diff --git a/doc/软件设计规格说明书-基于软件工厂的群智协作贡献评估系统.doc b/doc/软件设计规格说明书-基于软件工厂的群智协作贡献评估系统.doc new file mode 100644 index 0000000..21cdc38 Binary files /dev/null and b/doc/软件设计规格说明书-基于软件工厂的群智协作贡献评估系统.doc differ diff --git a/doc/软件需求构思及描述-基于软件工厂的群智协作价值评估系统.docx b/doc/软件需求构思及描述-基于软件工厂的群智协作价值评估系统.docx new file mode 100644 index 0000000..3e69773 Binary files /dev/null and b/doc/软件需求构思及描述-基于软件工厂的群智协作价值评估系统.docx differ diff --git a/doc/软件需求规格说明书-基于软件工厂的群智协作价值评估系统.docx b/doc/软件需求规格说明书-基于软件工厂的群智协作价值评估系统.docx index a789833..1bfcb9d 100644 Binary files a/doc/软件需求规格说明书-基于软件工厂的群智协作价值评估系统.docx and b/doc/软件需求规格说明书-基于软件工厂的群智协作价值评估系统.docx differ diff --git a/front/frontend/app.js b/front/frontend/app.js index feaf080..151ff24 100644 --- a/front/frontend/app.js +++ b/front/frontend/app.js @@ -4,6 +4,14 @@ class OpenRankDashboard { this.currentTab = 'overview'; this.charts = {}; this.mockData = this.generateMockData(); + // 新增:模式状态与项目模式缓存 + this.mode = 'global'; // 'global' | 'project' + this.projectState = { + list: [], // {fullName, approxScore, contributorsCount} + current: null, // fullName + approxSnapshots: {}, // key -> snapshot + inFlightFull: new Set(), // 追踪正在进行的 full 计算 + }; this.init(); } @@ -14,17 +22,27 @@ class OpenRankDashboard { this.initCharts(); this.updateLastUpdateTime(); this.setupTabNavigation(); + this.setupModeSwitch(); // 默认显示开发者分析数据 this.displayDeveloperAnalysis(this.mockData.developers); + this.hydrateFromURL(); } // 设置事件监听器 setupEventListeners() { // 计算按钮点击事件 document.getElementById('calculate-btn').addEventListener('click', () => { - this.calculateOpenRank(); + this.openCalcModal(); }); + // 项目搜索 + const projectSearch = document.getElementById('project-search'); + if (projectSearch) { + projectSearch.addEventListener('input', (e) => { + this.renderProjectList(e.target.value.trim()); + }); + } + // 搜索功能 const searchInput = document.getElementById('developer-search'); searchInput.addEventListener('input', (e) => { @@ -36,10 +54,383 @@ class OpenRankDashboard { this.filterRepositories(e.target.value); }); + // Delegated handler for repo card action buttons (reliable for dynamic content) + const repoGrid = document.getElementById('repo-grid'); + if (repoGrid) { + repoGrid.addEventListener('click', (ev) => { + const btn = ev.target.closest && ev.target.closest('.btn-view-details, .btn-view-contrib'); + if (!btn) return; + const repoName = btn.getAttribute('data-repo-name') || ''; + const owner = btn.getAttribute('data-repo-owner') || btn.closest('.repo-card')?.getAttribute('data-owner') || ''; + console.log('repoGrid click handler triggered for', { repoName, owner }); + if (btn.classList.contains('btn-view-details')) { + ev.preventDefault(); + this.onViewRepoDetails(repoName); + } else if (btn.classList.contains('btn-view-contrib')) { + ev.preventDefault(); + this.onViewRepoContributions(repoName); + } + }); + } + // 配置表单变化 this.setupConfigListeners(); } + // 模式切换按钮逻辑 + setupModeSwitch() { + const container = document.getElementById('mode-switch'); + if (!container) return; + container.addEventListener('click', (e) => { + const btn = e.target.closest('.mode-btn'); + if (!btn) return; + const targetMode = btn.getAttribute('data-mode'); + if (targetMode && targetMode !== this.mode) { + this.switchMode(targetMode); + } + }); + } + + switchMode(mode) { + this.mode = mode; + // 更新按钮样式 + document.querySelectorAll('.mode-btn').forEach(b => { + b.classList.toggle('active', b.getAttribute('data-mode') === mode); + }); + // 切换根容器的显示 + const globalRoot = document.getElementById('global-root'); + const projectRoot = document.getElementById('project-mode-root'); + if (mode === 'global') { + globalRoot.classList.remove('hidden'); + projectRoot.classList.add('hidden'); + document.body.classList.remove('project-mode-active'); + } else { + globalRoot.classList.add('hidden'); + projectRoot.classList.remove('hidden'); + document.body.classList.add('project-mode-active'); + // 首次进入时构建项目列表 + if (!this.projectState.list.length) { + this.buildProjectListFromGlobal(); + } + } + this.pushURLState(); + } + + // URL 同步:写入 ?mode=...&repo=... + pushURLState() { + const params = new URLSearchParams(window.location.search); + params.set('mode', this.mode); + if (this.mode === 'project' && this.projectState.current) params.set('repo', this.projectState.current); + else params.delete('repo'); + const newUrl = `${window.location.pathname}?${params.toString()}`; + window.history.replaceState({}, '', newUrl); + } + + hydrateFromURL() { + const params = new URLSearchParams(window.location.search); + const mode = params.get('mode'); + const repo = params.get('repo'); + if (mode === 'project') { + this.switchMode('project'); + if (repo) { + // 等待仓库列表加载后再选择 + const wait = setInterval(() => { + if (this.projectState.list.length) { + clearInterval(wait); + this.projectState.current = repo; + this.renderProjectList(); + this.renderApproxProject(repo); + } + }, 200); + setTimeout(()=>clearInterval(wait), 8000); + } + } + } + + buildProjectListFromGlobal() { + // 从后端获取真实仓库列表(失败则 fallback 到 mock) + const params = new URLSearchParams({ page: '1', size: '100', sort: 'stars', order: 'desc' }); + fetch('http://localhost:4001/api/repos?' + params.toString()) + .then(r => r.ok ? r.json() : Promise.reject(r.statusText)) + .then(data => { + const rowsRaw = (data.repos || []).map(r => ({ + fullName: r.full_name || r.fullName || r.name, + approxScore: r.stars || r.forks || 0, // 用 stars / forks 简单排序 + contributorsCount: r.contributors || 0 + })); + // 去重(fullName 唯一) + const seen = new Set(); + const rows = rowsRaw.filter(r => { if (seen.has(r.fullName)) return false; seen.add(r.fullName); return true; }); + if (rows.length) { + this.projectState.list = rows.sort((a,b)=> b.approxScore - a.approxScore); + this.renderProjectList(); + } else { + throw new Error('empty repo list'); + } + }) + .catch(() => { + const reposRaw = (this.mockData.repositories || []).map(r => ({ + fullName: r.name, + approxScore: r.openrank || 0, + contributorsCount: r.contributors || 0 + })); + const seen2 = new Set(); + this.projectState.list = reposRaw.filter(r=>{ if(seen2.has(r.fullName)) return false; seen2.add(r.fullName); return true; }); + this.renderProjectList(); + this.showNotification('使用 mock 仓库列表(后端 /api/repos 不可用)', 'info'); + }); + } + + renderProjectList(keyword = '') { + const ul = document.getElementById('project-list'); + if (!ul) return; + const lower = keyword.toLowerCase(); + const filtered = this.projectState.list.filter(p => !keyword || p.fullName.toLowerCase().includes(lower)); + if (!filtered.length) { + ul.innerHTML = '
  • 无匹配项目
  • '; + return; + } + ul.innerHTML = filtered.map(p => { + const active = this.projectState.current === p.fullName; + return `
  • + ${p.fullName} + ${p.approxScore.toFixed(1)} +
  • `; + }).join(''); + ul.querySelectorAll('li[data-project]').forEach(li => { + li.addEventListener('click', () => { + const fullName = li.getAttribute('data-project'); + this.projectState.current = fullName; + this.renderProjectList(keyword); // 重新渲染高亮 + this.renderApproxProject(fullName); + this.pushURLState(); + }); + }); + } + + // 生成近似项目级快照(基于全局数据局部化) + renderApproxProject(fullName, days) { + // 已缓存 + if (this.projectState.approxSnapshots[fullName] && !days) { + this.mountProjectView(this.projectState.approxSnapshots[fullName]); + // 若还没有 full 结果且未在进行,自动尝试触发 + const approxSnap = this.projectState.approxSnapshots[fullName]; + const hasFull = approxSnap && approxSnap.meta && approxSnap.meta.strategy === 'full'; + if (!hasFull && !this.projectState.inFlightFull.has(fullName)) { + this.autoTriggerFull(fullName, approxSnap.window && approxSnap.window.days); + } + return; + } + // 后端 approximate + const d = days && days>0 ? days : 30; + fetch(`http://localhost:4001/api/project/${encodeURIComponent(fullName.split('/')[0]||'')}/${encodeURIComponent(fullName.split('/')[1]||'')}/overview?strategy=approx&days=${d}`) + .then(r => r.ok ? r.json() : Promise.reject(r.statusText)) + .then(snap => { + const snapshot = { + repo: snap.repo, + window: snap.window, + generatedAt: snap.generatedAt, + contributors: snap.contributors || [], + activityBreakdown: snap.activityBreakdown || { issues:0, prs:0, comments:0 }, + timeseries: snap.timeseries || [], + meta: { ...(snap.meta||{}), approx: true } + }; + this.projectState.approxSnapshots[fullName] = snapshot; + this.mountProjectView(snapshot); + // 自动触发 full(首次) + if (!this.projectState.inFlightFull.has(fullName)) { + this.autoTriggerFull(fullName, snapshot.window && snapshot.window.days); + } + }) + .catch(() => { + // fallback 原 mock 逻辑 + const scale = 0.9; + const baseDevelopers = (this.mockData.developers || []).slice(0, 30); + const contributors = baseDevelopers.map(d => ({ + login: d.name, + openrankProject: d.openrank * scale * (0.5 + Math.random() * 0.5), + channels: { issues: d.activity.issues, prs: d.activity.prs, comments: d.activity.comments } + })).sort((a,b)=> b.openrankProject - a.openrankProject); + const snapshot = { + repo: fullName, + window: { start: '-', end: '-', days: d }, + generatedAt: new Date().toISOString(), + contributors, + activityBreakdown: { issues: contributors.reduce((s,c)=>s+c.channels.issues,0), prs: contributors.reduce((s,c)=>s+c.channels.prs,0), comments: contributors.reduce((s,c)=>s+c.channels.comments,0) }, + timeseries: [], + meta: { source: 'mock-fallback', approx: true } + }; + this.projectState.approxSnapshots[fullName] = snapshot; + this.mountProjectView(snapshot); + this.showNotification('后端 approximate 获取失败,使用本地近似方案', 'info'); + }); + } + + mountProjectView(snapshot) { + const container = document.getElementById('project-content'); + if (!container) return; + const { repo, contributors, activityBreakdown, meta, window } = snapshot; + const top = contributors.slice(0, 15); + const tableRows = top.map((c,idx) => ` + ${idx+1} + ${c.login} + ${c.channels.issues} + ${c.channels.prs} + ${c.channels.comments} + ${c.openrankProject.toFixed(2)} + `).join(''); + const totalIssues = contributors.reduce((s,c)=>s+(c.channels.issues||0),0); + const totalPRs = contributors.reduce((s,c)=>s+(c.channels.prs||0),0); + const totalComments = contributors.reduce((s,c)=>s+(c.channels.comments||0),0); + const distinctContribs = contributors.length; + const hasTS = !meta.approx && Array.isArray(snapshot.timeseries) && snapshot.timeseries.length > 0; + const winDays = window?.days || Math.round((new Date(window?.end||Date.now()) - new Date(window?.start||Date.now()-30*86400000))/86400000); + container.innerHTML = ` +
    +
    +

    ${repo}

    +
    + 窗口: ${winDays} 天 + 贡献者: ${distinctContribs} + Issues: ${totalIssues} + PRs: ${totalPRs} + Comments: ${totalComments} +
    +
    +
    + ${meta.approx ? '近似估算':'正式计算'} + +
    +
    +
    +
    +

    贡献者排名 Top 15

    +
    + + + ${tableRows} +
    #用户IssuesPRsCommentsProj-OR
    +
    +
    +
    +

    活动占比 (issues / prs / comments)

    +
    +
    +
    +

    结构指标

    + +
    +
    +
    +

    时间序列 ${meta.approx ? '(正式计算后显示)' : ''}

    +
    +
    + ${meta.approx ? '暂未计算(正式计算后展示)' : (hasTS ? '' : '窗口内无活动数据')} +
    + +
    +
    `; + + // 绑定正式计算按钮(当前占位) + const calcBtn = document.getElementById('trigger-full-project'); + if (calcBtn) { + calcBtn.addEventListener('click', () => { + this.triggerFullProjectCalculation(repo); + }); + } + + setTimeout(()=>{ + // 活动占比 + try { + const ctx = document.getElementById('project-activity-pie').getContext('2d'); + if (this.charts.projectActivityPie) this.charts.projectActivityPie.destroy(); + this.charts.projectActivityPie = new Chart(ctx, { type:'doughnut', data:{ labels:['Issues','PRs','Comments'], datasets:[{ data:[activityBreakdown.issues,activityBreakdown.prs,activityBreakdown.comments], backgroundColor:['#00d4ff','#00ff88','#ffd700'] }] }, options:{ responsive:true, maintainAspectRatio:false, plugins:{ legend:{ position:'bottom', labels:{ color:'#fff' } } } } }); + } catch(e){ console.warn('project activity pie error', e); } + // 时间序列(仅 full) + try { + if (!meta.approx && hasTS) { + const tsCtx = document.getElementById('project-timeseries-canvas').getContext('2d'); + const labels = snapshot.timeseries.map(p=>p.period); + const issues = snapshot.timeseries.map(p=>p.issues||0); + const prs = snapshot.timeseries.map(p=>p.prs||0); + const comments = snapshot.timeseries.map(p=>p.comments||0); + const merged = snapshot.timeseries.map(p=>p.merged||0); + if (this.charts.projectTimeseries) this.charts.projectTimeseries.destroy(); + this.charts.projectTimeseries = new Chart(tsCtx, { type:'line', data:{ labels, datasets:[ + { label:'Issues', data:issues, borderColor:'#00d4ff', backgroundColor:'rgba(0,212,255,.15)', tension:.25 }, + { label:'PRs', data:prs, borderColor:'#00ff88', backgroundColor:'rgba(0,255,136,.15)', tension:.25 }, + { label:'Comments', data:comments, borderColor:'#ffd700', backgroundColor:'rgba(255,215,0,.10)', tension:.25 }, + { label:'Merged', data:merged, borderColor:'#ff7af0', backgroundColor:'rgba(255,122,240,.12)', borderDash:[4,3], tension:.25 } + ]}, options:{ responsive:true, maintainAspectRatio:false, plugins:{ legend:{ labels:{ color:'#fff' } } }, scales:{ x:{ ticks:{ color:'#bbb' } }, y:{ ticks:{ color:'#bbb' }, beginAtZero:true } } } }); + const cvs = document.getElementById('project-timeseries-canvas'); + if (cvs) cvs.style.opacity = '1'; + } + } catch(tsErr){ console.warn('project timeseries chart error', tsErr); } + },50); + } + + // 触发正式项目计算并轮询任务 + triggerFullProjectCalculation(fullName) { + if (!fullName || fullName.indexOf('/') === -1) return; + const [owner, repo] = fullName.split('/'); + this.showNotification('已提交正式项目级计算任务', 'success'); + fetch(`http://localhost:4001/api/project/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/calculate`, { method: 'POST', headers:{ 'Content-Type':'application/json' }, body: JSON.stringify({}) }) + .then(r => r.ok ? r.json() : Promise.reject(r.statusText)) + .then(task => this.pollTask(task.taskId, fullName)) + .catch(err => this.showNotification('触发计算失败: '+err, 'negative')); + } + + autoTriggerFull(fullName, days) { + if (!fullName || fullName.indexOf('/') === -1) return; + const [owner, repo] = fullName.split('/'); + if (this.projectState.inFlightFull.has(fullName)) return; + this.projectState.inFlightFull.add(fullName); + const payload = days ? { days } : {}; + fetch(`http://localhost:4001/api/project/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/calculate`, { method: 'POST', headers:{ 'Content-Type':'application/json' }, body: JSON.stringify(payload) }) + .then(r => r.ok ? r.json() : Promise.reject(r.statusText)) + .then(task => this.pollTask(task.taskId, fullName, true)) + .catch(err => { this.projectState.inFlightFull.delete(fullName); console.warn('auto full calc failed', err); }); + } + + pollTask(taskId, fullName, silent) { + if (!taskId) return; + const interval = 1500; + const tick = () => { + fetch(`http://localhost:4001/api/tasks/${taskId}`) + .then(r => r.ok ? r.json() : Promise.reject(r.statusText)) + .then(task => { + if (task.status === 'done') { + if (!silent) this.showNotification('项目级正式计算完成', 'success'); + this.projectState.inFlightFull.delete(fullName); + if (task.result) { + const snap = { ...task.result, meta: { ...(task.result.meta||{}), approx:false } }; + // 缓存 full 快照(可与 approx 并存) + this.projectState.approxSnapshots[fullName] = snap; // 简化:复用存储键 + this.mountProjectView(snap); + this.pushURLState(); + } + } else if (task.status === 'error') { + this.projectState.inFlightFull.delete(fullName); + if (!silent) this.showNotification('项目级计算失败: '+ task.error, 'negative'); + } else { + // 更新按钮或显示进度(简单:修改按钮文本) + const btn = document.getElementById('trigger-full-project'); + if (btn) btn.textContent = `计算中… ${task.progress || 0}%`; + setTimeout(tick, interval); + } + }) + .catch(() => setTimeout(tick, interval)); + }; + setTimeout(tick, interval); + } + // 设置标签页导航 setupTabNavigation() { const navButtons = document.querySelectorAll('.nav-btn'); @@ -73,6 +464,132 @@ class OpenRankDashboard { } } + // 点击查看仓库详情 + // 点击查看仓库详情(现在调用后端详情接口并打开 modal) + // helper: parse strings like 'owner/repo' or just 'repo' + parseOwnerRepo(str) { + if (!str) return null; + const parts = String(str).split('/'); + if (parts.length >= 2) { + return { owner: parts[0], repo: parts.slice(1).join('/') }; + } + return null; + } + + async onViewRepoDetails(repoName) { + // If repoName contains owner (owner/repo), split it + const parsed = this.parseOwnerRepo(repoName); + let owner = ''; + let repo = repoName; + if (parsed) { + owner = parsed.owner; + repo = parsed.repo; + } else { + // Try to get owner from DOM attribute on the card/button + try { + const grid = document.getElementById('repo-grid'); + const card = Array.from(grid.querySelectorAll('.repo-card')).find(el => el.textContent && el.textContent.indexOf(repoName) !== -1); + if (card && card.getAttribute('data-owner')) owner = card.getAttribute('data-owner'); + } catch (_) { /* ignore */ } + if (!owner) owner = prompt('请输入仓库 owner(例如 FISCO-BCOS):', 'FISCO-BCOS') || 'FISCO-BCOS'; + } + + // Open details modal with separate owner and repo + this.showRepoDetails(owner, repo); + } + + // 点击查看仓库贡献分析 + async onViewRepoContributions(repoName) { + // 切换到 developers tab where contributions can be shown + this.switchTab('developers'); + + // Determine owner and repo, support repoName like 'owner/repo' + let owner = null; + let repo = repoName; + const parsed = this.parseOwnerRepo(repoName); + if (parsed) { + owner = parsed.owner; + repo = parsed.repo; + } else { + try { + const grid = document.getElementById('repo-grid'); + const card = Array.from(grid.querySelectorAll('.repo-card')).find(el => el.textContent && el.textContent.indexOf(repoName) !== -1); + if (card && card.getAttribute('data-owner')) owner = card.getAttribute('data-owner'); + } catch (_) { /* ignore */ } + if (!owner) { + owner = prompt('请输入仓库 owner(用于查询仓库级贡献者),或留空使用默认 FISCO-BCOS:', 'FISCO-BCOS') || 'FISCO-BCOS'; + } + } + + // Prefer calling backend details endpoint (DB-backed) to get robust contributor stats + try { + const params = new URLSearchParams({ start: new Date(Date.now() - 1000 * 60 * 60 * 24 * 30).toISOString(), end: new Date().toISOString(), granularity: 'day', useCache: '1' }); + const resp = await fetch(`http://localhost:4001/api/repo/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/details?${params.toString()}`); + if (resp.ok) { + const body = await resp.json(); + const contributors = (body.contributors || []).map((c) => ({ + id: c.id || null, + name: c.name || (c.actor_login || 'unknown'), + openrank: Number(c.openrank || c.openRank || 0) || 0, + change: 0, + activity: { + issues: Number((c.activity && (c.activity.issues !== undefined ? c.activity.issues : c.issues)) || 0) || 0, + prs: Number((c.activity && (c.activity.prs !== undefined ? c.activity.prs : c.prs)) || 0) || 0, + comments: Number((c.activity && (c.activity.comments !== undefined ? c.activity.comments : c.comments)) || 0) || 0 + } + })); + // 如果 openrank 都是 0,尝试与当前缓存的 global developers 匹配(同名)进行补填 + const allZero = contributors.every(c => !c.openrank); + if (allZero && this.mockData && Array.isArray(this.mockData.developers)) { + const devMap = new Map(this.mockData.developers.map(d => [String(d.name).toLowerCase(), d.openrank])); + contributors.forEach(c => { + const v = devMap.get(String(c.name).toLowerCase()); + if (typeof v === 'number' && v > 0) c.openrank = v; + }); + } + if (contributors.length === 0) { + this.showNotification(`未在 DB 中找到 ${owner}/${repoName} 的贡献者数据,显示全局开发者`, 'info'); + this.displayDeveloperAnalysis(this.mockData.developers); + return; + } + this.displayDeveloperAnalysis(contributors); + this.showNotification(`显示 ${owner}/${repoName} 的贡献者分析 (${contributors.length} 人)`, 'success'); + return; + } + } catch (e) { + console.warn('Failed to fetch repo details, falling back to local repoContributors if available', e); + } + + // Fallback: use in-memory repoContributors from previous calculate call (normalize fields) + if (this.repoContributors && (this.repoContributors[repoName] || this.repoContributors[`${owner}/${repoName}`])) { + const key = this.repoContributors[repoName] ? repoName : `${owner}/${repoName}`; + const arr = this.repoContributors[key] || []; + const contributors = arr.map(c => ({ + id: c.id || null, + name: c.name || c.actor_login || 'unknown', + openrank: Number(c.openrank || 0) || 0, + change: 0, + activity: { + issues: Number((c.activity && (c.activity.issues !== undefined ? c.activity.issues : c.issues)) || 0) || 0, + prs: Number((c.activity && (c.activity.prs !== undefined ? c.activity.prs : c.prs)) || 0) || 0, + comments: Number((c.activity && (c.activity.comments !== undefined ? c.activity.comments : c.comments)) || 0) || 0 + } + })); + if (contributors.length === 0) { + this.showNotification(`仓库 ${repoName} 没有贡献者数据,显示全局开发者`, 'info'); + this.displayDeveloperAnalysis(this.mockData.developers); + return; + } + this.displayDeveloperAnalysis(contributors); + this.showNotification(`显示 ${repoName} 的贡献者分析 (${contributors.length} 人)`, 'success'); + return; + } + + // 最后回退:显示全局开发者 + this.showNotification(`未找到 ${repoName} 的仓库级数据,显示全局开发者`, 'info'); + this.displayDeveloperAnalysis(this.mockData.developers); + } + // 设置配置监听器 setupConfigListeners() { const configInputs = document.querySelectorAll('.setting-item input'); @@ -293,8 +810,8 @@ class OpenRankDashboard { const repoGrid = document.getElementById('repo-grid'); const sortedRepos = [...this.mockData.repositories].sort((a, b) => b.openrank - a.openrank); - repoGrid.innerHTML = sortedRepos.map((repo, index) => ` -
    + repoGrid.innerHTML = sortedRepos.map((repo, index) => ` +
    @@ -349,17 +866,24 @@ class OpenRankDashboard {
    - -
    `).join(''); + + /* + // Previously attached per-button handlers here; now using delegated handler added in setupEventListeners + setTimeout(() => { + // noop + }, 0); + */ } // 初始化图表 @@ -811,10 +1335,14 @@ class OpenRankDashboard { // 创建开发者卡片 createDeveloperCard(developer) { - const activityTotal = developer.activity.issues + developer.activity.prs + developer.activity.comments; - const issuesPercent = activityTotal > 0 ? (developer.activity.issues / activityTotal * 100).toFixed(1) : 0; - const prsPercent = activityTotal > 0 ? (developer.activity.prs / activityTotal * 100).toFixed(1) : 0; - const commentsPercent = activityTotal > 0 ? (developer.activity.comments / activityTotal * 100).toFixed(1) : 0; + // normalize activity fields to avoid undefined/null + const issuesCount = Number((developer.activity && developer.activity.issues) || developer.issues || 0) || 0; + const prsCount = Number((developer.activity && developer.activity.prs) || developer.prs || 0) || 0; + const commentsCount = Number((developer.activity && developer.activity.comments) || developer.comments || 0) || 0; + const activityTotal = issuesCount + prsCount + commentsCount; + const issuesPercent = activityTotal > 0 ? (issuesCount / activityTotal * 100).toFixed(1) : 0; + const prsPercent = activityTotal > 0 ? (prsCount / activityTotal * 100).toFixed(1) : 0; + const commentsPercent = activityTotal > 0 ? (commentsCount / activityTotal * 100).toFixed(1) : 0; return `
    @@ -832,21 +1360,21 @@ class OpenRankDashboard {
    Issues - ${developer.activity.issues} + ${issuesCount}
    PRs - ${developer.activity.prs} + ${prsCount}
    Comments - ${developer.activity.comments} + ${commentsCount}
    @@ -1007,16 +1535,156 @@ class OpenRankDashboard { // 计算 OpenRank(模拟) calculateOpenRank() { - this.showLoading(); - - // 模拟计算过程 - setTimeout(() => { - this.hideLoading(); - this.refreshData(); - this.showNotification('OpenRank 计算完成!', 'success'); - }, 2000); + const ownerInput = document.getElementById('calc-owner'); + const repoInput = document.getElementById('calc-repo'); + const owner = ownerInput ? ownerInput.value.trim() : ''; + const repo = repoInput ? repoInput.value.trim() : ''; + const startInput = document.getElementById('calc-start'); + const endInput = document.getElementById('calc-end'); + const startVal = startInput && startInput.value ? startInput.value : ''; + const endVal = endInput && endInput.value ? endInput.value : ''; + const useExplicitDates = startVal && endVal; + if (!owner || !repo) { + const btn = document.getElementById('calculate-btn'); + if (btn) { + const old = btn.dataset.originalText || btn.textContent; + btn.dataset.originalText = old; + btn.textContent = '请输入 owner 和 repo 再计算'; + btn.disabled = true; + setTimeout(()=>{ if (btn){ btn.textContent = old; btn.disabled = false; } }, 1800); + } + this.showNotification('请输入 owner 和 repo 再计算', 'negative'); + return; + } + this.showLoading(); + const payload = { owner, repo, topNUsers: 50, topNRepos: 20, useReal: true }; + if (useExplicitDates) { + payload.startDate = new Date(startVal + 'T00:00:00Z').toISOString(); + const endDateObj = new Date(endVal + 'T00:00:00Z'); + endDateObj.setUTCDate(endDateObj.getUTCDate() + 1); + endDateObj.setUTCSeconds(endDateObj.getUTCSeconds() - 1); + payload.endDate = endDateObj.toISOString(); + } else { + // 默认最近 30 天 + payload.days = 30; + } + fetch('http://localhost:4001/api/calculate', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(payload) + }) + .then(async resp => { + if (!resp.ok) { + const err = await resp.json().catch(()=>({})); + throw new Error(err.error || resp.statusText || '计算失败'); + } + return resp.json(); + }) + .then(data => { + if (data && data.results) { + const r = data.results; + this.mockData.developers = (r.users || []).map(u => ({ id: u.id, name: u.name, openrank: u.openrank||0, change: u.change||0, activity: u.activity || { issues:0, prs:0, comments:0 } })); + this.mockData.repositories = (r.repos || []).map(p => ({ id: p.id, name: p.name, openrank: p.openrank||0, stars: p.stars||0, forks: p.forks||0, contributors: p.contributors||0 })); + if (Array.isArray(r.openrankDistribution) && r.openrankDistribution.length) this.mockData.openrankDistribution = r.openrankDistribution; + if (r.activityDistribution && Object.keys(r.activityDistribution).length) this.mockData.activityDistribution = r.activityDistribution; + this.repoContributors = r.repoContributors || {}; + const sumActivity = (this.mockData.developers||[]).reduce((s,d)=> s + (d.activity.issues||0)+(d.activity.prs||0)+(d.activity.comments||0),0); + if (sumActivity === 0) { + this.showNotification('警告:本次计算活动总量为 0,可能没有抓到真实数据或窗口内为空', 'negative'); + } + } + this.hideLoading(); + this.loadMockData(); + try { + if (this.charts.distribution) { + const labels = (this.mockData.openrankDistribution || []).map(d=>d.range); + const counts = (this.mockData.openrankDistribution || []).map(d=>d.count); + this.charts.distribution.data.labels = labels; + if (this.charts.distribution.data.datasets && this.charts.distribution.data.datasets[0]) { + this.charts.distribution.data.datasets[0].data = counts; + } + this.charts.distribution.update(); + } + if (this.charts.activity && this.mockData.activityDistribution) { + this.charts.activity.data.datasets[0].data = [ + this.mockData.activityDistribution.issueComment, + this.mockData.activityDistribution.openIssue, + this.mockData.activityDistribution.openPull, + this.mockData.activityDistribution.reviewComment, + this.mockData.activityDistribution.mergedPull + ]; + this.charts.activity.update(); + } + } catch (e) { console.warn('chart update failed', e); } + if (this.mode === 'project') { + this.projectState.list = []; // clear to force reload + this.buildProjectListFromGlobal(); + } + const winDays = (data && data.window && data.window.days) ? data.window.days : (payload.days|| (useExplicitDates ? Math.round((new Date(payload.endDate)-new Date(payload.startDate))/86400000) : 30)); + const winLabel = useExplicitDates ? `${payload.startDate.slice(0,10)} ~ ${payload.endDate.slice(0,10)} (${winDays}天)` : `最近 ${winDays} 天`; + this.showNotification('OpenRank 计算完成!窗口: ' + winLabel, 'success'); + this.closeCalcModal(); + // 自动切换到项目模式并高亮新仓库 + this.switchMode('project'); + const fullName = owner + '/' + repo; + this.projectState.current = fullName; + // 延迟等待列表刷新 + setTimeout(()=>{ + this.renderProjectList(); + if (!this.projectState.approxSnapshots[fullName]) this.renderApproxProject(fullName, winDays); + }, 600); + }) + .catch(err => { + console.error('计算失败', err); + this.hideLoading(); + this.showNotification('OpenRank 计算失败: ' + (err.message || err), 'negative'); + }); } + openCalcModal() { + const modal = document.getElementById('calc-modal'); + if (!modal) return; + modal.classList.add('open'); + const ownerInput = document.getElementById('calc-owner'); + if (ownerInput) ownerInput.focus(); + // bind close buttons + modal.querySelectorAll('[data-close-calc]').forEach(btn => btn.addEventListener('click', () => this.closeCalcModal(), { once: true })); + // form submit + const form = document.getElementById('calc-form'); + if (form) { + form.addEventListener('submit', (e) => { + e.preventDefault(); + this.calculateOpenRank(); + }, { once: true }); + } + // quick range buttons + const startInput = document.getElementById('calc-start'); + const endInput = document.getElementById('calc-end'); + const quickBtns = modal.querySelectorAll('.quick-range-btn'); + if (quickBtns && startInput && endInput) { + quickBtns.forEach(btn => { + btn.addEventListener('click', () => { + const days = parseInt(btn.getAttribute('data-range')||'0', 10); + if (!days || days <= 0) return; + // remove previous active + quickBtns.forEach(b=>b.classList.remove('active')); + btn.classList.add('active'); + const today = new Date(); + const endDate = new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate())); + const startDate = new Date(endDate.getTime() - (days - 1) * 86400000); + const fmt = d => d.toISOString().slice(0,10); + startInput.value = fmt(startDate); + endInput.value = fmt(endDate); + }, { once: true }); // once per modal open + }); + } + } + + closeCalcModal() { + const modal = document.getElementById('calc-modal'); + if (modal) modal.classList.remove('open'); + } + // 显示加载动画 showLoading() { document.getElementById('loading-overlay').classList.add('active'); @@ -1076,6 +1744,178 @@ class OpenRankDashboard { }, 3000); } + // Fetch and show repo details modal + async showRepoDetails(owner, repoName) { + // create modal container if not exist + let modal = document.getElementById('repo-detail-modal'); + if (!modal) { + modal = document.createElement('div'); + modal.id = 'repo-detail-modal'; + modal.className = 'modal'; + modal.innerHTML = ` + + `; + document.body.appendChild(modal); + modal.querySelector('.modal-close').addEventListener('click', () => modal.classList.remove('open')); + } + + // show loading state + const title = modal.querySelector('#repo-detail-title'); + const summary = modal.querySelector('#repo-detail-summary'); + const contribContainer = modal.querySelector('#repo-detail-contributors'); + const canvas = modal.querySelector('#repo-detail-timeseries'); + title.textContent = `仓库:${owner}/${repoName}`; + summary.innerHTML = `

    加载中…

    `; + contribContainer.innerHTML = ''; + + modal.classList.add('open'); + + try { + const params = new URLSearchParams({ start: new Date(Date.now() - 1000 * 60 * 60 * 24 * 30).toISOString(), end: new Date().toISOString(), granularity: 'day', useCache: '1' }); + // ensure owner and repo are separate path segments (do not include a slash in repoName) + const resp = await fetch(`http://localhost:4001/api/repo/${encodeURIComponent(owner)}/${encodeURIComponent(repoName)}/details?${params.toString()}`); + if (!resp.ok) { + const err = await resp.json().catch(()=>({})); + throw new Error(err.error || resp.statusText || '无法获取仓库详情'); + } + const data = await resp.json(); + // repository window summary + const winStart = data.window && data.window.start ? data.window.start : ''; + const winEnd = data.window && data.window.end ? data.window.end : ''; + // repo metadata (be defensive against different field names) + const repoMeta = data.repo || data.repository || {}; + const fullName = repoMeta.full_name || repoMeta.fullName || `${owner}/${repoName}`; + const stars = repoMeta.stars || repoMeta.stargazers_count || repoMeta.stargazers || 0; + const forks = repoMeta.forks || repoMeta.forks_count || 0; + const repoDescription = repoMeta.description || ''; + + summary.innerHTML = ` +
    +
    +
    +

    ${fullName}

    +
    ${repoDescription}
    +
    时间窗口: ${winStart} — ${winEnd}
    +
    +
    +
    +
    Stars
    +
    ${formatNumber(stars)}
    +
    +
    +
    Forks
    +
    ${formatNumber(forks)}
    +
    +
    +
    Contributors
    +
    ${(data.contributors && data.contributors.length) || '-'}
    +
    +
    +
    +
    + `; + + // Build a compact contributors section (top 10) and an activity breakdown area + const contributors = (data.contributors || []).slice(0, 10); + if (!contributors || contributors.length === 0) { + contribContainer.innerHTML = `

    未找到贡献者数据。

    `; + } else { + const rows = contributors.map(c => ` + + ${c.name || c.actor_login || 'unknown'} + ${(c.activity && (c.activity.issues||0)) || (c.issues||0)} + ${(c.activity && (c.activity.prs||0)) || (c.prs||0)} + ${(c.activity && (c.activity.comments||0)) || (c.comments||0)} + ${c.merged || 0} + + `).join(''); + contribContainer.innerHTML = ` +

    Top 贡献者(最多 10 人)

    + + + ${rows} +
    名称IssuesPRsCommentsMerged
    + `; + } + + // compute aggregated activity for breakdown (fallback to timeseries sums) + const ts = data.timeseries || []; + const labels = ts.map(p=>p.period); + const issuesData = ts.map(p=>p.issues || 0); + const prsData = ts.map(p=>p.prs || 0); + const mergedData = ts.map(p=>p.merged || 0); + const commentsData = ts.map(p=>p.comments || 0); + + const totalIssues = issuesData.reduce((a,b)=>a+b,0); + const totalPRs = prsData.reduce((a,b)=>a+b,0); + const totalMerged = mergedData.reduce((a,b)=>a+b,0); + const totalComments = commentsData.reduce((a,b)=>a+b,0); + + // activity breakdown canvas (insert above timeseries if not present) + let breakdownCanvas = modal.querySelector('#repo-activity-breakdown'); + if (!breakdownCanvas) { + const el = document.createElement('div'); + el.innerHTML = `
    +
    +

    活动占比

    +
    +
    +
    +

    时间序列

    +
    +
    +
    `; + // replace existing canvas area + canvas.parentElement.parentElement.insertBefore(el, canvas.parentElement); + // remove original single-canvas wrapper + canvas.parentElement.remove(); + } + + // cleanup existing chart instances + if (this.charts.repoTimeseries) { try { this.charts.repoTimeseries.destroy(); } catch(e){} } + if (this.charts.repoActivityBreakdown) { try { this.charts.repoActivityBreakdown.destroy(); } catch(e){} } + + // create breakdown chart + const breakdownCtx = (modal.querySelector('#repo-activity-breakdown') || document.getElementById('repo-activity-breakdown')).getContext('2d'); + this.charts.repoActivityBreakdown = new Chart(breakdownCtx, { + type: 'doughnut', + data: { + labels: ['Issues','PRs','Merged','Comments'], + datasets: [{ data: [totalIssues, totalPRs, totalMerged, totalComments], backgroundColor: ['#00d4ff','#00ff88','#ffd700','#ff7ab6'] }] + }, + options: { responsive:true, maintainAspectRatio:false, plugins:{legend:{position:'right', labels:{color:'#fff'}}} } + }); + + // create timeseries chart + const tsCanvas = modal.querySelector('#repo-detail-timeseries') || canvas; + const ctxTs = tsCanvas.getContext('2d'); + this.charts.repoTimeseries = new Chart(ctxTs, { + type: 'line', + data: { + labels, + datasets: [ + { label: 'Issues', data: issuesData, borderColor: '#00d4ff', fill:false }, + { label: 'PRs', data: prsData, borderColor: '#00ff88', fill:false }, + { label: 'Merged', data: mergedData, borderColor: '#ffd700', fill:false } + ] + }, + options: { responsive:true, maintainAspectRatio:false } + }); + + } catch (err) { + console.error('showRepoDetails error', err); + summary.innerHTML = `
    无法获取仓库详情: ${(err && err.message) || err}
    `; + } + } + // 更新最后更新时间 updateLastUpdateTime() { const now = new Date(); diff --git a/front/frontend/index.html b/front/frontend/index.html index 9ff4028..7669d94 100644 --- a/front/frontend/index.html +++ b/front/frontend/index.html @@ -7,6 +7,8 @@ + +
    @@ -16,6 +18,10 @@ OpenRank Analytics
    +
    + + +
    + + + diff --git a/front/frontend/node_modules/.bin/atob b/front/frontend/node_modules/.bin/atob new file mode 100644 index 0000000..bcdbad1 --- /dev/null +++ b/front/frontend/node_modules/.bin/atob @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../atob/bin/atob.js" "$@" +else + exec node "$basedir/../atob/bin/atob.js" "$@" +fi diff --git a/front/frontend/node_modules/.bin/atob.cmd b/front/frontend/node_modules/.bin/atob.cmd new file mode 100644 index 0000000..850a60b --- /dev/null +++ b/front/frontend/node_modules/.bin/atob.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\atob\bin\atob.js" %* diff --git a/front/frontend/node_modules/.bin/atob.ps1 b/front/frontend/node_modules/.bin/atob.ps1 new file mode 100644 index 0000000..4a9f311 --- /dev/null +++ b/front/frontend/node_modules/.bin/atob.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../atob/bin/atob.js" $args + } else { + & "$basedir/node$exe" "$basedir/../atob/bin/atob.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../atob/bin/atob.js" $args + } else { + & "node$exe" "$basedir/../atob/bin/atob.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/front/frontend/node_modules/.bin/live-server b/front/frontend/node_modules/.bin/live-server new file mode 100644 index 0000000..534fcce --- /dev/null +++ b/front/frontend/node_modules/.bin/live-server @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../live-server/live-server.js" "$@" +else + exec node "$basedir/../live-server/live-server.js" "$@" +fi diff --git a/front/frontend/node_modules/.bin/live-server.cmd b/front/frontend/node_modules/.bin/live-server.cmd new file mode 100644 index 0000000..f6e0d29 --- /dev/null +++ b/front/frontend/node_modules/.bin/live-server.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\live-server\live-server.js" %* diff --git a/front/frontend/node_modules/.bin/live-server.ps1 b/front/frontend/node_modules/.bin/live-server.ps1 new file mode 100644 index 0000000..5858d01 --- /dev/null +++ b/front/frontend/node_modules/.bin/live-server.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../live-server/live-server.js" $args + } else { + & "$basedir/node$exe" "$basedir/../live-server/live-server.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../live-server/live-server.js" $args + } else { + & "node$exe" "$basedir/../live-server/live-server.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/front/frontend/node_modules/.bin/uuid b/front/frontend/node_modules/.bin/uuid new file mode 100644 index 0000000..93e9edb --- /dev/null +++ b/front/frontend/node_modules/.bin/uuid @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../uuid/bin/uuid" "$@" +else + exec node "$basedir/../uuid/bin/uuid" "$@" +fi diff --git a/front/frontend/node_modules/.bin/uuid.cmd b/front/frontend/node_modules/.bin/uuid.cmd new file mode 100644 index 0000000..1156e27 --- /dev/null +++ b/front/frontend/node_modules/.bin/uuid.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\bin\uuid" %* diff --git a/front/frontend/node_modules/.bin/uuid.ps1 b/front/frontend/node_modules/.bin/uuid.ps1 new file mode 100644 index 0000000..9e6c24b --- /dev/null +++ b/front/frontend/node_modules/.bin/uuid.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../uuid/bin/uuid" $args + } else { + & "$basedir/node$exe" "$basedir/../uuid/bin/uuid" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../uuid/bin/uuid" $args + } else { + & "node$exe" "$basedir/../uuid/bin/uuid" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/front/frontend/node_modules/.package-lock.json b/front/frontend/node_modules/.package-lock.json new file mode 100644 index 0000000..9f2a83b --- /dev/null +++ b/front/frontend/node_modules/.package-lock.json @@ -0,0 +1,2344 @@ +{ + "name": "openrank-frontend", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/accepts/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/accepts/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "license": "ISC", + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "node_modules/anymatch/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/apache-crypt": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/apache-crypt/-/apache-crypt-1.2.6.tgz", + "integrity": "sha512-072WetlM4blL8PREJVeY+WHiUh1R5VNt2HfceGS8aKqttPHcmqE5pkKuXPz/ULmJOFkc8Hw3kfKl6vy7Qka6DA==", + "dev": true, + "license": "MIT", + "dependencies": { + "unix-crypt-td-js": "^1.1.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/apache-md5": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/apache-md5/-/apache-md5-1.1.8.tgz", + "integrity": "sha512-FCAJojipPn0bXjuEpjOOOMN8FZDkxfWWp4JGN9mifU2IhxvKyXZYqpzPHdnTSUpmPDy+tsslB6Z1g+Vg6nVbYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async-each": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.6.tgz", + "integrity": "sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT" + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true, + "license": "(MIT OR Apache-2.0)", + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "optionalDependencies": { + "fsevents": "^1.2.7" + } + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/component-emitter": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true, + "license": "MIT" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true, + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" + } + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "dev": true, + "license": "MIT", + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==", + "dev": true, + "license": "MIT" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-auth": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/http-auth/-/http-auth-3.1.3.tgz", + "integrity": "sha512-Jbx0+ejo2IOx+cRUYAGS1z6RGc6JfYUNkysZM4u4Sfk1uLlGv814F7/PIjQQAuThLdAWxb74JMGd5J8zex1VQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "apache-crypt": "^1.1.2", + "apache-md5": "^1.0.6", + "bcryptjs": "^2.3.0", + "uuid": "^3.0.0" + }, + "engines": { + "node": ">=4.6.1" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-errors/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.10.tgz", + "integrity": "sha512-Pysuw9XpUq5dVc/2SMHpuTY01RFl8fttgcyunjL7eEMhGM3cI4eOmiCycJDVCo/7O7ClfQD3SaI6ftDzqOXYMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz", + "integrity": "sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-data-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz", + "integrity": "sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/live-server": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/live-server/-/live-server-1.2.2.tgz", + "integrity": "sha512-t28HXLjITRGoMSrCOv4eZ88viHaBVIjKjdI5PO92Vxlu+twbk6aE0t7dVIaz6ZWkjPilYFV6OSdMYl9ybN2B4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^2.0.4", + "colors": "1.4.0", + "connect": "^3.6.6", + "cors": "latest", + "event-stream": "3.3.4", + "faye-websocket": "0.11.x", + "http-auth": "3.1.x", + "morgan": "^1.9.1", + "object-assign": "latest", + "opn": "latest", + "proxy-middleware": "latest", + "send": "latest", + "serve-index": "^1.9.1" + }, + "bin": { + "live-server": "live-server.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==", + "dev": true + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/morgan": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.1.tgz", + "integrity": "sha512-223dMRJtI/l25dJKWpgij2cMtywuG/WiUKXdvwfbhGKBhy1puASqXwFzmWZ7+K73vUPoR7SS2Qz2cI/g9MKw0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.1.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", + "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/opn": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-6.0.0.tgz", + "integrity": "sha512-I9PKfIZC+e4RXZ/qr1RhgyCnGgYX0UEIlXgWnCOVACIvFgaC9rz6Won7xbdhoHrd8IIhV7YEpHjreNUNkqCGkQ==", + "deprecated": "The package has been renamed to `open`", + "dev": true, + "license": "MIT", + "dependencies": { + "is-wsl": "^1.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==", + "dev": true, + "license": [ + "MIT", + "Apache2" + ], + "dependencies": { + "through": "~2.3" + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/proxy-middleware": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/proxy-middleware/-/proxy-middleware-0.15.0.tgz", + "integrity": "sha512-EGCG8SeoIRVMhsqHQUdDigB2i7qU7fCsWASwn54+nPutYO8n4q6EiwMzyfWlC+dzRFExP+kvcnDFdBDHoZBU7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", + "dev": true, + "license": "ISC" + }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "deprecated": "https://github.com/lydell/resolve-url#deprecated", + "dev": true, + "license": "MIT" + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/send": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", + "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.5", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "mime-types": "^3.0.1", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/send/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/send/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/send/node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-index/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true, + "license": "ISC" + }, + "node_modules/serve-index/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "license": "ISC" + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "license": "MIT", + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dev": true, + "license": "MIT", + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated", + "dev": true, + "license": "MIT" + }, + "node_modules/split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "through": "2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexer": "~0.1.1" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unix-crypt-td-js": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/unix-crypt-td-js/-/unix-crypt-td-js-1.1.4.tgz", + "integrity": "sha512-8rMeVYWSIyccIJscb9NdCfZKSRBKYTeVnwmiRYT2ulE3qd1RaDQ0xQDP+rI3ccIWbhu/zuo5cgN8z73belNZgw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "deprecated": "Please see https://github.com/lydell/urix#deprecated", + "dev": true, + "license": "MIT" + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=0.8.0" + } + } + } +} diff --git a/front/frontend/node_modules/accepts/HISTORY.md b/front/frontend/node_modules/accepts/HISTORY.md new file mode 100644 index 0000000..cb5990c --- /dev/null +++ b/front/frontend/node_modules/accepts/HISTORY.md @@ -0,0 +1,243 @@ +1.3.8 / 2022-02-02 +================== + + * deps: mime-types@~2.1.34 + - deps: mime-db@~1.51.0 + * deps: negotiator@0.6.3 + +1.3.7 / 2019-04-29 +================== + + * deps: negotiator@0.6.2 + - Fix sorting charset, encoding, and language with extra parameters + +1.3.6 / 2019-04-28 +================== + + * deps: mime-types@~2.1.24 + - deps: mime-db@~1.40.0 + +1.3.5 / 2018-02-28 +================== + + * deps: mime-types@~2.1.18 + - deps: mime-db@~1.33.0 + +1.3.4 / 2017-08-22 +================== + + * deps: mime-types@~2.1.16 + - deps: mime-db@~1.29.0 + +1.3.3 / 2016-05-02 +================== + + * deps: mime-types@~2.1.11 + - deps: mime-db@~1.23.0 + * deps: negotiator@0.6.1 + - perf: improve `Accept` parsing speed + - perf: improve `Accept-Charset` parsing speed + - perf: improve `Accept-Encoding` parsing speed + - perf: improve `Accept-Language` parsing speed + +1.3.2 / 2016-03-08 +================== + + * deps: mime-types@~2.1.10 + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + - deps: mime-db@~1.22.0 + +1.3.1 / 2016-01-19 +================== + + * deps: mime-types@~2.1.9 + - deps: mime-db@~1.21.0 + +1.3.0 / 2015-09-29 +================== + + * deps: mime-types@~2.1.7 + - deps: mime-db@~1.19.0 + * deps: negotiator@0.6.0 + - Fix including type extensions in parameters in `Accept` parsing + - Fix parsing `Accept` parameters with quoted equals + - Fix parsing `Accept` parameters with quoted semicolons + - Lazy-load modules from main entry point + - perf: delay type concatenation until needed + - perf: enable strict mode + - perf: hoist regular expressions + - perf: remove closures getting spec properties + - perf: remove a closure from media type parsing + - perf: remove property delete from media type parsing + +1.2.13 / 2015-09-06 +=================== + + * deps: mime-types@~2.1.6 + - deps: mime-db@~1.18.0 + +1.2.12 / 2015-07-30 +=================== + + * deps: mime-types@~2.1.4 + - deps: mime-db@~1.16.0 + +1.2.11 / 2015-07-16 +=================== + + * deps: mime-types@~2.1.3 + - deps: mime-db@~1.15.0 + +1.2.10 / 2015-07-01 +=================== + + * deps: mime-types@~2.1.2 + - deps: mime-db@~1.14.0 + +1.2.9 / 2015-06-08 +================== + + * deps: mime-types@~2.1.1 + - perf: fix deopt during mapping + +1.2.8 / 2015-06-07 +================== + + * deps: mime-types@~2.1.0 + - deps: mime-db@~1.13.0 + * perf: avoid argument reassignment & argument slice + * perf: avoid negotiator recursive construction + * perf: enable strict mode + * perf: remove unnecessary bitwise operator + +1.2.7 / 2015-05-10 +================== + + * deps: negotiator@0.5.3 + - Fix media type parameter matching to be case-insensitive + +1.2.6 / 2015-05-07 +================== + + * deps: mime-types@~2.0.11 + - deps: mime-db@~1.9.1 + * deps: negotiator@0.5.2 + - Fix comparing media types with quoted values + - Fix splitting media types with quoted commas + +1.2.5 / 2015-03-13 +================== + + * deps: mime-types@~2.0.10 + - deps: mime-db@~1.8.0 + +1.2.4 / 2015-02-14 +================== + + * Support Node.js 0.6 + * deps: mime-types@~2.0.9 + - deps: mime-db@~1.7.0 + * deps: negotiator@0.5.1 + - Fix preference sorting to be stable for long acceptable lists + +1.2.3 / 2015-01-31 +================== + + * deps: mime-types@~2.0.8 + - deps: mime-db@~1.6.0 + +1.2.2 / 2014-12-30 +================== + + * deps: mime-types@~2.0.7 + - deps: mime-db@~1.5.0 + +1.2.1 / 2014-12-30 +================== + + * deps: mime-types@~2.0.5 + - deps: mime-db@~1.3.1 + +1.2.0 / 2014-12-19 +================== + + * deps: negotiator@0.5.0 + - Fix list return order when large accepted list + - Fix missing identity encoding when q=0 exists + - Remove dynamic building of Negotiator class + +1.1.4 / 2014-12-10 +================== + + * deps: mime-types@~2.0.4 + - deps: mime-db@~1.3.0 + +1.1.3 / 2014-11-09 +================== + + * deps: mime-types@~2.0.3 + - deps: mime-db@~1.2.0 + +1.1.2 / 2014-10-14 +================== + + * deps: negotiator@0.4.9 + - Fix error when media type has invalid parameter + +1.1.1 / 2014-09-28 +================== + + * deps: mime-types@~2.0.2 + - deps: mime-db@~1.1.0 + * deps: negotiator@0.4.8 + - Fix all negotiations to be case-insensitive + - Stable sort preferences of same quality according to client order + +1.1.0 / 2014-09-02 +================== + + * update `mime-types` + +1.0.7 / 2014-07-04 +================== + + * Fix wrong type returned from `type` when match after unknown extension + +1.0.6 / 2014-06-24 +================== + + * deps: negotiator@0.4.7 + +1.0.5 / 2014-06-20 +================== + + * fix crash when unknown extension given + +1.0.4 / 2014-06-19 +================== + + * use `mime-types` + +1.0.3 / 2014-06-11 +================== + + * deps: negotiator@0.4.6 + - Order by specificity when quality is the same + +1.0.2 / 2014-05-29 +================== + + * Fix interpretation when header not in request + * deps: pin negotiator@0.4.5 + +1.0.1 / 2014-01-18 +================== + + * Identity encoding isn't always acceptable + * deps: negotiator@~0.4.0 + +1.0.0 / 2013-12-27 +================== + + * Genesis diff --git a/front/frontend/node_modules/accepts/LICENSE b/front/frontend/node_modules/accepts/LICENSE new file mode 100644 index 0000000..0616607 --- /dev/null +++ b/front/frontend/node_modules/accepts/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/accepts/README.md b/front/frontend/node_modules/accepts/README.md new file mode 100644 index 0000000..82680c5 --- /dev/null +++ b/front/frontend/node_modules/accepts/README.md @@ -0,0 +1,140 @@ +# accepts + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][github-actions-ci-image]][github-actions-ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). +Extracted from [koa](https://www.npmjs.com/package/koa) for general use. + +In addition to negotiator, it allows: + +- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` + as well as `('text/html', 'application/json')`. +- Allows type shorthands such as `json`. +- Returns `false` when no types match +- Treats non-existent headers as `*` + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install accepts +``` + +## API + +```js +var accepts = require('accepts') +``` + +### accepts(req) + +Create a new `Accepts` object for the given `req`. + +#### .charset(charsets) + +Return the first accepted charset. If nothing in `charsets` is accepted, +then `false` is returned. + +#### .charsets() + +Return the charsets that the request accepts, in the order of the client's +preference (most preferred first). + +#### .encoding(encodings) + +Return the first accepted encoding. If nothing in `encodings` is accepted, +then `false` is returned. + +#### .encodings() + +Return the encodings that the request accepts, in the order of the client's +preference (most preferred first). + +#### .language(languages) + +Return the first accepted language. If nothing in `languages` is accepted, +then `false` is returned. + +#### .languages() + +Return the languages that the request accepts, in the order of the client's +preference (most preferred first). + +#### .type(types) + +Return the first accepted type (and it is returned as the same text as what +appears in the `types` array). If nothing in `types` is accepted, then `false` +is returned. + +The `types` array can contain full MIME types or file extensions. Any value +that is not a full MIME types is passed to `require('mime-types').lookup`. + +#### .types() + +Return the types that the request accepts, in the order of the client's +preference (most preferred first). + +## Examples + +### Simple type negotiation + +This simple example shows how to use `accepts` to return a different typed +respond body based on what the client wants to accept. The server lists it's +preferences in order and will get back the best match between the client and +server. + +```js +var accepts = require('accepts') +var http = require('http') + +function app (req, res) { + var accept = accepts(req) + + // the order of this list is significant; should be server preferred order + switch (accept.type(['json', 'html'])) { + case 'json': + res.setHeader('Content-Type', 'application/json') + res.write('{"hello":"world!"}') + break + case 'html': + res.setHeader('Content-Type', 'text/html') + res.write('hello, world!') + break + default: + // the fallback is text/plain, so no need to specify it above + res.setHeader('Content-Type', 'text/plain') + res.write('hello, world!') + break + } + + res.end() +} + +http.createServer(app).listen(3000) +``` + +You can test this out with the cURL program: +```sh +curl -I -H'Accept: text/html' http://localhost:3000/ +``` + +## License + +[MIT](LICENSE) + +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master +[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master +[github-actions-ci-image]: https://badgen.net/github/checks/jshttp/accepts/master?label=ci +[github-actions-ci-url]: https://github.com/jshttp/accepts/actions/workflows/ci.yml +[node-version-image]: https://badgen.net/npm/node/accepts +[node-version-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/accepts +[npm-url]: https://npmjs.org/package/accepts +[npm-version-image]: https://badgen.net/npm/v/accepts diff --git a/front/frontend/node_modules/accepts/index.js b/front/frontend/node_modules/accepts/index.js new file mode 100644 index 0000000..e9b2f63 --- /dev/null +++ b/front/frontend/node_modules/accepts/index.js @@ -0,0 +1,238 @@ +/*! + * accepts + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var Negotiator = require('negotiator') +var mime = require('mime-types') + +/** + * Module exports. + * @public + */ + +module.exports = Accepts + +/** + * Create a new Accepts object for the given req. + * + * @param {object} req + * @public + */ + +function Accepts (req) { + if (!(this instanceof Accepts)) { + return new Accepts(req) + } + + this.headers = req.headers + this.negotiator = new Negotiator(req) +} + +/** + * Check if the given `type(s)` is acceptable, returning + * the best match when true, otherwise `undefined`, in which + * case you should respond with 406 "Not Acceptable". + * + * The `type` value may be a single mime type string + * such as "application/json", the extension name + * such as "json" or an array `["json", "html", "text/plain"]`. When a list + * or array is given the _best_ match, if any is returned. + * + * Examples: + * + * // Accept: text/html + * this.types('html'); + * // => "html" + * + * // Accept: text/*, application/json + * this.types('html'); + * // => "html" + * this.types('text/html'); + * // => "text/html" + * this.types('json', 'text'); + * // => "json" + * this.types('application/json'); + * // => "application/json" + * + * // Accept: text/*, application/json + * this.types('image/png'); + * this.types('png'); + * // => undefined + * + * // Accept: text/*;q=.5, application/json + * this.types(['html', 'json']); + * this.types('html', 'json'); + * // => "json" + * + * @param {String|Array} types... + * @return {String|Array|Boolean} + * @public + */ + +Accepts.prototype.type = +Accepts.prototype.types = function (types_) { + var types = types_ + + // support flattened arguments + if (types && !Array.isArray(types)) { + types = new Array(arguments.length) + for (var i = 0; i < types.length; i++) { + types[i] = arguments[i] + } + } + + // no types, return all requested types + if (!types || types.length === 0) { + return this.negotiator.mediaTypes() + } + + // no accept header, return first given type + if (!this.headers.accept) { + return types[0] + } + + var mimes = types.map(extToMime) + var accepts = this.negotiator.mediaTypes(mimes.filter(validMime)) + var first = accepts[0] + + return first + ? types[mimes.indexOf(first)] + : false +} + +/** + * Return accepted encodings or best fit based on `encodings`. + * + * Given `Accept-Encoding: gzip, deflate` + * an array sorted by quality is returned: + * + * ['gzip', 'deflate'] + * + * @param {String|Array} encodings... + * @return {String|Array} + * @public + */ + +Accepts.prototype.encoding = +Accepts.prototype.encodings = function (encodings_) { + var encodings = encodings_ + + // support flattened arguments + if (encodings && !Array.isArray(encodings)) { + encodings = new Array(arguments.length) + for (var i = 0; i < encodings.length; i++) { + encodings[i] = arguments[i] + } + } + + // no encodings, return all requested encodings + if (!encodings || encodings.length === 0) { + return this.negotiator.encodings() + } + + return this.negotiator.encodings(encodings)[0] || false +} + +/** + * Return accepted charsets or best fit based on `charsets`. + * + * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5` + * an array sorted by quality is returned: + * + * ['utf-8', 'utf-7', 'iso-8859-1'] + * + * @param {String|Array} charsets... + * @return {String|Array} + * @public + */ + +Accepts.prototype.charset = +Accepts.prototype.charsets = function (charsets_) { + var charsets = charsets_ + + // support flattened arguments + if (charsets && !Array.isArray(charsets)) { + charsets = new Array(arguments.length) + for (var i = 0; i < charsets.length; i++) { + charsets[i] = arguments[i] + } + } + + // no charsets, return all requested charsets + if (!charsets || charsets.length === 0) { + return this.negotiator.charsets() + } + + return this.negotiator.charsets(charsets)[0] || false +} + +/** + * Return accepted languages or best fit based on `langs`. + * + * Given `Accept-Language: en;q=0.8, es, pt` + * an array sorted by quality is returned: + * + * ['es', 'pt', 'en'] + * + * @param {String|Array} langs... + * @return {Array|String} + * @public + */ + +Accepts.prototype.lang = +Accepts.prototype.langs = +Accepts.prototype.language = +Accepts.prototype.languages = function (languages_) { + var languages = languages_ + + // support flattened arguments + if (languages && !Array.isArray(languages)) { + languages = new Array(arguments.length) + for (var i = 0; i < languages.length; i++) { + languages[i] = arguments[i] + } + } + + // no languages, return all requested languages + if (!languages || languages.length === 0) { + return this.negotiator.languages() + } + + return this.negotiator.languages(languages)[0] || false +} + +/** + * Convert extnames to mime. + * + * @param {String} type + * @return {String} + * @private + */ + +function extToMime (type) { + return type.indexOf('/') === -1 + ? mime.lookup(type) + : type +} + +/** + * Check if mime is valid. + * + * @param {String} type + * @return {String} + * @private + */ + +function validMime (type) { + return typeof type === 'string' +} diff --git a/front/frontend/node_modules/accepts/node_modules/mime-db/HISTORY.md b/front/frontend/node_modules/accepts/node_modules/mime-db/HISTORY.md new file mode 100644 index 0000000..7436f64 --- /dev/null +++ b/front/frontend/node_modules/accepts/node_modules/mime-db/HISTORY.md @@ -0,0 +1,507 @@ +1.52.0 / 2022-02-21 +=================== + + * Add extensions from IANA for more `image/*` types + * Add extension `.asc` to `application/pgp-keys` + * Add extensions to various XML types + * Add new upstream MIME types + +1.51.0 / 2021-11-08 +=================== + + * Add new upstream MIME types + * Mark `image/vnd.microsoft.icon` as compressible + * Mark `image/vnd.ms-dds` as compressible + +1.50.0 / 2021-09-15 +=================== + + * Add deprecated iWorks mime types and extensions + * Add new upstream MIME types + +1.49.0 / 2021-07-26 +=================== + + * Add extension `.trig` to `application/trig` + * Add new upstream MIME types + +1.48.0 / 2021-05-30 +=================== + + * Add extension `.mvt` to `application/vnd.mapbox-vector-tile` + * Add new upstream MIME types + * Mark `text/yaml` as compressible + +1.47.0 / 2021-04-01 +=================== + + * Add new upstream MIME types + * Remove ambigious extensions from IANA for `application/*+xml` types + * Update primary extension to `.es` for `application/ecmascript` + +1.46.0 / 2021-02-13 +=================== + + * Add extension `.amr` to `audio/amr` + * Add extension `.m4s` to `video/iso.segment` + * Add extension `.opus` to `audio/ogg` + * Add new upstream MIME types + +1.45.0 / 2020-09-22 +=================== + + * Add `application/ubjson` with extension `.ubj` + * Add `image/avif` with extension `.avif` + * Add `image/ktx2` with extension `.ktx2` + * Add extension `.dbf` to `application/vnd.dbf` + * Add extension `.rar` to `application/vnd.rar` + * Add extension `.td` to `application/urc-targetdesc+xml` + * Add new upstream MIME types + * Fix extension of `application/vnd.apple.keynote` to be `.key` + +1.44.0 / 2020-04-22 +=================== + + * Add charsets from IANA + * Add extension `.cjs` to `application/node` + * Add new upstream MIME types + +1.43.0 / 2020-01-05 +=================== + + * Add `application/x-keepass2` with extension `.kdbx` + * Add extension `.mxmf` to `audio/mobile-xmf` + * Add extensions from IANA for `application/*+xml` types + * Add new upstream MIME types + +1.42.0 / 2019-09-25 +=================== + + * Add `image/vnd.ms-dds` with extension `.dds` + * Add new upstream MIME types + * Remove compressible from `multipart/mixed` + +1.41.0 / 2019-08-30 +=================== + + * Add new upstream MIME types + * Add `application/toml` with extension `.toml` + * Mark `font/ttf` as compressible + +1.40.0 / 2019-04-20 +=================== + + * Add extensions from IANA for `model/*` types + * Add `text/mdx` with extension `.mdx` + +1.39.0 / 2019-04-04 +=================== + + * Add extensions `.siv` and `.sieve` to `application/sieve` + * Add new upstream MIME types + +1.38.0 / 2019-02-04 +=================== + + * Add extension `.nq` to `application/n-quads` + * Add extension `.nt` to `application/n-triples` + * Add new upstream MIME types + * Mark `text/less` as compressible + +1.37.0 / 2018-10-19 +=================== + + * Add extensions to HEIC image types + * Add new upstream MIME types + +1.36.0 / 2018-08-20 +=================== + + * Add Apple file extensions from IANA + * Add extensions from IANA for `image/*` types + * Add new upstream MIME types + +1.35.0 / 2018-07-15 +=================== + + * Add extension `.owl` to `application/rdf+xml` + * Add new upstream MIME types + - Removes extension `.woff` from `application/font-woff` + +1.34.0 / 2018-06-03 +=================== + + * Add extension `.csl` to `application/vnd.citationstyles.style+xml` + * Add extension `.es` to `application/ecmascript` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/turtle` + * Mark all XML-derived types as compressible + +1.33.0 / 2018-02-15 +=================== + + * Add extensions from IANA for `message/*` types + * Add new upstream MIME types + * Fix some incorrect OOXML types + * Remove `application/font-woff2` + +1.32.0 / 2017-11-29 +=================== + + * Add new upstream MIME types + * Update `text/hjson` to registered `application/hjson` + * Add `text/shex` with extension `.shex` + +1.31.0 / 2017-10-25 +=================== + + * Add `application/raml+yaml` with extension `.raml` + * Add `application/wasm` with extension `.wasm` + * Add new `font` type from IANA + * Add new upstream font extensions + * Add new upstream MIME types + * Add extensions for JPEG-2000 images + +1.30.0 / 2017-08-27 +=================== + + * Add `application/vnd.ms-outlook` + * Add `application/x-arj` + * Add extension `.mjs` to `application/javascript` + * Add glTF types and extensions + * Add new upstream MIME types + * Add `text/x-org` + * Add VirtualBox MIME types + * Fix `source` records for `video/*` types that are IANA + * Update `font/opentype` to registered `font/otf` + +1.29.0 / 2017-07-10 +=================== + + * Add `application/fido.trusted-apps+json` + * Add extension `.wadl` to `application/vnd.sun.wadl+xml` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/css` + +1.28.0 / 2017-05-14 +=================== + + * Add new upstream MIME types + * Add extension `.gz` to `application/gzip` + * Update extensions `.md` and `.markdown` to be `text/markdown` + +1.27.0 / 2017-03-16 +=================== + + * Add new upstream MIME types + * Add `image/apng` with extension `.apng` + +1.26.0 / 2017-01-14 +=================== + + * Add new upstream MIME types + * Add extension `.geojson` to `application/geo+json` + +1.25.0 / 2016-11-11 +=================== + + * Add new upstream MIME types + +1.24.0 / 2016-09-18 +=================== + + * Add `audio/mp3` + * Add new upstream MIME types + +1.23.0 / 2016-05-01 +=================== + + * Add new upstream MIME types + * Add extension `.3gpp` to `audio/3gpp` + +1.22.0 / 2016-02-15 +=================== + + * Add `text/slim` + * Add extension `.rng` to `application/xml` + * Add new upstream MIME types + * Fix extension of `application/dash+xml` to be `.mpd` + * Update primary extension to `.m4a` for `audio/mp4` + +1.21.0 / 2016-01-06 +=================== + + * Add Google document types + * Add new upstream MIME types + +1.20.0 / 2015-11-10 +=================== + + * Add `text/x-suse-ymp` + * Add new upstream MIME types + +1.19.0 / 2015-09-17 +=================== + + * Add `application/vnd.apple.pkpass` + * Add new upstream MIME types + +1.18.0 / 2015-09-03 +=================== + + * Add new upstream MIME types + +1.17.0 / 2015-08-13 +=================== + + * Add `application/x-msdos-program` + * Add `audio/g711-0` + * Add `image/vnd.mozilla.apng` + * Add extension `.exe` to `application/x-msdos-program` + +1.16.0 / 2015-07-29 +=================== + + * Add `application/vnd.uri-map` + +1.15.0 / 2015-07-13 +=================== + + * Add `application/x-httpd-php` + +1.14.0 / 2015-06-25 +=================== + + * Add `application/scim+json` + * Add `application/vnd.3gpp.ussd+xml` + * Add `application/vnd.biopax.rdf+xml` + * Add `text/x-processing` + +1.13.0 / 2015-06-07 +=================== + + * Add nginx as a source + * Add `application/x-cocoa` + * Add `application/x-java-archive-diff` + * Add `application/x-makeself` + * Add `application/x-perl` + * Add `application/x-pilot` + * Add `application/x-redhat-package-manager` + * Add `application/x-sea` + * Add `audio/x-m4a` + * Add `audio/x-realaudio` + * Add `image/x-jng` + * Add `text/mathml` + +1.12.0 / 2015-06-05 +=================== + + * Add `application/bdoc` + * Add `application/vnd.hyperdrive+json` + * Add `application/x-bdoc` + * Add extension `.rtf` to `text/rtf` + +1.11.0 / 2015-05-31 +=================== + + * Add `audio/wav` + * Add `audio/wave` + * Add extension `.litcoffee` to `text/coffeescript` + * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` + * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` + +1.10.0 / 2015-05-19 +=================== + + * Add `application/vnd.balsamiq.bmpr` + * Add `application/vnd.microsoft.portable-executable` + * Add `application/x-ns-proxy-autoconfig` + +1.9.1 / 2015-04-19 +================== + + * Remove `.json` extension from `application/manifest+json` + - This is causing bugs downstream + +1.9.0 / 2015-04-19 +================== + + * Add `application/manifest+json` + * Add `application/vnd.micro+json` + * Add `image/vnd.zbrush.pcx` + * Add `image/x-ms-bmp` + +1.8.0 / 2015-03-13 +================== + + * Add `application/vnd.citationstyles.style+xml` + * Add `application/vnd.fastcopy-disk-image` + * Add `application/vnd.gov.sk.xmldatacontainer+xml` + * Add extension `.jsonld` to `application/ld+json` + +1.7.0 / 2015-02-08 +================== + + * Add `application/vnd.gerber` + * Add `application/vnd.msa-disk-image` + +1.6.1 / 2015-02-05 +================== + + * Community extensions ownership transferred from `node-mime` + +1.6.0 / 2015-01-29 +================== + + * Add `application/jose` + * Add `application/jose+json` + * Add `application/json-seq` + * Add `application/jwk+json` + * Add `application/jwk-set+json` + * Add `application/jwt` + * Add `application/rdap+json` + * Add `application/vnd.gov.sk.e-form+xml` + * Add `application/vnd.ims.imsccv1p3` + +1.5.0 / 2014-12-30 +================== + + * Add `application/vnd.oracle.resource+json` + * Fix various invalid MIME type entries + - `application/mbox+xml` + - `application/oscp-response` + - `application/vwg-multiplexed` + - `audio/g721` + +1.4.0 / 2014-12-21 +================== + + * Add `application/vnd.ims.imsccv1p2` + * Fix various invalid MIME type entries + - `application/vnd-acucobol` + - `application/vnd-curl` + - `application/vnd-dart` + - `application/vnd-dxr` + - `application/vnd-fdf` + - `application/vnd-mif` + - `application/vnd-sema` + - `application/vnd-wap-wmlc` + - `application/vnd.adobe.flash-movie` + - `application/vnd.dece-zip` + - `application/vnd.dvb_service` + - `application/vnd.micrografx-igx` + - `application/vnd.sealed-doc` + - `application/vnd.sealed-eml` + - `application/vnd.sealed-mht` + - `application/vnd.sealed-ppt` + - `application/vnd.sealed-tiff` + - `application/vnd.sealed-xls` + - `application/vnd.sealedmedia.softseal-html` + - `application/vnd.sealedmedia.softseal-pdf` + - `application/vnd.wap-slc` + - `application/vnd.wap-wbxml` + - `audio/vnd.sealedmedia.softseal-mpeg` + - `image/vnd-djvu` + - `image/vnd-svf` + - `image/vnd-wap-wbmp` + - `image/vnd.sealed-png` + - `image/vnd.sealedmedia.softseal-gif` + - `image/vnd.sealedmedia.softseal-jpg` + - `model/vnd-dwf` + - `model/vnd.parasolid.transmit-binary` + - `model/vnd.parasolid.transmit-text` + - `text/vnd-a` + - `text/vnd-curl` + - `text/vnd.wap-wml` + * Remove example template MIME types + - `application/example` + - `audio/example` + - `image/example` + - `message/example` + - `model/example` + - `multipart/example` + - `text/example` + - `video/example` + +1.3.1 / 2014-12-16 +================== + + * Fix missing extensions + - `application/json5` + - `text/hjson` + +1.3.0 / 2014-12-07 +================== + + * Add `application/a2l` + * Add `application/aml` + * Add `application/atfx` + * Add `application/atxml` + * Add `application/cdfx+xml` + * Add `application/dii` + * Add `application/json5` + * Add `application/lxf` + * Add `application/mf4` + * Add `application/vnd.apache.thrift.compact` + * Add `application/vnd.apache.thrift.json` + * Add `application/vnd.coffeescript` + * Add `application/vnd.enphase.envoy` + * Add `application/vnd.ims.imsccv1p1` + * Add `text/csv-schema` + * Add `text/hjson` + * Add `text/markdown` + * Add `text/yaml` + +1.2.0 / 2014-11-09 +================== + + * Add `application/cea` + * Add `application/dit` + * Add `application/vnd.gov.sk.e-form+zip` + * Add `application/vnd.tmd.mediaflex.api+xml` + * Type `application/epub+zip` is now IANA-registered + +1.1.2 / 2014-10-23 +================== + + * Rebuild database for `application/x-www-form-urlencoded` change + +1.1.1 / 2014-10-20 +================== + + * Mark `application/x-www-form-urlencoded` as compressible. + +1.1.0 / 2014-09-28 +================== + + * Add `application/font-woff2` + +1.0.3 / 2014-09-25 +================== + + * Fix engine requirement in package + +1.0.2 / 2014-09-25 +================== + + * Add `application/coap-group+json` + * Add `application/dcd` + * Add `application/vnd.apache.thrift.binary` + * Add `image/vnd.tencent.tap` + * Mark all JSON-derived types as compressible + * Update `text/vtt` data + +1.0.1 / 2014-08-30 +================== + + * Fix extension ordering + +1.0.0 / 2014-08-30 +================== + + * Add `application/atf` + * Add `application/merge-patch+json` + * Add `multipart/x-mixed-replace` + * Add `source: 'apache'` metadata + * Add `source: 'iana'` metadata + * Remove badly-assumed charset data diff --git a/front/frontend/node_modules/accepts/node_modules/mime-db/LICENSE b/front/frontend/node_modules/accepts/node_modules/mime-db/LICENSE new file mode 100644 index 0000000..0751cb1 --- /dev/null +++ b/front/frontend/node_modules/accepts/node_modules/mime-db/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015-2022 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/accepts/node_modules/mime-db/README.md b/front/frontend/node_modules/accepts/node_modules/mime-db/README.md new file mode 100644 index 0000000..5a8fcfe --- /dev/null +++ b/front/frontend/node_modules/accepts/node_modules/mime-db/README.md @@ -0,0 +1,100 @@ +# mime-db + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][ci-image]][ci-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +This is a large database of mime types and information about them. +It consists of a single, public JSON file and does not include any logic, +allowing it to remain as un-opinionated as possible with an API. +It aggregates data from the following sources: + +- http://www.iana.org/assignments/media-types/media-types.xhtml +- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types +- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types + +## Installation + +```bash +npm install mime-db +``` + +### Database Download + +If you're crazy enough to use this in the browser, you can just grab the +JSON file using [jsDelivr](https://www.jsdelivr.com/). It is recommended to +replace `master` with [a release tag](https://github.com/jshttp/mime-db/tags) +as the JSON format may change in the future. + +``` +https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json +``` + +## Usage + +```js +var db = require('mime-db') + +// grab data on .js files +var data = db['application/javascript'] +``` + +## Data Structure + +The JSON file is a map lookup for lowercased mime types. +Each mime type has the following properties: + +- `.source` - where the mime type is defined. + If not set, it's probably a custom media type. + - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) + - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) + - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) +- `.extensions[]` - known extensions associated with this mime type. +- `.compressible` - whether a file of this type can be gzipped. +- `.charset` - the default charset associated with this type, if any. + +If unknown, every property could be `undefined`. + +## Contributing + +To edit the database, only make PRs against `src/custom-types.json` or +`src/custom-suffix.json`. + +The `src/custom-types.json` file is a JSON object with the MIME type as the +keys and the values being an object with the following keys: + +- `compressible` - leave out if you don't know, otherwise `true`/`false` to + indicate whether the data represented by the type is typically compressible. +- `extensions` - include an array of file extensions that are associated with + the type. +- `notes` - human-readable notes about the type, typically what the type is. +- `sources` - include an array of URLs of where the MIME type and the associated + extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source); + links to type aggregating sites and Wikipedia are _not acceptable_. + +To update the build, run `npm run build`. + +### Adding Custom Media Types + +The best way to get new media types included in this library is to register +them with the IANA. The community registration procedure is outlined in +[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types +registered with the IANA are automatically pulled into this library. + +If that is not possible / feasible, they can be added directly here as a +"custom" type. To do this, it is required to have a primary source that +definitively lists the media type. If an extension is going to be listed as +associateed with this media type, the source must definitively link the +media type and extension as well. + +[ci-image]: https://badgen.net/github/checks/jshttp/mime-db/master?label=ci +[ci-url]: https://github.com/jshttp/mime-db/actions?query=workflow%3Aci +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master +[node-image]: https://badgen.net/npm/node/mime-db +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-db +[npm-url]: https://npmjs.org/package/mime-db +[npm-version-image]: https://badgen.net/npm/v/mime-db diff --git a/front/frontend/node_modules/accepts/node_modules/mime-db/db.json b/front/frontend/node_modules/accepts/node_modules/mime-db/db.json new file mode 100644 index 0000000..eb9c42c --- /dev/null +++ b/front/frontend/node_modules/accepts/node_modules/mime-db/db.json @@ -0,0 +1,8519 @@ +{ + "application/1d-interleaved-parityfec": { + "source": "iana" + }, + "application/3gpdash-qoe-report+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/3gpp-ims+xml": { + "source": "iana", + "compressible": true + }, + "application/3gpphal+json": { + "source": "iana", + "compressible": true + }, + "application/3gpphalforms+json": { + "source": "iana", + "compressible": true + }, + "application/a2l": { + "source": "iana" + }, + "application/ace+cbor": { + "source": "iana" + }, + "application/activemessage": { + "source": "iana" + }, + "application/activity+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-directory+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcost+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcostparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointprop+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointpropparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-error+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamcontrol+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamparams+json": { + "source": "iana", + "compressible": true + }, + "application/aml": { + "source": "iana" + }, + "application/andrew-inset": { + "source": "iana", + "extensions": ["ez"] + }, + "application/applefile": { + "source": "iana" + }, + "application/applixware": { + "source": "apache", + "extensions": ["aw"] + }, + "application/at+jwt": { + "source": "iana" + }, + "application/atf": { + "source": "iana" + }, + "application/atfx": { + "source": "iana" + }, + "application/atom+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atom"] + }, + "application/atomcat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomcat"] + }, + "application/atomdeleted+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomdeleted"] + }, + "application/atomicmail": { + "source": "iana" + }, + "application/atomsvc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomsvc"] + }, + "application/atsc-dwd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dwd"] + }, + "application/atsc-dynamic-event-message": { + "source": "iana" + }, + "application/atsc-held+xml": { + "source": "iana", + "compressible": true, + "extensions": ["held"] + }, + "application/atsc-rdt+json": { + "source": "iana", + "compressible": true + }, + "application/atsc-rsat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsat"] + }, + "application/atxml": { + "source": "iana" + }, + "application/auth-policy+xml": { + "source": "iana", + "compressible": true + }, + "application/bacnet-xdd+zip": { + "source": "iana", + "compressible": false + }, + "application/batch-smtp": { + "source": "iana" + }, + "application/bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/beep+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/calendar+json": { + "source": "iana", + "compressible": true + }, + "application/calendar+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xcs"] + }, + "application/call-completion": { + "source": "iana" + }, + "application/cals-1840": { + "source": "iana" + }, + "application/captive+json": { + "source": "iana", + "compressible": true + }, + "application/cbor": { + "source": "iana" + }, + "application/cbor-seq": { + "source": "iana" + }, + "application/cccex": { + "source": "iana" + }, + "application/ccmp+xml": { + "source": "iana", + "compressible": true + }, + "application/ccxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ccxml"] + }, + "application/cdfx+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdfx"] + }, + "application/cdmi-capability": { + "source": "iana", + "extensions": ["cdmia"] + }, + "application/cdmi-container": { + "source": "iana", + "extensions": ["cdmic"] + }, + "application/cdmi-domain": { + "source": "iana", + "extensions": ["cdmid"] + }, + "application/cdmi-object": { + "source": "iana", + "extensions": ["cdmio"] + }, + "application/cdmi-queue": { + "source": "iana", + "extensions": ["cdmiq"] + }, + "application/cdni": { + "source": "iana" + }, + "application/cea": { + "source": "iana" + }, + "application/cea-2018+xml": { + "source": "iana", + "compressible": true + }, + "application/cellml+xml": { + "source": "iana", + "compressible": true + }, + "application/cfw": { + "source": "iana" + }, + "application/city+json": { + "source": "iana", + "compressible": true + }, + "application/clr": { + "source": "iana" + }, + "application/clue+xml": { + "source": "iana", + "compressible": true + }, + "application/clue_info+xml": { + "source": "iana", + "compressible": true + }, + "application/cms": { + "source": "iana" + }, + "application/cnrp+xml": { + "source": "iana", + "compressible": true + }, + "application/coap-group+json": { + "source": "iana", + "compressible": true + }, + "application/coap-payload": { + "source": "iana" + }, + "application/commonground": { + "source": "iana" + }, + "application/conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/cose": { + "source": "iana" + }, + "application/cose-key": { + "source": "iana" + }, + "application/cose-key-set": { + "source": "iana" + }, + "application/cpl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cpl"] + }, + "application/csrattrs": { + "source": "iana" + }, + "application/csta+xml": { + "source": "iana", + "compressible": true + }, + "application/cstadata+xml": { + "source": "iana", + "compressible": true + }, + "application/csvm+json": { + "source": "iana", + "compressible": true + }, + "application/cu-seeme": { + "source": "apache", + "extensions": ["cu"] + }, + "application/cwt": { + "source": "iana" + }, + "application/cybercash": { + "source": "iana" + }, + "application/dart": { + "compressible": true + }, + "application/dash+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpd"] + }, + "application/dash-patch+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpp"] + }, + "application/dashdelta": { + "source": "iana" + }, + "application/davmount+xml": { + "source": "iana", + "compressible": true, + "extensions": ["davmount"] + }, + "application/dca-rft": { + "source": "iana" + }, + "application/dcd": { + "source": "iana" + }, + "application/dec-dx": { + "source": "iana" + }, + "application/dialog-info+xml": { + "source": "iana", + "compressible": true + }, + "application/dicom": { + "source": "iana" + }, + "application/dicom+json": { + "source": "iana", + "compressible": true + }, + "application/dicom+xml": { + "source": "iana", + "compressible": true + }, + "application/dii": { + "source": "iana" + }, + "application/dit": { + "source": "iana" + }, + "application/dns": { + "source": "iana" + }, + "application/dns+json": { + "source": "iana", + "compressible": true + }, + "application/dns-message": { + "source": "iana" + }, + "application/docbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dbk"] + }, + "application/dots+cbor": { + "source": "iana" + }, + "application/dskpp+xml": { + "source": "iana", + "compressible": true + }, + "application/dssc+der": { + "source": "iana", + "extensions": ["dssc"] + }, + "application/dssc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdssc"] + }, + "application/dvcs": { + "source": "iana" + }, + "application/ecmascript": { + "source": "iana", + "compressible": true, + "extensions": ["es","ecma"] + }, + "application/edi-consent": { + "source": "iana" + }, + "application/edi-x12": { + "source": "iana", + "compressible": false + }, + "application/edifact": { + "source": "iana", + "compressible": false + }, + "application/efi": { + "source": "iana" + }, + "application/elm+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/elm+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.cap+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/emergencycalldata.comment+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.control+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.deviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.ecall.msd": { + "source": "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.serviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.subscriberinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.veds+xml": { + "source": "iana", + "compressible": true + }, + "application/emma+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emma"] + }, + "application/emotionml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emotionml"] + }, + "application/encaprtp": { + "source": "iana" + }, + "application/epp+xml": { + "source": "iana", + "compressible": true + }, + "application/epub+zip": { + "source": "iana", + "compressible": false, + "extensions": ["epub"] + }, + "application/eshop": { + "source": "iana" + }, + "application/exi": { + "source": "iana", + "extensions": ["exi"] + }, + "application/expect-ct-report+json": { + "source": "iana", + "compressible": true + }, + "application/express": { + "source": "iana", + "extensions": ["exp"] + }, + "application/fastinfoset": { + "source": "iana" + }, + "application/fastsoap": { + "source": "iana" + }, + "application/fdt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fdt"] + }, + "application/fhir+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fhir+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fido.trusted-apps+json": { + "compressible": true + }, + "application/fits": { + "source": "iana" + }, + "application/flexfec": { + "source": "iana" + }, + "application/font-sfnt": { + "source": "iana" + }, + "application/font-tdpfr": { + "source": "iana", + "extensions": ["pfr"] + }, + "application/font-woff": { + "source": "iana", + "compressible": false + }, + "application/framework-attributes+xml": { + "source": "iana", + "compressible": true + }, + "application/geo+json": { + "source": "iana", + "compressible": true, + "extensions": ["geojson"] + }, + "application/geo+json-seq": { + "source": "iana" + }, + "application/geopackage+sqlite3": { + "source": "iana" + }, + "application/geoxacml+xml": { + "source": "iana", + "compressible": true + }, + "application/gltf-buffer": { + "source": "iana" + }, + "application/gml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["gml"] + }, + "application/gpx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["gpx"] + }, + "application/gxf": { + "source": "apache", + "extensions": ["gxf"] + }, + "application/gzip": { + "source": "iana", + "compressible": false, + "extensions": ["gz"] + }, + "application/h224": { + "source": "iana" + }, + "application/held+xml": { + "source": "iana", + "compressible": true + }, + "application/hjson": { + "extensions": ["hjson"] + }, + "application/http": { + "source": "iana" + }, + "application/hyperstudio": { + "source": "iana", + "extensions": ["stk"] + }, + "application/ibe-key-request+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pkg-reply+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pp-data": { + "source": "iana" + }, + "application/iges": { + "source": "iana" + }, + "application/im-iscomposing+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/index": { + "source": "iana" + }, + "application/index.cmd": { + "source": "iana" + }, + "application/index.obj": { + "source": "iana" + }, + "application/index.response": { + "source": "iana" + }, + "application/index.vnd": { + "source": "iana" + }, + "application/inkml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ink","inkml"] + }, + "application/iotp": { + "source": "iana" + }, + "application/ipfix": { + "source": "iana", + "extensions": ["ipfix"] + }, + "application/ipp": { + "source": "iana" + }, + "application/isup": { + "source": "iana" + }, + "application/its+xml": { + "source": "iana", + "compressible": true, + "extensions": ["its"] + }, + "application/java-archive": { + "source": "apache", + "compressible": false, + "extensions": ["jar","war","ear"] + }, + "application/java-serialized-object": { + "source": "apache", + "compressible": false, + "extensions": ["ser"] + }, + "application/java-vm": { + "source": "apache", + "compressible": false, + "extensions": ["class"] + }, + "application/javascript": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js","mjs"] + }, + "application/jf2feed+json": { + "source": "iana", + "compressible": true + }, + "application/jose": { + "source": "iana" + }, + "application/jose+json": { + "source": "iana", + "compressible": true + }, + "application/jrd+json": { + "source": "iana", + "compressible": true + }, + "application/jscalendar+json": { + "source": "iana", + "compressible": true + }, + "application/json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["json","map"] + }, + "application/json-patch+json": { + "source": "iana", + "compressible": true + }, + "application/json-seq": { + "source": "iana" + }, + "application/json5": { + "extensions": ["json5"] + }, + "application/jsonml+json": { + "source": "apache", + "compressible": true, + "extensions": ["jsonml"] + }, + "application/jwk+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+json": { + "source": "iana", + "compressible": true + }, + "application/jwt": { + "source": "iana" + }, + "application/kpml-request+xml": { + "source": "iana", + "compressible": true + }, + "application/kpml-response+xml": { + "source": "iana", + "compressible": true + }, + "application/ld+json": { + "source": "iana", + "compressible": true, + "extensions": ["jsonld"] + }, + "application/lgr+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lgr"] + }, + "application/link-format": { + "source": "iana" + }, + "application/load-control+xml": { + "source": "iana", + "compressible": true + }, + "application/lost+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lostxml"] + }, + "application/lostsync+xml": { + "source": "iana", + "compressible": true + }, + "application/lpf+zip": { + "source": "iana", + "compressible": false + }, + "application/lxf": { + "source": "iana" + }, + "application/mac-binhex40": { + "source": "iana", + "extensions": ["hqx"] + }, + "application/mac-compactpro": { + "source": "apache", + "extensions": ["cpt"] + }, + "application/macwriteii": { + "source": "iana" + }, + "application/mads+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mads"] + }, + "application/manifest+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["webmanifest"] + }, + "application/marc": { + "source": "iana", + "extensions": ["mrc"] + }, + "application/marcxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mrcx"] + }, + "application/mathematica": { + "source": "iana", + "extensions": ["ma","nb","mb"] + }, + "application/mathml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mathml"] + }, + "application/mathml-content+xml": { + "source": "iana", + "compressible": true + }, + "application/mathml-presentation+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-associated-procedure-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-deregister+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-envelope+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-protection-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-reception-report+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-schedule+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-user-service-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbox": { + "source": "iana", + "extensions": ["mbox"] + }, + "application/media-policy-dataset+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpf"] + }, + "application/media_control+xml": { + "source": "iana", + "compressible": true + }, + "application/mediaservercontrol+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mscml"] + }, + "application/merge-patch+json": { + "source": "iana", + "compressible": true + }, + "application/metalink+xml": { + "source": "apache", + "compressible": true, + "extensions": ["metalink"] + }, + "application/metalink4+xml": { + "source": "iana", + "compressible": true, + "extensions": ["meta4"] + }, + "application/mets+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mets"] + }, + "application/mf4": { + "source": "iana" + }, + "application/mikey": { + "source": "iana" + }, + "application/mipc": { + "source": "iana" + }, + "application/missing-blocks+cbor-seq": { + "source": "iana" + }, + "application/mmt-aei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["maei"] + }, + "application/mmt-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musd"] + }, + "application/mods+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mods"] + }, + "application/moss-keys": { + "source": "iana" + }, + "application/moss-signature": { + "source": "iana" + }, + "application/mosskey-data": { + "source": "iana" + }, + "application/mosskey-request": { + "source": "iana" + }, + "application/mp21": { + "source": "iana", + "extensions": ["m21","mp21"] + }, + "application/mp4": { + "source": "iana", + "extensions": ["mp4s","m4p"] + }, + "application/mpeg4-generic": { + "source": "iana" + }, + "application/mpeg4-iod": { + "source": "iana" + }, + "application/mpeg4-iod-xmt": { + "source": "iana" + }, + "application/mrb-consumer+xml": { + "source": "iana", + "compressible": true + }, + "application/mrb-publish+xml": { + "source": "iana", + "compressible": true + }, + "application/msc-ivr+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msc-mixer+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msword": { + "source": "iana", + "compressible": false, + "extensions": ["doc","dot"] + }, + "application/mud+json": { + "source": "iana", + "compressible": true + }, + "application/multipart-core": { + "source": "iana" + }, + "application/mxf": { + "source": "iana", + "extensions": ["mxf"] + }, + "application/n-quads": { + "source": "iana", + "extensions": ["nq"] + }, + "application/n-triples": { + "source": "iana", + "extensions": ["nt"] + }, + "application/nasdata": { + "source": "iana" + }, + "application/news-checkgroups": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-groupinfo": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-transmission": { + "source": "iana" + }, + "application/nlsml+xml": { + "source": "iana", + "compressible": true + }, + "application/node": { + "source": "iana", + "extensions": ["cjs"] + }, + "application/nss": { + "source": "iana" + }, + "application/oauth-authz-req+jwt": { + "source": "iana" + }, + "application/oblivious-dns-message": { + "source": "iana" + }, + "application/ocsp-request": { + "source": "iana" + }, + "application/ocsp-response": { + "source": "iana" + }, + "application/octet-stream": { + "source": "iana", + "compressible": false, + "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] + }, + "application/oda": { + "source": "iana", + "extensions": ["oda"] + }, + "application/odm+xml": { + "source": "iana", + "compressible": true + }, + "application/odx": { + "source": "iana" + }, + "application/oebps-package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["opf"] + }, + "application/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogx"] + }, + "application/omdoc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["omdoc"] + }, + "application/onenote": { + "source": "apache", + "extensions": ["onetoc","onetoc2","onetmp","onepkg"] + }, + "application/opc-nodeset+xml": { + "source": "iana", + "compressible": true + }, + "application/oscore": { + "source": "iana" + }, + "application/oxps": { + "source": "iana", + "extensions": ["oxps"] + }, + "application/p21": { + "source": "iana" + }, + "application/p21+zip": { + "source": "iana", + "compressible": false + }, + "application/p2p-overlay+xml": { + "source": "iana", + "compressible": true, + "extensions": ["relo"] + }, + "application/parityfec": { + "source": "iana" + }, + "application/passport": { + "source": "iana" + }, + "application/patch-ops-error+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xer"] + }, + "application/pdf": { + "source": "iana", + "compressible": false, + "extensions": ["pdf"] + }, + "application/pdx": { + "source": "iana" + }, + "application/pem-certificate-chain": { + "source": "iana" + }, + "application/pgp-encrypted": { + "source": "iana", + "compressible": false, + "extensions": ["pgp"] + }, + "application/pgp-keys": { + "source": "iana", + "extensions": ["asc"] + }, + "application/pgp-signature": { + "source": "iana", + "extensions": ["asc","sig"] + }, + "application/pics-rules": { + "source": "apache", + "extensions": ["prf"] + }, + "application/pidf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pidf-diff+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pkcs10": { + "source": "iana", + "extensions": ["p10"] + }, + "application/pkcs12": { + "source": "iana" + }, + "application/pkcs7-mime": { + "source": "iana", + "extensions": ["p7m","p7c"] + }, + "application/pkcs7-signature": { + "source": "iana", + "extensions": ["p7s"] + }, + "application/pkcs8": { + "source": "iana", + "extensions": ["p8"] + }, + "application/pkcs8-encrypted": { + "source": "iana" + }, + "application/pkix-attr-cert": { + "source": "iana", + "extensions": ["ac"] + }, + "application/pkix-cert": { + "source": "iana", + "extensions": ["cer"] + }, + "application/pkix-crl": { + "source": "iana", + "extensions": ["crl"] + }, + "application/pkix-pkipath": { + "source": "iana", + "extensions": ["pkipath"] + }, + "application/pkixcmp": { + "source": "iana", + "extensions": ["pki"] + }, + "application/pls+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pls"] + }, + "application/poc-settings+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/postscript": { + "source": "iana", + "compressible": true, + "extensions": ["ai","eps","ps"] + }, + "application/ppsp-tracker+json": { + "source": "iana", + "compressible": true + }, + "application/problem+json": { + "source": "iana", + "compressible": true + }, + "application/problem+xml": { + "source": "iana", + "compressible": true + }, + "application/provenance+xml": { + "source": "iana", + "compressible": true, + "extensions": ["provx"] + }, + "application/prs.alvestrand.titrax-sheet": { + "source": "iana" + }, + "application/prs.cww": { + "source": "iana", + "extensions": ["cww"] + }, + "application/prs.cyn": { + "source": "iana", + "charset": "7-BIT" + }, + "application/prs.hpub+zip": { + "source": "iana", + "compressible": false + }, + "application/prs.nprend": { + "source": "iana" + }, + "application/prs.plucker": { + "source": "iana" + }, + "application/prs.rdf-xml-crypt": { + "source": "iana" + }, + "application/prs.xsf+xml": { + "source": "iana", + "compressible": true + }, + "application/pskc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pskcxml"] + }, + "application/pvd+json": { + "source": "iana", + "compressible": true + }, + "application/qsig": { + "source": "iana" + }, + "application/raml+yaml": { + "compressible": true, + "extensions": ["raml"] + }, + "application/raptorfec": { + "source": "iana" + }, + "application/rdap+json": { + "source": "iana", + "compressible": true + }, + "application/rdf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rdf","owl"] + }, + "application/reginfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rif"] + }, + "application/relax-ng-compact-syntax": { + "source": "iana", + "extensions": ["rnc"] + }, + "application/remote-printing": { + "source": "iana" + }, + "application/reputon+json": { + "source": "iana", + "compressible": true + }, + "application/resource-lists+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rl"] + }, + "application/resource-lists-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rld"] + }, + "application/rfc+xml": { + "source": "iana", + "compressible": true + }, + "application/riscos": { + "source": "iana" + }, + "application/rlmi+xml": { + "source": "iana", + "compressible": true + }, + "application/rls-services+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rs"] + }, + "application/route-apd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rapd"] + }, + "application/route-s-tsid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sls"] + }, + "application/route-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rusd"] + }, + "application/rpki-ghostbusters": { + "source": "iana", + "extensions": ["gbr"] + }, + "application/rpki-manifest": { + "source": "iana", + "extensions": ["mft"] + }, + "application/rpki-publication": { + "source": "iana" + }, + "application/rpki-roa": { + "source": "iana", + "extensions": ["roa"] + }, + "application/rpki-updown": { + "source": "iana" + }, + "application/rsd+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rsd"] + }, + "application/rss+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rss"] + }, + "application/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "application/rtploopback": { + "source": "iana" + }, + "application/rtx": { + "source": "iana" + }, + "application/samlassertion+xml": { + "source": "iana", + "compressible": true + }, + "application/samlmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/sarif+json": { + "source": "iana", + "compressible": true + }, + "application/sarif-external-properties+json": { + "source": "iana", + "compressible": true + }, + "application/sbe": { + "source": "iana" + }, + "application/sbml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sbml"] + }, + "application/scaip+xml": { + "source": "iana", + "compressible": true + }, + "application/scim+json": { + "source": "iana", + "compressible": true + }, + "application/scvp-cv-request": { + "source": "iana", + "extensions": ["scq"] + }, + "application/scvp-cv-response": { + "source": "iana", + "extensions": ["scs"] + }, + "application/scvp-vp-request": { + "source": "iana", + "extensions": ["spq"] + }, + "application/scvp-vp-response": { + "source": "iana", + "extensions": ["spp"] + }, + "application/sdp": { + "source": "iana", + "extensions": ["sdp"] + }, + "application/secevent+jwt": { + "source": "iana" + }, + "application/senml+cbor": { + "source": "iana" + }, + "application/senml+json": { + "source": "iana", + "compressible": true + }, + "application/senml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["senmlx"] + }, + "application/senml-etch+cbor": { + "source": "iana" + }, + "application/senml-etch+json": { + "source": "iana", + "compressible": true + }, + "application/senml-exi": { + "source": "iana" + }, + "application/sensml+cbor": { + "source": "iana" + }, + "application/sensml+json": { + "source": "iana", + "compressible": true + }, + "application/sensml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sensmlx"] + }, + "application/sensml-exi": { + "source": "iana" + }, + "application/sep+xml": { + "source": "iana", + "compressible": true + }, + "application/sep-exi": { + "source": "iana" + }, + "application/session-info": { + "source": "iana" + }, + "application/set-payment": { + "source": "iana" + }, + "application/set-payment-initiation": { + "source": "iana", + "extensions": ["setpay"] + }, + "application/set-registration": { + "source": "iana" + }, + "application/set-registration-initiation": { + "source": "iana", + "extensions": ["setreg"] + }, + "application/sgml": { + "source": "iana" + }, + "application/sgml-open-catalog": { + "source": "iana" + }, + "application/shf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["shf"] + }, + "application/sieve": { + "source": "iana", + "extensions": ["siv","sieve"] + }, + "application/simple-filter+xml": { + "source": "iana", + "compressible": true + }, + "application/simple-message-summary": { + "source": "iana" + }, + "application/simplesymbolcontainer": { + "source": "iana" + }, + "application/sipc": { + "source": "iana" + }, + "application/slate": { + "source": "iana" + }, + "application/smil": { + "source": "iana" + }, + "application/smil+xml": { + "source": "iana", + "compressible": true, + "extensions": ["smi","smil"] + }, + "application/smpte336m": { + "source": "iana" + }, + "application/soap+fastinfoset": { + "source": "iana" + }, + "application/soap+xml": { + "source": "iana", + "compressible": true + }, + "application/sparql-query": { + "source": "iana", + "extensions": ["rq"] + }, + "application/sparql-results+xml": { + "source": "iana", + "compressible": true, + "extensions": ["srx"] + }, + "application/spdx+json": { + "source": "iana", + "compressible": true + }, + "application/spirits-event+xml": { + "source": "iana", + "compressible": true + }, + "application/sql": { + "source": "iana" + }, + "application/srgs": { + "source": "iana", + "extensions": ["gram"] + }, + "application/srgs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["grxml"] + }, + "application/sru+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sru"] + }, + "application/ssdl+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ssdl"] + }, + "application/ssml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ssml"] + }, + "application/stix+json": { + "source": "iana", + "compressible": true + }, + "application/swid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["swidtag"] + }, + "application/tamp-apex-update": { + "source": "iana" + }, + "application/tamp-apex-update-confirm": { + "source": "iana" + }, + "application/tamp-community-update": { + "source": "iana" + }, + "application/tamp-community-update-confirm": { + "source": "iana" + }, + "application/tamp-error": { + "source": "iana" + }, + "application/tamp-sequence-adjust": { + "source": "iana" + }, + "application/tamp-sequence-adjust-confirm": { + "source": "iana" + }, + "application/tamp-status-query": { + "source": "iana" + }, + "application/tamp-status-response": { + "source": "iana" + }, + "application/tamp-update": { + "source": "iana" + }, + "application/tamp-update-confirm": { + "source": "iana" + }, + "application/tar": { + "compressible": true + }, + "application/taxii+json": { + "source": "iana", + "compressible": true + }, + "application/td+json": { + "source": "iana", + "compressible": true + }, + "application/tei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tei","teicorpus"] + }, + "application/tetra_isi": { + "source": "iana" + }, + "application/thraud+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tfi"] + }, + "application/timestamp-query": { + "source": "iana" + }, + "application/timestamp-reply": { + "source": "iana" + }, + "application/timestamped-data": { + "source": "iana", + "extensions": ["tsd"] + }, + "application/tlsrpt+gzip": { + "source": "iana" + }, + "application/tlsrpt+json": { + "source": "iana", + "compressible": true + }, + "application/tnauthlist": { + "source": "iana" + }, + "application/token-introspection+jwt": { + "source": "iana" + }, + "application/toml": { + "compressible": true, + "extensions": ["toml"] + }, + "application/trickle-ice-sdpfrag": { + "source": "iana" + }, + "application/trig": { + "source": "iana", + "extensions": ["trig"] + }, + "application/ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ttml"] + }, + "application/tve-trigger": { + "source": "iana" + }, + "application/tzif": { + "source": "iana" + }, + "application/tzif-leap": { + "source": "iana" + }, + "application/ubjson": { + "compressible": false, + "extensions": ["ubj"] + }, + "application/ulpfec": { + "source": "iana" + }, + "application/urc-grpsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/urc-ressheet+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsheet"] + }, + "application/urc-targetdesc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["td"] + }, + "application/urc-uisocketdesc+xml": { + "source": "iana", + "compressible": true + }, + "application/vcard+json": { + "source": "iana", + "compressible": true + }, + "application/vcard+xml": { + "source": "iana", + "compressible": true + }, + "application/vemmi": { + "source": "iana" + }, + "application/vividence.scriptfile": { + "source": "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + "source": "iana", + "compressible": true, + "extensions": ["1km"] + }, + "application/vnd.3gpp-prose+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-v2x-local-service-information": { + "source": "iana" + }, + "application/vnd.3gpp.5gnas": { + "source": "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.bsf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gmop+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gtpc": { + "source": "iana" + }, + "application/vnd.3gpp.interworking-data": { + "source": "iana" + }, + "application/vnd.3gpp.lpp": { + "source": "iana" + }, + "application/vnd.3gpp.mc-signalling-ear": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-payload": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-signalling": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-floor-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-signed+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-init-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-transmission-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mid-call+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ngap": { + "source": "iana" + }, + "application/vnd.3gpp.pfcp": { + "source": "iana" + }, + "application/vnd.3gpp.pic-bw-large": { + "source": "iana", + "extensions": ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + "source": "iana", + "extensions": ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + "source": "iana", + "extensions": ["pvb"] + }, + "application/vnd.3gpp.s1ap": { + "source": "iana" + }, + "application/vnd.3gpp.sms": { + "source": "iana" + }, + "application/vnd.3gpp.sms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-ext+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.state-and-event-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ussd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.sms": { + "source": "iana" + }, + "application/vnd.3gpp2.tcap": { + "source": "iana", + "extensions": ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + "source": "iana" + }, + "application/vnd.3m.post-it-notes": { + "source": "iana", + "extensions": ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + "source": "iana", + "extensions": ["aso"] + }, + "application/vnd.accpac.simply.imp": { + "source": "iana", + "extensions": ["imp"] + }, + "application/vnd.acucobol": { + "source": "iana", + "extensions": ["acu"] + }, + "application/vnd.acucorp": { + "source": "iana", + "extensions": ["atc","acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + "source": "apache", + "compressible": false, + "extensions": ["air"] + }, + "application/vnd.adobe.flash.movie": { + "source": "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + "source": "iana", + "extensions": ["fcdt"] + }, + "application/vnd.adobe.fxp": { + "source": "iana", + "extensions": ["fxp","fxpl"] + }, + "application/vnd.adobe.partial-upload": { + "source": "iana" + }, + "application/vnd.adobe.xdp+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdp"] + }, + "application/vnd.adobe.xfdf": { + "source": "iana", + "extensions": ["xfdf"] + }, + "application/vnd.aether.imp": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata-pagedef": { + "source": "iana" + }, + "application/vnd.afpc.cmoca-cmresource": { + "source": "iana" + }, + "application/vnd.afpc.foca-charset": { + "source": "iana" + }, + "application/vnd.afpc.foca-codedfont": { + "source": "iana" + }, + "application/vnd.afpc.foca-codepage": { + "source": "iana" + }, + "application/vnd.afpc.modca": { + "source": "iana" + }, + "application/vnd.afpc.modca-cmtable": { + "source": "iana" + }, + "application/vnd.afpc.modca-formdef": { + "source": "iana" + }, + "application/vnd.afpc.modca-mediummap": { + "source": "iana" + }, + "application/vnd.afpc.modca-objectcontainer": { + "source": "iana" + }, + "application/vnd.afpc.modca-overlay": { + "source": "iana" + }, + "application/vnd.afpc.modca-pagesegment": { + "source": "iana" + }, + "application/vnd.age": { + "source": "iana", + "extensions": ["age"] + }, + "application/vnd.ah-barcode": { + "source": "iana" + }, + "application/vnd.ahead.space": { + "source": "iana", + "extensions": ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + "source": "iana", + "extensions": ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + "source": "iana", + "extensions": ["azs"] + }, + "application/vnd.amadeus+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.amazon.ebook": { + "source": "apache", + "extensions": ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + "source": "iana" + }, + "application/vnd.americandynamics.acc": { + "source": "iana", + "extensions": ["acc"] + }, + "application/vnd.amiga.ami": { + "source": "iana", + "extensions": ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.android.ota": { + "source": "iana" + }, + "application/vnd.android.package-archive": { + "source": "apache", + "compressible": false, + "extensions": ["apk"] + }, + "application/vnd.anki": { + "source": "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + "source": "iana", + "extensions": ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + "source": "apache", + "extensions": ["fti"] + }, + "application/vnd.antix.game-component": { + "source": "iana", + "extensions": ["atx"] + }, + "application/vnd.apache.arrow.file": { + "source": "iana" + }, + "application/vnd.apache.arrow.stream": { + "source": "iana" + }, + "application/vnd.apache.thrift.binary": { + "source": "iana" + }, + "application/vnd.apache.thrift.compact": { + "source": "iana" + }, + "application/vnd.apache.thrift.json": { + "source": "iana" + }, + "application/vnd.api+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.aplextor.warrp+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apothekende.reservation+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apple.installer+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpkg"] + }, + "application/vnd.apple.keynote": { + "source": "iana", + "extensions": ["key"] + }, + "application/vnd.apple.mpegurl": { + "source": "iana", + "extensions": ["m3u8"] + }, + "application/vnd.apple.numbers": { + "source": "iana", + "extensions": ["numbers"] + }, + "application/vnd.apple.pages": { + "source": "iana", + "extensions": ["pages"] + }, + "application/vnd.apple.pkpass": { + "compressible": false, + "extensions": ["pkpass"] + }, + "application/vnd.arastra.swi": { + "source": "iana" + }, + "application/vnd.aristanetworks.swi": { + "source": "iana", + "extensions": ["swi"] + }, + "application/vnd.artisan+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.artsquare": { + "source": "iana" + }, + "application/vnd.astraea-software.iota": { + "source": "iana", + "extensions": ["iota"] + }, + "application/vnd.audiograph": { + "source": "iana", + "extensions": ["aep"] + }, + "application/vnd.autopackage": { + "source": "iana" + }, + "application/vnd.avalon+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.avistar+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.balsamiq.bmml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["bmml"] + }, + "application/vnd.balsamiq.bmpr": { + "source": "iana" + }, + "application/vnd.banana-accounting": { + "source": "iana" + }, + "application/vnd.bbf.usp.error": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bekitzur-stech+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bint.med-content": { + "source": "iana" + }, + "application/vnd.biopax.rdf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.blink-idb-value-wrapper": { + "source": "iana" + }, + "application/vnd.blueice.multipass": { + "source": "iana", + "extensions": ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + "source": "iana" + }, + "application/vnd.bluetooth.le.oob": { + "source": "iana" + }, + "application/vnd.bmi": { + "source": "iana", + "extensions": ["bmi"] + }, + "application/vnd.bpf": { + "source": "iana" + }, + "application/vnd.bpf3": { + "source": "iana" + }, + "application/vnd.businessobjects": { + "source": "iana", + "extensions": ["rep"] + }, + "application/vnd.byu.uapi+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cab-jscript": { + "source": "iana" + }, + "application/vnd.canon-cpdl": { + "source": "iana" + }, + "application/vnd.canon-lips": { + "source": "iana" + }, + "application/vnd.capasystems-pg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cendio.thinlinc.clientconf": { + "source": "iana" + }, + "application/vnd.century-systems.tcp_stream": { + "source": "iana" + }, + "application/vnd.chemdraw+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdxml"] + }, + "application/vnd.chess-pgn": { + "source": "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + "source": "iana", + "extensions": ["mmd"] + }, + "application/vnd.ciedi": { + "source": "iana" + }, + "application/vnd.cinderella": { + "source": "iana", + "extensions": ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + "source": "iana" + }, + "application/vnd.citationstyles.style+xml": { + "source": "iana", + "compressible": true, + "extensions": ["csl"] + }, + "application/vnd.claymore": { + "source": "iana", + "extensions": ["cla"] + }, + "application/vnd.cloanto.rp9": { + "source": "iana", + "extensions": ["rp9"] + }, + "application/vnd.clonk.c4group": { + "source": "iana", + "extensions": ["c4g","c4d","c4f","c4p","c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + "source": "iana", + "extensions": ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + "source": "iana", + "extensions": ["c11amz"] + }, + "application/vnd.coffeescript": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet-template": { + "source": "iana" + }, + "application/vnd.collection+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.doc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.next+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.comicbook+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.comicbook-rar": { + "source": "iana" + }, + "application/vnd.commerce-battelle": { + "source": "iana" + }, + "application/vnd.commonspace": { + "source": "iana", + "extensions": ["csp"] + }, + "application/vnd.contact.cmsg": { + "source": "iana", + "extensions": ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cosmocaller": { + "source": "iana", + "extensions": ["cmc"] + }, + "application/vnd.crick.clicker": { + "source": "iana", + "extensions": ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + "source": "iana", + "extensions": ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + "source": "iana", + "extensions": ["clkp"] + }, + "application/vnd.crick.clicker.template": { + "source": "iana", + "extensions": ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + "source": "iana", + "extensions": ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wbs"] + }, + "application/vnd.cryptii.pipe+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.crypto-shade-file": { + "source": "iana" + }, + "application/vnd.cryptomator.encrypted": { + "source": "iana" + }, + "application/vnd.cryptomator.vault": { + "source": "iana" + }, + "application/vnd.ctc-posml": { + "source": "iana", + "extensions": ["pml"] + }, + "application/vnd.ctct.ws+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cups-pdf": { + "source": "iana" + }, + "application/vnd.cups-postscript": { + "source": "iana" + }, + "application/vnd.cups-ppd": { + "source": "iana", + "extensions": ["ppd"] + }, + "application/vnd.cups-raster": { + "source": "iana" + }, + "application/vnd.cups-raw": { + "source": "iana" + }, + "application/vnd.curl": { + "source": "iana" + }, + "application/vnd.curl.car": { + "source": "apache", + "extensions": ["car"] + }, + "application/vnd.curl.pcurl": { + "source": "apache", + "extensions": ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cybank": { + "source": "iana" + }, + "application/vnd.cyclonedx+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cyclonedx+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.d2l.coursepackage1p0+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.d3m-dataset": { + "source": "iana" + }, + "application/vnd.d3m-problem": { + "source": "iana" + }, + "application/vnd.dart": { + "source": "iana", + "compressible": true, + "extensions": ["dart"] + }, + "application/vnd.data-vision.rdz": { + "source": "iana", + "extensions": ["rdz"] + }, + "application/vnd.datapackage+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dataresource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dbf": { + "source": "iana", + "extensions": ["dbf"] + }, + "application/vnd.debian.binary-package": { + "source": "iana" + }, + "application/vnd.dece.data": { + "source": "iana", + "extensions": ["uvf","uvvf","uvd","uvvd"] + }, + "application/vnd.dece.ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uvt","uvvt"] + }, + "application/vnd.dece.unspecified": { + "source": "iana", + "extensions": ["uvx","uvvx"] + }, + "application/vnd.dece.zip": { + "source": "iana", + "extensions": ["uvz","uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + "source": "iana", + "extensions": ["fe_launch"] + }, + "application/vnd.desmume.movie": { + "source": "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + "source": "iana" + }, + "application/vnd.dm.delegation+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dna": { + "source": "iana", + "extensions": ["dna"] + }, + "application/vnd.document+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dolby.mlp": { + "source": "apache", + "extensions": ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + "source": "iana" + }, + "application/vnd.dolby.mobile.2": { + "source": "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + "source": "iana" + }, + "application/vnd.dpgraph": { + "source": "iana", + "extensions": ["dpg"] + }, + "application/vnd.dreamfactory": { + "source": "iana", + "extensions": ["dfac"] + }, + "application/vnd.drive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ds-keypoint": { + "source": "apache", + "extensions": ["kpxx"] + }, + "application/vnd.dtg.local": { + "source": "iana" + }, + "application/vnd.dtg.local.flash": { + "source": "iana" + }, + "application/vnd.dtg.local.html": { + "source": "iana" + }, + "application/vnd.dvb.ait": { + "source": "iana", + "extensions": ["ait"] + }, + "application/vnd.dvb.dvbisl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.dvbj": { + "source": "iana" + }, + "application/vnd.dvb.esgcontainer": { + "source": "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + "source": "iana" + }, + "application/vnd.dvb.ipdcroaming": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + "source": "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-container+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-generic+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-init+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.pfr": { + "source": "iana" + }, + "application/vnd.dvb.service": { + "source": "iana", + "extensions": ["svc"] + }, + "application/vnd.dxr": { + "source": "iana" + }, + "application/vnd.dynageo": { + "source": "iana", + "extensions": ["geo"] + }, + "application/vnd.dzr": { + "source": "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + "source": "iana" + }, + "application/vnd.ecdis-update": { + "source": "iana" + }, + "application/vnd.ecip.rlp": { + "source": "iana" + }, + "application/vnd.eclipse.ditto+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ecowin.chart": { + "source": "iana", + "extensions": ["mag"] + }, + "application/vnd.ecowin.filerequest": { + "source": "iana" + }, + "application/vnd.ecowin.fileupdate": { + "source": "iana" + }, + "application/vnd.ecowin.series": { + "source": "iana" + }, + "application/vnd.ecowin.seriesrequest": { + "source": "iana" + }, + "application/vnd.ecowin.seriesupdate": { + "source": "iana" + }, + "application/vnd.efi.img": { + "source": "iana" + }, + "application/vnd.efi.iso": { + "source": "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.enliven": { + "source": "iana", + "extensions": ["nml"] + }, + "application/vnd.enphase.envoy": { + "source": "iana" + }, + "application/vnd.eprints.data+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.epson.esf": { + "source": "iana", + "extensions": ["esf"] + }, + "application/vnd.epson.msf": { + "source": "iana", + "extensions": ["msf"] + }, + "application/vnd.epson.quickanime": { + "source": "iana", + "extensions": ["qam"] + }, + "application/vnd.epson.salt": { + "source": "iana", + "extensions": ["slt"] + }, + "application/vnd.epson.ssf": { + "source": "iana", + "extensions": ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + "source": "iana" + }, + "application/vnd.espass-espass+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.eszigno3+xml": { + "source": "iana", + "compressible": true, + "extensions": ["es3","et3"] + }, + "application/vnd.etsi.aoc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.asic-e+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.asic-s+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.cug+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvcommand+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-bc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-cod+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvservice+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsync+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mcid+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mheg5": { + "source": "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.pstn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.sci+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.simservs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.timestamp-token": { + "source": "iana" + }, + "application/vnd.etsi.tsl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.tsl.der": { + "source": "iana" + }, + "application/vnd.eu.kasparian.car+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.eudora.data": { + "source": "iana" + }, + "application/vnd.evolv.ecig.profile": { + "source": "iana" + }, + "application/vnd.evolv.ecig.settings": { + "source": "iana" + }, + "application/vnd.evolv.ecig.theme": { + "source": "iana" + }, + "application/vnd.exstream-empower+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.exstream-package": { + "source": "iana" + }, + "application/vnd.ezpix-album": { + "source": "iana", + "extensions": ["ez2"] + }, + "application/vnd.ezpix-package": { + "source": "iana", + "extensions": ["ez3"] + }, + "application/vnd.f-secure.mobile": { + "source": "iana" + }, + "application/vnd.familysearch.gedcom+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.fastcopy-disk-image": { + "source": "iana" + }, + "application/vnd.fdf": { + "source": "iana", + "extensions": ["fdf"] + }, + "application/vnd.fdsn.mseed": { + "source": "iana", + "extensions": ["mseed"] + }, + "application/vnd.fdsn.seed": { + "source": "iana", + "extensions": ["seed","dataless"] + }, + "application/vnd.ffsns": { + "source": "iana" + }, + "application/vnd.ficlab.flb+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.filmit.zfc": { + "source": "iana" + }, + "application/vnd.fints": { + "source": "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + "source": "iana" + }, + "application/vnd.flographit": { + "source": "iana", + "extensions": ["gph"] + }, + "application/vnd.fluxtime.clip": { + "source": "iana", + "extensions": ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + "source": "iana" + }, + "application/vnd.framemaker": { + "source": "iana", + "extensions": ["fm","frame","maker","book"] + }, + "application/vnd.frogans.fnc": { + "source": "iana", + "extensions": ["fnc"] + }, + "application/vnd.frogans.ltf": { + "source": "iana", + "extensions": ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + "source": "iana", + "extensions": ["fsc"] + }, + "application/vnd.fujifilm.fb.docuworks": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.docuworks.binder": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.jfi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.fujitsu.oasys": { + "source": "iana", + "extensions": ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + "source": "iana", + "extensions": ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + "source": "iana", + "extensions": ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + "source": "iana", + "extensions": ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + "source": "iana", + "extensions": ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + "source": "iana" + }, + "application/vnd.fujixerox.art4": { + "source": "iana" + }, + "application/vnd.fujixerox.ddd": { + "source": "iana", + "extensions": ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + "source": "iana", + "extensions": ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + "source": "iana", + "extensions": ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujixerox.hbpl": { + "source": "iana" + }, + "application/vnd.fut-misnet": { + "source": "iana" + }, + "application/vnd.futoin+cbor": { + "source": "iana" + }, + "application/vnd.futoin+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.fuzzysheet": { + "source": "iana", + "extensions": ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + "source": "iana", + "extensions": ["txd"] + }, + "application/vnd.gentics.grd+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geo+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geocube+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.geogebra.file": { + "source": "iana", + "extensions": ["ggb"] + }, + "application/vnd.geogebra.slides": { + "source": "iana" + }, + "application/vnd.geogebra.tool": { + "source": "iana", + "extensions": ["ggt"] + }, + "application/vnd.geometry-explorer": { + "source": "iana", + "extensions": ["gex","gre"] + }, + "application/vnd.geonext": { + "source": "iana", + "extensions": ["gxt"] + }, + "application/vnd.geoplan": { + "source": "iana", + "extensions": ["g2w"] + }, + "application/vnd.geospace": { + "source": "iana", + "extensions": ["g3w"] + }, + "application/vnd.gerber": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + "source": "iana" + }, + "application/vnd.gmx": { + "source": "iana", + "extensions": ["gmx"] + }, + "application/vnd.google-apps.document": { + "compressible": false, + "extensions": ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + "compressible": false, + "extensions": ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + "compressible": false, + "extensions": ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["kml"] + }, + "application/vnd.google-earth.kmz": { + "source": "iana", + "compressible": false, + "extensions": ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.gov.sk.e-form+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.grafeq": { + "source": "iana", + "extensions": ["gqf","gqs"] + }, + "application/vnd.gridmp": { + "source": "iana" + }, + "application/vnd.groove-account": { + "source": "iana", + "extensions": ["gac"] + }, + "application/vnd.groove-help": { + "source": "iana", + "extensions": ["ghf"] + }, + "application/vnd.groove-identity-message": { + "source": "iana", + "extensions": ["gim"] + }, + "application/vnd.groove-injector": { + "source": "iana", + "extensions": ["grv"] + }, + "application/vnd.groove-tool-message": { + "source": "iana", + "extensions": ["gtm"] + }, + "application/vnd.groove-tool-template": { + "source": "iana", + "extensions": ["tpl"] + }, + "application/vnd.groove-vcard": { + "source": "iana", + "extensions": ["vcg"] + }, + "application/vnd.hal+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hal+xml": { + "source": "iana", + "compressible": true, + "extensions": ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zmm"] + }, + "application/vnd.hbci": { + "source": "iana", + "extensions": ["hbci"] + }, + "application/vnd.hc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hcl-bireports": { + "source": "iana" + }, + "application/vnd.hdt": { + "source": "iana" + }, + "application/vnd.heroku+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hhe.lesson-player": { + "source": "iana", + "extensions": ["les"] + }, + "application/vnd.hl7cda+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.hl7v2+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.hp-hpgl": { + "source": "iana", + "extensions": ["hpgl"] + }, + "application/vnd.hp-hpid": { + "source": "iana", + "extensions": ["hpid"] + }, + "application/vnd.hp-hps": { + "source": "iana", + "extensions": ["hps"] + }, + "application/vnd.hp-jlyt": { + "source": "iana", + "extensions": ["jlt"] + }, + "application/vnd.hp-pcl": { + "source": "iana", + "extensions": ["pcl"] + }, + "application/vnd.hp-pclxl": { + "source": "iana", + "extensions": ["pclxl"] + }, + "application/vnd.httphone": { + "source": "iana" + }, + "application/vnd.hydrostatix.sof-data": { + "source": "iana", + "extensions": ["sfd-hdstx"] + }, + "application/vnd.hyper+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyper-item+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyperdrive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hzn-3d-crossword": { + "source": "iana" + }, + "application/vnd.ibm.afplinedata": { + "source": "iana" + }, + "application/vnd.ibm.electronic-media": { + "source": "iana" + }, + "application/vnd.ibm.minipay": { + "source": "iana", + "extensions": ["mpy"] + }, + "application/vnd.ibm.modcap": { + "source": "iana", + "extensions": ["afp","listafp","list3820"] + }, + "application/vnd.ibm.rights-management": { + "source": "iana", + "extensions": ["irm"] + }, + "application/vnd.ibm.secure-container": { + "source": "iana", + "extensions": ["sc"] + }, + "application/vnd.iccprofile": { + "source": "iana", + "extensions": ["icc","icm"] + }, + "application/vnd.ieee.1905": { + "source": "iana" + }, + "application/vnd.igloader": { + "source": "iana", + "extensions": ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.imagemeter.image+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.immervision-ivp": { + "source": "iana", + "extensions": ["ivp"] + }, + "application/vnd.immervision-ivu": { + "source": "iana", + "extensions": ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p2": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p3": { + "source": "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.informedcontrol.rms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.informix-visionary": { + "source": "iana" + }, + "application/vnd.infotech.project": { + "source": "iana" + }, + "application/vnd.infotech.project+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.innopath.wamp.notification": { + "source": "iana" + }, + "application/vnd.insors.igm": { + "source": "iana", + "extensions": ["igm"] + }, + "application/vnd.intercon.formnet": { + "source": "iana", + "extensions": ["xpw","xpx"] + }, + "application/vnd.intergeo": { + "source": "iana", + "extensions": ["i2g"] + }, + "application/vnd.intertrust.digibox": { + "source": "iana" + }, + "application/vnd.intertrust.nncp": { + "source": "iana" + }, + "application/vnd.intu.qbo": { + "source": "iana", + "extensions": ["qbo"] + }, + "application/vnd.intu.qfx": { + "source": "iana", + "extensions": ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.conceptitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.packageitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.planningitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ipunplugged.rcprofile": { + "source": "iana", + "extensions": ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["irp"] + }, + "application/vnd.is-xpr": { + "source": "iana", + "extensions": ["xpr"] + }, + "application/vnd.isac.fcs": { + "source": "iana", + "extensions": ["fcs"] + }, + "application/vnd.iso11783-10+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.jam": { + "source": "iana", + "extensions": ["jam"] + }, + "application/vnd.japannet-directory-service": { + "source": "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-payment-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-registration": { + "source": "iana" + }, + "application/vnd.japannet-registration-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-verification": { + "source": "iana" + }, + "application/vnd.japannet-verification-wakeup": { + "source": "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + "source": "iana", + "extensions": ["rms"] + }, + "application/vnd.jisp": { + "source": "iana", + "extensions": ["jisp"] + }, + "application/vnd.joost.joda-archive": { + "source": "iana", + "extensions": ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + "source": "iana" + }, + "application/vnd.kahootz": { + "source": "iana", + "extensions": ["ktz","ktr"] + }, + "application/vnd.kde.karbon": { + "source": "iana", + "extensions": ["karbon"] + }, + "application/vnd.kde.kchart": { + "source": "iana", + "extensions": ["chrt"] + }, + "application/vnd.kde.kformula": { + "source": "iana", + "extensions": ["kfo"] + }, + "application/vnd.kde.kivio": { + "source": "iana", + "extensions": ["flw"] + }, + "application/vnd.kde.kontour": { + "source": "iana", + "extensions": ["kon"] + }, + "application/vnd.kde.kpresenter": { + "source": "iana", + "extensions": ["kpr","kpt"] + }, + "application/vnd.kde.kspread": { + "source": "iana", + "extensions": ["ksp"] + }, + "application/vnd.kde.kword": { + "source": "iana", + "extensions": ["kwd","kwt"] + }, + "application/vnd.kenameaapp": { + "source": "iana", + "extensions": ["htke"] + }, + "application/vnd.kidspiration": { + "source": "iana", + "extensions": ["kia"] + }, + "application/vnd.kinar": { + "source": "iana", + "extensions": ["kne","knp"] + }, + "application/vnd.koan": { + "source": "iana", + "extensions": ["skp","skd","skt","skm"] + }, + "application/vnd.kodak-descriptor": { + "source": "iana", + "extensions": ["sse"] + }, + "application/vnd.las": { + "source": "iana" + }, + "application/vnd.las.las+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.las.las+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lasxml"] + }, + "application/vnd.laszip": { + "source": "iana" + }, + "application/vnd.leap+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.liberty-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.llamagraphics.life-balance.desktop": { + "source": "iana", + "extensions": ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lbe"] + }, + "application/vnd.logipipe.circuit+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.loom": { + "source": "iana" + }, + "application/vnd.lotus-1-2-3": { + "source": "iana", + "extensions": ["123"] + }, + "application/vnd.lotus-approach": { + "source": "iana", + "extensions": ["apr"] + }, + "application/vnd.lotus-freelance": { + "source": "iana", + "extensions": ["pre"] + }, + "application/vnd.lotus-notes": { + "source": "iana", + "extensions": ["nsf"] + }, + "application/vnd.lotus-organizer": { + "source": "iana", + "extensions": ["org"] + }, + "application/vnd.lotus-screencam": { + "source": "iana", + "extensions": ["scm"] + }, + "application/vnd.lotus-wordpro": { + "source": "iana", + "extensions": ["lwp"] + }, + "application/vnd.macports.portpkg": { + "source": "iana", + "extensions": ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + "source": "iana", + "extensions": ["mvt"] + }, + "application/vnd.marlin.drm.actiontoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.conftoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.license+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.mdcf": { + "source": "iana" + }, + "application/vnd.mason+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.maxar.archive.3tz+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.maxmind.maxmind-db": { + "source": "iana" + }, + "application/vnd.mcd": { + "source": "iana", + "extensions": ["mcd"] + }, + "application/vnd.medcalcdata": { + "source": "iana", + "extensions": ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + "source": "iana", + "extensions": ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + "source": "iana" + }, + "application/vnd.mfer": { + "source": "iana", + "extensions": ["mwf"] + }, + "application/vnd.mfmp": { + "source": "iana", + "extensions": ["mfm"] + }, + "application/vnd.micro+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.micrografx.flo": { + "source": "iana", + "extensions": ["flo"] + }, + "application/vnd.micrografx.igx": { + "source": "iana", + "extensions": ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + "source": "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + "source": "iana" + }, + "application/vnd.miele+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.mif": { + "source": "iana", + "extensions": ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + "source": "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + "source": "iana" + }, + "application/vnd.mobius.daf": { + "source": "iana", + "extensions": ["daf"] + }, + "application/vnd.mobius.dis": { + "source": "iana", + "extensions": ["dis"] + }, + "application/vnd.mobius.mbk": { + "source": "iana", + "extensions": ["mbk"] + }, + "application/vnd.mobius.mqy": { + "source": "iana", + "extensions": ["mqy"] + }, + "application/vnd.mobius.msl": { + "source": "iana", + "extensions": ["msl"] + }, + "application/vnd.mobius.plc": { + "source": "iana", + "extensions": ["plc"] + }, + "application/vnd.mobius.txf": { + "source": "iana", + "extensions": ["txf"] + }, + "application/vnd.mophun.application": { + "source": "iana", + "extensions": ["mpn"] + }, + "application/vnd.mophun.certificate": { + "source": "iana", + "extensions": ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + "source": "iana" + }, + "application/vnd.motorola.iprm": { + "source": "iana" + }, + "application/vnd.mozilla.xul+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xul"] + }, + "application/vnd.ms-3mfdocument": { + "source": "iana" + }, + "application/vnd.ms-artgalry": { + "source": "iana", + "extensions": ["cil"] + }, + "application/vnd.ms-asf": { + "source": "iana" + }, + "application/vnd.ms-cab-compressed": { + "source": "iana", + "extensions": ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + "source": "apache" + }, + "application/vnd.ms-excel": { + "source": "iana", + "compressible": false, + "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + "source": "iana", + "extensions": ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + "source": "iana", + "extensions": ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + "source": "iana", + "extensions": ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + "source": "iana", + "extensions": ["xltm"] + }, + "application/vnd.ms-fontobject": { + "source": "iana", + "compressible": true, + "extensions": ["eot"] + }, + "application/vnd.ms-htmlhelp": { + "source": "iana", + "extensions": ["chm"] + }, + "application/vnd.ms-ims": { + "source": "iana", + "extensions": ["ims"] + }, + "application/vnd.ms-lrm": { + "source": "iana", + "extensions": ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-officetheme": { + "source": "iana", + "extensions": ["thmx"] + }, + "application/vnd.ms-opentype": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-outlook": { + "compressible": false, + "extensions": ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + "source": "apache" + }, + "application/vnd.ms-pki.seccat": { + "source": "apache", + "extensions": ["cat"] + }, + "application/vnd.ms-pki.stl": { + "source": "apache", + "extensions": ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-powerpoint": { + "source": "iana", + "compressible": false, + "extensions": ["ppt","pps","pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + "source": "iana", + "extensions": ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + "source": "iana", + "extensions": ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + "source": "iana", + "extensions": ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + "source": "iana", + "extensions": ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + "source": "iana", + "extensions": ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-printing.printticket+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-printschematicket+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-project": { + "source": "iana", + "extensions": ["mpp","mpt"] + }, + "application/vnd.ms-tnef": { + "source": "iana" + }, + "application/vnd.ms-windows.devicepairing": { + "source": "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + "source": "iana" + }, + "application/vnd.ms-windows.printerpairing": { + "source": "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + "source": "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + "source": "iana", + "extensions": ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + "source": "iana", + "extensions": ["dotm"] + }, + "application/vnd.ms-works": { + "source": "iana", + "extensions": ["wps","wks","wcm","wdb"] + }, + "application/vnd.ms-wpl": { + "source": "iana", + "extensions": ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + "source": "iana", + "compressible": false, + "extensions": ["xps"] + }, + "application/vnd.msa-disk-image": { + "source": "iana" + }, + "application/vnd.mseq": { + "source": "iana", + "extensions": ["mseq"] + }, + "application/vnd.msign": { + "source": "iana" + }, + "application/vnd.multiad.creator": { + "source": "iana" + }, + "application/vnd.multiad.creator.cif": { + "source": "iana" + }, + "application/vnd.music-niff": { + "source": "iana" + }, + "application/vnd.musician": { + "source": "iana", + "extensions": ["mus"] + }, + "application/vnd.muvee.style": { + "source": "iana", + "extensions": ["msty"] + }, + "application/vnd.mynfc": { + "source": "iana", + "extensions": ["taglet"] + }, + "application/vnd.nacamar.ybrid+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ncd.control": { + "source": "iana" + }, + "application/vnd.ncd.reference": { + "source": "iana" + }, + "application/vnd.nearst.inv+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nebumind.line": { + "source": "iana" + }, + "application/vnd.nervana": { + "source": "iana" + }, + "application/vnd.netfpx": { + "source": "iana" + }, + "application/vnd.neurolanguage.nlu": { + "source": "iana", + "extensions": ["nlu"] + }, + "application/vnd.nimn": { + "source": "iana" + }, + "application/vnd.nintendo.nitro.rom": { + "source": "iana" + }, + "application/vnd.nintendo.snes.rom": { + "source": "iana" + }, + "application/vnd.nitf": { + "source": "iana", + "extensions": ["ntf","nitf"] + }, + "application/vnd.noblenet-directory": { + "source": "iana", + "extensions": ["nnd"] + }, + "application/vnd.noblenet-sealer": { + "source": "iana", + "extensions": ["nns"] + }, + "application/vnd.noblenet-web": { + "source": "iana", + "extensions": ["nnw"] + }, + "application/vnd.nokia.catalogs": { + "source": "iana" + }, + "application/vnd.nokia.conml+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.conml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.iptv.config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.isds-radio-presets": { + "source": "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.landmark+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.landmarkcollection+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.n-gage.ac+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ac"] + }, + "application/vnd.nokia.n-gage.data": { + "source": "iana", + "extensions": ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + "source": "iana", + "extensions": ["n-gage"] + }, + "application/vnd.nokia.ncd": { + "source": "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.pcd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.radio-preset": { + "source": "iana", + "extensions": ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + "source": "iana", + "extensions": ["rpss"] + }, + "application/vnd.novadigm.edm": { + "source": "iana", + "extensions": ["edm"] + }, + "application/vnd.novadigm.edx": { + "source": "iana", + "extensions": ["edx"] + }, + "application/vnd.novadigm.ext": { + "source": "iana", + "extensions": ["ext"] + }, + "application/vnd.ntt-local.content-share": { + "source": "iana" + }, + "application/vnd.ntt-local.file-transfer": { + "source": "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.chart": { + "source": "iana", + "extensions": ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + "source": "iana", + "extensions": ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + "source": "iana", + "extensions": ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + "source": "iana", + "extensions": ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + "source": "iana", + "extensions": ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + "source": "iana", + "compressible": false, + "extensions": ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + "source": "iana", + "extensions": ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + "source": "iana", + "extensions": ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + "source": "iana", + "extensions": ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + "source": "iana", + "extensions": ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + "source": "iana", + "compressible": false, + "extensions": ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + "source": "iana", + "extensions": ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + "source": "iana", + "compressible": false, + "extensions": ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + "source": "iana", + "extensions": ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + "source": "iana", + "extensions": ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + "source": "iana", + "extensions": ["oth"] + }, + "application/vnd.obn": { + "source": "iana" + }, + "application/vnd.ocf+cbor": { + "source": "iana" + }, + "application/vnd.oci.image.manifest.v1+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oftn.l10n+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.cspg-hexbinary": { + "source": "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.dae.xhtml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.pae.gem": { + "source": "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.spdlist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.ueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.userprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.olpc-sugar": { + "source": "iana", + "extensions": ["xo"] + }, + "application/vnd.oma-scws-config": { + "source": "iana" + }, + "application/vnd.oma-scws-http-request": { + "source": "iana" + }, + "application/vnd.oma-scws-http-response": { + "source": "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.imd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.ltkm": { + "source": "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.provisioningtrigger": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgboot": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sgdu": { + "source": "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + "source": "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sprov+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.stkm": { + "source": "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-feature-handler+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-pcc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-subs-invite+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-user-prefs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.dcd": { + "source": "iana" + }, + "application/vnd.oma.dcdc": { + "source": "iana" + }, + "application/vnd.oma.dd2+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.group-usage-list+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+cbor": { + "source": "iana" + }, + "application/vnd.oma.lwm2m+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+tlv": { + "source": "iana" + }, + "application/vnd.oma.pal+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.final-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.groups+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.push": { + "source": "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.xcap-directory+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omads-email+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-file+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-folder+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omaloc-supl-init": { + "source": "iana" + }, + "application/vnd.onepager": { + "source": "iana" + }, + "application/vnd.onepagertamp": { + "source": "iana" + }, + "application/vnd.onepagertamx": { + "source": "iana" + }, + "application/vnd.onepagertat": { + "source": "iana" + }, + "application/vnd.onepagertatp": { + "source": "iana" + }, + "application/vnd.onepagertatx": { + "source": "iana" + }, + "application/vnd.openblox.game+xml": { + "source": "iana", + "compressible": true, + "extensions": ["obgx"] + }, + "application/vnd.openblox.game-binary": { + "source": "iana" + }, + "application/vnd.openeye.oeb": { + "source": "iana" + }, + "application/vnd.openofficeorg.extension": { + "source": "apache", + "extensions": ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osm"] + }, + "application/vnd.opentimestamps.ots": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + "source": "iana", + "extensions": ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + "source": "iana", + "extensions": ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + "source": "iana", + "extensions": ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + "source": "iana", + "compressible": false, + "extensions": ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + "source": "iana", + "extensions": ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "source": "iana", + "compressible": false, + "extensions": ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + "source": "iana", + "extensions": ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.relationships+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oracle.resource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.orange.indata": { + "source": "iana" + }, + "application/vnd.osa.netdeploy": { + "source": "iana" + }, + "application/vnd.osgeo.mapguide.package": { + "source": "iana", + "extensions": ["mgp"] + }, + "application/vnd.osgi.bundle": { + "source": "iana" + }, + "application/vnd.osgi.dp": { + "source": "iana", + "extensions": ["dp"] + }, + "application/vnd.osgi.subsystem": { + "source": "iana", + "extensions": ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oxli.countgraph": { + "source": "iana" + }, + "application/vnd.pagerduty+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.palm": { + "source": "iana", + "extensions": ["pdb","pqa","oprc"] + }, + "application/vnd.panoply": { + "source": "iana" + }, + "application/vnd.paos.xml": { + "source": "iana" + }, + "application/vnd.patentdive": { + "source": "iana" + }, + "application/vnd.patientecommsdoc": { + "source": "iana" + }, + "application/vnd.pawaafile": { + "source": "iana", + "extensions": ["paw"] + }, + "application/vnd.pcos": { + "source": "iana" + }, + "application/vnd.pg.format": { + "source": "iana", + "extensions": ["str"] + }, + "application/vnd.pg.osasli": { + "source": "iana", + "extensions": ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + "source": "iana" + }, + "application/vnd.picsel": { + "source": "iana", + "extensions": ["efif"] + }, + "application/vnd.pmi.widget": { + "source": "iana", + "extensions": ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.pocketlearn": { + "source": "iana", + "extensions": ["plf"] + }, + "application/vnd.powerbuilder6": { + "source": "iana", + "extensions": ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + "source": "iana" + }, + "application/vnd.powerbuilder7": { + "source": "iana" + }, + "application/vnd.powerbuilder7-s": { + "source": "iana" + }, + "application/vnd.powerbuilder75": { + "source": "iana" + }, + "application/vnd.powerbuilder75-s": { + "source": "iana" + }, + "application/vnd.preminet": { + "source": "iana" + }, + "application/vnd.previewsystems.box": { + "source": "iana", + "extensions": ["box"] + }, + "application/vnd.proteus.magazine": { + "source": "iana", + "extensions": ["mgz"] + }, + "application/vnd.psfs": { + "source": "iana" + }, + "application/vnd.publishare-delta-tree": { + "source": "iana", + "extensions": ["qps"] + }, + "application/vnd.pvi.ptid1": { + "source": "iana", + "extensions": ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + "source": "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.qualcomm.brew-app-res": { + "source": "iana" + }, + "application/vnd.quarantainenet": { + "source": "iana" + }, + "application/vnd.quark.quarkxpress": { + "source": "iana", + "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] + }, + "application/vnd.quobject-quoxdocument": { + "source": "iana" + }, + "application/vnd.radisys.moml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-stream+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-base+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-group+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.rainstor.data": { + "source": "iana" + }, + "application/vnd.rapid": { + "source": "iana" + }, + "application/vnd.rar": { + "source": "iana", + "extensions": ["rar"] + }, + "application/vnd.realvnc.bed": { + "source": "iana", + "extensions": ["bed"] + }, + "application/vnd.recordare.musicxml": { + "source": "iana", + "extensions": ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + "source": "iana" + }, + "application/vnd.resilient.logic": { + "source": "iana" + }, + "application/vnd.restful+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.rig.cryptonote": { + "source": "iana", + "extensions": ["cryptonote"] + }, + "application/vnd.rim.cod": { + "source": "apache", + "extensions": ["cod"] + }, + "application/vnd.rn-realmedia": { + "source": "apache", + "extensions": ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + "source": "apache", + "extensions": ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + "source": "iana", + "compressible": true, + "extensions": ["link66"] + }, + "application/vnd.rs-274x": { + "source": "iana" + }, + "application/vnd.ruckus.download": { + "source": "iana" + }, + "application/vnd.s3sms": { + "source": "iana" + }, + "application/vnd.sailingtracker.track": { + "source": "iana", + "extensions": ["st"] + }, + "application/vnd.sar": { + "source": "iana" + }, + "application/vnd.sbm.cid": { + "source": "iana" + }, + "application/vnd.sbm.mid2": { + "source": "iana" + }, + "application/vnd.scribus": { + "source": "iana" + }, + "application/vnd.sealed.3df": { + "source": "iana" + }, + "application/vnd.sealed.csf": { + "source": "iana" + }, + "application/vnd.sealed.doc": { + "source": "iana" + }, + "application/vnd.sealed.eml": { + "source": "iana" + }, + "application/vnd.sealed.mht": { + "source": "iana" + }, + "application/vnd.sealed.net": { + "source": "iana" + }, + "application/vnd.sealed.ppt": { + "source": "iana" + }, + "application/vnd.sealed.tiff": { + "source": "iana" + }, + "application/vnd.sealed.xls": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + "source": "iana" + }, + "application/vnd.seemail": { + "source": "iana", + "extensions": ["see"] + }, + "application/vnd.seis+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.sema": { + "source": "iana", + "extensions": ["sema"] + }, + "application/vnd.semd": { + "source": "iana", + "extensions": ["semd"] + }, + "application/vnd.semf": { + "source": "iana", + "extensions": ["semf"] + }, + "application/vnd.shade-save-file": { + "source": "iana" + }, + "application/vnd.shana.informed.formdata": { + "source": "iana", + "extensions": ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + "source": "iana", + "extensions": ["itp"] + }, + "application/vnd.shana.informed.interchange": { + "source": "iana", + "extensions": ["iif"] + }, + "application/vnd.shana.informed.package": { + "source": "iana", + "extensions": ["ipk"] + }, + "application/vnd.shootproof+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shopkick+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shp": { + "source": "iana" + }, + "application/vnd.shx": { + "source": "iana" + }, + "application/vnd.sigrok.session": { + "source": "iana" + }, + "application/vnd.simtech-mindmapper": { + "source": "iana", + "extensions": ["twd","twds"] + }, + "application/vnd.siren+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.smaf": { + "source": "iana", + "extensions": ["mmf"] + }, + "application/vnd.smart.notebook": { + "source": "iana" + }, + "application/vnd.smart.teacher": { + "source": "iana", + "extensions": ["teacher"] + }, + "application/vnd.snesdev-page-table": { + "source": "iana" + }, + "application/vnd.software602.filler.form+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fo"] + }, + "application/vnd.software602.filler.form-xml-zip": { + "source": "iana" + }, + "application/vnd.solent.sdkm+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sdkm","sdkd"] + }, + "application/vnd.spotfire.dxp": { + "source": "iana", + "extensions": ["dxp"] + }, + "application/vnd.spotfire.sfs": { + "source": "iana", + "extensions": ["sfs"] + }, + "application/vnd.sqlite3": { + "source": "iana" + }, + "application/vnd.sss-cod": { + "source": "iana" + }, + "application/vnd.sss-dtf": { + "source": "iana" + }, + "application/vnd.sss-ntf": { + "source": "iana" + }, + "application/vnd.stardivision.calc": { + "source": "apache", + "extensions": ["sdc"] + }, + "application/vnd.stardivision.draw": { + "source": "apache", + "extensions": ["sda"] + }, + "application/vnd.stardivision.impress": { + "source": "apache", + "extensions": ["sdd"] + }, + "application/vnd.stardivision.math": { + "source": "apache", + "extensions": ["smf"] + }, + "application/vnd.stardivision.writer": { + "source": "apache", + "extensions": ["sdw","vor"] + }, + "application/vnd.stardivision.writer-global": { + "source": "apache", + "extensions": ["sgl"] + }, + "application/vnd.stepmania.package": { + "source": "iana", + "extensions": ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + "source": "iana", + "extensions": ["sm"] + }, + "application/vnd.street-stream": { + "source": "iana" + }, + "application/vnd.sun.wadl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wadl"] + }, + "application/vnd.sun.xml.calc": { + "source": "apache", + "extensions": ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + "source": "apache", + "extensions": ["stc"] + }, + "application/vnd.sun.xml.draw": { + "source": "apache", + "extensions": ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + "source": "apache", + "extensions": ["std"] + }, + "application/vnd.sun.xml.impress": { + "source": "apache", + "extensions": ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + "source": "apache", + "extensions": ["sti"] + }, + "application/vnd.sun.xml.math": { + "source": "apache", + "extensions": ["sxm"] + }, + "application/vnd.sun.xml.writer": { + "source": "apache", + "extensions": ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + "source": "apache", + "extensions": ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + "source": "apache", + "extensions": ["stw"] + }, + "application/vnd.sus-calendar": { + "source": "iana", + "extensions": ["sus","susp"] + }, + "application/vnd.svd": { + "source": "iana", + "extensions": ["svd"] + }, + "application/vnd.swiftview-ics": { + "source": "iana" + }, + "application/vnd.sycle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.syft+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.symbian.install": { + "source": "apache", + "extensions": ["sis","sisx"] + }, + "application/vnd.syncml+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["ddf"] + }, + "application/vnd.syncml.dmtnds+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.syncml.ds.notification": { + "source": "iana" + }, + "application/vnd.tableschema+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tao.intent-module-archive": { + "source": "iana", + "extensions": ["tao"] + }, + "application/vnd.tcpdump.pcap": { + "source": "iana", + "extensions": ["pcap","cap","dmp"] + }, + "application/vnd.think-cell.ppttc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tmd.mediaflex.api+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.tml": { + "source": "iana" + }, + "application/vnd.tmobile-livetv": { + "source": "iana", + "extensions": ["tmo"] + }, + "application/vnd.tri.onesource": { + "source": "iana" + }, + "application/vnd.trid.tpt": { + "source": "iana", + "extensions": ["tpt"] + }, + "application/vnd.triscape.mxs": { + "source": "iana", + "extensions": ["mxs"] + }, + "application/vnd.trueapp": { + "source": "iana", + "extensions": ["tra"] + }, + "application/vnd.truedoc": { + "source": "iana" + }, + "application/vnd.ubisoft.webplayer": { + "source": "iana" + }, + "application/vnd.ufdl": { + "source": "iana", + "extensions": ["ufd","ufdl"] + }, + "application/vnd.uiq.theme": { + "source": "iana", + "extensions": ["utz"] + }, + "application/vnd.umajin": { + "source": "iana", + "extensions": ["umj"] + }, + "application/vnd.unity": { + "source": "iana", + "extensions": ["unityweb"] + }, + "application/vnd.uoml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uoml"] + }, + "application/vnd.uplanet.alert": { + "source": "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.channel": { + "source": "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.list": { + "source": "iana" + }, + "application/vnd.uplanet.list-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.signal": { + "source": "iana" + }, + "application/vnd.uri-map": { + "source": "iana" + }, + "application/vnd.valve.source.material": { + "source": "iana" + }, + "application/vnd.vcx": { + "source": "iana", + "extensions": ["vcx"] + }, + "application/vnd.vd-study": { + "source": "iana" + }, + "application/vnd.vectorworks": { + "source": "iana" + }, + "application/vnd.vel+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.verimatrix.vcas": { + "source": "iana" + }, + "application/vnd.veritone.aion+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.veryant.thin": { + "source": "iana" + }, + "application/vnd.ves.encrypted": { + "source": "iana" + }, + "application/vnd.vidsoft.vidconference": { + "source": "iana" + }, + "application/vnd.visio": { + "source": "iana", + "extensions": ["vsd","vst","vss","vsw"] + }, + "application/vnd.visionary": { + "source": "iana", + "extensions": ["vis"] + }, + "application/vnd.vividence.scriptfile": { + "source": "iana" + }, + "application/vnd.vsf": { + "source": "iana", + "extensions": ["vsf"] + }, + "application/vnd.wap.sic": { + "source": "iana" + }, + "application/vnd.wap.slc": { + "source": "iana" + }, + "application/vnd.wap.wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["wbxml"] + }, + "application/vnd.wap.wmlc": { + "source": "iana", + "extensions": ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + "source": "iana", + "extensions": ["wmlsc"] + }, + "application/vnd.webturbo": { + "source": "iana", + "extensions": ["wtb"] + }, + "application/vnd.wfa.dpp": { + "source": "iana" + }, + "application/vnd.wfa.p2p": { + "source": "iana" + }, + "application/vnd.wfa.wsc": { + "source": "iana" + }, + "application/vnd.windows.devicepairing": { + "source": "iana" + }, + "application/vnd.wmc": { + "source": "iana" + }, + "application/vnd.wmf.bootstrap": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica.package": { + "source": "iana" + }, + "application/vnd.wolfram.player": { + "source": "iana", + "extensions": ["nbp"] + }, + "application/vnd.wordperfect": { + "source": "iana", + "extensions": ["wpd"] + }, + "application/vnd.wqd": { + "source": "iana", + "extensions": ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + "source": "iana" + }, + "application/vnd.wt.stf": { + "source": "iana", + "extensions": ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + "source": "iana" + }, + "application/vnd.wv.csp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.wv.ssp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xacml+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.xara": { + "source": "iana", + "extensions": ["xar"] + }, + "application/vnd.xfdl": { + "source": "iana", + "extensions": ["xfdl"] + }, + "application/vnd.xfdl.webform": { + "source": "iana" + }, + "application/vnd.xmi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xmpie.cpkg": { + "source": "iana" + }, + "application/vnd.xmpie.dpkg": { + "source": "iana" + }, + "application/vnd.xmpie.plan": { + "source": "iana" + }, + "application/vnd.xmpie.ppkg": { + "source": "iana" + }, + "application/vnd.xmpie.xlim": { + "source": "iana" + }, + "application/vnd.yamaha.hv-dic": { + "source": "iana", + "extensions": ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + "source": "iana", + "extensions": ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + "source": "iana", + "extensions": ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + "source": "iana", + "extensions": ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + "source": "iana" + }, + "application/vnd.yamaha.smaf-audio": { + "source": "iana", + "extensions": ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + "source": "iana", + "extensions": ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + "source": "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + "source": "iana" + }, + "application/vnd.yaoweme": { + "source": "iana" + }, + "application/vnd.yellowriver-custom-menu": { + "source": "iana", + "extensions": ["cmp"] + }, + "application/vnd.youtube.yt": { + "source": "iana" + }, + "application/vnd.zul": { + "source": "iana", + "extensions": ["zir","zirz"] + }, + "application/vnd.zzazz.deck+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zaz"] + }, + "application/voicexml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["vxml"] + }, + "application/voucher-cms+json": { + "source": "iana", + "compressible": true + }, + "application/vq-rtcpxr": { + "source": "iana" + }, + "application/wasm": { + "source": "iana", + "compressible": true, + "extensions": ["wasm"] + }, + "application/watcherinfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wif"] + }, + "application/webpush-options+json": { + "source": "iana", + "compressible": true + }, + "application/whoispp-query": { + "source": "iana" + }, + "application/whoispp-response": { + "source": "iana" + }, + "application/widget": { + "source": "iana", + "extensions": ["wgt"] + }, + "application/winhlp": { + "source": "apache", + "extensions": ["hlp"] + }, + "application/wita": { + "source": "iana" + }, + "application/wordperfect5.1": { + "source": "iana" + }, + "application/wsdl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wsdl"] + }, + "application/wspolicy+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wspolicy"] + }, + "application/x-7z-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["7z"] + }, + "application/x-abiword": { + "source": "apache", + "extensions": ["abw"] + }, + "application/x-ace-compressed": { + "source": "apache", + "extensions": ["ace"] + }, + "application/x-amf": { + "source": "apache" + }, + "application/x-apple-diskimage": { + "source": "apache", + "extensions": ["dmg"] + }, + "application/x-arj": { + "compressible": false, + "extensions": ["arj"] + }, + "application/x-authorware-bin": { + "source": "apache", + "extensions": ["aab","x32","u32","vox"] + }, + "application/x-authorware-map": { + "source": "apache", + "extensions": ["aam"] + }, + "application/x-authorware-seg": { + "source": "apache", + "extensions": ["aas"] + }, + "application/x-bcpio": { + "source": "apache", + "extensions": ["bcpio"] + }, + "application/x-bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/x-bittorrent": { + "source": "apache", + "extensions": ["torrent"] + }, + "application/x-blorb": { + "source": "apache", + "extensions": ["blb","blorb"] + }, + "application/x-bzip": { + "source": "apache", + "compressible": false, + "extensions": ["bz"] + }, + "application/x-bzip2": { + "source": "apache", + "compressible": false, + "extensions": ["bz2","boz"] + }, + "application/x-cbr": { + "source": "apache", + "extensions": ["cbr","cba","cbt","cbz","cb7"] + }, + "application/x-cdlink": { + "source": "apache", + "extensions": ["vcd"] + }, + "application/x-cfs-compressed": { + "source": "apache", + "extensions": ["cfs"] + }, + "application/x-chat": { + "source": "apache", + "extensions": ["chat"] + }, + "application/x-chess-pgn": { + "source": "apache", + "extensions": ["pgn"] + }, + "application/x-chrome-extension": { + "extensions": ["crx"] + }, + "application/x-cocoa": { + "source": "nginx", + "extensions": ["cco"] + }, + "application/x-compress": { + "source": "apache" + }, + "application/x-conference": { + "source": "apache", + "extensions": ["nsc"] + }, + "application/x-cpio": { + "source": "apache", + "extensions": ["cpio"] + }, + "application/x-csh": { + "source": "apache", + "extensions": ["csh"] + }, + "application/x-deb": { + "compressible": false + }, + "application/x-debian-package": { + "source": "apache", + "extensions": ["deb","udeb"] + }, + "application/x-dgc-compressed": { + "source": "apache", + "extensions": ["dgc"] + }, + "application/x-director": { + "source": "apache", + "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] + }, + "application/x-doom": { + "source": "apache", + "extensions": ["wad"] + }, + "application/x-dtbncx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ncx"] + }, + "application/x-dtbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dtb"] + }, + "application/x-dtbresource+xml": { + "source": "apache", + "compressible": true, + "extensions": ["res"] + }, + "application/x-dvi": { + "source": "apache", + "compressible": false, + "extensions": ["dvi"] + }, + "application/x-envoy": { + "source": "apache", + "extensions": ["evy"] + }, + "application/x-eva": { + "source": "apache", + "extensions": ["eva"] + }, + "application/x-font-bdf": { + "source": "apache", + "extensions": ["bdf"] + }, + "application/x-font-dos": { + "source": "apache" + }, + "application/x-font-framemaker": { + "source": "apache" + }, + "application/x-font-ghostscript": { + "source": "apache", + "extensions": ["gsf"] + }, + "application/x-font-libgrx": { + "source": "apache" + }, + "application/x-font-linux-psf": { + "source": "apache", + "extensions": ["psf"] + }, + "application/x-font-pcf": { + "source": "apache", + "extensions": ["pcf"] + }, + "application/x-font-snf": { + "source": "apache", + "extensions": ["snf"] + }, + "application/x-font-speedo": { + "source": "apache" + }, + "application/x-font-sunos-news": { + "source": "apache" + }, + "application/x-font-type1": { + "source": "apache", + "extensions": ["pfa","pfb","pfm","afm"] + }, + "application/x-font-vfont": { + "source": "apache" + }, + "application/x-freearc": { + "source": "apache", + "extensions": ["arc"] + }, + "application/x-futuresplash": { + "source": "apache", + "extensions": ["spl"] + }, + "application/x-gca-compressed": { + "source": "apache", + "extensions": ["gca"] + }, + "application/x-glulx": { + "source": "apache", + "extensions": ["ulx"] + }, + "application/x-gnumeric": { + "source": "apache", + "extensions": ["gnumeric"] + }, + "application/x-gramps-xml": { + "source": "apache", + "extensions": ["gramps"] + }, + "application/x-gtar": { + "source": "apache", + "extensions": ["gtar"] + }, + "application/x-gzip": { + "source": "apache" + }, + "application/x-hdf": { + "source": "apache", + "extensions": ["hdf"] + }, + "application/x-httpd-php": { + "compressible": true, + "extensions": ["php"] + }, + "application/x-install-instructions": { + "source": "apache", + "extensions": ["install"] + }, + "application/x-iso9660-image": { + "source": "apache", + "extensions": ["iso"] + }, + "application/x-iwork-keynote-sffkey": { + "extensions": ["key"] + }, + "application/x-iwork-numbers-sffnumbers": { + "extensions": ["numbers"] + }, + "application/x-iwork-pages-sffpages": { + "extensions": ["pages"] + }, + "application/x-java-archive-diff": { + "source": "nginx", + "extensions": ["jardiff"] + }, + "application/x-java-jnlp-file": { + "source": "apache", + "compressible": false, + "extensions": ["jnlp"] + }, + "application/x-javascript": { + "compressible": true + }, + "application/x-keepass2": { + "extensions": ["kdbx"] + }, + "application/x-latex": { + "source": "apache", + "compressible": false, + "extensions": ["latex"] + }, + "application/x-lua-bytecode": { + "extensions": ["luac"] + }, + "application/x-lzh-compressed": { + "source": "apache", + "extensions": ["lzh","lha"] + }, + "application/x-makeself": { + "source": "nginx", + "extensions": ["run"] + }, + "application/x-mie": { + "source": "apache", + "extensions": ["mie"] + }, + "application/x-mobipocket-ebook": { + "source": "apache", + "extensions": ["prc","mobi"] + }, + "application/x-mpegurl": { + "compressible": false + }, + "application/x-ms-application": { + "source": "apache", + "extensions": ["application"] + }, + "application/x-ms-shortcut": { + "source": "apache", + "extensions": ["lnk"] + }, + "application/x-ms-wmd": { + "source": "apache", + "extensions": ["wmd"] + }, + "application/x-ms-wmz": { + "source": "apache", + "extensions": ["wmz"] + }, + "application/x-ms-xbap": { + "source": "apache", + "extensions": ["xbap"] + }, + "application/x-msaccess": { + "source": "apache", + "extensions": ["mdb"] + }, + "application/x-msbinder": { + "source": "apache", + "extensions": ["obd"] + }, + "application/x-mscardfile": { + "source": "apache", + "extensions": ["crd"] + }, + "application/x-msclip": { + "source": "apache", + "extensions": ["clp"] + }, + "application/x-msdos-program": { + "extensions": ["exe"] + }, + "application/x-msdownload": { + "source": "apache", + "extensions": ["exe","dll","com","bat","msi"] + }, + "application/x-msmediaview": { + "source": "apache", + "extensions": ["mvb","m13","m14"] + }, + "application/x-msmetafile": { + "source": "apache", + "extensions": ["wmf","wmz","emf","emz"] + }, + "application/x-msmoney": { + "source": "apache", + "extensions": ["mny"] + }, + "application/x-mspublisher": { + "source": "apache", + "extensions": ["pub"] + }, + "application/x-msschedule": { + "source": "apache", + "extensions": ["scd"] + }, + "application/x-msterminal": { + "source": "apache", + "extensions": ["trm"] + }, + "application/x-mswrite": { + "source": "apache", + "extensions": ["wri"] + }, + "application/x-netcdf": { + "source": "apache", + "extensions": ["nc","cdf"] + }, + "application/x-ns-proxy-autoconfig": { + "compressible": true, + "extensions": ["pac"] + }, + "application/x-nzb": { + "source": "apache", + "extensions": ["nzb"] + }, + "application/x-perl": { + "source": "nginx", + "extensions": ["pl","pm"] + }, + "application/x-pilot": { + "source": "nginx", + "extensions": ["prc","pdb"] + }, + "application/x-pkcs12": { + "source": "apache", + "compressible": false, + "extensions": ["p12","pfx"] + }, + "application/x-pkcs7-certificates": { + "source": "apache", + "extensions": ["p7b","spc"] + }, + "application/x-pkcs7-certreqresp": { + "source": "apache", + "extensions": ["p7r"] + }, + "application/x-pki-message": { + "source": "iana" + }, + "application/x-rar-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["rar"] + }, + "application/x-redhat-package-manager": { + "source": "nginx", + "extensions": ["rpm"] + }, + "application/x-research-info-systems": { + "source": "apache", + "extensions": ["ris"] + }, + "application/x-sea": { + "source": "nginx", + "extensions": ["sea"] + }, + "application/x-sh": { + "source": "apache", + "compressible": true, + "extensions": ["sh"] + }, + "application/x-shar": { + "source": "apache", + "extensions": ["shar"] + }, + "application/x-shockwave-flash": { + "source": "apache", + "compressible": false, + "extensions": ["swf"] + }, + "application/x-silverlight-app": { + "source": "apache", + "extensions": ["xap"] + }, + "application/x-sql": { + "source": "apache", + "extensions": ["sql"] + }, + "application/x-stuffit": { + "source": "apache", + "compressible": false, + "extensions": ["sit"] + }, + "application/x-stuffitx": { + "source": "apache", + "extensions": ["sitx"] + }, + "application/x-subrip": { + "source": "apache", + "extensions": ["srt"] + }, + "application/x-sv4cpio": { + "source": "apache", + "extensions": ["sv4cpio"] + }, + "application/x-sv4crc": { + "source": "apache", + "extensions": ["sv4crc"] + }, + "application/x-t3vm-image": { + "source": "apache", + "extensions": ["t3"] + }, + "application/x-tads": { + "source": "apache", + "extensions": ["gam"] + }, + "application/x-tar": { + "source": "apache", + "compressible": true, + "extensions": ["tar"] + }, + "application/x-tcl": { + "source": "apache", + "extensions": ["tcl","tk"] + }, + "application/x-tex": { + "source": "apache", + "extensions": ["tex"] + }, + "application/x-tex-tfm": { + "source": "apache", + "extensions": ["tfm"] + }, + "application/x-texinfo": { + "source": "apache", + "extensions": ["texinfo","texi"] + }, + "application/x-tgif": { + "source": "apache", + "extensions": ["obj"] + }, + "application/x-ustar": { + "source": "apache", + "extensions": ["ustar"] + }, + "application/x-virtualbox-hdd": { + "compressible": true, + "extensions": ["hdd"] + }, + "application/x-virtualbox-ova": { + "compressible": true, + "extensions": ["ova"] + }, + "application/x-virtualbox-ovf": { + "compressible": true, + "extensions": ["ovf"] + }, + "application/x-virtualbox-vbox": { + "compressible": true, + "extensions": ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + "compressible": false, + "extensions": ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + "compressible": true, + "extensions": ["vdi"] + }, + "application/x-virtualbox-vhd": { + "compressible": true, + "extensions": ["vhd"] + }, + "application/x-virtualbox-vmdk": { + "compressible": true, + "extensions": ["vmdk"] + }, + "application/x-wais-source": { + "source": "apache", + "extensions": ["src"] + }, + "application/x-web-app-manifest+json": { + "compressible": true, + "extensions": ["webapp"] + }, + "application/x-www-form-urlencoded": { + "source": "iana", + "compressible": true + }, + "application/x-x509-ca-cert": { + "source": "iana", + "extensions": ["der","crt","pem"] + }, + "application/x-x509-ca-ra-cert": { + "source": "iana" + }, + "application/x-x509-next-ca-cert": { + "source": "iana" + }, + "application/x-xfig": { + "source": "apache", + "extensions": ["fig"] + }, + "application/x-xliff+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xlf"] + }, + "application/x-xpinstall": { + "source": "apache", + "compressible": false, + "extensions": ["xpi"] + }, + "application/x-xz": { + "source": "apache", + "extensions": ["xz"] + }, + "application/x-zmachine": { + "source": "apache", + "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] + }, + "application/x400-bp": { + "source": "iana" + }, + "application/xacml+xml": { + "source": "iana", + "compressible": true + }, + "application/xaml+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xaml"] + }, + "application/xcap-att+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xav"] + }, + "application/xcap-caps+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xca"] + }, + "application/xcap-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdf"] + }, + "application/xcap-el+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xel"] + }, + "application/xcap-error+xml": { + "source": "iana", + "compressible": true + }, + "application/xcap-ns+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xns"] + }, + "application/xcon-conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/xcon-conference-info-diff+xml": { + "source": "iana", + "compressible": true + }, + "application/xenc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xenc"] + }, + "application/xhtml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtml","xht"] + }, + "application/xhtml-voice+xml": { + "source": "apache", + "compressible": true + }, + "application/xliff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xlf"] + }, + "application/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml","xsl","xsd","rng"] + }, + "application/xml-dtd": { + "source": "iana", + "compressible": true, + "extensions": ["dtd"] + }, + "application/xml-external-parsed-entity": { + "source": "iana" + }, + "application/xml-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/xmpp+xml": { + "source": "iana", + "compressible": true + }, + "application/xop+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xop"] + }, + "application/xproc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xpl"] + }, + "application/xslt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xsl","xslt"] + }, + "application/xspf+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xspf"] + }, + "application/xv+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mxml","xhvml","xvml","xvm"] + }, + "application/yang": { + "source": "iana", + "extensions": ["yang"] + }, + "application/yang-data+json": { + "source": "iana", + "compressible": true + }, + "application/yang-data+xml": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+json": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/yin+xml": { + "source": "iana", + "compressible": true, + "extensions": ["yin"] + }, + "application/zip": { + "source": "iana", + "compressible": false, + "extensions": ["zip"] + }, + "application/zlib": { + "source": "iana" + }, + "application/zstd": { + "source": "iana" + }, + "audio/1d-interleaved-parityfec": { + "source": "iana" + }, + "audio/32kadpcm": { + "source": "iana" + }, + "audio/3gpp": { + "source": "iana", + "compressible": false, + "extensions": ["3gpp"] + }, + "audio/3gpp2": { + "source": "iana" + }, + "audio/aac": { + "source": "iana" + }, + "audio/ac3": { + "source": "iana" + }, + "audio/adpcm": { + "source": "apache", + "extensions": ["adp"] + }, + "audio/amr": { + "source": "iana", + "extensions": ["amr"] + }, + "audio/amr-wb": { + "source": "iana" + }, + "audio/amr-wb+": { + "source": "iana" + }, + "audio/aptx": { + "source": "iana" + }, + "audio/asc": { + "source": "iana" + }, + "audio/atrac-advanced-lossless": { + "source": "iana" + }, + "audio/atrac-x": { + "source": "iana" + }, + "audio/atrac3": { + "source": "iana" + }, + "audio/basic": { + "source": "iana", + "compressible": false, + "extensions": ["au","snd"] + }, + "audio/bv16": { + "source": "iana" + }, + "audio/bv32": { + "source": "iana" + }, + "audio/clearmode": { + "source": "iana" + }, + "audio/cn": { + "source": "iana" + }, + "audio/dat12": { + "source": "iana" + }, + "audio/dls": { + "source": "iana" + }, + "audio/dsr-es201108": { + "source": "iana" + }, + "audio/dsr-es202050": { + "source": "iana" + }, + "audio/dsr-es202211": { + "source": "iana" + }, + "audio/dsr-es202212": { + "source": "iana" + }, + "audio/dv": { + "source": "iana" + }, + "audio/dvi4": { + "source": "iana" + }, + "audio/eac3": { + "source": "iana" + }, + "audio/encaprtp": { + "source": "iana" + }, + "audio/evrc": { + "source": "iana" + }, + "audio/evrc-qcp": { + "source": "iana" + }, + "audio/evrc0": { + "source": "iana" + }, + "audio/evrc1": { + "source": "iana" + }, + "audio/evrcb": { + "source": "iana" + }, + "audio/evrcb0": { + "source": "iana" + }, + "audio/evrcb1": { + "source": "iana" + }, + "audio/evrcnw": { + "source": "iana" + }, + "audio/evrcnw0": { + "source": "iana" + }, + "audio/evrcnw1": { + "source": "iana" + }, + "audio/evrcwb": { + "source": "iana" + }, + "audio/evrcwb0": { + "source": "iana" + }, + "audio/evrcwb1": { + "source": "iana" + }, + "audio/evs": { + "source": "iana" + }, + "audio/flexfec": { + "source": "iana" + }, + "audio/fwdred": { + "source": "iana" + }, + "audio/g711-0": { + "source": "iana" + }, + "audio/g719": { + "source": "iana" + }, + "audio/g722": { + "source": "iana" + }, + "audio/g7221": { + "source": "iana" + }, + "audio/g723": { + "source": "iana" + }, + "audio/g726-16": { + "source": "iana" + }, + "audio/g726-24": { + "source": "iana" + }, + "audio/g726-32": { + "source": "iana" + }, + "audio/g726-40": { + "source": "iana" + }, + "audio/g728": { + "source": "iana" + }, + "audio/g729": { + "source": "iana" + }, + "audio/g7291": { + "source": "iana" + }, + "audio/g729d": { + "source": "iana" + }, + "audio/g729e": { + "source": "iana" + }, + "audio/gsm": { + "source": "iana" + }, + "audio/gsm-efr": { + "source": "iana" + }, + "audio/gsm-hr-08": { + "source": "iana" + }, + "audio/ilbc": { + "source": "iana" + }, + "audio/ip-mr_v2.5": { + "source": "iana" + }, + "audio/isac": { + "source": "apache" + }, + "audio/l16": { + "source": "iana" + }, + "audio/l20": { + "source": "iana" + }, + "audio/l24": { + "source": "iana", + "compressible": false + }, + "audio/l8": { + "source": "iana" + }, + "audio/lpc": { + "source": "iana" + }, + "audio/melp": { + "source": "iana" + }, + "audio/melp1200": { + "source": "iana" + }, + "audio/melp2400": { + "source": "iana" + }, + "audio/melp600": { + "source": "iana" + }, + "audio/mhas": { + "source": "iana" + }, + "audio/midi": { + "source": "apache", + "extensions": ["mid","midi","kar","rmi"] + }, + "audio/mobile-xmf": { + "source": "iana", + "extensions": ["mxmf"] + }, + "audio/mp3": { + "compressible": false, + "extensions": ["mp3"] + }, + "audio/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["m4a","mp4a"] + }, + "audio/mp4a-latm": { + "source": "iana" + }, + "audio/mpa": { + "source": "iana" + }, + "audio/mpa-robust": { + "source": "iana" + }, + "audio/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] + }, + "audio/mpeg4-generic": { + "source": "iana" + }, + "audio/musepack": { + "source": "apache" + }, + "audio/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["oga","ogg","spx","opus"] + }, + "audio/opus": { + "source": "iana" + }, + "audio/parityfec": { + "source": "iana" + }, + "audio/pcma": { + "source": "iana" + }, + "audio/pcma-wb": { + "source": "iana" + }, + "audio/pcmu": { + "source": "iana" + }, + "audio/pcmu-wb": { + "source": "iana" + }, + "audio/prs.sid": { + "source": "iana" + }, + "audio/qcelp": { + "source": "iana" + }, + "audio/raptorfec": { + "source": "iana" + }, + "audio/red": { + "source": "iana" + }, + "audio/rtp-enc-aescm128": { + "source": "iana" + }, + "audio/rtp-midi": { + "source": "iana" + }, + "audio/rtploopback": { + "source": "iana" + }, + "audio/rtx": { + "source": "iana" + }, + "audio/s3m": { + "source": "apache", + "extensions": ["s3m"] + }, + "audio/scip": { + "source": "iana" + }, + "audio/silk": { + "source": "apache", + "extensions": ["sil"] + }, + "audio/smv": { + "source": "iana" + }, + "audio/smv-qcp": { + "source": "iana" + }, + "audio/smv0": { + "source": "iana" + }, + "audio/sofa": { + "source": "iana" + }, + "audio/sp-midi": { + "source": "iana" + }, + "audio/speex": { + "source": "iana" + }, + "audio/t140c": { + "source": "iana" + }, + "audio/t38": { + "source": "iana" + }, + "audio/telephone-event": { + "source": "iana" + }, + "audio/tetra_acelp": { + "source": "iana" + }, + "audio/tetra_acelp_bb": { + "source": "iana" + }, + "audio/tone": { + "source": "iana" + }, + "audio/tsvcis": { + "source": "iana" + }, + "audio/uemclip": { + "source": "iana" + }, + "audio/ulpfec": { + "source": "iana" + }, + "audio/usac": { + "source": "iana" + }, + "audio/vdvi": { + "source": "iana" + }, + "audio/vmr-wb": { + "source": "iana" + }, + "audio/vnd.3gpp.iufp": { + "source": "iana" + }, + "audio/vnd.4sb": { + "source": "iana" + }, + "audio/vnd.audiokoz": { + "source": "iana" + }, + "audio/vnd.celp": { + "source": "iana" + }, + "audio/vnd.cisco.nse": { + "source": "iana" + }, + "audio/vnd.cmles.radio-events": { + "source": "iana" + }, + "audio/vnd.cns.anp1": { + "source": "iana" + }, + "audio/vnd.cns.inf1": { + "source": "iana" + }, + "audio/vnd.dece.audio": { + "source": "iana", + "extensions": ["uva","uvva"] + }, + "audio/vnd.digital-winds": { + "source": "iana", + "extensions": ["eol"] + }, + "audio/vnd.dlna.adts": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.1": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.2": { + "source": "iana" + }, + "audio/vnd.dolby.mlp": { + "source": "iana" + }, + "audio/vnd.dolby.mps": { + "source": "iana" + }, + "audio/vnd.dolby.pl2": { + "source": "iana" + }, + "audio/vnd.dolby.pl2x": { + "source": "iana" + }, + "audio/vnd.dolby.pl2z": { + "source": "iana" + }, + "audio/vnd.dolby.pulse.1": { + "source": "iana" + }, + "audio/vnd.dra": { + "source": "iana", + "extensions": ["dra"] + }, + "audio/vnd.dts": { + "source": "iana", + "extensions": ["dts"] + }, + "audio/vnd.dts.hd": { + "source": "iana", + "extensions": ["dtshd"] + }, + "audio/vnd.dts.uhd": { + "source": "iana" + }, + "audio/vnd.dvb.file": { + "source": "iana" + }, + "audio/vnd.everad.plj": { + "source": "iana" + }, + "audio/vnd.hns.audio": { + "source": "iana" + }, + "audio/vnd.lucent.voice": { + "source": "iana", + "extensions": ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + "source": "iana", + "extensions": ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + "source": "iana" + }, + "audio/vnd.nortel.vbk": { + "source": "iana" + }, + "audio/vnd.nuera.ecelp4800": { + "source": "iana", + "extensions": ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + "source": "iana", + "extensions": ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + "source": "iana", + "extensions": ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + "source": "iana" + }, + "audio/vnd.presonus.multitrack": { + "source": "iana" + }, + "audio/vnd.qcelp": { + "source": "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + "source": "iana" + }, + "audio/vnd.rip": { + "source": "iana", + "extensions": ["rip"] + }, + "audio/vnd.rn-realaudio": { + "compressible": false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + "source": "iana" + }, + "audio/vnd.vmx.cvsd": { + "source": "iana" + }, + "audio/vnd.wave": { + "compressible": false + }, + "audio/vorbis": { + "source": "iana", + "compressible": false + }, + "audio/vorbis-config": { + "source": "iana" + }, + "audio/wav": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/wave": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/webm": { + "source": "apache", + "compressible": false, + "extensions": ["weba"] + }, + "audio/x-aac": { + "source": "apache", + "compressible": false, + "extensions": ["aac"] + }, + "audio/x-aiff": { + "source": "apache", + "extensions": ["aif","aiff","aifc"] + }, + "audio/x-caf": { + "source": "apache", + "compressible": false, + "extensions": ["caf"] + }, + "audio/x-flac": { + "source": "apache", + "extensions": ["flac"] + }, + "audio/x-m4a": { + "source": "nginx", + "extensions": ["m4a"] + }, + "audio/x-matroska": { + "source": "apache", + "extensions": ["mka"] + }, + "audio/x-mpegurl": { + "source": "apache", + "extensions": ["m3u"] + }, + "audio/x-ms-wax": { + "source": "apache", + "extensions": ["wax"] + }, + "audio/x-ms-wma": { + "source": "apache", + "extensions": ["wma"] + }, + "audio/x-pn-realaudio": { + "source": "apache", + "extensions": ["ram","ra"] + }, + "audio/x-pn-realaudio-plugin": { + "source": "apache", + "extensions": ["rmp"] + }, + "audio/x-realaudio": { + "source": "nginx", + "extensions": ["ra"] + }, + "audio/x-tta": { + "source": "apache" + }, + "audio/x-wav": { + "source": "apache", + "extensions": ["wav"] + }, + "audio/xm": { + "source": "apache", + "extensions": ["xm"] + }, + "chemical/x-cdx": { + "source": "apache", + "extensions": ["cdx"] + }, + "chemical/x-cif": { + "source": "apache", + "extensions": ["cif"] + }, + "chemical/x-cmdf": { + "source": "apache", + "extensions": ["cmdf"] + }, + "chemical/x-cml": { + "source": "apache", + "extensions": ["cml"] + }, + "chemical/x-csml": { + "source": "apache", + "extensions": ["csml"] + }, + "chemical/x-pdb": { + "source": "apache" + }, + "chemical/x-xyz": { + "source": "apache", + "extensions": ["xyz"] + }, + "font/collection": { + "source": "iana", + "extensions": ["ttc"] + }, + "font/otf": { + "source": "iana", + "compressible": true, + "extensions": ["otf"] + }, + "font/sfnt": { + "source": "iana" + }, + "font/ttf": { + "source": "iana", + "compressible": true, + "extensions": ["ttf"] + }, + "font/woff": { + "source": "iana", + "extensions": ["woff"] + }, + "font/woff2": { + "source": "iana", + "extensions": ["woff2"] + }, + "image/aces": { + "source": "iana", + "extensions": ["exr"] + }, + "image/apng": { + "compressible": false, + "extensions": ["apng"] + }, + "image/avci": { + "source": "iana", + "extensions": ["avci"] + }, + "image/avcs": { + "source": "iana", + "extensions": ["avcs"] + }, + "image/avif": { + "source": "iana", + "compressible": false, + "extensions": ["avif"] + }, + "image/bmp": { + "source": "iana", + "compressible": true, + "extensions": ["bmp"] + }, + "image/cgm": { + "source": "iana", + "extensions": ["cgm"] + }, + "image/dicom-rle": { + "source": "iana", + "extensions": ["drle"] + }, + "image/emf": { + "source": "iana", + "extensions": ["emf"] + }, + "image/fits": { + "source": "iana", + "extensions": ["fits"] + }, + "image/g3fax": { + "source": "iana", + "extensions": ["g3"] + }, + "image/gif": { + "source": "iana", + "compressible": false, + "extensions": ["gif"] + }, + "image/heic": { + "source": "iana", + "extensions": ["heic"] + }, + "image/heic-sequence": { + "source": "iana", + "extensions": ["heics"] + }, + "image/heif": { + "source": "iana", + "extensions": ["heif"] + }, + "image/heif-sequence": { + "source": "iana", + "extensions": ["heifs"] + }, + "image/hej2k": { + "source": "iana", + "extensions": ["hej2"] + }, + "image/hsj2": { + "source": "iana", + "extensions": ["hsj2"] + }, + "image/ief": { + "source": "iana", + "extensions": ["ief"] + }, + "image/jls": { + "source": "iana", + "extensions": ["jls"] + }, + "image/jp2": { + "source": "iana", + "compressible": false, + "extensions": ["jp2","jpg2"] + }, + "image/jpeg": { + "source": "iana", + "compressible": false, + "extensions": ["jpeg","jpg","jpe"] + }, + "image/jph": { + "source": "iana", + "extensions": ["jph"] + }, + "image/jphc": { + "source": "iana", + "extensions": ["jhc"] + }, + "image/jpm": { + "source": "iana", + "compressible": false, + "extensions": ["jpm"] + }, + "image/jpx": { + "source": "iana", + "compressible": false, + "extensions": ["jpx","jpf"] + }, + "image/jxr": { + "source": "iana", + "extensions": ["jxr"] + }, + "image/jxra": { + "source": "iana", + "extensions": ["jxra"] + }, + "image/jxrs": { + "source": "iana", + "extensions": ["jxrs"] + }, + "image/jxs": { + "source": "iana", + "extensions": ["jxs"] + }, + "image/jxsc": { + "source": "iana", + "extensions": ["jxsc"] + }, + "image/jxsi": { + "source": "iana", + "extensions": ["jxsi"] + }, + "image/jxss": { + "source": "iana", + "extensions": ["jxss"] + }, + "image/ktx": { + "source": "iana", + "extensions": ["ktx"] + }, + "image/ktx2": { + "source": "iana", + "extensions": ["ktx2"] + }, + "image/naplps": { + "source": "iana" + }, + "image/pjpeg": { + "compressible": false + }, + "image/png": { + "source": "iana", + "compressible": false, + "extensions": ["png"] + }, + "image/prs.btif": { + "source": "iana", + "extensions": ["btif"] + }, + "image/prs.pti": { + "source": "iana", + "extensions": ["pti"] + }, + "image/pwg-raster": { + "source": "iana" + }, + "image/sgi": { + "source": "apache", + "extensions": ["sgi"] + }, + "image/svg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["svg","svgz"] + }, + "image/t38": { + "source": "iana", + "extensions": ["t38"] + }, + "image/tiff": { + "source": "iana", + "compressible": false, + "extensions": ["tif","tiff"] + }, + "image/tiff-fx": { + "source": "iana", + "extensions": ["tfx"] + }, + "image/vnd.adobe.photoshop": { + "source": "iana", + "compressible": true, + "extensions": ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + "source": "iana", + "extensions": ["azv"] + }, + "image/vnd.cns.inf2": { + "source": "iana" + }, + "image/vnd.dece.graphic": { + "source": "iana", + "extensions": ["uvi","uvvi","uvg","uvvg"] + }, + "image/vnd.djvu": { + "source": "iana", + "extensions": ["djvu","djv"] + }, + "image/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "image/vnd.dwg": { + "source": "iana", + "extensions": ["dwg"] + }, + "image/vnd.dxf": { + "source": "iana", + "extensions": ["dxf"] + }, + "image/vnd.fastbidsheet": { + "source": "iana", + "extensions": ["fbs"] + }, + "image/vnd.fpx": { + "source": "iana", + "extensions": ["fpx"] + }, + "image/vnd.fst": { + "source": "iana", + "extensions": ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + "source": "iana", + "extensions": ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + "source": "iana", + "extensions": ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + "source": "iana" + }, + "image/vnd.microsoft.icon": { + "source": "iana", + "compressible": true, + "extensions": ["ico"] + }, + "image/vnd.mix": { + "source": "iana" + }, + "image/vnd.mozilla.apng": { + "source": "iana" + }, + "image/vnd.ms-dds": { + "compressible": true, + "extensions": ["dds"] + }, + "image/vnd.ms-modi": { + "source": "iana", + "extensions": ["mdi"] + }, + "image/vnd.ms-photo": { + "source": "apache", + "extensions": ["wdp"] + }, + "image/vnd.net-fpx": { + "source": "iana", + "extensions": ["npx"] + }, + "image/vnd.pco.b16": { + "source": "iana", + "extensions": ["b16"] + }, + "image/vnd.radiance": { + "source": "iana" + }, + "image/vnd.sealed.png": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + "source": "iana" + }, + "image/vnd.svf": { + "source": "iana" + }, + "image/vnd.tencent.tap": { + "source": "iana", + "extensions": ["tap"] + }, + "image/vnd.valve.source.texture": { + "source": "iana", + "extensions": ["vtf"] + }, + "image/vnd.wap.wbmp": { + "source": "iana", + "extensions": ["wbmp"] + }, + "image/vnd.xiff": { + "source": "iana", + "extensions": ["xif"] + }, + "image/vnd.zbrush.pcx": { + "source": "iana", + "extensions": ["pcx"] + }, + "image/webp": { + "source": "apache", + "extensions": ["webp"] + }, + "image/wmf": { + "source": "iana", + "extensions": ["wmf"] + }, + "image/x-3ds": { + "source": "apache", + "extensions": ["3ds"] + }, + "image/x-cmu-raster": { + "source": "apache", + "extensions": ["ras"] + }, + "image/x-cmx": { + "source": "apache", + "extensions": ["cmx"] + }, + "image/x-freehand": { + "source": "apache", + "extensions": ["fh","fhc","fh4","fh5","fh7"] + }, + "image/x-icon": { + "source": "apache", + "compressible": true, + "extensions": ["ico"] + }, + "image/x-jng": { + "source": "nginx", + "extensions": ["jng"] + }, + "image/x-mrsid-image": { + "source": "apache", + "extensions": ["sid"] + }, + "image/x-ms-bmp": { + "source": "nginx", + "compressible": true, + "extensions": ["bmp"] + }, + "image/x-pcx": { + "source": "apache", + "extensions": ["pcx"] + }, + "image/x-pict": { + "source": "apache", + "extensions": ["pic","pct"] + }, + "image/x-portable-anymap": { + "source": "apache", + "extensions": ["pnm"] + }, + "image/x-portable-bitmap": { + "source": "apache", + "extensions": ["pbm"] + }, + "image/x-portable-graymap": { + "source": "apache", + "extensions": ["pgm"] + }, + "image/x-portable-pixmap": { + "source": "apache", + "extensions": ["ppm"] + }, + "image/x-rgb": { + "source": "apache", + "extensions": ["rgb"] + }, + "image/x-tga": { + "source": "apache", + "extensions": ["tga"] + }, + "image/x-xbitmap": { + "source": "apache", + "extensions": ["xbm"] + }, + "image/x-xcf": { + "compressible": false + }, + "image/x-xpixmap": { + "source": "apache", + "extensions": ["xpm"] + }, + "image/x-xwindowdump": { + "source": "apache", + "extensions": ["xwd"] + }, + "message/cpim": { + "source": "iana" + }, + "message/delivery-status": { + "source": "iana" + }, + "message/disposition-notification": { + "source": "iana", + "extensions": [ + "disposition-notification" + ] + }, + "message/external-body": { + "source": "iana" + }, + "message/feedback-report": { + "source": "iana" + }, + "message/global": { + "source": "iana", + "extensions": ["u8msg"] + }, + "message/global-delivery-status": { + "source": "iana", + "extensions": ["u8dsn"] + }, + "message/global-disposition-notification": { + "source": "iana", + "extensions": ["u8mdn"] + }, + "message/global-headers": { + "source": "iana", + "extensions": ["u8hdr"] + }, + "message/http": { + "source": "iana", + "compressible": false + }, + "message/imdn+xml": { + "source": "iana", + "compressible": true + }, + "message/news": { + "source": "iana" + }, + "message/partial": { + "source": "iana", + "compressible": false + }, + "message/rfc822": { + "source": "iana", + "compressible": true, + "extensions": ["eml","mime"] + }, + "message/s-http": { + "source": "iana" + }, + "message/sip": { + "source": "iana" + }, + "message/sipfrag": { + "source": "iana" + }, + "message/tracking-status": { + "source": "iana" + }, + "message/vnd.si.simp": { + "source": "iana" + }, + "message/vnd.wfa.wsc": { + "source": "iana", + "extensions": ["wsc"] + }, + "model/3mf": { + "source": "iana", + "extensions": ["3mf"] + }, + "model/e57": { + "source": "iana" + }, + "model/gltf+json": { + "source": "iana", + "compressible": true, + "extensions": ["gltf"] + }, + "model/gltf-binary": { + "source": "iana", + "compressible": true, + "extensions": ["glb"] + }, + "model/iges": { + "source": "iana", + "compressible": false, + "extensions": ["igs","iges"] + }, + "model/mesh": { + "source": "iana", + "compressible": false, + "extensions": ["msh","mesh","silo"] + }, + "model/mtl": { + "source": "iana", + "extensions": ["mtl"] + }, + "model/obj": { + "source": "iana", + "extensions": ["obj"] + }, + "model/step": { + "source": "iana" + }, + "model/step+xml": { + "source": "iana", + "compressible": true, + "extensions": ["stpx"] + }, + "model/step+zip": { + "source": "iana", + "compressible": false, + "extensions": ["stpz"] + }, + "model/step-xml+zip": { + "source": "iana", + "compressible": false, + "extensions": ["stpxz"] + }, + "model/stl": { + "source": "iana", + "extensions": ["stl"] + }, + "model/vnd.collada+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dae"] + }, + "model/vnd.dwf": { + "source": "iana", + "extensions": ["dwf"] + }, + "model/vnd.flatland.3dml": { + "source": "iana" + }, + "model/vnd.gdl": { + "source": "iana", + "extensions": ["gdl"] + }, + "model/vnd.gs-gdl": { + "source": "apache" + }, + "model/vnd.gs.gdl": { + "source": "iana" + }, + "model/vnd.gtw": { + "source": "iana", + "extensions": ["gtw"] + }, + "model/vnd.moml+xml": { + "source": "iana", + "compressible": true + }, + "model/vnd.mts": { + "source": "iana", + "extensions": ["mts"] + }, + "model/vnd.opengex": { + "source": "iana", + "extensions": ["ogex"] + }, + "model/vnd.parasolid.transmit.binary": { + "source": "iana", + "extensions": ["x_b"] + }, + "model/vnd.parasolid.transmit.text": { + "source": "iana", + "extensions": ["x_t"] + }, + "model/vnd.pytha.pyox": { + "source": "iana" + }, + "model/vnd.rosette.annotated-data-model": { + "source": "iana" + }, + "model/vnd.sap.vds": { + "source": "iana", + "extensions": ["vds"] + }, + "model/vnd.usdz+zip": { + "source": "iana", + "compressible": false, + "extensions": ["usdz"] + }, + "model/vnd.valve.source.compiled-map": { + "source": "iana", + "extensions": ["bsp"] + }, + "model/vnd.vtu": { + "source": "iana", + "extensions": ["vtu"] + }, + "model/vrml": { + "source": "iana", + "compressible": false, + "extensions": ["wrl","vrml"] + }, + "model/x3d+binary": { + "source": "apache", + "compressible": false, + "extensions": ["x3db","x3dbz"] + }, + "model/x3d+fastinfoset": { + "source": "iana", + "extensions": ["x3db"] + }, + "model/x3d+vrml": { + "source": "apache", + "compressible": false, + "extensions": ["x3dv","x3dvz"] + }, + "model/x3d+xml": { + "source": "iana", + "compressible": true, + "extensions": ["x3d","x3dz"] + }, + "model/x3d-vrml": { + "source": "iana", + "extensions": ["x3dv"] + }, + "multipart/alternative": { + "source": "iana", + "compressible": false + }, + "multipart/appledouble": { + "source": "iana" + }, + "multipart/byteranges": { + "source": "iana" + }, + "multipart/digest": { + "source": "iana" + }, + "multipart/encrypted": { + "source": "iana", + "compressible": false + }, + "multipart/form-data": { + "source": "iana", + "compressible": false + }, + "multipart/header-set": { + "source": "iana" + }, + "multipart/mixed": { + "source": "iana" + }, + "multipart/multilingual": { + "source": "iana" + }, + "multipart/parallel": { + "source": "iana" + }, + "multipart/related": { + "source": "iana", + "compressible": false + }, + "multipart/report": { + "source": "iana" + }, + "multipart/signed": { + "source": "iana", + "compressible": false + }, + "multipart/vnd.bint.med-plus": { + "source": "iana" + }, + "multipart/voice-message": { + "source": "iana" + }, + "multipart/x-mixed-replace": { + "source": "iana" + }, + "text/1d-interleaved-parityfec": { + "source": "iana" + }, + "text/cache-manifest": { + "source": "iana", + "compressible": true, + "extensions": ["appcache","manifest"] + }, + "text/calendar": { + "source": "iana", + "extensions": ["ics","ifb"] + }, + "text/calender": { + "compressible": true + }, + "text/cmd": { + "compressible": true + }, + "text/coffeescript": { + "extensions": ["coffee","litcoffee"] + }, + "text/cql": { + "source": "iana" + }, + "text/cql-expression": { + "source": "iana" + }, + "text/cql-identifier": { + "source": "iana" + }, + "text/css": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["css"] + }, + "text/csv": { + "source": "iana", + "compressible": true, + "extensions": ["csv"] + }, + "text/csv-schema": { + "source": "iana" + }, + "text/directory": { + "source": "iana" + }, + "text/dns": { + "source": "iana" + }, + "text/ecmascript": { + "source": "iana" + }, + "text/encaprtp": { + "source": "iana" + }, + "text/enriched": { + "source": "iana" + }, + "text/fhirpath": { + "source": "iana" + }, + "text/flexfec": { + "source": "iana" + }, + "text/fwdred": { + "source": "iana" + }, + "text/gff3": { + "source": "iana" + }, + "text/grammar-ref-list": { + "source": "iana" + }, + "text/html": { + "source": "iana", + "compressible": true, + "extensions": ["html","htm","shtml"] + }, + "text/jade": { + "extensions": ["jade"] + }, + "text/javascript": { + "source": "iana", + "compressible": true + }, + "text/jcr-cnd": { + "source": "iana" + }, + "text/jsx": { + "compressible": true, + "extensions": ["jsx"] + }, + "text/less": { + "compressible": true, + "extensions": ["less"] + }, + "text/markdown": { + "source": "iana", + "compressible": true, + "extensions": ["markdown","md"] + }, + "text/mathml": { + "source": "nginx", + "extensions": ["mml"] + }, + "text/mdx": { + "compressible": true, + "extensions": ["mdx"] + }, + "text/mizar": { + "source": "iana" + }, + "text/n3": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["n3"] + }, + "text/parameters": { + "source": "iana", + "charset": "UTF-8" + }, + "text/parityfec": { + "source": "iana" + }, + "text/plain": { + "source": "iana", + "compressible": true, + "extensions": ["txt","text","conf","def","list","log","in","ini"] + }, + "text/provenance-notation": { + "source": "iana", + "charset": "UTF-8" + }, + "text/prs.fallenstein.rst": { + "source": "iana" + }, + "text/prs.lines.tag": { + "source": "iana", + "extensions": ["dsc"] + }, + "text/prs.prop.logic": { + "source": "iana" + }, + "text/raptorfec": { + "source": "iana" + }, + "text/red": { + "source": "iana" + }, + "text/rfc822-headers": { + "source": "iana" + }, + "text/richtext": { + "source": "iana", + "compressible": true, + "extensions": ["rtx"] + }, + "text/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "text/rtp-enc-aescm128": { + "source": "iana" + }, + "text/rtploopback": { + "source": "iana" + }, + "text/rtx": { + "source": "iana" + }, + "text/sgml": { + "source": "iana", + "extensions": ["sgml","sgm"] + }, + "text/shaclc": { + "source": "iana" + }, + "text/shex": { + "source": "iana", + "extensions": ["shex"] + }, + "text/slim": { + "extensions": ["slim","slm"] + }, + "text/spdx": { + "source": "iana", + "extensions": ["spdx"] + }, + "text/strings": { + "source": "iana" + }, + "text/stylus": { + "extensions": ["stylus","styl"] + }, + "text/t140": { + "source": "iana" + }, + "text/tab-separated-values": { + "source": "iana", + "compressible": true, + "extensions": ["tsv"] + }, + "text/troff": { + "source": "iana", + "extensions": ["t","tr","roff","man","me","ms"] + }, + "text/turtle": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["ttl"] + }, + "text/ulpfec": { + "source": "iana" + }, + "text/uri-list": { + "source": "iana", + "compressible": true, + "extensions": ["uri","uris","urls"] + }, + "text/vcard": { + "source": "iana", + "compressible": true, + "extensions": ["vcard"] + }, + "text/vnd.a": { + "source": "iana" + }, + "text/vnd.abc": { + "source": "iana" + }, + "text/vnd.ascii-art": { + "source": "iana" + }, + "text/vnd.curl": { + "source": "iana", + "extensions": ["curl"] + }, + "text/vnd.curl.dcurl": { + "source": "apache", + "extensions": ["dcurl"] + }, + "text/vnd.curl.mcurl": { + "source": "apache", + "extensions": ["mcurl"] + }, + "text/vnd.curl.scurl": { + "source": "apache", + "extensions": ["scurl"] + }, + "text/vnd.debian.copyright": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.dmclientscript": { + "source": "iana" + }, + "text/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.familysearch.gedcom": { + "source": "iana", + "extensions": ["ged"] + }, + "text/vnd.ficlab.flt": { + "source": "iana" + }, + "text/vnd.fly": { + "source": "iana", + "extensions": ["fly"] + }, + "text/vnd.fmi.flexstor": { + "source": "iana", + "extensions": ["flx"] + }, + "text/vnd.gml": { + "source": "iana" + }, + "text/vnd.graphviz": { + "source": "iana", + "extensions": ["gv"] + }, + "text/vnd.hans": { + "source": "iana" + }, + "text/vnd.hgl": { + "source": "iana" + }, + "text/vnd.in3d.3dml": { + "source": "iana", + "extensions": ["3dml"] + }, + "text/vnd.in3d.spot": { + "source": "iana", + "extensions": ["spot"] + }, + "text/vnd.iptc.newsml": { + "source": "iana" + }, + "text/vnd.iptc.nitf": { + "source": "iana" + }, + "text/vnd.latex-z": { + "source": "iana" + }, + "text/vnd.motorola.reflex": { + "source": "iana" + }, + "text/vnd.ms-mediapackage": { + "source": "iana" + }, + "text/vnd.net2phone.commcenter.command": { + "source": "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + "source": "iana" + }, + "text/vnd.senx.warpscript": { + "source": "iana" + }, + "text/vnd.si.uricatalogue": { + "source": "iana" + }, + "text/vnd.sosi": { + "source": "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["jad"] + }, + "text/vnd.trolltech.linguist": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.wap.si": { + "source": "iana" + }, + "text/vnd.wap.sl": { + "source": "iana" + }, + "text/vnd.wap.wml": { + "source": "iana", + "extensions": ["wml"] + }, + "text/vnd.wap.wmlscript": { + "source": "iana", + "extensions": ["wmls"] + }, + "text/vtt": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["vtt"] + }, + "text/x-asm": { + "source": "apache", + "extensions": ["s","asm"] + }, + "text/x-c": { + "source": "apache", + "extensions": ["c","cc","cxx","cpp","h","hh","dic"] + }, + "text/x-component": { + "source": "nginx", + "extensions": ["htc"] + }, + "text/x-fortran": { + "source": "apache", + "extensions": ["f","for","f77","f90"] + }, + "text/x-gwt-rpc": { + "compressible": true + }, + "text/x-handlebars-template": { + "extensions": ["hbs"] + }, + "text/x-java-source": { + "source": "apache", + "extensions": ["java"] + }, + "text/x-jquery-tmpl": { + "compressible": true + }, + "text/x-lua": { + "extensions": ["lua"] + }, + "text/x-markdown": { + "compressible": true, + "extensions": ["mkd"] + }, + "text/x-nfo": { + "source": "apache", + "extensions": ["nfo"] + }, + "text/x-opml": { + "source": "apache", + "extensions": ["opml"] + }, + "text/x-org": { + "compressible": true, + "extensions": ["org"] + }, + "text/x-pascal": { + "source": "apache", + "extensions": ["p","pas"] + }, + "text/x-processing": { + "compressible": true, + "extensions": ["pde"] + }, + "text/x-sass": { + "extensions": ["sass"] + }, + "text/x-scss": { + "extensions": ["scss"] + }, + "text/x-setext": { + "source": "apache", + "extensions": ["etx"] + }, + "text/x-sfv": { + "source": "apache", + "extensions": ["sfv"] + }, + "text/x-suse-ymp": { + "compressible": true, + "extensions": ["ymp"] + }, + "text/x-uuencode": { + "source": "apache", + "extensions": ["uu"] + }, + "text/x-vcalendar": { + "source": "apache", + "extensions": ["vcs"] + }, + "text/x-vcard": { + "source": "apache", + "extensions": ["vcf"] + }, + "text/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml"] + }, + "text/xml-external-parsed-entity": { + "source": "iana" + }, + "text/yaml": { + "compressible": true, + "extensions": ["yaml","yml"] + }, + "video/1d-interleaved-parityfec": { + "source": "iana" + }, + "video/3gpp": { + "source": "iana", + "extensions": ["3gp","3gpp"] + }, + "video/3gpp-tt": { + "source": "iana" + }, + "video/3gpp2": { + "source": "iana", + "extensions": ["3g2"] + }, + "video/av1": { + "source": "iana" + }, + "video/bmpeg": { + "source": "iana" + }, + "video/bt656": { + "source": "iana" + }, + "video/celb": { + "source": "iana" + }, + "video/dv": { + "source": "iana" + }, + "video/encaprtp": { + "source": "iana" + }, + "video/ffv1": { + "source": "iana" + }, + "video/flexfec": { + "source": "iana" + }, + "video/h261": { + "source": "iana", + "extensions": ["h261"] + }, + "video/h263": { + "source": "iana", + "extensions": ["h263"] + }, + "video/h263-1998": { + "source": "iana" + }, + "video/h263-2000": { + "source": "iana" + }, + "video/h264": { + "source": "iana", + "extensions": ["h264"] + }, + "video/h264-rcdo": { + "source": "iana" + }, + "video/h264-svc": { + "source": "iana" + }, + "video/h265": { + "source": "iana" + }, + "video/iso.segment": { + "source": "iana", + "extensions": ["m4s"] + }, + "video/jpeg": { + "source": "iana", + "extensions": ["jpgv"] + }, + "video/jpeg2000": { + "source": "iana" + }, + "video/jpm": { + "source": "apache", + "extensions": ["jpm","jpgm"] + }, + "video/jxsv": { + "source": "iana" + }, + "video/mj2": { + "source": "iana", + "extensions": ["mj2","mjp2"] + }, + "video/mp1s": { + "source": "iana" + }, + "video/mp2p": { + "source": "iana" + }, + "video/mp2t": { + "source": "iana", + "extensions": ["ts"] + }, + "video/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["mp4","mp4v","mpg4"] + }, + "video/mp4v-es": { + "source": "iana" + }, + "video/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpeg","mpg","mpe","m1v","m2v"] + }, + "video/mpeg4-generic": { + "source": "iana" + }, + "video/mpv": { + "source": "iana" + }, + "video/nv": { + "source": "iana" + }, + "video/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogv"] + }, + "video/parityfec": { + "source": "iana" + }, + "video/pointer": { + "source": "iana" + }, + "video/quicktime": { + "source": "iana", + "compressible": false, + "extensions": ["qt","mov"] + }, + "video/raptorfec": { + "source": "iana" + }, + "video/raw": { + "source": "iana" + }, + "video/rtp-enc-aescm128": { + "source": "iana" + }, + "video/rtploopback": { + "source": "iana" + }, + "video/rtx": { + "source": "iana" + }, + "video/scip": { + "source": "iana" + }, + "video/smpte291": { + "source": "iana" + }, + "video/smpte292m": { + "source": "iana" + }, + "video/ulpfec": { + "source": "iana" + }, + "video/vc1": { + "source": "iana" + }, + "video/vc2": { + "source": "iana" + }, + "video/vnd.cctv": { + "source": "iana" + }, + "video/vnd.dece.hd": { + "source": "iana", + "extensions": ["uvh","uvvh"] + }, + "video/vnd.dece.mobile": { + "source": "iana", + "extensions": ["uvm","uvvm"] + }, + "video/vnd.dece.mp4": { + "source": "iana" + }, + "video/vnd.dece.pd": { + "source": "iana", + "extensions": ["uvp","uvvp"] + }, + "video/vnd.dece.sd": { + "source": "iana", + "extensions": ["uvs","uvvs"] + }, + "video/vnd.dece.video": { + "source": "iana", + "extensions": ["uvv","uvvv"] + }, + "video/vnd.directv.mpeg": { + "source": "iana" + }, + "video/vnd.directv.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dlna.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dvb.file": { + "source": "iana", + "extensions": ["dvb"] + }, + "video/vnd.fvt": { + "source": "iana", + "extensions": ["fvt"] + }, + "video/vnd.hns.video": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsavc": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + "source": "iana" + }, + "video/vnd.motorola.video": { + "source": "iana" + }, + "video/vnd.motorola.videop": { + "source": "iana" + }, + "video/vnd.mpegurl": { + "source": "iana", + "extensions": ["mxu","m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + "source": "iana", + "extensions": ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + "source": "iana" + }, + "video/vnd.nokia.mp4vr": { + "source": "iana" + }, + "video/vnd.nokia.videovoip": { + "source": "iana" + }, + "video/vnd.objectvideo": { + "source": "iana" + }, + "video/vnd.radgamettools.bink": { + "source": "iana" + }, + "video/vnd.radgamettools.smacker": { + "source": "iana" + }, + "video/vnd.sealed.mpeg1": { + "source": "iana" + }, + "video/vnd.sealed.mpeg4": { + "source": "iana" + }, + "video/vnd.sealed.swf": { + "source": "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + "source": "iana" + }, + "video/vnd.uvvu.mp4": { + "source": "iana", + "extensions": ["uvu","uvvu"] + }, + "video/vnd.vivo": { + "source": "iana", + "extensions": ["viv"] + }, + "video/vnd.youtube.yt": { + "source": "iana" + }, + "video/vp8": { + "source": "iana" + }, + "video/vp9": { + "source": "iana" + }, + "video/webm": { + "source": "apache", + "compressible": false, + "extensions": ["webm"] + }, + "video/x-f4v": { + "source": "apache", + "extensions": ["f4v"] + }, + "video/x-fli": { + "source": "apache", + "extensions": ["fli"] + }, + "video/x-flv": { + "source": "apache", + "compressible": false, + "extensions": ["flv"] + }, + "video/x-m4v": { + "source": "apache", + "extensions": ["m4v"] + }, + "video/x-matroska": { + "source": "apache", + "compressible": false, + "extensions": ["mkv","mk3d","mks"] + }, + "video/x-mng": { + "source": "apache", + "extensions": ["mng"] + }, + "video/x-ms-asf": { + "source": "apache", + "extensions": ["asf","asx"] + }, + "video/x-ms-vob": { + "source": "apache", + "extensions": ["vob"] + }, + "video/x-ms-wm": { + "source": "apache", + "extensions": ["wm"] + }, + "video/x-ms-wmv": { + "source": "apache", + "compressible": false, + "extensions": ["wmv"] + }, + "video/x-ms-wmx": { + "source": "apache", + "extensions": ["wmx"] + }, + "video/x-ms-wvx": { + "source": "apache", + "extensions": ["wvx"] + }, + "video/x-msvideo": { + "source": "apache", + "extensions": ["avi"] + }, + "video/x-sgi-movie": { + "source": "apache", + "extensions": ["movie"] + }, + "video/x-smv": { + "source": "apache", + "extensions": ["smv"] + }, + "x-conference/x-cooltalk": { + "source": "apache", + "extensions": ["ice"] + }, + "x-shader/x-fragment": { + "compressible": true + }, + "x-shader/x-vertex": { + "compressible": true + } +} diff --git a/front/frontend/node_modules/accepts/node_modules/mime-db/index.js b/front/frontend/node_modules/accepts/node_modules/mime-db/index.js new file mode 100644 index 0000000..ec2be30 --- /dev/null +++ b/front/frontend/node_modules/accepts/node_modules/mime-db/index.js @@ -0,0 +1,12 @@ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = require('./db.json') diff --git a/front/frontend/node_modules/accepts/node_modules/mime-db/package.json b/front/frontend/node_modules/accepts/node_modules/mime-db/package.json new file mode 100644 index 0000000..32c14b8 --- /dev/null +++ b/front/frontend/node_modules/accepts/node_modules/mime-db/package.json @@ -0,0 +1,60 @@ +{ + "name": "mime-db", + "description": "Media Type Database", + "version": "1.52.0", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)", + "Robert Kieffer (http://github.com/broofa)" + ], + "license": "MIT", + "keywords": [ + "mime", + "db", + "type", + "types", + "database", + "charset", + "charsets" + ], + "repository": "jshttp/mime-db", + "devDependencies": { + "bluebird": "3.7.2", + "co": "4.6.0", + "cogent": "1.0.1", + "csv-parse": "4.16.3", + "eslint": "7.32.0", + "eslint-config-standard": "15.0.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.1.1", + "eslint-plugin-standard": "4.1.0", + "gnode": "0.1.2", + "media-typer": "1.1.0", + "mocha": "9.2.1", + "nyc": "15.1.0", + "raw-body": "2.5.0", + "stream-to-array": "2.3.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "db.json", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "build": "node scripts/build", + "fetch": "node scripts/fetch-apache && gnode scripts/fetch-iana && node scripts/fetch-nginx", + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "update": "npm run fetch && npm run build", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/front/frontend/node_modules/accepts/node_modules/mime-types/HISTORY.md b/front/frontend/node_modules/accepts/node_modules/mime-types/HISTORY.md new file mode 100644 index 0000000..c5043b7 --- /dev/null +++ b/front/frontend/node_modules/accepts/node_modules/mime-types/HISTORY.md @@ -0,0 +1,397 @@ +2.1.35 / 2022-03-12 +=================== + + * deps: mime-db@1.52.0 + - Add extensions from IANA for more `image/*` types + - Add extension `.asc` to `application/pgp-keys` + - Add extensions to various XML types + - Add new upstream MIME types + +2.1.34 / 2021-11-08 +=================== + + * deps: mime-db@1.51.0 + - Add new upstream MIME types + +2.1.33 / 2021-10-01 +=================== + + * deps: mime-db@1.50.0 + - Add deprecated iWorks mime types and extensions + - Add new upstream MIME types + +2.1.32 / 2021-07-27 +=================== + + * deps: mime-db@1.49.0 + - Add extension `.trig` to `application/trig` + - Add new upstream MIME types + +2.1.31 / 2021-06-01 +=================== + + * deps: mime-db@1.48.0 + - Add extension `.mvt` to `application/vnd.mapbox-vector-tile` + - Add new upstream MIME types + +2.1.30 / 2021-04-02 +=================== + + * deps: mime-db@1.47.0 + - Add extension `.amr` to `audio/amr` + - Remove ambigious extensions from IANA for `application/*+xml` types + - Update primary extension to `.es` for `application/ecmascript` + +2.1.29 / 2021-02-17 +=================== + + * deps: mime-db@1.46.0 + - Add extension `.amr` to `audio/amr` + - Add extension `.m4s` to `video/iso.segment` + - Add extension `.opus` to `audio/ogg` + - Add new upstream MIME types + +2.1.28 / 2021-01-01 +=================== + + * deps: mime-db@1.45.0 + - Add `application/ubjson` with extension `.ubj` + - Add `image/avif` with extension `.avif` + - Add `image/ktx2` with extension `.ktx2` + - Add extension `.dbf` to `application/vnd.dbf` + - Add extension `.rar` to `application/vnd.rar` + - Add extension `.td` to `application/urc-targetdesc+xml` + - Add new upstream MIME types + - Fix extension of `application/vnd.apple.keynote` to be `.key` + +2.1.27 / 2020-04-23 +=================== + + * deps: mime-db@1.44.0 + - Add charsets from IANA + - Add extension `.cjs` to `application/node` + - Add new upstream MIME types + +2.1.26 / 2020-01-05 +=================== + + * deps: mime-db@1.43.0 + - Add `application/x-keepass2` with extension `.kdbx` + - Add extension `.mxmf` to `audio/mobile-xmf` + - Add extensions from IANA for `application/*+xml` types + - Add new upstream MIME types + +2.1.25 / 2019-11-12 +=================== + + * deps: mime-db@1.42.0 + - Add new upstream MIME types + - Add `application/toml` with extension `.toml` + - Add `image/vnd.ms-dds` with extension `.dds` + +2.1.24 / 2019-04-20 +=================== + + * deps: mime-db@1.40.0 + - Add extensions from IANA for `model/*` types + - Add `text/mdx` with extension `.mdx` + +2.1.23 / 2019-04-17 +=================== + + * deps: mime-db@~1.39.0 + - Add extensions `.siv` and `.sieve` to `application/sieve` + - Add new upstream MIME types + +2.1.22 / 2019-02-14 +=================== + + * deps: mime-db@~1.38.0 + - Add extension `.nq` to `application/n-quads` + - Add extension `.nt` to `application/n-triples` + - Add new upstream MIME types + +2.1.21 / 2018-10-19 +=================== + + * deps: mime-db@~1.37.0 + - Add extensions to HEIC image types + - Add new upstream MIME types + +2.1.20 / 2018-08-26 +=================== + + * deps: mime-db@~1.36.0 + - Add Apple file extensions from IANA + - Add extensions from IANA for `image/*` types + - Add new upstream MIME types + +2.1.19 / 2018-07-17 +=================== + + * deps: mime-db@~1.35.0 + - Add extension `.csl` to `application/vnd.citationstyles.style+xml` + - Add extension `.es` to `application/ecmascript` + - Add extension `.owl` to `application/rdf+xml` + - Add new upstream MIME types + - Add UTF-8 as default charset for `text/turtle` + +2.1.18 / 2018-02-16 +=================== + + * deps: mime-db@~1.33.0 + - Add `application/raml+yaml` with extension `.raml` + - Add `application/wasm` with extension `.wasm` + - Add `text/shex` with extension `.shex` + - Add extensions for JPEG-2000 images + - Add extensions from IANA for `message/*` types + - Add new upstream MIME types + - Update font MIME types + - Update `text/hjson` to registered `application/hjson` + +2.1.17 / 2017-09-01 +=================== + + * deps: mime-db@~1.30.0 + - Add `application/vnd.ms-outlook` + - Add `application/x-arj` + - Add extension `.mjs` to `application/javascript` + - Add glTF types and extensions + - Add new upstream MIME types + - Add `text/x-org` + - Add VirtualBox MIME types + - Fix `source` records for `video/*` types that are IANA + - Update `font/opentype` to registered `font/otf` + +2.1.16 / 2017-07-24 +=================== + + * deps: mime-db@~1.29.0 + - Add `application/fido.trusted-apps+json` + - Add extension `.wadl` to `application/vnd.sun.wadl+xml` + - Add extension `.gz` to `application/gzip` + - Add new upstream MIME types + - Update extensions `.md` and `.markdown` to be `text/markdown` + +2.1.15 / 2017-03-23 +=================== + + * deps: mime-db@~1.27.0 + - Add new mime types + - Add `image/apng` + +2.1.14 / 2017-01-14 +=================== + + * deps: mime-db@~1.26.0 + - Add new mime types + +2.1.13 / 2016-11-18 +=================== + + * deps: mime-db@~1.25.0 + - Add new mime types + +2.1.12 / 2016-09-18 +=================== + + * deps: mime-db@~1.24.0 + - Add new mime types + - Add `audio/mp3` + +2.1.11 / 2016-05-01 +=================== + + * deps: mime-db@~1.23.0 + - Add new mime types + +2.1.10 / 2016-02-15 +=================== + + * deps: mime-db@~1.22.0 + - Add new mime types + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + +2.1.9 / 2016-01-06 +================== + + * deps: mime-db@~1.21.0 + - Add new mime types + +2.1.8 / 2015-11-30 +================== + + * deps: mime-db@~1.20.0 + - Add new mime types + +2.1.7 / 2015-09-20 +================== + + * deps: mime-db@~1.19.0 + - Add new mime types + +2.1.6 / 2015-09-03 +================== + + * deps: mime-db@~1.18.0 + - Add new mime types + +2.1.5 / 2015-08-20 +================== + + * deps: mime-db@~1.17.0 + - Add new mime types + +2.1.4 / 2015-07-30 +================== + + * deps: mime-db@~1.16.0 + - Add new mime types + +2.1.3 / 2015-07-13 +================== + + * deps: mime-db@~1.15.0 + - Add new mime types + +2.1.2 / 2015-06-25 +================== + + * deps: mime-db@~1.14.0 + - Add new mime types + +2.1.1 / 2015-06-08 +================== + + * perf: fix deopt during mapping + +2.1.0 / 2015-06-07 +================== + + * Fix incorrectly treating extension-less file name as extension + - i.e. `'path/to/json'` will no longer return `application/json` + * Fix `.charset(type)` to accept parameters + * Fix `.charset(type)` to match case-insensitive + * Improve generation of extension to MIME mapping + * Refactor internals for readability and no argument reassignment + * Prefer `application/*` MIME types from the same source + * Prefer any type over `application/octet-stream` + * deps: mime-db@~1.13.0 + - Add nginx as a source + - Add new mime types + +2.0.14 / 2015-06-06 +=================== + + * deps: mime-db@~1.12.0 + - Add new mime types + +2.0.13 / 2015-05-31 +=================== + + * deps: mime-db@~1.11.0 + - Add new mime types + +2.0.12 / 2015-05-19 +=================== + + * deps: mime-db@~1.10.0 + - Add new mime types + +2.0.11 / 2015-05-05 +=================== + + * deps: mime-db@~1.9.1 + - Add new mime types + +2.0.10 / 2015-03-13 +=================== + + * deps: mime-db@~1.8.0 + - Add new mime types + +2.0.9 / 2015-02-09 +================== + + * deps: mime-db@~1.7.0 + - Add new mime types + - Community extensions ownership transferred from `node-mime` + +2.0.8 / 2015-01-29 +================== + + * deps: mime-db@~1.6.0 + - Add new mime types + +2.0.7 / 2014-12-30 +================== + + * deps: mime-db@~1.5.0 + - Add new mime types + - Fix various invalid MIME type entries + +2.0.6 / 2014-12-30 +================== + + * deps: mime-db@~1.4.0 + - Add new mime types + - Fix various invalid MIME type entries + - Remove example template MIME types + +2.0.5 / 2014-12-29 +================== + + * deps: mime-db@~1.3.1 + - Fix missing extensions + +2.0.4 / 2014-12-10 +================== + + * deps: mime-db@~1.3.0 + - Add new mime types + +2.0.3 / 2014-11-09 +================== + + * deps: mime-db@~1.2.0 + - Add new mime types + +2.0.2 / 2014-09-28 +================== + + * deps: mime-db@~1.1.0 + - Add new mime types + - Update charsets + +2.0.1 / 2014-09-07 +================== + + * Support Node.js 0.6 + +2.0.0 / 2014-09-02 +================== + + * Use `mime-db` + * Remove `.define()` + +1.0.2 / 2014-08-04 +================== + + * Set charset=utf-8 for `text/javascript` + +1.0.1 / 2014-06-24 +================== + + * Add `text/jsx` type + +1.0.0 / 2014-05-12 +================== + + * Return `false` for unknown types + * Set charset=utf-8 for `application/json` + +0.1.0 / 2014-05-02 +================== + + * Initial release diff --git a/front/frontend/node_modules/accepts/node_modules/mime-types/LICENSE b/front/frontend/node_modules/accepts/node_modules/mime-types/LICENSE new file mode 100644 index 0000000..0616607 --- /dev/null +++ b/front/frontend/node_modules/accepts/node_modules/mime-types/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/accepts/node_modules/mime-types/README.md b/front/frontend/node_modules/accepts/node_modules/mime-types/README.md new file mode 100644 index 0000000..48d2fb4 --- /dev/null +++ b/front/frontend/node_modules/accepts/node_modules/mime-types/README.md @@ -0,0 +1,113 @@ +# mime-types + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][ci-image]][ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +The ultimate javascript content-type utility. + +Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except: + +- __No fallbacks.__ Instead of naively returning the first available type, + `mime-types` simply returns `false`, so do + `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. +- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. +- No `.define()` functionality +- Bug fixes for `.lookup(path)` + +Otherwise, the API is compatible with `mime` 1.x. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install mime-types +``` + +## Adding Types + +All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db), +so open a PR there if you'd like to add mime types. + +## API + +```js +var mime = require('mime-types') +``` + +All functions return `false` if input is invalid or not found. + +### mime.lookup(path) + +Lookup the content-type associated with a file. + +```js +mime.lookup('json') // 'application/json' +mime.lookup('.md') // 'text/markdown' +mime.lookup('file.html') // 'text/html' +mime.lookup('folder/file.js') // 'application/javascript' +mime.lookup('folder/.htaccess') // false + +mime.lookup('cats') // false +``` + +### mime.contentType(type) + +Create a full content-type header given a content-type or extension. +When given an extension, `mime.lookup` is used to get the matching +content-type, otherwise the given content-type is used. Then if the +content-type does not already have a `charset` parameter, `mime.charset` +is used to get the default charset and add to the returned content-type. + +```js +mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' +mime.contentType('file.json') // 'application/json; charset=utf-8' +mime.contentType('text/html') // 'text/html; charset=utf-8' +mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1' + +// from a full path +mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' +``` + +### mime.extension(type) + +Get the default extension for a content-type. + +```js +mime.extension('application/octet-stream') // 'bin' +``` + +### mime.charset(type) + +Lookup the implied default charset of a content-type. + +```js +mime.charset('text/markdown') // 'UTF-8' +``` + +### var type = mime.types[extension] + +A map of content-types by extension. + +### [extensions...] = mime.extensions[type] + +A map of extensions by content-type. + +## License + +[MIT](LICENSE) + +[ci-image]: https://badgen.net/github/checks/jshttp/mime-types/master?label=ci +[ci-url]: https://github.com/jshttp/mime-types/actions/workflows/ci.yml +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master +[node-version-image]: https://badgen.net/npm/node/mime-types +[node-version-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-types +[npm-url]: https://npmjs.org/package/mime-types +[npm-version-image]: https://badgen.net/npm/v/mime-types diff --git a/front/frontend/node_modules/accepts/node_modules/mime-types/index.js b/front/frontend/node_modules/accepts/node_modules/mime-types/index.js new file mode 100644 index 0000000..b9f34d5 --- /dev/null +++ b/front/frontend/node_modules/accepts/node_modules/mime-types/index.js @@ -0,0 +1,188 @@ +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var db = require('mime-db') +var extname = require('path').extname + +/** + * Module variables. + * @private + */ + +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps (extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] + + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) + + if (types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { + // skip the remapping + continue + } + } + + // set the extension -> mime + types[extension] = type + } + }) +} diff --git a/front/frontend/node_modules/accepts/node_modules/mime-types/package.json b/front/frontend/node_modules/accepts/node_modules/mime-types/package.json new file mode 100644 index 0000000..bbef696 --- /dev/null +++ b/front/frontend/node_modules/accepts/node_modules/mime-types/package.json @@ -0,0 +1,44 @@ +{ + "name": "mime-types", + "description": "The ultimate javascript content-type utility.", + "version": "2.1.35", + "contributors": [ + "Douglas Christopher Wilson ", + "Jeremiah Senkpiel (https://searchbeam.jit.su)", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "keywords": [ + "mime", + "types" + ], + "repository": "jshttp/mime-types", + "dependencies": { + "mime-db": "1.52.0" + }, + "devDependencies": { + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.2.0", + "eslint-plugin-standard": "4.1.0", + "mocha": "9.2.2", + "nyc": "15.1.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec test/test.js", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/front/frontend/node_modules/accepts/package.json b/front/frontend/node_modules/accepts/package.json new file mode 100644 index 0000000..0f2d15d --- /dev/null +++ b/front/frontend/node_modules/accepts/package.json @@ -0,0 +1,47 @@ +{ + "name": "accepts", + "description": "Higher-level content negotiation", + "version": "1.3.8", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "repository": "jshttp/accepts", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "devDependencies": { + "deep-equal": "1.0.1", + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "4.3.1", + "eslint-plugin-standard": "4.1.0", + "mocha": "9.2.0", + "nyc": "15.1.0" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + }, + "keywords": [ + "content", + "negotiation", + "accept", + "accepts" + ] +} diff --git a/front/frontend/node_modules/anymatch/LICENSE b/front/frontend/node_modules/anymatch/LICENSE new file mode 100644 index 0000000..bc42470 --- /dev/null +++ b/front/frontend/node_modules/anymatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2014 Elan Shanker + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/front/frontend/node_modules/anymatch/README.md b/front/frontend/node_modules/anymatch/README.md new file mode 100644 index 0000000..f674f40 --- /dev/null +++ b/front/frontend/node_modules/anymatch/README.md @@ -0,0 +1,99 @@ +anymatch [![Build Status](https://travis-ci.org/micromatch/anymatch.svg?branch=master)](https://travis-ci.org/micromatch/anymatch) [![Coverage Status](https://img.shields.io/coveralls/micromatch/anymatch.svg?branch=master)](https://coveralls.io/r/micromatch/anymatch?branch=master) +====== +Javascript module to match a string against a regular expression, glob, string, +or function that takes the string as an argument and returns a truthy or falsy +value. The matcher can also be an array of any or all of these. Useful for +allowing a very flexible user-defined config to define things like file paths. + +__Note: This module has Bash-parity, please be aware that Windows-style backslashes are not supported as separators. See https://github.com/micromatch/micromatch#backslashes for more information.__ + +[![NPM](https://nodei.co/npm/anymatch.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/anymatch/) +[![NPM](https://nodei.co/npm-dl/anymatch.png?height=3&months=9)](https://nodei.co/npm-dl/anymatch/) + +Usage +----- +```sh +npm install anymatch --save +``` + +#### anymatch (matchers, testString, [returnIndex], [startIndex], [endIndex]) +* __matchers__: (_Array|String|RegExp|Function_) +String to be directly matched, string with glob patterns, regular expression +test, function that takes the testString as an argument and returns a truthy +value if it should be matched, or an array of any number and mix of these types. +* __testString__: (_String|Array_) The string to test against the matchers. If +passed as an array, the first element of the array will be used as the +`testString` for non-function matchers, while the entire array will be applied +as the arguments for function matchers. +* __returnIndex__: (_Boolean [optional]_) If true, return the array index of +the first matcher that that testString matched, or -1 if no match, instead of a +boolean result. +* __startIndex, endIndex__: (_Integer [optional]_) Can be used to define a +subset out of the array of provided matchers to test against. Can be useful +with bound matcher functions (see below). When used with `returnIndex = true` +preserves original indexing. Behaves the same as `Array.prototype.slice` (i.e. +includes array members up to, but not including endIndex). + +```js +var anymatch = require('anymatch'); + +var matchers = [ + 'path/to/file.js', + 'path/anyjs/**/*.js', + /foo\.js$/, + function (string) { + return string.indexOf('bar') !== -1 && string.length > 10 + } +]; + +anymatch(matchers, 'path/to/file.js'); // true +anymatch(matchers, 'path/anyjs/baz.js'); // true +anymatch(matchers, 'path/to/foo.js'); // true +anymatch(matchers, 'path/to/bar.js'); // true +anymatch(matchers, 'bar.js'); // false + +// returnIndex = true +anymatch(matchers, 'foo.js', true); // 2 +anymatch(matchers, 'path/anyjs/foo.js', true); // 1 + +// skip matchers +anymatch(matchers, 'path/to/file.js', false, 1); // false +anymatch(matchers, 'path/anyjs/foo.js', true, 2, 3); // 2 +anymatch(matchers, 'path/to/bar.js', true, 0, 3); // -1 + +// using globs to match directories and their children +anymatch('node_modules', 'node_modules'); // true +anymatch('node_modules', 'node_modules/somelib/index.js'); // false +anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true +anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false +anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true +``` + +#### anymatch (matchers) +You can also pass in only your matcher(s) to get a curried function that has +already been bound to the provided matching criteria. This can be used as an +`Array.prototype.filter` callback. + +```js +var matcher = anymatch(matchers); + +matcher('path/to/file.js'); // true +matcher('path/anyjs/baz.js', true); // 1 +matcher('path/anyjs/baz.js', true, 2); // -1 + +['foo.js', 'bar.js'].filter(matcher); // ['foo.js'] +``` + +Change Log +---------- +[See release notes page on GitHub](https://github.com/micromatch/anymatch/releases) + +NOTE: As of v2.0.0, [micromatch](https://github.com/jonschlinkert/micromatch) moves away from minimatch-parity and inline with Bash. This includes handling backslashes differently (see https://github.com/micromatch/micromatch#backslashes for more information). + +NOTE: As of v1.2.0, anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch) +for glob pattern matching. Issues with glob pattern matching should be +reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues). + +License +------- +[ISC](https://raw.github.com/micromatch/anymatch/master/LICENSE) diff --git a/front/frontend/node_modules/anymatch/index.js b/front/frontend/node_modules/anymatch/index.js new file mode 100644 index 0000000..e411618 --- /dev/null +++ b/front/frontend/node_modules/anymatch/index.js @@ -0,0 +1,67 @@ +'use strict'; + +var micromatch = require('micromatch'); +var normalize = require('normalize-path'); +var path = require('path'); // required for tests. +var arrify = function(a) { return a == null ? [] : (Array.isArray(a) ? a : [a]); }; + +var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) { + criteria = arrify(criteria); + value = arrify(value); + if (arguments.length === 1) { + return anymatch.bind(null, criteria.map(function(criterion) { + return typeof criterion === 'string' && criterion[0] !== '!' ? + micromatch.matcher(criterion) : criterion; + })); + } + startIndex = startIndex || 0; + var string = value[0]; + var altString, altValue; + var matched = false; + var matchIndex = -1; + function testCriteria(criterion, index) { + var result; + switch (Object.prototype.toString.call(criterion)) { + case '[object String]': + result = string === criterion || altString && altString === criterion; + result = result || micromatch.isMatch(string, criterion); + break; + case '[object RegExp]': + result = criterion.test(string) || altString && criterion.test(altString); + break; + case '[object Function]': + result = criterion.apply(null, value); + result = result || altValue && criterion.apply(null, altValue); + break; + default: + result = false; + } + if (result) { + matchIndex = index + startIndex; + } + return result; + } + var crit = criteria; + var negGlobs = crit.reduce(function(arr, criterion, index) { + if (typeof criterion === 'string' && criterion[0] === '!') { + if (crit === criteria) { + // make a copy before modifying + crit = crit.slice(); + } + crit[index] = null; + arr.push(criterion.substr(1)); + } + return arr; + }, []); + if (!negGlobs.length || !micromatch.any(string, negGlobs)) { + if (path.sep === '\\' && typeof string === 'string') { + altString = normalize(string); + altString = altString === string ? null : altString; + if (altString) altValue = [altString].concat(value.slice(1)); + } + matched = crit.slice(startIndex, endIndex).some(testCriteria); + } + return returnIndex === true ? matchIndex : matched; +}; + +module.exports = anymatch; diff --git a/front/frontend/node_modules/anymatch/node_modules/normalize-path/LICENSE b/front/frontend/node_modules/anymatch/node_modules/normalize-path/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/front/frontend/node_modules/anymatch/node_modules/normalize-path/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/anymatch/node_modules/normalize-path/README.md b/front/frontend/node_modules/anymatch/node_modules/normalize-path/README.md new file mode 100644 index 0000000..daa0edd --- /dev/null +++ b/front/frontend/node_modules/anymatch/node_modules/normalize-path/README.md @@ -0,0 +1,92 @@ +# normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path) + +> Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save normalize-path +``` + +## Usage + +```js +var normalize = require('normalize-path'); + +normalize('\\foo\\bar\\baz\\'); +//=> '/foo/bar/baz' + +normalize('./foo/bar/baz/'); +//=> './foo/bar/baz' +``` + +Pass `false` as the last argument to **keep** trailing slashes: + +```js +normalize('./foo/bar/baz/', false); +//=> './foo/bar/baz/' + +normalize('foo\\bar\\baz\\', false); +//=> 'foo/bar/baz/' +``` + +## About + +### Related projects + +* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.") +* [ends-with](https://www.npmjs.com/package/ends-with): Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for… [more](https://github.com/jonschlinkert/ends-with) | [homepage](https://github.com/jonschlinkert/ends-with "Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for comparisons.") +* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute "Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute.") +* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") +* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.") +* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.") +* [path-segments](https://www.npmjs.com/package/path-segments): Get n specific segments of a file path, e.g. first 2, last 3, etc. | [homepage](https://github.com/jonschlinkert/path-segments "Get n specific segments of a file path, e.g. first 2, last 3, etc.") +* [rewrite-ext](https://www.npmjs.com/package/rewrite-ext): Automatically re-write the destination extension of a filepath based on the source extension. e.g… [more](https://github.com/jonschlinkert/rewrite-ext) | [homepage](https://github.com/jonschlinkert/rewrite-ext "Automatically re-write the destination extension of a filepath based on the source extension. e.g `.coffee` => `.js`. This will only rename the ext, no other path parts are modified.") +* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 31 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [phated](https://github.com/phated) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 29, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/anymatch/node_modules/normalize-path/index.js b/front/frontend/node_modules/anymatch/node_modules/normalize-path/index.js new file mode 100644 index 0000000..4a4f8cc --- /dev/null +++ b/front/frontend/node_modules/anymatch/node_modules/normalize-path/index.js @@ -0,0 +1,19 @@ +/*! + * normalize-path + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +var removeTrailingSeparator = require('remove-trailing-separator'); + +module.exports = function normalizePath(str, stripTrailing) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + str = str.replace(/[\\\/]+/g, '/'); + if (stripTrailing !== false) { + str = removeTrailingSeparator(str); + } + return str; +}; diff --git a/front/frontend/node_modules/anymatch/node_modules/normalize-path/package.json b/front/frontend/node_modules/anymatch/node_modules/normalize-path/package.json new file mode 100644 index 0000000..c16ef9d --- /dev/null +++ b/front/frontend/node_modules/anymatch/node_modules/normalize-path/package.json @@ -0,0 +1,78 @@ +{ + "name": "normalize-path", + "description": "Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled.", + "version": "2.1.1", + "homepage": "https://github.com/jonschlinkert/normalize-path", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Blaine Bublitz (https://twitter.com/BlaineBublitz)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/normalize-path", + "bugs": { + "url": "https://github.com/jonschlinkert/normalize-path/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "devDependencies": { + "benchmarked": "^0.1.1", + "gulp-format-md": "^0.1.11", + "minimist": "^1.2.0", + "mocha": "*" + }, + "keywords": [ + "backslash", + "file", + "filepath", + "fix", + "forward", + "fp", + "fs", + "normalize", + "path", + "slash", + "slashes", + "trailing", + "unix", + "urix" + ], + "verb": { + "related": { + "list": [ + "contains-path", + "ends-with", + "is-absolute", + "is-relative", + "parse-filepath", + "path-ends-with", + "path-segments", + "rewrite-ext", + "unixify" + ], + "description": "Other useful libraries for working with paths in node.js:" + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/anymatch/package.json b/front/frontend/node_modules/anymatch/package.json new file mode 100644 index 0000000..fdbafd7 --- /dev/null +++ b/front/frontend/node_modules/anymatch/package.json @@ -0,0 +1,47 @@ +{ + "name": "anymatch", + "version": "2.0.0", + "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", + "files": [ + "index.js" + ], + "author": { + "name": "Elan Shanker", + "url": "http://github.com/es128" + }, + "license": "ISC", + "homepage": "https://github.com/micromatch/anymatch", + "repository": { + "type": "git", + "url": "https://github.com/micromatch/anymatch" + }, + "bugs": { + "url": "https://github.com/micromatch/anymatch/issues" + }, + "keywords": [ + "match", + "any", + "string", + "file", + "fs", + "list", + "glob", + "regex", + "regexp", + "regular", + "expression", + "function" + ], + "scripts": { + "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" + }, + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "devDependencies": { + "coveralls": "^2.7.0", + "istanbul": "^0.4.5", + "mocha": "^3.0.0" + } +} diff --git a/front/frontend/node_modules/apache-crypt/LICENSE b/front/frontend/node_modules/apache-crypt/LICENSE new file mode 100644 index 0000000..8a6cf57 --- /dev/null +++ b/front/frontend/node_modules/apache-crypt/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) Gevorg Harutyunyan + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/apache-crypt/README.md b/front/frontend/node_modules/apache-crypt/README.md new file mode 100644 index 0000000..680c027 --- /dev/null +++ b/front/frontend/node_modules/apache-crypt/README.md @@ -0,0 +1,43 @@ +# apache-crypt +[Node.js](http://nodejs.org/) package for Apache style password encryption using crypt(3). + +[![build](https://github.com/gevorg/apache-crypt/workflows/build/badge.svg)](https://github.com/gevorg/apache-crypt/actions/workflows/build.yml) + +## Installation + +Via git (or downloaded tarball): + +```bash +$ git clone git://github.com/gevorg/apache-crypt.git +``` +Via [npm](http://npmjs.org/): + +```bash +$ npm install apache-crypt +``` + +## Usage + +```javascript +const crypt = require("apache-crypt"); + +// Encrypting password using auto-generated 2 char salt. +const encryptedPassword = crypt("mypass"); + +// Should print true. +console.log(crypt("mypass", encryptedPassword) == encryptedPassword); +// Should print false. +console.log(crypt("notmypass", encryptedPassword) == encryptedPassword); +``` + +## Running tests + +It uses [mocha](https://mochajs.org/), so just run following command in package directory: + +```bash +$ npm test +``` + +## License + +The MIT License (MIT) \ No newline at end of file diff --git a/front/frontend/node_modules/apache-crypt/package.json b/front/frontend/node_modules/apache-crypt/package.json new file mode 100644 index 0000000..699e695 --- /dev/null +++ b/front/frontend/node_modules/apache-crypt/package.json @@ -0,0 +1,53 @@ +{ + "name": "apache-crypt", + "description": "Node.js module for Apache style password encryption using crypt(3).", + "version": "1.2.6", + "author": "Gevorg Harutyunyan (http://github.com/gevorg)", + "maintainers": [ + { + "name": "gevorg", + "email": "gevorg.ha@gmail.com" + } + ], + "homepage": "http://github.com/gevorg/apache-crypt", + "repository": { + "type": "git", + "url": "http://github.com/gevorg/apache-crypt.git" + }, + "main": "./src/index.js", + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/gevorg/apache-crypt/blob/master/LICENSE" + } + ], + "license": "MIT", + "bugs": { + "url": "http://github.com/gevorg/apache-crypt/issues" + }, + "dependencies": { + "unix-crypt-td-js": "^1.1.4" + }, + "devDependencies": { + "chai": "^4.2.0", + "eslint": "^6.8.0", + "eslint-config-prettier": "^6.10.0", + "eslint-plugin-node": "^11.0.0", + "eslint-plugin-prettier": "^3.1.2", + "mocha": "^7.0.1", + "prettier": "^1.19.1" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "mocha", + "pretest": "eslint --ignore-path .gitignore ." + }, + "keywords": [ + "apache", + "crypt", + "password", + "htpasswd" + ] +} diff --git a/front/frontend/node_modules/apache-crypt/src/index.js b/front/frontend/node_modules/apache-crypt/src/index.js new file mode 100644 index 0000000..342c647 --- /dev/null +++ b/front/frontend/node_modules/apache-crypt/src/index.js @@ -0,0 +1,20 @@ +"use strict"; + +// Des module. +const des = require("unix-crypt-td-js"); + +// Hash generation string. +const itoa64 = + "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + +// Salt generation method. +function getSalt() { + return ( + itoa64[parseInt(Math.random() * 64)] + itoa64[parseInt(Math.random() * 64)] + ); +} + +// Exporting old style. +module.exports = (password, salt) => { + return salt ? des(password, salt) : des(password, getSalt()); +}; diff --git a/front/frontend/node_modules/apache-md5/LICENSE b/front/frontend/node_modules/apache-md5/LICENSE new file mode 100644 index 0000000..8a6cf57 --- /dev/null +++ b/front/frontend/node_modules/apache-md5/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) Gevorg Harutyunyan + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/apache-md5/README.md b/front/frontend/node_modules/apache-md5/README.md new file mode 100644 index 0000000..e28077b --- /dev/null +++ b/front/frontend/node_modules/apache-md5/README.md @@ -0,0 +1,43 @@ +# apache-md5 +[Node.js](http://nodejs.org/) package for Apache style password encryption using md5. + +[![build](https://github.com/gevorg/apache-md5/workflows/build/badge.svg)](https://github.com/gevorg/apache-md5/actions/workflows/build.yml) + +## Installation + +Via git (or downloaded tarball): + +```bash +$ git clone git://github.com/gevorg/apache-md5.git +``` +Via [npm](http://npmjs.org/): + +```bash +$ npm install apache-md5 +``` + +## Usage + +```javascript +const md5 = require("apache-md5"); + +// Encrypting password using apache's md5 algorithm. +const encryptedPassword = md5("mypass"); + +// Should print true. +console.log(md5("mypass", encryptedPassword) == encryptedPassword); +// Should print false. +console.log(md5("notmypass", encryptedPassword) == encryptedPassword); +``` + +## Running tests + +It uses [mocha](https://mochajs.org/), so just run following command in package directory: + +```bash +$ npm test +``` + +## License + +The MIT License (MIT) \ No newline at end of file diff --git a/front/frontend/node_modules/apache-md5/package.json b/front/frontend/node_modules/apache-md5/package.json new file mode 100644 index 0000000..f2a9421 --- /dev/null +++ b/front/frontend/node_modules/apache-md5/package.json @@ -0,0 +1,51 @@ +{ + "name": "apache-md5", + "description": "Node.js module for Apache style password encryption using md5.", + "version": "1.1.8", + "author": "Gevorg Harutyunyan (http://github.com/gevorg)", + "maintainers": [ + { + "name": "gevorg", + "email": "gevorg.ha@gmail.com" + } + ], + "homepage": "http://github.com/gevorg/apache-md5", + "repository": { + "type": "git", + "url": "http://github.com/gevorg/apache-md5.git" + }, + "main": "./src/index.js", + "typings": "./src/apache-md5.d.ts", + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/gevorg/apache-md5/blob/master/LICENSE" + } + ], + "license": "MIT", + "bugs": { + "url": "http://github.com/gevorg/apache-md5/issues" + }, + "devDependencies": { + "chai": "^4.2.0", + "eslint": "^6.8.0", + "eslint-config-prettier": "^6.10.0", + "eslint-plugin-node": "^11.0.0", + "eslint-plugin-prettier": "^3.1.2", + "mocha": "^7.0.1", + "prettier": "^1.19.1" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "mocha", + "pretest": "eslint --ignore-path .gitignore ." + }, + "keywords": [ + "apache", + "md5", + "password", + "htpasswd" + ] +} diff --git a/front/frontend/node_modules/apache-md5/src/apache-md5.d.ts b/front/frontend/node_modules/apache-md5/src/apache-md5.d.ts new file mode 100644 index 0000000..64b6cc9 --- /dev/null +++ b/front/frontend/node_modules/apache-md5/src/apache-md5.d.ts @@ -0,0 +1,4 @@ +declare function aprMd5(password: string, salt?: string): string; + +export default aprMd5; + diff --git a/front/frontend/node_modules/apache-md5/src/index.js b/front/frontend/node_modules/apache-md5/src/index.js new file mode 100644 index 0000000..1c79b65 --- /dev/null +++ b/front/frontend/node_modules/apache-md5/src/index.js @@ -0,0 +1,148 @@ +"use strict"; + +// Crypto module import. +const crypto = require("crypto"); + +// Hash generation string. +const itoa64 = + "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + +// To 64 bit version. +function to64(index, count) { + let result = ""; + + while (--count >= 0) { + // Result char count. + result += itoa64[index & 63]; // Get corresponding char. + index = index >> 6; // Move to next one. + } + + return result; +} + +// Returns salt. +function getSalt(inputSalt) { + let salt = ""; + + if (inputSalt) { + // Remove $apr1$ token and extract salt. + salt = inputSalt.split("$")[2]; + } else { + while (salt.length < 8) { + // Random 8 chars. + let rchIndex = Math.floor(Math.random() * 64); + salt += itoa64[rchIndex]; + } + } + + return salt; +} + +// Returns password. +function getPassword(final) { + // Encrypted pass. + let epass = ""; + + epass += to64( + (final.charCodeAt(0) << 16) | + (final.charCodeAt(6) << 8) | + final.charCodeAt(12), + 4 + ); + epass += to64( + (final.charCodeAt(1) << 16) | + (final.charCodeAt(7) << 8) | + final.charCodeAt(13), + 4 + ); + epass += to64( + (final.charCodeAt(2) << 16) | + (final.charCodeAt(8) << 8) | + final.charCodeAt(14), + 4 + ); + epass += to64( + (final.charCodeAt(3) << 16) | + (final.charCodeAt(9) << 8) | + final.charCodeAt(15), + 4 + ); + epass += to64( + (final.charCodeAt(4) << 16) | + (final.charCodeAt(10) << 8) | + final.charCodeAt(5), + 4 + ); + epass += to64(final.charCodeAt(11), 2); + + return epass; +} + +// Exporting old style. +module.exports = (password, salt) => { + let magic = ""; + if (salt && salt.split("$")[1] === "1") { + magic = "$1$"; + } else { + magic = "$apr1$"; + } + + salt = getSalt(salt); + + let ctx = password + magic + salt; + let final = crypto + .createHash("md5") + .update(password + salt + password, "ascii") + .digest("binary"); + + for (let pl = password.length; pl > 0; pl -= 16) { + ctx += final.substr(0, pl > 16 ? 16 : pl); + } + + for (let i = password.length; i; i >>= 1) { + if (i % 2) { + ctx += String.fromCharCode(0); + } else { + ctx += password.charAt(0); + } + } + + final = crypto + .createHash("md5") + .update(ctx, "ascii") + .digest("binary"); + + // 1000 loop. + for (let i = 0; i < 1000; ++i) { + // Weird stuff. + let ctxl = ""; + + if (i % 2) { + ctxl += password; + } else { + ctxl += final.substr(0, 16); + } + + if (i % 3) { + ctxl += salt; + } + + if (i % 7) { + ctxl += password; + } + + if (i % 2) { + ctxl += final.substr(0, 16); + } else { + ctxl += password; + } + + // Final assignment after each loop. + final = crypto + .createHash("md5") + .update(ctxl, "ascii") + .digest("binary"); + } + + return magic + salt + "$" + getPassword(final); +}; diff --git a/front/frontend/node_modules/arr-diff/LICENSE b/front/frontend/node_modules/arr-diff/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/front/frontend/node_modules/arr-diff/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/arr-diff/README.md b/front/frontend/node_modules/arr-diff/README.md new file mode 100644 index 0000000..961f5c3 --- /dev/null +++ b/front/frontend/node_modules/arr-diff/README.md @@ -0,0 +1,130 @@ +# arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg?style=flat)](https://www.npmjs.com/package/arr-diff) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-diff.svg?style=flat)](https://npmjs.org/package/arr-diff) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-diff.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-diff) + +> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save arr-diff +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add arr-diff +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install arr-diff --save +``` + +## Usage + +Returns the difference between the first array and additional arrays. + +```js +var diff = require('arr-diff'); + +var a = ['a', 'b', 'c', 'd']; +var b = ['b', 'c']; + +console.log(diff(a, b)) +//=> ['a', 'd'] +``` + +## Benchmarks + +This library versus [array-differ](https://github.com/sindresorhus/array-differ), on April 14, 2017: + +``` +Benchmarking: (4 of 4) + · long-dupes + · long + · med + · short + +# benchmark/fixtures/long-dupes.js (100804 bytes) + arr-diff-3.0.0 x 822 ops/sec ±0.67% (86 runs sampled) + arr-diff-4.0.0 x 2,141 ops/sec ±0.42% (89 runs sampled) + array-differ x 708 ops/sec ±0.70% (89 runs sampled) + + fastest is arr-diff-4.0.0 + +# benchmark/fixtures/long.js (94529 bytes) + arr-diff-3.0.0 x 882 ops/sec ±0.60% (87 runs sampled) + arr-diff-4.0.0 x 2,329 ops/sec ±0.97% (83 runs sampled) + array-differ x 769 ops/sec ±0.61% (90 runs sampled) + + fastest is arr-diff-4.0.0 + +# benchmark/fixtures/med.js (708 bytes) + arr-diff-3.0.0 x 856,150 ops/sec ±0.42% (89 runs sampled) + arr-diff-4.0.0 x 4,665,249 ops/sec ±1.06% (89 runs sampled) + array-differ x 653,888 ops/sec ±1.02% (86 runs sampled) + + fastest is arr-diff-4.0.0 + +# benchmark/fixtures/short.js (60 bytes) + arr-diff-3.0.0 x 3,078,467 ops/sec ±0.77% (93 runs sampled) + arr-diff-4.0.0 x 9,213,296 ops/sec ±0.65% (89 runs sampled) + array-differ x 1,337,051 ops/sec ±0.91% (92 runs sampled) + + fastest is arr-diff-4.0.0 +``` + +## About + +### Related projects + +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") +* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter "Array#filter for older browsers.") +* [array-intersection](https://www.npmjs.com/package/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality… [more](https://github.com/jonschlinkert/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection "Return an array with the unique values present in _all_ given arrays using strict equality for comparisons.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [paulmillr](https://github.com/paulmillr) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 14, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/arr-diff/index.js b/front/frontend/node_modules/arr-diff/index.js new file mode 100644 index 0000000..90f2807 --- /dev/null +++ b/front/frontend/node_modules/arr-diff/index.js @@ -0,0 +1,47 @@ +/*! + * arr-diff + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function diff(arr/*, arrays*/) { + var len = arguments.length; + var idx = 0; + while (++idx < len) { + arr = diffArray(arr, arguments[idx]); + } + return arr; +}; + +function diffArray(one, two) { + if (!Array.isArray(two)) { + return one.slice(); + } + + var tlen = two.length + var olen = one.length; + var idx = -1; + var arr = []; + + while (++idx < olen) { + var ele = one[idx]; + + var hasEle = false; + for (var i = 0; i < tlen; i++) { + var val = two[i]; + + if (ele === val) { + hasEle = true; + break; + } + } + + if (hasEle === false) { + arr.push(ele); + } + } + return arr; +} diff --git a/front/frontend/node_modules/arr-diff/package.json b/front/frontend/node_modules/arr-diff/package.json new file mode 100644 index 0000000..c106813 --- /dev/null +++ b/front/frontend/node_modules/arr-diff/package.json @@ -0,0 +1,69 @@ +{ + "name": "arr-diff", + "description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.", + "version": "4.0.0", + "homepage": "https://github.com/jonschlinkert/arr-diff", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Paul Miller (paulmillr.com)" + ], + "repository": "jonschlinkert/arr-diff", + "bugs": { + "url": "https://github.com/jonschlinkert/arr-diff/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "devDependencies": { + "ansi-bold": "^0.1.1", + "arr-flatten": "^1.0.1", + "array-differ": "^1.0.0", + "benchmarked": "^0.2.4", + "gulp-format-md": "^0.1.9", + "minimist": "^1.2.0", + "mocha": "^2.4.5" + }, + "keywords": [ + "arr", + "array", + "array differ", + "array-differ", + "diff", + "differ", + "difference" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-flatten", + "array-filter", + "array-intersection" + ] + }, + "reflinks": [ + "array-differ", + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/arr-flatten/LICENSE b/front/frontend/node_modules/arr-flatten/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/front/frontend/node_modules/arr-flatten/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/arr-flatten/README.md b/front/frontend/node_modules/arr-flatten/README.md new file mode 100644 index 0000000..7dc7a97 --- /dev/null +++ b/front/frontend/node_modules/arr-flatten/README.md @@ -0,0 +1,86 @@ +# arr-flatten [![NPM version](https://img.shields.io/npm/v/arr-flatten.svg?style=flat)](https://www.npmjs.com/package/arr-flatten) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![NPM total downloads](https://img.shields.io/npm/dt/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-flatten.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-flatten) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/arr-flatten.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/arr-flatten) + +> Recursively flatten an array or arrays. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save arr-flatten +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install arr-flatten --save +``` + +## Usage + +```js +var flatten = require('arr-flatten'); + +flatten(['a', ['b', ['c']], 'd', ['e']]); +//=> ['a', 'b', 'c', 'd', 'e'] +``` + +## Why another flatten utility? + +I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%. + +## About + +### Related projects + +* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.") +* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.") +* [array-each](https://www.npmjs.com/package/array-each): Loop over each item in an array and call the given function on every element. | [homepage](https://github.com/jonschlinkert/array-each "Loop over each item in an array and call the given function on every element.") +* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique "Remove duplicate values from an array. Fastest ES5 implementation.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 20 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [lukeed](https://github.com/lukeed) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 05, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/arr-flatten/index.js b/front/frontend/node_modules/arr-flatten/index.js new file mode 100644 index 0000000..0cb4ea4 --- /dev/null +++ b/front/frontend/node_modules/arr-flatten/index.js @@ -0,0 +1,22 @@ +/*! + * arr-flatten + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function (arr) { + return flat(arr, []); +}; + +function flat(arr, res) { + var i = 0, cur; + var len = arr.length; + for (; i < len; i++) { + cur = arr[i]; + Array.isArray(cur) ? flat(cur, res) : res.push(cur); + } + return res; +} diff --git a/front/frontend/node_modules/arr-flatten/package.json b/front/frontend/node_modules/arr-flatten/package.json new file mode 100644 index 0000000..d2d33e9 --- /dev/null +++ b/front/frontend/node_modules/arr-flatten/package.json @@ -0,0 +1,76 @@ +{ + "name": "arr-flatten", + "description": "Recursively flatten an array or arrays.", + "version": "1.1.0", + "homepage": "https://github.com/jonschlinkert/arr-flatten", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Luke Edwards (https://lukeed.com)" + ], + "repository": "jonschlinkert/arr-flatten", + "bugs": { + "url": "https://github.com/jonschlinkert/arr-flatten/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "array-flatten": "^2.1.1", + "array-slice": "^1.0.0", + "benchmarked": "^1.0.0", + "compute-flatten": "^1.0.0", + "flatit": "^1.1.1", + "flatten": "^1.0.2", + "flatten-array": "^1.0.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "just-flatten-it": "^1.1.23", + "lodash.flattendeep": "^4.4.0", + "m_flattened": "^1.0.1", + "mocha": "^3.2.0", + "utils-flatten": "^1.0.0", + "write": "^0.3.3" + }, + "keywords": [ + "arr", + "array", + "elements", + "flat", + "flatten", + "nested", + "recurse", + "recursive", + "recursively" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-filter", + "arr-union", + "array-each", + "array-unique" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/arr-union/LICENSE b/front/frontend/node_modules/arr-union/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/front/frontend/node_modules/arr-union/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/arr-union/README.md b/front/frontend/node_modules/arr-union/README.md new file mode 100644 index 0000000..b3cd4f4 --- /dev/null +++ b/front/frontend/node_modules/arr-union/README.md @@ -0,0 +1,99 @@ +# arr-union [![NPM version](https://img.shields.io/npm/v/arr-union.svg)](https://www.npmjs.com/package/arr-union) [![Build Status](https://img.shields.io/travis/jonschlinkert/arr-union.svg)](https://travis-ci.org/jonschlinkert/arr-union) + +> Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm i arr-union --save +``` + +## Benchmarks + +This library is **10-20 times faster** and more performant than [array-union](https://github.com/sindresorhus/array-union). + +See the [benchmarks](./benchmark). + +```sh +#1: five-arrays + array-union x 511,121 ops/sec ±0.80% (96 runs sampled) + arr-union x 5,716,039 ops/sec ±0.86% (93 runs sampled) + +#2: ten-arrays + array-union x 245,196 ops/sec ±0.69% (94 runs sampled) + arr-union x 1,850,786 ops/sec ±0.84% (97 runs sampled) + +#3: two-arrays + array-union x 563,869 ops/sec ±0.97% (94 runs sampled) + arr-union x 9,602,852 ops/sec ±0.87% (92 runs sampled) +``` + +## Usage + +```js +var union = require('arr-union'); + +union(['a'], ['b', 'c'], ['d', 'e', 'f']); +//=> ['a', 'b', 'c', 'd', 'e', 'f'] +``` + +Returns only unique elements: + +```js +union(['a', 'a'], ['b', 'c']); +//=> ['a', 'b', 'c'] +``` + +## Related projects + +* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://www.npmjs.com/package/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff) +* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter) +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten) +* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map) +* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck) +* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce) +* [array-unique](https://www.npmjs.com/package/array-unique): Return an array free of duplicate values. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-union/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm i verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the [MIT license](https://github.com/jonschlinkert/arr-union/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on February 23, 2016._ \ No newline at end of file diff --git a/front/frontend/node_modules/arr-union/index.js b/front/frontend/node_modules/arr-union/index.js new file mode 100644 index 0000000..5ae6c4a --- /dev/null +++ b/front/frontend/node_modules/arr-union/index.js @@ -0,0 +1,29 @@ +'use strict'; + +module.exports = function union(init) { + if (!Array.isArray(init)) { + throw new TypeError('arr-union expects the first argument to be an array.'); + } + + var len = arguments.length; + var i = 0; + + while (++i < len) { + var arg = arguments[i]; + if (!arg) continue; + + if (!Array.isArray(arg)) { + arg = [arg]; + } + + for (var j = 0; j < arg.length; j++) { + var ele = arg[j]; + + if (init.indexOf(ele) >= 0) { + continue; + } + init.push(ele); + } + } + return init; +}; diff --git a/front/frontend/node_modules/arr-union/package.json b/front/frontend/node_modules/arr-union/package.json new file mode 100644 index 0000000..5ee87fd --- /dev/null +++ b/front/frontend/node_modules/arr-union/package.json @@ -0,0 +1,76 @@ +{ + "name": "arr-union", + "description": "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.", + "version": "3.1.0", + "homepage": "https://github.com/jonschlinkert/arr-union", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/arr-union", + "bugs": { + "url": "https://github.com/jonschlinkert/arr-union/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "array-union": "^1.0.1", + "array-unique": "^0.2.1", + "benchmarked": "^0.1.4", + "gulp-format-md": "^0.1.7", + "minimist": "^1.1.1", + "mocha": "*", + "should": "*" + }, + "keywords": [ + "add", + "append", + "array", + "arrays", + "combine", + "concat", + "extend", + "union", + "uniq", + "unique", + "util", + "utility", + "utils" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-diff", + "arr-flatten", + "arr-filter", + "arr-map", + "arr-pluck", + "arr-reduce", + "array-unique" + ] + }, + "reflinks": [ + "verb", + "array-union" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/array-unique/LICENSE b/front/frontend/node_modules/array-unique/LICENSE new file mode 100644 index 0000000..842218c --- /dev/null +++ b/front/frontend/node_modules/array-unique/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/array-unique/README.md b/front/frontend/node_modules/array-unique/README.md new file mode 100644 index 0000000..41c8c90 --- /dev/null +++ b/front/frontend/node_modules/array-unique/README.md @@ -0,0 +1,77 @@ +# array-unique [![NPM version](https://img.shields.io/npm/v/array-unique.svg?style=flat)](https://www.npmjs.com/package/array-unique) [![NPM downloads](https://img.shields.io/npm/dm/array-unique.svg?style=flat)](https://npmjs.org/package/array-unique) [![Build Status](https://img.shields.io/travis/jonschlinkert/array-unique.svg?style=flat)](https://travis-ci.org/jonschlinkert/array-unique) + +Remove duplicate values from an array. Fastest ES5 implementation. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save array-unique +``` + +## Usage + +```js +var unique = require('array-unique'); + +var arr = ['a', 'b', 'c', 'c']; +console.log(unique(arr)) //=> ['a', 'b', 'c'] +console.log(arr) //=> ['a', 'b', 'c'] + +/* The above modifies the input array. To prevent that at a slight performance cost: */ +var unique = require("array-unique").immutable; + +var arr = ['a', 'b', 'c', 'c']; +console.log(unique(arr)) //=> ['a', 'b', 'c'] +console.log(arr) //=> ['a', 'b', 'c', 'c'] +``` + +## About + +### Related projects + +* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://github.com/jonschlinkert/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.") +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") +* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.") +* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck "Retrieves the value of a specified property from all elements in the collection.") +* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce "Fast array reduce that also loops over sparse elements.") +* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/array-unique/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.28, on July 31, 2016._ \ No newline at end of file diff --git a/front/frontend/node_modules/array-unique/index.js b/front/frontend/node_modules/array-unique/index.js new file mode 100644 index 0000000..7e481e0 --- /dev/null +++ b/front/frontend/node_modules/array-unique/index.js @@ -0,0 +1,43 @@ +/*! + * array-unique + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function unique(arr) { + if (!Array.isArray(arr)) { + throw new TypeError('array-unique expects an array.'); + } + + var len = arr.length; + var i = -1; + + while (i++ < len) { + var j = i + 1; + + for (; j < arr.length; ++j) { + if (arr[i] === arr[j]) { + arr.splice(j--, 1); + } + } + } + return arr; +}; + +module.exports.immutable = function uniqueImmutable(arr) { + if (!Array.isArray(arr)) { + throw new TypeError('array-unique expects an array.'); + } + + var arrLen = arr.length; + var newArr = new Array(arrLen); + + for (var i = 0; i < arrLen; i++) { + newArr[i] = arr[i]; + } + + return module.exports(newArr); +}; diff --git a/front/frontend/node_modules/array-unique/package.json b/front/frontend/node_modules/array-unique/package.json new file mode 100644 index 0000000..d87640a --- /dev/null +++ b/front/frontend/node_modules/array-unique/package.json @@ -0,0 +1,62 @@ +{ + "name": "array-unique", + "description": "Remove duplicate values from an array. Fastest ES5 implementation.", + "version": "0.3.2", + "homepage": "https://github.com/jonschlinkert/array-unique", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/array-unique", + "bugs": { + "url": "https://github.com/jonschlinkert/array-unique/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "LICENSE", + "README.md" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "array-uniq": "^1.0.2", + "benchmarked": "^0.1.3", + "gulp-format-md": "^0.1.9", + "mocha": "^2.5.3", + "should": "^10.0.0" + }, + "keywords": [ + "array", + "unique" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-diff", + "arr-union", + "arr-flatten", + "arr-reduce", + "arr-map", + "arr-pluck" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/assign-symbols/LICENSE b/front/frontend/node_modules/assign-symbols/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/front/frontend/node_modules/assign-symbols/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/assign-symbols/README.md b/front/frontend/node_modules/assign-symbols/README.md new file mode 100644 index 0000000..422729d --- /dev/null +++ b/front/frontend/node_modules/assign-symbols/README.md @@ -0,0 +1,73 @@ +# assign-symbols [![NPM version](https://badge.fury.io/js/assign-symbols.svg)](http://badge.fury.io/js/assign-symbols) + +> Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method. + +From the [Mozilla Developer docs for Symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol): + +> A symbol is a unique and immutable data type and may be used as an identifier for object properties. The symbol object is an implicit object wrapper for the symbol primitive data type. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i assign-symbols --save +``` + +## Usage + +```js +var assignSymbols = require('assign-symbols'); +var obj = {}; + +var one = {}; +var symbolOne = Symbol('aaa'); +one[symbolOne] = 'bbb'; + +var two = {}; +var symbolTwo = Symbol('ccc'); +two[symbolTwo] = 'ddd'; + +assignSymbols(obj, one, two); + +console.log(obj[symbolOne]); +//=> 'bbb' +console.log(obj[symbolTwo]); +//=> 'ddd' +``` + +## Similar projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. | [homepage](https://github.com/jonschlinkert/assign-deep) +* [clone-deep](https://www.npmjs.com/package/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. | [homepage](https://github.com/jonschlinkert/clone-deep) +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow) +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep) +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/assign-symbols/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 06, 2015._ \ No newline at end of file diff --git a/front/frontend/node_modules/assign-symbols/index.js b/front/frontend/node_modules/assign-symbols/index.js new file mode 100644 index 0000000..c08a232 --- /dev/null +++ b/front/frontend/node_modules/assign-symbols/index.js @@ -0,0 +1,40 @@ +/*! + * assign-symbols + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function(receiver, objects) { + if (receiver === null || typeof receiver === 'undefined') { + throw new TypeError('expected first argument to be an object.'); + } + + if (typeof objects === 'undefined' || typeof Symbol === 'undefined') { + return receiver; + } + + if (typeof Object.getOwnPropertySymbols !== 'function') { + return receiver; + } + + var isEnumerable = Object.prototype.propertyIsEnumerable; + var target = Object(receiver); + var len = arguments.length, i = 0; + + while (++i < len) { + var provider = Object(arguments[i]); + var names = Object.getOwnPropertySymbols(provider); + + for (var j = 0; j < names.length; j++) { + var key = names[j]; + + if (isEnumerable.call(provider, key)) { + target[key] = provider[key]; + } + } + } + return target; +}; diff --git a/front/frontend/node_modules/assign-symbols/package.json b/front/frontend/node_modules/assign-symbols/package.json new file mode 100644 index 0000000..7f77b58 --- /dev/null +++ b/front/frontend/node_modules/assign-symbols/package.json @@ -0,0 +1,40 @@ +{ + "name": "assign-symbols", + "description": "Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/assign-symbols", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/assign-symbols", + "bugs": { + "url": "https://github.com/jonschlinkert/assign-symbols/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "^3.0.0" + }, + "keywords": [ + "assign", + "symbols" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "mixin-deep", + "merge-deep", + "extend-shallow", + "clone-deep" + ] + } + } +} diff --git a/front/frontend/node_modules/async-each/LICENSE b/front/frontend/node_modules/async-each/LICENSE new file mode 100644 index 0000000..b4d4dec --- /dev/null +++ b/front/frontend/node_modules/async-each/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/front/frontend/node_modules/async-each/README.md b/front/frontend/node_modules/async-each/README.md new file mode 100644 index 0000000..6b03be4 --- /dev/null +++ b/front/frontend/node_modules/async-each/README.md @@ -0,0 +1,35 @@ +# async-each + +No-bullshit, ultra-simple, 40-lines-of-code async parallel forEach function for JavaScript. + +We don't need junky 30K async libs. Really. + +For browsers and node.js. + +## Usage + +`npm install async-each` if you're using NPM. + +For browsers, just include async-each before your scripts and use global variable `asyncEach` + +* `each(array, iterator, callback)` — `Array`, `Function`, `(optional) Function` +* `iterator(item, next)` receives current item and a callback that will mark the item as done. `next` callback receives optional `error, transformedItem` arguments. +* `callback(error, transformedArray)` optionally receives first error and transformed result `Array`. + +```javascript +var each = require('async-each'); +each(['a.js', 'b.js', 'c.js'], fs.readFile, function(error, contents) { + if (error) console.error(error); + console.log('Contents for a, b and c:', contents); +}); + +asyncEach(list, fn, callback); // use global var in browser +``` + +## License + +The MIT License (MIT) + +Copyright (c) 2016 Paul Miller [(paulmillr.com)](https://paulmillr.com) + +See [LICENSE](https://github.com/paulmillr/async-each/blob/master/LICENSE) file. diff --git a/front/frontend/node_modules/async-each/index.js b/front/frontend/node_modules/async-each/index.js new file mode 100644 index 0000000..8806c5f --- /dev/null +++ b/front/frontend/node_modules/async-each/index.js @@ -0,0 +1,39 @@ +/*! async-each - MIT License (c) 2016 Paul Miller (paulmillr.com) */ +(function (globals) { + 'use strict'; + var each = function (items, next, callback) { + if (!Array.isArray(items)) throw new TypeError('each() expects array as first argument'); + if (typeof next !== 'function') + throw new TypeError('each() expects function as second argument'); + if (typeof callback !== 'function') callback = Function.prototype; // no-op + + var total = items.length; + if (total === 0) return callback(undefined, items); + var transformed = new Array(total); + var transformedCount = 0; + var returned = false; + + items.forEach(function (item, index) { + next(item, function (error, transformedItem) { + if (returned) return; + if (error) { + returned = true; + return callback(error); + } + transformed[index] = transformedItem; + transformedCount += 1; // can't use index: last item could take more time + if (transformedCount === total) return callback(undefined, transformed); + }); + }); + }; + + if (typeof define !== 'undefined' && define.amd) { + define([], function () { + return each; + }); // RequireJS + } else if (typeof module !== 'undefined' && module.exports) { + module.exports = each; // CommonJS + } else { + globals.asyncEach = each; // diff --git a/front/frontend/node_modules/live-server/live-server.js b/front/frontend/node_modules/live-server/live-server.js new file mode 100644 index 0000000..9eac8f1 --- /dev/null +++ b/front/frontend/node_modules/live-server/live-server.js @@ -0,0 +1,174 @@ +#!/usr/bin/env node +var path = require('path'); +var fs = require('fs'); +var assign = require('object-assign'); +var liveServer = require("./index"); + +var opts = { + host: process.env.IP, + port: process.env.PORT, + open: true, + mount: [], + proxy: [], + middleware: [], + logLevel: 2, +}; + +var homeDir = process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME']; +var configPath = path.join(homeDir, '.live-server.json'); +if (fs.existsSync(configPath)) { + var userConfig = fs.readFileSync(configPath, 'utf8'); + assign(opts, JSON.parse(userConfig)); + if (opts.ignorePattern) opts.ignorePattern = new RegExp(opts.ignorePattern); +} + +for (var i = process.argv.length - 1; i >= 2; --i) { + var arg = process.argv[i]; + if (arg.indexOf("--port=") > -1) { + var portString = arg.substring(7); + var portNumber = parseInt(portString, 10); + if (portNumber === +portString) { + opts.port = portNumber; + process.argv.splice(i, 1); + } + } + else if (arg.indexOf("--host=") > -1) { + opts.host = arg.substring(7); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--open=") > -1) { + var open = arg.substring(7); + if (open.indexOf('/') !== 0) { + open = '/' + open; + } + switch (typeof opts.open) { + case "boolean": + opts.open = open; + break; + case "string": + opts.open = [opts.open, open]; + break; + case "object": + opts.open.push(open); + break; + } + process.argv.splice(i, 1); + } + else if (arg.indexOf("--watch=") > -1) { + // Will be modified later when cwd is known + opts.watch = arg.substring(8).split(","); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--ignore=") > -1) { + // Will be modified later when cwd is known + opts.ignore = arg.substring(9).split(","); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--ignorePattern=") > -1) { + opts.ignorePattern = new RegExp(arg.substring(16)); + process.argv.splice(i, 1); + } + else if (arg === "--no-css-inject") { + opts.noCssInject = true; + process.argv.splice(i, 1); + } + else if (arg === "--no-browser") { + opts.open = false; + process.argv.splice(i, 1); + } + else if (arg.indexOf("--browser=") > -1) { + opts.browser = arg.substring(10).split(","); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--entry-file=") > -1) { + var file = arg.substring(13); + if (file.length) { + opts.file = file; + process.argv.splice(i, 1); + } + } + else if (arg === "--spa") { + opts.middleware.push("spa"); + process.argv.splice(i, 1); + } + else if (arg === "--quiet" || arg === "-q") { + opts.logLevel = 0; + process.argv.splice(i, 1); + } + else if (arg === "--verbose" || arg === "-V") { + opts.logLevel = 3; + process.argv.splice(i, 1); + } + else if (arg.indexOf("--mount=") > -1) { + // e.g. "--mount=/components:./node_modules" will be ['/components', '/node_modules'] + // split only on the first ":", as the path may contain ":" as well (e.g. C:\file.txt) + var match = arg.substring(8).match(/([^:]+):(.+)$/); + match[2] = path.resolve(process.cwd(), match[2]); + opts.mount.push([ match[1], match[2] ]); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--wait=") > -1) { + var waitString = arg.substring(7); + var waitNumber = parseInt(waitString, 10); + if (waitNumber === +waitString) { + opts.wait = waitNumber; + process.argv.splice(i, 1); + } + } + else if (arg === "--version" || arg === "-v") { + var packageJson = require('./package.json'); + console.log(packageJson.name, packageJson.version); + process.exit(); + } + else if (arg.indexOf("--htpasswd=") > -1) { + opts.htpasswd = arg.substring(11); + process.argv.splice(i, 1); + } + else if (arg === "--cors") { + opts.cors = true; + process.argv.splice(i, 1); + } + else if (arg.indexOf("--https=") > -1) { + opts.https = arg.substring(8); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--https-module=") > -1) { + opts.httpsModule = arg.substring(15); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--proxy=") > -1) { + // split only on the first ":", as the URL will contain ":" as well + var match = arg.substring(8).match(/([^:]+):(.+)$/); + opts.proxy.push([ match[1], match[2] ]); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--middleware=") > -1) { + opts.middleware.push(arg.substring(13)); + process.argv.splice(i, 1); + } + else if (arg === "--help" || arg === "-h") { + console.log('Usage: live-server [-v|--version] [-h|--help] [-q|--quiet] [--port=PORT] [--host=HOST] [--open=PATH] [--no-browser] [--browser=BROWSER] [--ignore=PATH] [--ignorePattern=RGXP] [--no-css-inject] [--entry-file=PATH] [--spa] [--mount=ROUTE:PATH] [--wait=MILLISECONDS] [--htpasswd=PATH] [--cors] [--https=PATH] [--https-module=MODULE_NAME] [--proxy=PATH] [PATH]'); + process.exit(); + } + else if (arg === "--test") { + // Hidden param for tests to exit automatically + setTimeout(liveServer.shutdown, 500); + process.argv.splice(i, 1); + } +} + +// Patch paths +var dir = opts.root = process.argv[2] || ""; + +if (opts.watch) { + opts.watch = opts.watch.map(function(relativePath) { + return path.join(dir, relativePath); + }); +} +if (opts.ignore) { + opts.ignore = opts.ignore.map(function(relativePath) { + return path.join(dir, relativePath); + }); +} + +liveServer.start(opts); diff --git a/front/frontend/node_modules/live-server/middleware/example.js b/front/frontend/node_modules/live-server/middleware/example.js new file mode 100644 index 0000000..cd5fd7a --- /dev/null +++ b/front/frontend/node_modules/live-server/middleware/example.js @@ -0,0 +1,5 @@ +module.exports = function(req, res, next) { + res.statusCode = 202; + next(); +} + diff --git a/front/frontend/node_modules/live-server/middleware/spa-ignore-assets.js b/front/frontend/node_modules/live-server/middleware/spa-ignore-assets.js new file mode 100644 index 0000000..ead9e9c --- /dev/null +++ b/front/frontend/node_modules/live-server/middleware/spa-ignore-assets.js @@ -0,0 +1,14 @@ +// Single Page Apps - redirect to /#/ except when a file extension is given +var path = require('path'); +module.exports = function(req, res, next) { + if (req.method !== "GET" && req.method !== "HEAD") + next(); + if (req.url !== '/' && path.extname(req.url) === '') { + var route = req.url; + req.url = '/'; + res.statusCode = 302; + res.setHeader('Location', req.url + '#' + route); + res.end(); + } + else next(); +} diff --git a/front/frontend/node_modules/live-server/middleware/spa.js b/front/frontend/node_modules/live-server/middleware/spa.js new file mode 100644 index 0000000..6326e4b --- /dev/null +++ b/front/frontend/node_modules/live-server/middleware/spa.js @@ -0,0 +1,13 @@ +// Single Page Apps - redirect to /#/ +module.exports = function(req, res, next) { + if (req.method !== "GET" && req.method !== "HEAD") + next(); + if (req.url !== '/') { + var route = req.url; + req.url = '/'; + res.statusCode = 302; + res.setHeader('Location', req.url + '#' + route); + res.end(); + } + else next(); +} diff --git a/front/frontend/node_modules/live-server/package.json b/front/frontend/node_modules/live-server/package.json new file mode 100644 index 0000000..cae825c --- /dev/null +++ b/front/frontend/node_modules/live-server/package.json @@ -0,0 +1,66 @@ +{ + "name": "live-server", + "version": "1.2.2", + "description": "simple development http server with live reload capability", + "keywords": [ + "front-end", + "development", + "tool", + "server", + "http", + "cli" + ], + "author": "Tapio Vierros", + "dependencies": { + "chokidar": "^2.0.4", + "colors": "1.4.0", + "connect": "^3.6.6", + "cors": "latest", + "event-stream": "3.3.4", + "faye-websocket": "0.11.x", + "http-auth": "3.1.x", + "morgan": "^1.9.1", + "object-assign": "latest", + "opn": "latest", + "proxy-middleware": "latest", + "send": "latest", + "serve-index": "^1.9.1" + }, + "devDependencies": { + "eslint": "^5.9.0", + "jshint": "^2.9.6", + "mocha": "^5.2.0", + "supertest": "^3.3.0" + }, + "scripts": { + "lint": "eslint live-server.js index.js", + "hint": "jshint live-server.js index.js", + "test": "mocha test --exit && npm run lint" + }, + "bin": { + "live-server": "./live-server.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/tapio/live-server.git" + }, + "engines": { + "node": ">=0.10.0" + }, + "preferGlobal": true, + "license": "MIT", + "eslintConfig": { + "env": { + "node": true + }, + "rules": { + "quotes": 0, + "curly": 0, + "strict": 0, + "no-process-exit": 0, + "eqeqeq": 1, + "no-unused-vars": 1, + "no-shadow": 1 + } + } +} diff --git a/front/frontend/node_modules/live-server/test/acceptance.js b/front/frontend/node_modules/live-server/test/acceptance.js new file mode 100644 index 0000000..e4eabbb --- /dev/null +++ b/front/frontend/node_modules/live-server/test/acceptance.js @@ -0,0 +1,67 @@ +var request = require('supertest'); +var path = require('path'); +var liveServer = require('..').start({ + root: path.join(__dirname, "data"), + port: 0, + open: false +}); + +describe('basic functional tests', function(){ + it('should respond with index.html', function(done){ + request(liveServer) + .get('/') + .expect('Content-Type', 'text/html; charset=UTF-8') + .expect(/hello world/i) + .expect(200, done); + }); + it('should have injected script', function(done){ + request(liveServer) + .get('/') + .expect('Content-Type', 'text/html; charset=UTF-8') + .expect(/ + + + diff --git a/front/frontend/node_modules/live-server/test/htpasswd.js b/front/frontend/node_modules/live-server/test/htpasswd.js new file mode 100644 index 0000000..c606e49 --- /dev/null +++ b/front/frontend/node_modules/live-server/test/htpasswd.js @@ -0,0 +1,28 @@ +var request = require('supertest'); +var path = require('path'); +var liveServer = require('..').start({ + root: path.join(__dirname, "data"), + port: 0, + open: false, + htpasswd: path.join(__dirname, "data", "htpasswd-test") +}); + +describe('htpasswd tests', function() { + it('should respond with 401 since no password is given', function(done) { + request(liveServer) + .get('/') + .expect(401, done); + }); + it('should respond with 401 since wrong password is given', function(done) { + request(liveServer) + .get('/') + .auth("test", "not-real-password") + .expect(401, done); + }); + it('should respond with 200 since correct password is given', function(done) { + request(liveServer) + .get('/') + .auth("test", "test") + .expect(200, done); + }); +}); diff --git a/front/frontend/node_modules/live-server/test/https.js b/front/frontend/node_modules/live-server/test/https.js new file mode 100644 index 0000000..9b4bd71 --- /dev/null +++ b/front/frontend/node_modules/live-server/test/https.js @@ -0,0 +1,48 @@ +var request = require('supertest'); +var path = require('path'); +// accept self-signed certificates +process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; + +function tests(liveServer) { + it('should reply with a correct index file', function(done) { + request(liveServer) + .get('/index.html') + .expect('Content-Type', 'text/html; charset=UTF-8') + .expect(/Hello world/i) + .expect(200, done); + }); + it('should support head request', function(done) { + request(liveServer) + .head('/index.html') + .expect('Content-Type', 'text/html; charset=UTF-8') + .expect(200, done); + }); +} + +describe('https tests with external module', function() { + var opts = { + root: path.join(__dirname, 'data'), + port: 0, + open: false, + https: path.join(__dirname, 'conf/https.conf.js') + }; + var liveServer = require("..").start(opts); + tests(liveServer); + after(function () { + liveServer.close() + }); +}); + +describe('https tests with object', function() { + var opts = { + root: path.join(__dirname, 'data'), + port: 0, + open: false, + https: require(path.join(__dirname, 'conf/https.conf.js')) + }; + var liveServer = require("..").start(opts); + tests(liveServer); + after(function () { + liveServer.close() + }); +}); diff --git a/front/frontend/node_modules/live-server/test/middleware.js b/front/frontend/node_modules/live-server/test/middleware.js new file mode 100644 index 0000000..acaecd8 --- /dev/null +++ b/front/frontend/node_modules/live-server/test/middleware.js @@ -0,0 +1,43 @@ +var request = require('supertest'); +var path = require('path'); +var liveServer1 = require('..').start({ + root: path.join(__dirname, 'data'), + port: 0, + open: false, + middleware: [ + function setStatus(req, res, next) { + res.statusCode = 201; + next(); + } + ] +}); +var liveServer2 = require('..').start({ + root: path.join(__dirname, 'data'), + port: 0, + open: false, + middleware: [ "example" ] +}); +var liveServer3 = require('..').start({ + root: path.join(__dirname, 'data'), + port: 0, + open: false, + middleware: [ path.join(__dirname, 'data', 'middleware.js') ] +}); + +describe('middleware tests', function() { + it("should respond with middleware function's status code", function(done) { + request(liveServer1) + .get('/') + .expect(201, done); + }); + it("should respond with built-in middleware's status code", function(done) { + request(liveServer2) + .get('/') + .expect(202, done); + }); + it("should respond with external middleware's status code", function(done) { + request(liveServer3) + .get('/') + .expect(203, done); + }); +}); diff --git a/front/frontend/node_modules/live-server/test/mount.js b/front/frontend/node_modules/live-server/test/mount.js new file mode 100644 index 0000000..3660bd7 --- /dev/null +++ b/front/frontend/node_modules/live-server/test/mount.js @@ -0,0 +1,30 @@ +var request = require('supertest'); +var path = require('path'); +var liveServer = require('..').start({ + root: path.join(__dirname, "data"), + port: 0, + open: false, + mount: [ + [ "/mounted", path.join(__dirname, "data", "sub") ], + [ "/style", path.join(__dirname, "data", "style.css") ] + ] +}); + +describe('mount tests', function() { + it('should respond with sub.html', function(done) { + request(liveServer) + .get('/mounted/sub.html') + .expect('Content-Type', 'text/html; charset=UTF-8') + .expect(/Subdirectory/i) + .expect(200, done); + }); + it('should respond with style.css', function(done) { + request(liveServer) + .get('/style') + .expect('Content-Type', 'text/css; charset=UTF-8') + .expect(/color/i) + .expect(200, done); + }); +}); + + diff --git a/front/frontend/node_modules/live-server/test/proxy.js b/front/frontend/node_modules/live-server/test/proxy.js new file mode 100644 index 0000000..473e628 --- /dev/null +++ b/front/frontend/node_modules/live-server/test/proxy.js @@ -0,0 +1,28 @@ +var request = require('supertest'); +var path = require('path'); +var port = 40200; +var server1 = require('..').start({ + root: path.join(__dirname, "data"), + port: port, + open: false +}); +var server2 = require('..').start({ + root: path.join(__dirname, "data"), + port: 0, + open: false, + proxy: [ + ["/server1", "http://localhost:" + port] + ] +}); + +describe('proxy tests', function() { + it('should respond with proxied content', function(done) { + request(server2) + .get('/server1/index.html') + .expect('Content-Type', 'text/html; charset=UTF-8') + .expect(/Hello world/i) + .expect(200, done); + }); +}); + + diff --git a/front/frontend/node_modules/live-server/test/spa.js b/front/frontend/node_modules/live-server/test/spa.js new file mode 100644 index 0000000..eb41f48 --- /dev/null +++ b/front/frontend/node_modules/live-server/test/spa.js @@ -0,0 +1,40 @@ +var request = require('supertest'); +var path = require('path'); +var liveServerSpa = require('..').start({ + root: path.join(__dirname, "data"), + port: 0, + open: false, + middleware: [ "spa" ] +}); +var liveServerSpaIgnoreAssets = require('..').start({ + root: path.join(__dirname, "data"), + port: 0, + open: false, + middleware: [ "spa-ignore-assets" ] +}); + +describe('spa tests', function(){ + it('spa should redirect', function(done){ + request(liveServerSpa) + .get('/api') + .expect('Location', /\/#\//) + .expect(302, done); + }); + it('spa should redirect everything', function(done){ + request(liveServerSpa) + .get('/style.css') + .expect('Location', /\/#\//) + .expect(302, done); + }); + it('spa-ignore-assets should redirect something', function(done){ + request(liveServerSpaIgnoreAssets) + .get('/api') + .expect('Location', /\/#\//) + .expect(302, done); + }); + it('spa-ignore-assets should not redirect .css', function(done){ + request(liveServerSpaIgnoreAssets) + .get('/style.css') + .expect(200, done); + }); +}); diff --git a/front/frontend/node_modules/map-cache/LICENSE b/front/frontend/node_modules/map-cache/LICENSE new file mode 100644 index 0000000..1e49edf --- /dev/null +++ b/front/frontend/node_modules/map-cache/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/map-cache/README.md b/front/frontend/node_modules/map-cache/README.md new file mode 100644 index 0000000..6260b29 --- /dev/null +++ b/front/frontend/node_modules/map-cache/README.md @@ -0,0 +1,145 @@ +# map-cache [![NPM version](https://img.shields.io/npm/v/map-cache.svg?style=flat)](https://www.npmjs.com/package/map-cache) [![NPM downloads](https://img.shields.io/npm/dm/map-cache.svg?style=flat)](https://npmjs.org/package/map-cache) [![Build Status](https://img.shields.io/travis/jonschlinkert/map-cache.svg?style=flat)](https://travis-ci.org/jonschlinkert/map-cache) + +Basic cache object for storing key-value pairs. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install map-cache --save +``` + +Based on MapCache in Lo-dash v3.0. [MIT License](https://github.com/lodash/lodash/blob/master/LICENSE.txt) + +## Usage + +```js +var MapCache = require('map-cache'); +var mapCache = new MapCache(); +``` + +## API + +### [MapCache](index.js#L28) + +Creates a cache object to store key/value pairs. + +**Example** + +```js +var cache = new MapCache(); +``` + +### [.set](index.js#L45) + +Adds `value` to `key` on the cache. + +**Params** + +* `key` **{String}**: The key of the value to cache. +* `value` **{any}**: The value to cache. +* `returns` **{Object}**: Returns the `Cache` object for chaining. + +**Example** + +```js +cache.set('foo', 'bar'); +``` + +### [.get](index.js#L65) + +Gets the cached value for `key`. + +**Params** + +* `key` **{String}**: The key of the value to get. +* `returns` **{any}**: Returns the cached value. + +**Example** + +```js +cache.get('foo'); +//=> 'bar' +``` + +### [.has](index.js#L82) + +Checks if a cached value for `key` exists. + +**Params** + +* `key` **{String}**: The key of the entry to check. +* `returns` **{Boolean}**: Returns `true` if an entry for `key` exists, else `false`. + +**Example** + +```js +cache.has('foo'); +//=> true +``` + +### [.del](index.js#L98) + +Removes `key` and its value from the cache. + +**Params** + +* `key` **{String}**: The key of the value to remove. +* `returns` **{Boolean}**: Returns `true` if the entry was removed successfully, else `false`. + +**Example** + +```js +cache.del('foo'); +``` + +## Related projects + +You might also be interested in these projects: + +* [cache-base](https://www.npmjs.com/package/cache-base): Basic object cache with `get`, `set`, `del`, and `has` methods for node.js/javascript projects. | [homepage](https://github.com/jonschlinkert/cache-base) +* [config-cache](https://www.npmjs.com/package/config-cache): General purpose JavaScript object storage methods. | [homepage](https://github.com/jonschlinkert/config-cache) +* [option-cache](https://www.npmjs.com/package/option-cache): Simple API for managing options in JavaScript applications. | [homepage](https://github.com/jonschlinkert/option-cache) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/map-cache/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/map-cache/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 10, 2016._ \ No newline at end of file diff --git a/front/frontend/node_modules/map-cache/index.js b/front/frontend/node_modules/map-cache/index.js new file mode 100644 index 0000000..f86842f --- /dev/null +++ b/front/frontend/node_modules/map-cache/index.js @@ -0,0 +1,100 @@ +/*! + * map-cache + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var hasOwn = Object.prototype.hasOwnProperty; + +/** + * Expose `MapCache` + */ + +module.exports = MapCache; + +/** + * Creates a cache object to store key/value pairs. + * + * ```js + * var cache = new MapCache(); + * ``` + * + * @api public + */ + +function MapCache(data) { + this.__data__ = data || {}; +} + +/** + * Adds `value` to `key` on the cache. + * + * ```js + * cache.set('foo', 'bar'); + * ``` + * + * @param {String} `key` The key of the value to cache. + * @param {*} `value` The value to cache. + * @returns {Object} Returns the `Cache` object for chaining. + * @api public + */ + +MapCache.prototype.set = function mapSet(key, value) { + if (key !== '__proto__') { + this.__data__[key] = value; + } + return this; +}; + +/** + * Gets the cached value for `key`. + * + * ```js + * cache.get('foo'); + * //=> 'bar' + * ``` + * + * @param {String} `key` The key of the value to get. + * @returns {*} Returns the cached value. + * @api public + */ + +MapCache.prototype.get = function mapGet(key) { + return key === '__proto__' ? undefined : this.__data__[key]; +}; + +/** + * Checks if a cached value for `key` exists. + * + * ```js + * cache.has('foo'); + * //=> true + * ``` + * + * @param {String} `key` The key of the entry to check. + * @returns {Boolean} Returns `true` if an entry for `key` exists, else `false`. + * @api public + */ + +MapCache.prototype.has = function mapHas(key) { + return key !== '__proto__' && hasOwn.call(this.__data__, key); +}; + +/** + * Removes `key` and its value from the cache. + * + * ```js + * cache.del('foo'); + * ``` + * @title .del + * @param {String} `key` The key of the value to remove. + * @returns {Boolean} Returns `true` if the entry was removed successfully, else `false`. + * @api public + */ + +MapCache.prototype.del = function mapDelete(key) { + return this.has(key) && delete this.__data__[key]; +}; diff --git a/front/frontend/node_modules/map-cache/package.json b/front/frontend/node_modules/map-cache/package.json new file mode 100644 index 0000000..8bf0af2 --- /dev/null +++ b/front/frontend/node_modules/map-cache/package.json @@ -0,0 +1,59 @@ +{ + "name": "map-cache", + "description": "Basic cache object for storing key-value pairs.", + "version": "0.2.2", + "homepage": "https://github.com/jonschlinkert/map-cache", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/map-cache", + "bugs": { + "url": "https://github.com/jonschlinkert/map-cache/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "should": "^8.3.1" + }, + "keywords": [ + "cache", + "get", + "has", + "object", + "set", + "storage", + "store" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "config-cache", + "option-cache", + "cache-base" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/map-stream/.npmignore b/front/frontend/node_modules/map-stream/.npmignore new file mode 100644 index 0000000..13abef4 --- /dev/null +++ b/front/frontend/node_modules/map-stream/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/front/frontend/node_modules/map-stream/.travis.yml b/front/frontend/node_modules/map-stream/.travis.yml new file mode 100644 index 0000000..895dbd3 --- /dev/null +++ b/front/frontend/node_modules/map-stream/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/front/frontend/node_modules/map-stream/LICENCE b/front/frontend/node_modules/map-stream/LICENCE new file mode 100644 index 0000000..171dd97 --- /dev/null +++ b/front/frontend/node_modules/map-stream/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/front/frontend/node_modules/map-stream/examples/pretty.js b/front/frontend/node_modules/map-stream/examples/pretty.js new file mode 100644 index 0000000..ab07398 --- /dev/null +++ b/front/frontend/node_modules/map-stream/examples/pretty.js @@ -0,0 +1,26 @@ + +var inspect = require('util').inspect + +if(!module.parent) { + var map = require('..') //load map-stream + var es = require('event-stream') //load event-stream + es.pipe( //pipe joins streams together + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + map(function (data, callback) { //turn this async function into a stream + var j + try { + j = JSON.parse(data) //try to parse input into json + } catch (err) { + return callback(null, data) //if it fails just pass it anyway + } + callback(null, inspect(j)) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) + } + +// run this +// +// curl -sS registry.npmjs.org/event-stream | node pretty.js +// diff --git a/front/frontend/node_modules/map-stream/index.js b/front/frontend/node_modules/map-stream/index.js new file mode 100644 index 0000000..09ae829 --- /dev/null +++ b/front/frontend/node_modules/map-stream/index.js @@ -0,0 +1,145 @@ +//filter will reemit the data if cb(err,pass) pass is truthy + +// reduce is more tricky +// maybe we want to group the reductions or emit progress updates occasionally +// the most basic reduce just emits one 'data' event after it has recieved 'end' + + +var Stream = require('stream').Stream + + +//create an event stream and apply function to each .write +//emitting each response as data +//unless it's an empty callback + +module.exports = function (mapper, opts) { + + var stream = new Stream() + , self = this + , inputs = 0 + , outputs = 0 + , ended = false + , paused = false + , destroyed = false + , lastWritten = 0 + , inNext = false + + this.opts = opts || {}; + var errorEventName = this.opts.failures ? 'failure' : 'error'; + + // Items that are not ready to be written yet (because they would come out of + // order) get stuck in a queue for later. + var writeQueue = {} + + stream.writable = true + stream.readable = true + + function queueData (data, number) { + var nextToWrite = lastWritten + 1 + + if (number === nextToWrite) { + // If it's next, and its not undefined write it + if (data !== undefined) { + stream.emit.apply(stream, ['data', data]) + } + lastWritten ++ + nextToWrite ++ + } else { + // Otherwise queue it for later. + writeQueue[number] = data + } + + // If the next value is in the queue, write it + if (writeQueue.hasOwnProperty(nextToWrite)) { + var dataToWrite = writeQueue[nextToWrite] + delete writeQueue[nextToWrite] + return queueData(dataToWrite, nextToWrite) + } + + outputs ++ + if(inputs === outputs) { + if(paused) paused = false, stream.emit('drain') //written all the incoming events + if(ended) end() + } + } + + function next (err, data, number) { + if(destroyed) return + inNext = true + + if (!err || self.opts.failures) { + queueData(data, number) + } + + if (err) { + stream.emit.apply(stream, [ errorEventName, err ]); + } + + inNext = false; + } + + // Wrap the mapper function by calling its callback with the order number of + // the item in the stream. + function wrappedMapper (input, number, callback) { + return mapper.call(null, input, function(err, data){ + callback(err, data, number) + }) + } + + stream.write = function (data) { + if(ended) throw new Error('map stream is not writable') + inNext = false + inputs ++ + + try { + //catch sync errors and handle them like async errors + var written = wrappedMapper(data, inputs, next) + paused = (written === false) + return !paused + } catch (err) { + //if the callback has been called syncronously, and the error + //has occured in an listener, throw it again. + if(inNext) + throw err + next(err) + return !paused + } + } + + function end (data) { + //if end was called with args, write it, + ended = true //write will emit 'end' if ended is true + stream.writable = false + if(data !== undefined) { + return queueData(data, inputs) + } else if (inputs == outputs) { //wait for processing + stream.readable = false, stream.emit('end'), stream.destroy() + } + } + + stream.end = function (data) { + if(ended) return + end() + } + + stream.destroy = function () { + ended = destroyed = true + stream.writable = stream.readable = paused = false + process.nextTick(function () { + stream.emit('close') + }) + } + stream.pause = function () { + paused = true + } + + stream.resume = function () { + paused = false + } + + return stream +} + + + + diff --git a/front/frontend/node_modules/map-stream/package.json b/front/frontend/node_modules/map-stream/package.json new file mode 100644 index 0000000..cb6b7f3 --- /dev/null +++ b/front/frontend/node_modules/map-stream/package.json @@ -0,0 +1,24 @@ +{ + "name": "map-stream", + "version": "0.1.0", + "description": "construct pipes of streams of events", + "homepage": "http://github.com/dominictarr/map-stream", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/map-stream.git" + }, + "dependencies": { + }, + "devDependencies": { + "asynct": "*", + "it-is": "1", + "ubelt": "~2.9", + "stream-spec": "~0.2", + "event-stream": "~2.1", + "from": "0.0.2" + }, + "scripts": { + "test": "asynct test/" + }, + "author": "Dominic Tarr (http://dominictarr.com)" +} diff --git a/front/frontend/node_modules/map-stream/readme.markdown b/front/frontend/node_modules/map-stream/readme.markdown new file mode 100644 index 0000000..1897158 --- /dev/null +++ b/front/frontend/node_modules/map-stream/readme.markdown @@ -0,0 +1,37 @@ +# MapStream + +Refactored out of [event-stream](https://github.com/dominictarr/event-stream) + +##map (asyncFunction[, options]) + +Create a through stream from an asyncronous function. + +``` js +var map = require('map-stream') + +map(function (data, callback) { + //transform data + // ... + callback(null, data) +}) + +``` + +Each map MUST call the callback. It may callback with data, with an error or with no arguments, + + * `callback()` drop this data. + this makes the map work like `filter`, + note:`callback(null,null)` is not the same, and will emit `null` + + * `callback(null, newData)` turn data into newData + + * `callback(error)` emit an error for this item. + +>Note: if a callback is not called, `map` will think that it is still being processed, +>every call must be answered or the stream will not know when to end. +> +>Also, if the callback is called more than once, every call but the first will be ignored. + +##Options + + * `failures` - `boolean` continue mapping even if error occured. On error `map-stream` will emit `failure` event. (default: `false`) diff --git a/front/frontend/node_modules/map-stream/test/simple-map.asynct.js b/front/frontend/node_modules/map-stream/test/simple-map.asynct.js new file mode 100644 index 0000000..2b9a292 --- /dev/null +++ b/front/frontend/node_modules/map-stream/test/simple-map.asynct.js @@ -0,0 +1,318 @@ +'use strict'; + +var map = require('../') + , it = require('it-is') + , u = require('ubelt') + , spec = require('stream-spec') + , from = require('from') + , Stream = require('stream') + , es = require('event-stream') + +//REFACTOR THIS TEST TO USE es.readArray and es.writeArray + +function writeArray(array, stream) { + + array.forEach( function (j) { + stream.write(j) + }) + stream.end() + +} + +function readStream(stream, done) { + + var array = [] + stream.on('data', function (data) { + array.push(data) + }) + stream.on('error', done) + stream.on('end', function (data) { + done(null, array) + }) + +} + +//call sink on each write, +//and complete when finished. + +function pauseStream (prob, delay) { + var pauseIf = ( + 'number' == typeof prob + ? function () { + return Math.random() < prob + } + : 'function' == typeof prob + ? prob + : 0.1 + ) + var delayer = ( + !delay + ? process.nextTick + : 'number' == typeof delay + ? function (next) { setTimeout(next, delay) } + : delay + ) + + return es.through(function (data) { + if(!this.paused && pauseIf()) { + console.log('PAUSE STREAM PAUSING') + this.pause() + var self = this + delayer(function () { + console.log('PAUSE STREAM RESUMING') + self.resume() + }) + } + console.log("emit ('data', " + data + ')') + this.emit('data', data) + }) +} + +exports ['simple map applied to a stream'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + //create event stream from + + var doubler = map(function (data, cb) { + cb(null, data * 2) + }) + + spec(doubler).through().validateOnExit() + + //a map is only a middle man, so it is both readable and writable + + it(doubler).has({ + readable: true, + writable: true, + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.map(function (j) { + return j * 2 + })) +// process.nextTick(x.validate) + test.done() + }) + + writeArray(input, doubler) + +} + +exports ['stream comes back in the correct order'] = function (test) { + var input = [3, 2, 1] + + var delayer = map(function(data, cb){ + setTimeout(function () { + cb(null, data) + }, 100 * data) + }) + + readStream(delayer, function (err, output) { + it(output).deepEqual(input) + test.done() + }) + + writeArray(input, delayer) +} + +exports ['continues on error event with failures `true`'] = function (test) { + var input = [1, 2, 3] + + var delayer = map(function(data, cb){ + cb(new Error('Something gone wrong'), data) + }, { failures: true }) + + readStream(delayer, function (err, output) { + it(output).deepEqual(input) + test.done() + }) + + writeArray(input, delayer) +} + +exports['pipe two maps together'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + //create event stream from + function dd (data, cb) { + cb(null, data * 2) + } + var doubler1 = map(dd), doubler2 = map(dd) + + doubler1.pipe(doubler2) + + spec(doubler1).through().validateOnExit() + spec(doubler2).through().validateOnExit() + + readStream(doubler2, function (err, output) { + it(output).deepEqual(input.map(function (j) { + return j * 4 + })) + test.done() + }) + + writeArray(input, doubler1) + +} + +//next: +// +// test pause, resume and drian. +// + +// then make a pipe joiner: +// +// plumber (evStr1, evStr2, evStr3, evStr4, evStr5) +// +// will return a single stream that write goes to the first + +exports ['map will not call end until the callback'] = function (test) { + + var ticker = map(function (data, cb) { + process.nextTick(function () { + cb(null, data * 2) + }) + }) + + spec(ticker).through().validateOnExit() + + ticker.write('x') + ticker.end() + + ticker.on('end', function () { + test.done() + }) +} + +exports ['emit failures with opts.failures === `ture`'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + map(function () { + throw err + }, { failures: true }) + + mapper.on('failure', function (_err) { + it(_err).equal(err) + test.done() + }) + + mapper.write('hello') + +} + +exports ['emit error thrown'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + map(function () { + throw err + }) + + mapper.on('error', function (_err) { + it(_err).equal(err) + test.done() + }) + + mapper.write('hello') + +} + +exports ['emit error calledback'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + map(function (data, callback) { + callback(err) + }) + + mapper.on('error', function (_err) { + it(_err).equal(err) + test.done() + }) + + mapper.write('hello') + +} + +exports ['do not emit drain if not paused'] = function (test) { + + var maps = map(function (data, callback) { + u.delay(callback)(null, 1) + return true + }) + + spec(maps).through().pausable().validateOnExit() + + maps.on('drain', function () { + it(false).ok('should not emit drain unless the stream is paused') + }) + + it(maps.write('hello')).equal(true) + it(maps.write('hello')).equal(true) + it(maps.write('hello')).equal(true) + setTimeout(function () {maps.end()},10) + maps.on('end', test.done) +} + +exports ['emits drain if paused, when all '] = function (test) { + var active = 0 + var drained = false + var maps = map(function (data, callback) { + active ++ + u.delay(function () { + active -- + callback(null, 1) + })() + console.log('WRITE', false) + return false + }) + + spec(maps).through().validateOnExit() + + maps.on('drain', function () { + drained = true + it(active).equal(0, 'should emit drain when all maps are done') + }) + + it(maps.write('hello')).equal(false) + it(maps.write('hello')).equal(false) + it(maps.write('hello')).equal(false) + + process.nextTick(function () {maps.end()},10) + + maps.on('end', function () { + console.log('end') + it(drained).ok('shoud have emitted drain before end') + test.done() + }) + +} + +exports ['map applied to a stream with filtering'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + + var doubler = map(function (data, callback) { + if (data % 2) + callback(null, data * 2) + else + callback() + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.filter(function (j) { + return j % 2 + }).map(function (j) { + return j * 2 + })) + test.done() + }) + + spec(doubler).through().validateOnExit() + + writeArray(input, doubler) + +} + + diff --git a/front/frontend/node_modules/map-visit/LICENSE b/front/frontend/node_modules/map-visit/LICENSE new file mode 100644 index 0000000..83b56e7 --- /dev/null +++ b/front/frontend/node_modules/map-visit/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/map-visit/README.md b/front/frontend/node_modules/map-visit/README.md new file mode 100644 index 0000000..5ab02d4 --- /dev/null +++ b/front/frontend/node_modules/map-visit/README.md @@ -0,0 +1,155 @@ +# map-visit [![NPM version](https://img.shields.io/npm/v/map-visit.svg?style=flat)](https://www.npmjs.com/package/map-visit) [![NPM monthly downloads](https://img.shields.io/npm/dm/map-visit.svg?style=flat)](https://npmjs.org/package/map-visit) [![NPM total downloads](https://img.shields.io/npm/dt/map-visit.svg?style=flat)](https://npmjs.org/package/map-visit) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/map-visit.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/map-visit) + +> Map `visit` over an array of objects. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save map-visit +``` + +## Usage + +```js +var mapVisit = require('map-visit'); +``` + +## What does this do? + +**Assign/Merge/Extend vs. Visit** + +Let's say you want to add a `set` method to your application that will: + +* set key-value pairs on a `data` object +* extend objects onto the `data` object +* extend arrays of objects onto the data object + +**Example using `extend`** + +Here is one way to accomplish this using Lo-Dash's `extend` (comparable to `Object.assign`): + +```js +var _ = require('lodash'); + +var obj = { + data: {}, + set: function (key, value) { + if (Array.isArray(key)) { + _.extend.apply(_, [obj.data].concat(key)); + } else if (typeof key === 'object') { + _.extend(obj.data, key); + } else { + obj.data[key] = value; + } + } +}; + +obj.set('a', 'a'); +obj.set([{b: 'b'}, {c: 'c'}]); +obj.set({d: {e: 'f'}}); + +console.log(obj.data); +//=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }} +``` + +The above approach works fine for most use cases. However, **if you also want to emit an event** each time a property is added to the `data` object, or you want more control over what happens as the object is extended, a better approach would be to use `visit`. + +**Example using `visit`** + +In this approach: + +* when an array is passed to `set`, the `mapVisit` library calls the `set` method on each object in the array. +* when an object is passed, `visit` calls `set` on each property in the object. + +As a result, the `data` event will be emitted every time a property is added to `data` (events are just an example, you can use this approach to perform any necessary logic every time the method is called). + +```js +var mapVisit = require('map-visit'); +var visit = require('object-visit'); + +var obj = { + data: {}, + set: function (key, value) { + if (Array.isArray(key)) { + mapVisit(obj, 'set', key); + } else if (typeof key === 'object') { + visit(obj, 'set', key); + } else { + // simulate an event-emitter + console.log('emit', key, value); + obj.data[key] = value; + } + } +}; + +obj.set('a', 'a'); +obj.set([{b: 'b'}, {c: 'c'}]); +obj.set({d: {e: 'f'}}); +obj.set({g: 'h', i: 'j', k: 'l'}); + +console.log(obj.data); +//=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }, g: 'h', i: 'j', k: 'l'} + +// events would look something like: +// emit a a +// emit b b +// emit c c +// emit d { e: 'f' } +// emit g h +// emit i j +// emit k l +``` + +## About + +### Related projects + +* [collection-visit](https://www.npmjs.com/package/collection-visit): Visit a method over the items in an object, or map visit over the objects… [more](https://github.com/jonschlinkert/collection-visit) | [homepage](https://github.com/jonschlinkert/collection-visit "Visit a method over the items in an object, or map visit over the objects in an array.") +* [object-visit](https://www.npmjs.com/package/object-visit): Call a specified method on each value in the given object. | [homepage](https://github.com/jonschlinkert/object-visit "Call a specified method on each value in the given object.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 15 | [jonschlinkert](https://github.com/jonschlinkert) | +| 7 | [doowb](https://github.com/doowb) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 09, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/map-visit/index.js b/front/frontend/node_modules/map-visit/index.js new file mode 100644 index 0000000..bc54ccc --- /dev/null +++ b/front/frontend/node_modules/map-visit/index.js @@ -0,0 +1,37 @@ +'use strict'; + +var util = require('util'); +var visit = require('object-visit'); + +/** + * Map `visit` over an array of objects. + * + * @param {Object} `collection` The context in which to invoke `method` + * @param {String} `method` Name of the method to call on `collection` + * @param {Object} `arr` Array of objects. + */ + +module.exports = function mapVisit(collection, method, val) { + if (isObject(val)) { + return visit.apply(null, arguments); + } + + if (!Array.isArray(val)) { + throw new TypeError('expected an array: ' + util.inspect(val)); + } + + var args = [].slice.call(arguments, 3); + + for (var i = 0; i < val.length; i++) { + var ele = val[i]; + if (isObject(ele)) { + visit.apply(null, [collection, method, ele].concat(args)); + } else { + collection[method].apply(collection, [ele].concat(args)); + } + } +}; + +function isObject(val) { + return val && (typeof val === 'function' || (!Array.isArray(val) && typeof val === 'object')); +} diff --git a/front/frontend/node_modules/map-visit/package.json b/front/frontend/node_modules/map-visit/package.json new file mode 100644 index 0000000..e8d0f41 --- /dev/null +++ b/front/frontend/node_modules/map-visit/package.json @@ -0,0 +1,74 @@ +{ + "name": "map-visit", + "description": "Map `visit` over an array of objects.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/map-visit", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/map-visit", + "bugs": { + "url": "https://github.com/jonschlinkert/map-visit/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "object-visit": "^1.0.0" + }, + "devDependencies": { + "clone-deep": "^0.2.4", + "extend-shallow": "^2.0.1", + "gulp-format-md": "^0.1.12", + "lodash": "^4.17.4", + "mocha": "^3.2.0" + }, + "keywords": [ + "array", + "arrays", + "function", + "helper", + "invoke", + "key", + "map", + "method", + "object", + "objects", + "value", + "visit", + "visitor" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "collection-visit", + "object-visit" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ] + } +} diff --git a/front/frontend/node_modules/micromatch/CHANGELOG.md b/front/frontend/node_modules/micromatch/CHANGELOG.md new file mode 100644 index 0000000..9d8e5ed --- /dev/null +++ b/front/frontend/node_modules/micromatch/CHANGELOG.md @@ -0,0 +1,37 @@ +## History + +### key + +Changelog entries are classified using the following labels _(from [keep-a-changelog][]_): + +- `added`: for new features +- `changed`: for changes in existing functionality +- `deprecated`: for once-stable features removed in upcoming releases +- `removed`: for deprecated features removed in this release +- `fixed`: for any bug fixes +- `bumped`: updated dependencies, only minor or higher will be listed. + +### [3.0.0] - 2017-04-11 + +TODO. There should be no breaking changes. Please report any regressions. I will [reformat these release notes](https://github.com/micromatch/micromatch/pull/76) and add them to the changelog as soon as I have a chance. + +### [1.0.1] - 2016-12-12 + +**Added** + +- Support for windows path edge cases where backslashes are used in brackets or other unusual combinations. + +### [1.0.0] - 2016-12-12 + +Stable release. + +### [0.1.0] - 2016-10-08 + +First release. + + +[Unreleased]: https://github.com/jonschlinkert/micromatch/compare/0.1.0...HEAD +[0.2.0]: https://github.com/jonschlinkert/micromatch/compare/0.1.0...0.2.0 + +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog + diff --git a/front/frontend/node_modules/micromatch/LICENSE b/front/frontend/node_modules/micromatch/LICENSE new file mode 100644 index 0000000..d32ab44 --- /dev/null +++ b/front/frontend/node_modules/micromatch/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/micromatch/README.md b/front/frontend/node_modules/micromatch/README.md new file mode 100644 index 0000000..5dfa149 --- /dev/null +++ b/front/frontend/node_modules/micromatch/README.md @@ -0,0 +1,1150 @@ +# micromatch [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![NPM total downloads](https://img.shields.io/npm/dt/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Linux Build Status](https://img.shields.io/travis/micromatch/micromatch.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/micromatch) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/micromatch.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/micromatch) + +> Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Table of Contents + +
    +Details + +- [Install](#install) +- [Quickstart](#quickstart) +- [Why use micromatch?](#why-use-micromatch) + * [Matching features](#matching-features) +- [Switching to micromatch](#switching-to-micromatch) + * [From minimatch](#from-minimatch) + * [From multimatch](#from-multimatch) +- [API](#api) +- [Options](#options) + * [options.basename](#optionsbasename) + * [options.bash](#optionsbash) + * [options.cache](#optionscache) + * [options.dot](#optionsdot) + * [options.failglob](#optionsfailglob) + * [options.ignore](#optionsignore) + * [options.matchBase](#optionsmatchbase) + * [options.nobrace](#optionsnobrace) + * [options.nocase](#optionsnocase) + * [options.nodupes](#optionsnodupes) + * [options.noext](#optionsnoext) + * [options.nonegate](#optionsnonegate) + * [options.noglobstar](#optionsnoglobstar) + * [options.nonull](#optionsnonull) + * [options.nullglob](#optionsnullglob) + * [options.snapdragon](#optionssnapdragon) + * [options.sourcemap](#optionssourcemap) + * [options.unescape](#optionsunescape) + * [options.unixify](#optionsunixify) +- [Extended globbing](#extended-globbing) + * [extglobs](#extglobs) + * [braces](#braces) + * [regex character classes](#regex-character-classes) + * [regex groups](#regex-groups) + * [POSIX bracket expressions](#posix-bracket-expressions) +- [Notes](#notes) + * [Bash 4.3 parity](#bash-43-parity) + * [Backslashes](#backslashes) +- [Contributing](#contributing) +- [Benchmarks](#benchmarks) + * [Running benchmarks](#running-benchmarks) + * [Latest results](#latest-results) +- [About](#about) + +
    + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save micromatch +``` + +## Quickstart + +```js +var mm = require('micromatch'); +mm(list, patterns[, options]); +``` + +The [main export](#micromatch) takes a list of strings and one or more glob patterns: + +```js +console.log(mm(['foo', 'bar', 'qux'], ['f*', 'b*'])); +//=> ['foo', 'bar'] +``` + +Use [.isMatch()](#ismatch) to get true/false: + +```js +console.log(mm.isMatch('foo', 'f*')); +//=> true +``` + +[Switching](#switching-to-micromatch) from minimatch and multimatch is easy! + +## Why use micromatch? + +> micromatch is a [drop-in replacement](#switching-to-micromatch) for minimatch and multimatch + +* Supports all of the same matching features as [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) +* Micromatch uses [snapdragon](https://github.com/jonschlinkert/snapdragon) for parsing and compiling globs, which provides granular control over the entire conversion process in a way that is easy to understand, reason about, and maintain. +* More consistently accurate matching [than minimatch](https://github.com/yarnpkg/yarn/pull/3339), with more than 36,000 [test assertions](./test) to prove it. +* More complete support for the Bash 4.3 specification than minimatch and multimatch. In fact, micromatch passes _all of the spec tests_ from bash, including some that bash still fails. +* [Faster matching](#benchmarks), from a combination of optimized glob patterns, faster algorithms, and regex caching. +* [Micromatch is safer](https://github.com/micromatch/braces#braces-is-safe), and is not subject to DoS with brace patterns, like minimatch and multimatch. +* More reliable windows support than minimatch and multimatch. + +### Matching features + +* Support for multiple glob patterns (no need for wrappers like multimatch) +* Wildcards (`**`, `*.js`) +* Negation (`'!a/*.js'`, `'*!(b).js']`) +* [extglobs](https://github.com/micromatch/extglob) (`+(x|y)`, `!(a|b)`) +* [POSIX character classes](https://github.com/micromatch/expand-brackets) (`[[:alpha:][:digit:]]`) +* [brace expansion](https://github.com/micromatch/braces) (`foo/{1..5}.md`, `bar/{a,b,c}.js`) +* regex character classes (`foo-[1-5].js`) +* regex logical "or" (`foo/(abc|xyz).js`) + +You can mix and match these features to create whatever patterns you need! + +## Switching to micromatch + +There is one notable difference between micromatch and minimatch in regards to how backslashes are handled. See [the notes about backslashes](#backslashes) for more information. + +### From minimatch + +Use [mm.isMatch()](#ismatch) instead of `minimatch()`: + +```js +mm.isMatch('foo', 'b*'); +//=> false +``` + +Use [mm.match()](#match) instead of `minimatch.match()`: + +```js +mm.match(['foo', 'bar'], 'b*'); +//=> 'bar' +``` + +### From multimatch + +Same signature: + +```js +mm(['foo', 'bar', 'baz'], ['f*', '*z']); +//=> ['foo', 'baz'] +``` + +## API + +### [micromatch](index.js#L41) + +The main function takes a list of strings and one or more glob patterns to use for matching. + +**Params** + +* `list` **{Array}**: A list of strings to match +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var mm = require('micromatch'); +mm(list, patterns[, options]); + +console.log(mm(['a.js', 'a.txt'], ['*.js'])); +//=> [ 'a.js' ] +``` + +### [.match](index.js#L93) + +Similar to the main function, but `pattern` must be a string. + +**Params** + +* `list` **{Array}**: Array of strings to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var mm = require('micromatch'); +mm.match(list, pattern[, options]); + +console.log(mm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); +//=> ['a.a', 'a.aa'] +``` + +### [.isMatch](index.js#L154) + +Returns true if the specified `string` matches the given glob `pattern`. + +**Params** + +* `string` **{String}**: String to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the string matches the glob pattern. + +**Example** + +```js +var mm = require('micromatch'); +mm.isMatch(string, pattern[, options]); + +console.log(mm.isMatch('a.a', '*.a')); +//=> true +console.log(mm.isMatch('a.b', '*.a')); +//=> false +``` + +### [.some](index.js#L192) + +Returns true if some of the strings in the given `list` match any of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. Returns as soon as the first match is found. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.some(list, patterns[, options]); + +console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// true +console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.every](index.js#L228) + +Returns true if every string in the given `list` matches any of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.every(list, patterns[, options]); + +console.log(mm.every('foo.js', ['foo.js'])); +// true +console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); +// true +console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// false +console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.any](index.js#L260) + +Returns true if **any** of the given glob `patterns` match the specified `string`. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.any(string, patterns[, options]); + +console.log(mm.any('a.a', ['b.*', '*.a'])); +//=> true +console.log(mm.any('a.a', 'b.*')); +//=> false +``` + +### [.all](index.js#L308) + +Returns true if **all** of the given `patterns` match the specified string. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.all(string, patterns[, options]); + +console.log(mm.all('foo.js', ['foo.js'])); +// true + +console.log(mm.all('foo.js', ['*.js', '!foo.js'])); +// false + +console.log(mm.all('foo.js', ['*.js', 'foo.js'])); +// true + +console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); +// true +``` + +### [.not](index.js#L340) + +Returns a list of strings that _**do not match any**_ of the given `patterns`. + +**Params** + +* `list` **{Array}**: Array of strings to match. +* `patterns` **{String|Array}**: One or more glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of strings that **do not match** the given patterns. + +**Example** + +```js +var mm = require('micromatch'); +mm.not(list, patterns[, options]); + +console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); +//=> ['b.b', 'c.c'] +``` + +### [.contains](index.js#L376) + +Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string. + +**Params** + +* `str` **{String}**: The string to match. +* `patterns` **{String|Array}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the patter matches any part of `str`. + +**Example** + +```js +var mm = require('micromatch'); +mm.contains(string, pattern[, options]); + +console.log(mm.contains('aa/bb/cc', '*b')); +//=> true +console.log(mm.contains('aa/bb/cc', '*d')); +//=> false +``` + +### [.matchKeys](index.js#L432) + +Filter the keys of the given object with the given `glob` pattern and `options`. Does not attempt to match nested keys. If you need this feature, use [glob-object](https://github.com/jonschlinkert/glob-object) instead. + +**Params** + +* `object` **{Object}**: The object with keys to filter. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Object}**: Returns an object with only keys that match the given patterns. + +**Example** + +```js +var mm = require('micromatch'); +mm.matchKeys(object, patterns[, options]); + +var obj = { aa: 'a', ab: 'b', ac: 'c' }; +console.log(mm.matchKeys(obj, '*b')); +//=> { ab: 'b' } +``` + +### [.matcher](index.js#L461) + +Returns a memoized matcher function from the given glob `pattern` and `options`. The returned function takes a string to match as its only argument and returns true if the string is a match. + +**Params** + +* `pattern` **{String}**: Glob pattern +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{Function}**: Returns a matcher function. + +**Example** + +```js +var mm = require('micromatch'); +mm.matcher(pattern[, options]); + +var isMatch = mm.matcher('*.!(*a)'); +console.log(isMatch('a.a')); +//=> false +console.log(isMatch('a.b')); +//=> true +``` + +### [.capture](index.js#L536) + +Returns an array of matches captured by `pattern` in `string, or`null` if the pattern did not match. + +**Params** + +* `pattern` **{String}**: Glob pattern to use for matching. +* `string` **{String}**: String to match +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns an array of captures if the string matches the glob pattern, otherwise `null`. + +**Example** + +```js +var mm = require('micromatch'); +mm.capture(pattern, string[, options]); + +console.log(mm.capture('test/*.js', 'test/foo.js')); +//=> ['foo'] +console.log(mm.capture('test/*.js', 'foo/bar.css')); +//=> null +``` + +### [.makeRe](index.js#L571) + +Create a regular expression from the given glob `pattern`. + +**Params** + +* `pattern` **{String}**: A glob pattern to convert to regex. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{RegExp}**: Returns a regex created from the given pattern. + +**Example** + +```js +var mm = require('micromatch'); +mm.makeRe(pattern[, options]); + +console.log(mm.makeRe('*.js')); +//=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ +``` + +### [.braces](index.js#L618) + +Expand the given brace `pattern`. + +**Params** + +* `pattern` **{String}**: String with brace pattern to expand. +* `options` **{Object}**: Any [options](#options) to change how expansion is performed. See the [braces](https://github.com/micromatch/braces) library for all available options. +* `returns` **{Array}** + +**Example** + +```js +var mm = require('micromatch'); +console.log(mm.braces('foo/{a,b}/bar')); +//=> ['foo/(a|b)/bar'] + +console.log(mm.braces('foo/{a,b}/bar', {expand: true})); +//=> ['foo/(a|b)/bar'] +``` + +### [.create](index.js#L685) + +Parses the given glob `pattern` and returns an array of abstract syntax trees (ASTs), with the compiled `output` and optional source `map` on each AST. + +**Params** + +* `pattern` **{String}**: Glob pattern to parse and compile. +* `options` **{Object}**: Any [options](#options) to change how parsing and compiling is performed. +* `returns` **{Object}**: Returns an object with the parsed AST, compiled string and optional source map. + +**Example** + +```js +var mm = require('micromatch'); +mm.create(pattern[, options]); + +console.log(mm.create('abc/*.js')); +// [{ options: { source: 'string', sourcemap: true }, +// state: {}, +// compilers: +// { ... }, +// output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', +// ast: +// { type: 'root', +// errors: [], +// nodes: +// [ ... ], +// dot: false, +// input: 'abc/*.js' }, +// parsingErrors: [], +// map: +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] }, +// position: { line: 1, column: 28 }, +// content: {}, +// files: {}, +// idx: 6 }] +``` + +### [.parse](index.js#L732) + +Parse the given `str` with the given `options`. + +**Params** + +* `str` **{String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an AST + +**Example** + +```js +var mm = require('micromatch'); +mm.parse(pattern[, options]); + +var ast = mm.parse('a/{b,c}/d'); +console.log(ast); +// { type: 'root', +// errors: [], +// input: 'a/{b,c}/d', +// nodes: +// [ { type: 'bos', val: '' }, +// { type: 'text', val: 'a/' }, +// { type: 'brace', +// nodes: +// [ { type: 'brace.open', val: '{' }, +// { type: 'text', val: 'b,c' }, +// { type: 'brace.close', val: '}' } ] }, +// { type: 'text', val: '/d' }, +// { type: 'eos', val: '' } ] } +``` + +### [.compile](index.js#L780) + +Compile the given `ast` or string with the given `options`. + +**Params** + +* `ast` **{Object|String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an object that has an `output` property with the compiled string. + +**Example** + +```js +var mm = require('micromatch'); +mm.compile(ast[, options]); + +var ast = mm.parse('a/{b,c}/d'); +console.log(mm.compile(ast)); +// { options: { source: 'string' }, +// state: {}, +// compilers: +// { eos: [Function], +// noop: [Function], +// bos: [Function], +// brace: [Function], +// 'brace.open': [Function], +// text: [Function], +// 'brace.close': [Function] }, +// output: [ 'a/(b|c)/d' ], +// ast: +// { ... }, +// parsingErrors: [] } +``` + +### [.clearCache](index.js#L801) + +Clear the regex cache. + +**Example** + +```js +mm.clearCache(); +``` + +## Options + +* [basename](#optionsbasename) +* [bash](#optionsbash) +* [cache](#optionscache) +* [dot](#optionsdot) +* [failglob](#optionsfailglob) +* [ignore](#optionsignore) +* [matchBase](#optionsmatchBase) +* [nobrace](#optionsnobrace) +* [nocase](#optionsnocase) +* [nodupes](#optionsnodupes) +* [noext](#optionsnoext) +* [noglobstar](#optionsnoglobstar) +* [nonull](#optionsnonull) +* [nullglob](#optionsnullglob) +* [snapdragon](#optionssnapdragon) +* [sourcemap](#optionssourcemap) +* [unescape](#optionsunescape) +* [unixify](#optionsunixify) + +### options.basename + +Allow glob patterns without slashes to match a file path based on its basename. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `matchBase`. + +**Type**: `Boolean` + +**Default**: `false` + +**Example** + +```js +mm(['a/b.js', 'a/c.md'], '*.js'); +//=> [] + +mm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true}); +//=> ['a/b.js'] +``` + +### options.bash + +Enabled by default, this option enforces bash-like behavior with stars immediately following a bracket expression. Bash bracket expressions are similar to regex character classes, but unlike regex, a star following a bracket expression **does not repeat the bracketed characters**. Instead, the star is treated the same as an other star. + +**Type**: `Boolean` + +**Default**: `true` + +**Example** + +```js +var files = ['abc', 'ajz']; +console.log(mm(files, '[a-c]*')); +//=> ['abc', 'ajz'] + +console.log(mm(files, '[a-c]*', {bash: false})); +``` + +### options.cache + +Disable regex and function memoization. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.dot + +Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `dot`. + +**Type**: `Boolean` + +**Default**: `false` + +### options.failglob + +Similar to the `--failglob` behavior in Bash, throws an error when no matches are found. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.ignore + +String or array of glob patterns to match files to ignore. + +**Type**: `String|Array` + +**Default**: `undefined` + +### options.matchBase + +Alias for [options.basename](#options-basename). + +### options.nobrace + +Disable expansion of brace patterns. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nobrace`. + +**Type**: `Boolean` + +**Default**: `undefined` + +See [braces](https://github.com/micromatch/braces) for more information about extended brace expansion. + +### options.nocase + +Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.nodupes + +Remove duplicate elements from the result array. + +**Type**: `Boolean` + +**Default**: `undefined` + +**Example** + +Example of using the `unescape` and `nodupes` options together: + +```js +mm.match(['a/b/c', 'a/b/c'], 'a/b/c'); +//=> ['a/b/c', 'a/b/c'] + +mm.match(['a/b/c', 'a/b/c'], 'a/b/c', {nodupes: true}); +//=> ['abc'] +``` + +### options.noext + +Disable extglob support, so that extglobs are regarded as literal characters. + +**Type**: `Boolean` + +**Default**: `undefined` + +**Examples** + +```js +mm(['a/z', 'a/b', 'a/!(z)'], 'a/!(z)'); +//=> ['a/b', 'a/!(z)'] + +mm(['a/z', 'a/b', 'a/!(z)'], 'a/!(z)', {noext: true}); +//=> ['a/!(z)'] (matches only as literal characters) +``` + +### options.nonegate + +Disallow negation (`!`) patterns, and treat leading `!` as a literal character to match. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.noglobstar + +Disable matching with globstars (`**`). + +**Type**: `Boolean` + +**Default**: `undefined` + +```js +mm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**'); +//=> ['a/b', 'a/b/c', 'a/b/c/d'] + +mm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**', {noglobstar: true}); +//=> ['a/b'] +``` + +### options.nonull + +Alias for [options.nullglob](#options-nullglob). + +### options.nullglob + +If `true`, when no matches are found the actual (arrayified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nonull`. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.snapdragon + +Pass your own instance of [snapdragon](https://github.com/jonschlinkert/snapdragon), to customize parsers or compilers. + +**Type**: `Object` + +**Default**: `undefined` + +### options.sourcemap + +Generate a source map by enabling the `sourcemap` option with the `.parse`, `.compile`, or `.create` methods. + +_(Note that sourcemaps are currently not enabled for brace patterns)_ + +**Examples** + +``` js +var mm = require('micromatch'); +var pattern = '*(*(of*(a)x)z)'; + +var res = mm.create('abc/*.js', {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] } + +var ast = mm.parse('abc/**/*.js'); +var res = mm.compile(ast, {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,2BAAE,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/**/*.js' ] } + +var ast = mm.parse(pattern); +var res = mm.compile(ast, {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,CAAE,CAAE,EAAE,CAAE,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC', +// sourcesContent: [ '*(*(of*(a)x)z)' ] } +``` + +### options.unescape + +Remove backslashes from returned matches. + +**Type**: `Boolean` + +**Default**: `undefined` + +**Example** + +In this example we want to match a literal `*`: + +```js +mm.match(['abc', 'a\\*c'], 'a\\*c'); +//=> ['a\\*c'] + +mm.match(['abc', 'a\\*c'], 'a\\*c', {unescape: true}); +//=> ['a*c'] +``` + +### options.unixify + +Convert path separators on returned files to posix/unix-style forward slashes. + +**Type**: `Boolean` + +**Default**: `true` on windows, `false` everywhere else + +**Example** + +```js +mm.match(['a\\b\\c'], 'a/**'); +//=> ['a/b/c'] + +mm.match(['a\\b\\c'], {unixify: false}); +//=> ['a\\b\\c'] +``` + +## Extended globbing + +Micromatch also supports extended globbing features. + +### extglobs + +Extended globbing, as described by the bash man page: + +| **pattern** | **regex equivalent** | **description** | +| --- | --- | --- | +| `?(pattern)` | `(pattern)?` | Matches zero or one occurrence of the given patterns | +| `*(pattern)` | `(pattern)*` | Matches zero or more occurrences of the given patterns | +| `+(pattern)` | `(pattern)+` | Matches one or more occurrences of the given patterns | +| `@(pattern)` | `(pattern)` * | Matches one of the given patterns | +| `!(pattern)` | N/A (equivalent regex is much more complicated) | Matches anything except one of the given patterns | + +* Note that `@` isn't a RegEx character. + +Powered by [extglob](https://github.com/micromatch/extglob). Visit that library for the full range of options or to report extglob related issues. + +### braces + +Brace patterns can be used to match specific ranges or sets of characters. For example, the pattern `*/{1..3}/*` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +baz/1/qux +baz/2/qux +baz/3/qux +``` + +Visit [braces](https://github.com/micromatch/braces) to see the full range of features and options related to brace expansion, or to create brace matching or expansion related issues. + +### regex character classes + +Given the list: `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `[ac].js`: matches both `a` and `c`, returning `['a.js', 'c.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `a/[A-Z].js`: matches and uppercase letter, returning `['a/E.md']` + +Learn about [regex character classes](http://www.regular-expressions.info/charclass.html). + +### regex groups + +Given `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `(a|c).js`: would match either `a` or `c`, returning `['a.js', 'c.js']` +* `(b|d).js`: would match either `b` or `d`, returning `['b.js', 'd.js']` +* `(b|[A-Z]).js`: would match either `b` or an uppercase letter, returning `['b.js', 'E.js']` + +As with regex, parens can be nested, so patterns like `((a|b)|c)/b` will work. Although brace expansion might be friendlier to use, depending on preference. + +### POSIX bracket expressions + +POSIX brackets are intended to be more user-friendly than regex character classes. This of course is in the eye of the beholder. + +**Example** + +```js +mm.isMatch('a1', '[[:alpha:][:digit:]]'); +//=> true + +mm.isMatch('a1', '[[:alpha:][:alpha:]]'); +//=> false +``` + +See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about bracket expressions. + +*** + +## Notes + +### Bash 4.3 parity + +Whenever possible matching behavior is based on behavior Bash 4.3, which is mostly consistent with minimatch. + +However, it's suprising how many edge cases and rabbit holes there are with glob matching, and since there is no real glob specification, and micromatch is more accurate than both Bash and minimatch, there are cases where best-guesses were made for behavior. In a few cases where Bash had no answers, we used wildmatch (used by git) as a fallback. + +### Backslashes + +There is an important, notable difference between minimatch and micromatch _in regards to how backslashes are handled_ in glob patterns. + +* Micromatch exclusively and explicitly reserves backslashes for escaping characters in a glob pattern, even on windows. This is consistent with bash behavior. +* Minimatch converts all backslashes to forward slashes, which means you can't use backslashes to escape any characters in your glob patterns. + +We made this decision for micromatch for a couple of reasons: + +* consistency with bash conventions. +* glob patterns are not filepaths. They are a type of [regular language](https://en.wikipedia.org/wiki/Regular_language) that is converted to a JavaScript regular expression. Thus, when forward slashes are defined in a glob pattern, the resulting regular expression will match windows or POSIX path separators just fine. + +**A note about joining paths to globs** + +Note that when you pass something like `path.join('foo', '*')` to micromatch, you are creating a filepath and expecting it to still work as a glob pattern. This causes problems on windows, since the `path.sep` is `\\`. + +In other words, since `\\` is reserved as an escape character in globs, on windows `path.join('foo', '*')` would result in `foo\\*`, which tells micromatch to match `*` as a literal character. This is the same behavior as bash. + +## Contributing + +All contributions are welcome! Please read [the contributing guide](.github/contributing.md) to get started. + +**Bug reports** + +Please create an issue if you encounter a bug or matching behavior that doesn't seem correct. If you find a matching-related issue, please: + +* [research existing issues first](../../issues) (open and closed) +* visit the [GNU Bash documentation](https://www.gnu.org/software/bash/manual/) to see how Bash deals with the pattern +* visit the [minimatch](https://github.com/isaacs/minimatch) documentation to cross-check expected behavior in node.js +* if all else fails, since there is no real specification for globs we will probably need to discuss expected behavior and decide how to resolve it. which means any detail you can provide to help with this discussion would be greatly appreciated. + +**Platform issues** + +It's important to us that micromatch work consistently on all platforms. If you encounter any platform-specific matching or path related issues, please let us know (pull requests are also greatly appreciated). + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm run benchmark +``` + +### Latest results + +As of February 18, 2018 (longer bars are better): + +```sh +# braces-globstar-large-list (485691 bytes) + micromatch ██████████████████████████████████████████████████ (517 ops/sec ±0.49%) + minimatch █ (18.92 ops/sec ±0.54%) + multimatch █ (18.94 ops/sec ±0.62%) + + micromatch is faster by an avg. of 2,733% + +# braces-multiple (3362 bytes) + micromatch ██████████████████████████████████████████████████ (33,625 ops/sec ±0.45%) + minimatch (2.92 ops/sec ±3.26%) + multimatch (2.90 ops/sec ±2.76%) + + micromatch is faster by an avg. of 1,156,935% + +# braces-range (727 bytes) + micromatch █████████████████████████████████████████████████ (155,220 ops/sec ±0.56%) + minimatch ██████ (20,186 ops/sec ±1.27%) + multimatch ██████ (19,809 ops/sec ±0.60%) + + micromatch is faster by an avg. of 776% + +# braces-set (2858 bytes) + micromatch █████████████████████████████████████████████████ (24,354 ops/sec ±0.92%) + minimatch █████ (2,566 ops/sec ±0.56%) + multimatch ████ (2,431 ops/sec ±1.25%) + + micromatch is faster by an avg. of 975% + +# globstar-large-list (485686 bytes) + micromatch █████████████████████████████████████████████████ (504 ops/sec ±0.45%) + minimatch ███ (33.36 ops/sec ±1.08%) + multimatch ███ (33.19 ops/sec ±1.35%) + + micromatch is faster by an avg. of 1,514% + +# globstar-long-list (90647 bytes) + micromatch ██████████████████████████████████████████████████ (2,694 ops/sec ±1.08%) + minimatch ████████████████ (870 ops/sec ±1.09%) + multimatch ████████████████ (862 ops/sec ±0.84%) + + micromatch is faster by an avg. of 311% + +# globstar-short-list (182 bytes) + micromatch ██████████████████████████████████████████████████ (328,921 ops/sec ±1.06%) + minimatch █████████ (64,808 ops/sec ±1.42%) + multimatch ████████ (57,991 ops/sec ±2.11%) + + micromatch is faster by an avg. of 536% + +# no-glob (701 bytes) + micromatch █████████████████████████████████████████████████ (415,935 ops/sec ±0.36%) + minimatch ███████████ (92,730 ops/sec ±1.44%) + multimatch █████████ (81,958 ops/sec ±2.13%) + + micromatch is faster by an avg. of 476% + +# star-basename-long (12339 bytes) + micromatch █████████████████████████████████████████████████ (7,963 ops/sec ±0.36%) + minimatch ███████████████████████████████ (5,072 ops/sec ±0.83%) + multimatch ███████████████████████████████ (5,028 ops/sec ±0.40%) + + micromatch is faster by an avg. of 158% + +# star-basename-short (349 bytes) + micromatch ██████████████████████████████████████████████████ (269,552 ops/sec ±0.70%) + minimatch ██████████████████████ (122,457 ops/sec ±1.39%) + multimatch ████████████████████ (110,788 ops/sec ±1.99%) + + micromatch is faster by an avg. of 231% + +# star-folder-long (19207 bytes) + micromatch █████████████████████████████████████████████████ (3,806 ops/sec ±0.38%) + minimatch ████████████████████████████ (2,204 ops/sec ±0.32%) + multimatch ██████████████████████████ (2,020 ops/sec ±1.07%) + + micromatch is faster by an avg. of 180% + +# star-folder-short (551 bytes) + micromatch ██████████████████████████████████████████████████ (249,077 ops/sec ±0.40%) + minimatch ███████████ (59,431 ops/sec ±1.67%) + multimatch ███████████ (55,569 ops/sec ±1.43%) + + micromatch is faster by an avg. of 433% +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [braces](https://www.npmjs.com/package/braces): Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support… [more](https://github.com/micromatch/braces) | [homepage](https://github.com/micromatch/braces "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.") +* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") +* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") +* [nanomatch](https://www.npmjs.com/package/nanomatch): Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash… [more](https://github.com/micromatch/nanomatch) | [homepage](https://github.com/micromatch/nanomatch "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 457 | [jonschlinkert](https://github.com/jonschlinkert) | +| 12 | [es128](https://github.com/es128) | +| 8 | [doowb](https://github.com/doowb) | +| 3 | [paulmillr](https://github.com/paulmillr) | +| 2 | [TrySound](https://github.com/TrySound) | +| 2 | [MartinKolarik](https://github.com/MartinKolarik) | +| 2 | [charlike-old](https://github.com/charlike-old) | +| 1 | [amilajack](https://github.com/amilajack) | +| 1 | [mrmlnc](https://github.com/mrmlnc) | +| 1 | [devongovett](https://github.com/devongovett) | +| 1 | [DianeLooney](https://github.com/DianeLooney) | +| 1 | [UltCombo](https://github.com/UltCombo) | +| 1 | [tomByrer](https://github.com/tomByrer) | +| 1 | [fidian](https://github.com/fidian) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 18, 2018._ \ No newline at end of file diff --git a/front/frontend/node_modules/micromatch/index.js b/front/frontend/node_modules/micromatch/index.js new file mode 100644 index 0000000..fe02f2c --- /dev/null +++ b/front/frontend/node_modules/micromatch/index.js @@ -0,0 +1,877 @@ +'use strict'; + +/** + * Module dependencies + */ + +var util = require('util'); +var braces = require('braces'); +var toRegex = require('to-regex'); +var extend = require('extend-shallow'); + +/** + * Local dependencies + */ + +var compilers = require('./lib/compilers'); +var parsers = require('./lib/parsers'); +var cache = require('./lib/cache'); +var utils = require('./lib/utils'); +var MAX_LENGTH = 1024 * 64; + +/** + * The main function takes a list of strings and one or more + * glob patterns to use for matching. + * + * ```js + * var mm = require('micromatch'); + * mm(list, patterns[, options]); + * + * console.log(mm(['a.js', 'a.txt'], ['*.js'])); + * //=> [ 'a.js' ] + * ``` + * @param {Array} `list` A list of strings to match + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @summary false + * @api public + */ + +function micromatch(list, patterns, options) { + patterns = utils.arrayify(patterns); + list = utils.arrayify(list); + + var len = patterns.length; + if (list.length === 0 || len === 0) { + return []; + } + + if (len === 1) { + return micromatch.match(list, patterns[0], options); + } + + var omit = []; + var keep = []; + var idx = -1; + + while (++idx < len) { + var pattern = patterns[idx]; + + if (typeof pattern === 'string' && pattern.charCodeAt(0) === 33 /* ! */) { + omit.push.apply(omit, micromatch.match(list, pattern.slice(1), options)); + } else { + keep.push.apply(keep, micromatch.match(list, pattern, options)); + } + } + + var matches = utils.diff(keep, omit); + if (!options || options.nodupes !== false) { + return utils.unique(matches); + } + + return matches; +} + +/** + * Similar to the main function, but `pattern` must be a string. + * + * ```js + * var mm = require('micromatch'); + * mm.match(list, pattern[, options]); + * + * console.log(mm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); + * //=> ['a.a', 'a.aa'] + * ``` + * @param {Array} `list` Array of strings to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @api public + */ + +micromatch.match = function(list, pattern, options) { + if (Array.isArray(pattern)) { + throw new TypeError('expected pattern to be a string'); + } + + var unixify = utils.unixify(options); + var isMatch = memoize('match', pattern, options, micromatch.matcher); + var matches = []; + + list = utils.arrayify(list); + var len = list.length; + var idx = -1; + + while (++idx < len) { + var ele = list[idx]; + if (ele === pattern || isMatch(ele)) { + matches.push(utils.value(ele, unixify, options)); + } + } + + // if no options were passed, uniquify results and return + if (typeof options === 'undefined') { + return utils.unique(matches); + } + + if (matches.length === 0) { + if (options.failglob === true) { + throw new Error('no matches found for "' + pattern + '"'); + } + if (options.nonull === true || options.nullglob === true) { + return [options.unescape ? utils.unescape(pattern) : pattern]; + } + } + + // if `opts.ignore` was defined, diff ignored list + if (options.ignore) { + matches = micromatch.not(matches, options.ignore, options); + } + + return options.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the specified `string` matches the given glob `pattern`. + * + * ```js + * var mm = require('micromatch'); + * mm.isMatch(string, pattern[, options]); + * + * console.log(mm.isMatch('a.a', '*.a')); + * //=> true + * console.log(mm.isMatch('a.b', '*.a')); + * //=> false + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the string matches the glob pattern. + * @api public + */ + +micromatch.isMatch = function(str, pattern, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (isEmptyString(str) || isEmptyString(pattern)) { + return false; + } + + var equals = utils.equalsPattern(options); + if (equals(str)) { + return true; + } + + var isMatch = memoize('isMatch', pattern, options, micromatch.matcher); + return isMatch(str); +}; + +/** + * Returns true if some of the strings in the given `list` match any of the + * given glob `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.some(list, patterns[, options]); + * + * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // true + * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.some = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + for (var i = 0; i < list.length; i++) { + if (micromatch(list[i], patterns, options).length === 1) { + return true; + } + } + return false; +}; + +/** + * Returns true if every string in the given `list` matches + * any of the given glob `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.every(list, patterns[, options]); + * + * console.log(mm.every('foo.js', ['foo.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // false + * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.every = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + for (var i = 0; i < list.length; i++) { + if (micromatch(list[i], patterns, options).length !== 1) { + return false; + } + } + return true; +}; + +/** + * Returns true if **any** of the given glob `patterns` + * match the specified `string`. + * + * ```js + * var mm = require('micromatch'); + * mm.any(string, patterns[, options]); + * + * console.log(mm.any('a.a', ['b.*', '*.a'])); + * //=> true + * console.log(mm.any('a.a', 'b.*')); + * //=> false + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.any = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (isEmptyString(str) || isEmptyString(patterns)) { + return false; + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (micromatch.isMatch(str, patterns[i], options)) { + return true; + } + } + return false; +}; + +/** + * Returns true if **all** of the given `patterns` match + * the specified string. + * + * ```js + * var mm = require('micromatch'); + * mm.all(string, patterns[, options]); + * + * console.log(mm.all('foo.js', ['foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); + * // false + * + * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); + * // true + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.all = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + if (typeof patterns === 'string') { + patterns = [patterns]; + } + for (var i = 0; i < patterns.length; i++) { + if (!micromatch.isMatch(str, patterns[i], options)) { + return false; + } + } + return true; +}; + +/** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.not(list, patterns[, options]); + * + * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); + * //=> ['b.b', 'c.c'] + * ``` + * @param {Array} `list` Array of strings to match. + * @param {String|Array} `patterns` One or more glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of strings that **do not match** the given patterns. + * @api public + */ + +micromatch.not = function(list, patterns, options) { + var opts = extend({}, options); + var ignore = opts.ignore; + delete opts.ignore; + + var unixify = utils.unixify(opts); + list = utils.arrayify(list).map(unixify); + + var matches = utils.diff(list, micromatch(list, patterns, opts)); + if (ignore) { + matches = utils.diff(matches, micromatch(list, ignore)); + } + + return opts.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar + * to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * ```js + * var mm = require('micromatch'); + * mm.contains(string, pattern[, options]); + * + * console.log(mm.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(mm.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String|Array} `patterns` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the patter matches any part of `str`. + * @api public + */ + +micromatch.contains = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + if (isEmptyString(str) || isEmptyString(patterns)) { + return false; + } + + var equals = utils.equalsPattern(patterns, options); + if (equals(str)) { + return true; + } + var contains = utils.containsPattern(patterns, options); + if (contains(str)) { + return true; + } + } + + var opts = extend({}, options, {contains: true}); + return micromatch.any(str, patterns, opts); +}; + +/** + * Returns true if the given pattern and options should enable + * the `matchBase` option. + * @return {Boolean} + * @api private + */ + +micromatch.matchBase = function(pattern, options) { + if (pattern && pattern.indexOf('/') !== -1 || !options) return false; + return options.basename === true || options.matchBase === true; +}; + +/** + * Filter the keys of the given object with the given `glob` pattern + * and `options`. Does not attempt to match nested keys. If you need this feature, + * use [glob-object][] instead. + * + * ```js + * var mm = require('micromatch'); + * mm.matchKeys(object, patterns[, options]); + * + * var obj = { aa: 'a', ab: 'b', ac: 'c' }; + * console.log(mm.matchKeys(obj, '*b')); + * //=> { ab: 'b' } + * ``` + * @param {Object} `object` The object with keys to filter. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Object} Returns an object with only keys that match the given patterns. + * @api public + */ + +micromatch.matchKeys = function(obj, patterns, options) { + if (!utils.isObject(obj)) { + throw new TypeError('expected the first argument to be an object'); + } + var keys = micromatch(Object.keys(obj), patterns, options); + return utils.pick(obj, keys); +}; + +/** + * Returns a memoized matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns + * true if the string is a match. + * + * ```js + * var mm = require('micromatch'); + * mm.matcher(pattern[, options]); + * + * var isMatch = mm.matcher('*.!(*a)'); + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.b')); + * //=> true + * ``` + * @param {String} `pattern` Glob pattern + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {Function} Returns a matcher function. + * @api public + */ + +micromatch.matcher = function matcher(pattern, options) { + if (Array.isArray(pattern)) { + return compose(pattern, options, matcher); + } + + // if pattern is a regex + if (pattern instanceof RegExp) { + return test(pattern); + } + + // if pattern is invalid + if (!utils.isString(pattern)) { + throw new TypeError('expected pattern to be an array, string or regex'); + } + + // if pattern is a non-glob string + if (!utils.hasSpecialChars(pattern)) { + if (options && options.nocase === true) { + pattern = pattern.toLowerCase(); + } + return utils.matchPath(pattern, options); + } + + // if pattern is a glob string + var re = micromatch.makeRe(pattern, options); + + // if `options.matchBase` or `options.basename` is defined + if (micromatch.matchBase(pattern, options)) { + return utils.matchBasename(re, options); + } + + function test(regex) { + var equals = utils.equalsPattern(options); + var unixify = utils.unixify(options); + + return function(str) { + if (equals(str)) { + return true; + } + + if (regex.test(unixify(str))) { + return true; + } + return false; + }; + } + + var fn = test(re); + Object.defineProperty(fn, 'result', { + configurable: true, + enumerable: false, + value: re.result + }); + return fn; +}; + +/** + * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. + * + * ```js + * var mm = require('micromatch'); + * mm.capture(pattern, string[, options]); + * + * console.log(mm.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(mm.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `pattern` Glob pattern to use for matching. + * @param {String} `string` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`. + * @api public + */ + +micromatch.capture = function(pattern, str, options) { + var re = micromatch.makeRe(pattern, extend({capture: true}, options)); + var unixify = utils.unixify(options); + + function match() { + return function(string) { + var match = re.exec(unixify(string)); + if (!match) { + return null; + } + + return match.slice(1); + }; + } + + var capture = memoize('capture', pattern, options, match); + return capture(str); +}; + +/** + * Create a regular expression from the given glob `pattern`. + * + * ```js + * var mm = require('micromatch'); + * mm.makeRe(pattern[, options]); + * + * console.log(mm.makeRe('*.js')); + * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ + * ``` + * @param {String} `pattern` A glob pattern to convert to regex. + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +micromatch.makeRe = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + function makeRe() { + var result = micromatch.create(pattern, options); + var ast_array = []; + var output = result.map(function(obj) { + obj.ast.state = obj.state; + ast_array.push(obj.ast); + return obj.output; + }); + + var regex = toRegex(output.join('|'), options); + Object.defineProperty(regex, 'result', { + configurable: true, + enumerable: false, + value: ast_array + }); + return regex; + } + + return memoize('makeRe', pattern, options, makeRe); +}; + +/** + * Expand the given brace `pattern`. + * + * ```js + * var mm = require('micromatch'); + * console.log(mm.braces('foo/{a,b}/bar')); + * //=> ['foo/(a|b)/bar'] + * + * console.log(mm.braces('foo/{a,b}/bar', {expand: true})); + * //=> ['foo/(a|b)/bar'] + * ``` + * @param {String} `pattern` String with brace pattern to expand. + * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. + * @return {Array} + * @api public + */ + +micromatch.braces = function(pattern, options) { + if (typeof pattern !== 'string' && !Array.isArray(pattern)) { + throw new TypeError('expected pattern to be an array or string'); + } + + function expand() { + if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) { + return utils.arrayify(pattern); + } + return braces(pattern, options); + } + + return memoize('braces', pattern, options, expand); +}; + +/** + * Proxy to the [micromatch.braces](#method), for parity with + * minimatch. + */ + +micromatch.braceExpand = function(pattern, options) { + var opts = extend({}, options, {expand: true}); + return micromatch.braces(pattern, opts); +}; + +/** + * Parses the given glob `pattern` and returns an array of abstract syntax + * trees (ASTs), with the compiled `output` and optional source `map` on + * each AST. + * + * ```js + * var mm = require('micromatch'); + * mm.create(pattern[, options]); + * + * console.log(mm.create('abc/*.js')); + * // [{ options: { source: 'string', sourcemap: true }, + * // state: {}, + * // compilers: + * // { ... }, + * // output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', + * // ast: + * // { type: 'root', + * // errors: [], + * // nodes: + * // [ ... ], + * // dot: false, + * // input: 'abc/*.js' }, + * // parsingErrors: [], + * // map: + * // { version: 3, + * // sources: [ 'string' ], + * // names: [], + * // mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', + * // sourcesContent: [ 'abc/*.js' ] }, + * // position: { line: 1, column: 28 }, + * // content: {}, + * // files: {}, + * // idx: 6 }] + * ``` + * @param {String} `pattern` Glob pattern to parse and compile. + * @param {Object} `options` Any [options](#options) to change how parsing and compiling is performed. + * @return {Object} Returns an object with the parsed AST, compiled string and optional source map. + * @api public + */ + +micromatch.create = function(pattern, options) { + return memoize('create', pattern, options, function() { + function create(str, opts) { + return micromatch.compile(micromatch.parse(str, opts), opts); + } + + pattern = micromatch.braces(pattern, options); + var len = pattern.length; + var idx = -1; + var res = []; + + while (++idx < len) { + res.push(create(pattern[idx], options)); + } + return res; + }); +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * var mm = require('micromatch'); + * mm.parse(pattern[, options]); + * + * var ast = mm.parse('a/{b,c}/d'); + * console.log(ast); + * // { type: 'root', + * // errors: [], + * // input: 'a/{b,c}/d', + * // nodes: + * // [ { type: 'bos', val: '' }, + * // { type: 'text', val: 'a/' }, + * // { type: 'brace', + * // nodes: + * // [ { type: 'brace.open', val: '{' }, + * // { type: 'text', val: 'b,c' }, + * // { type: 'brace.close', val: '}' } ] }, + * // { type: 'text', val: '/d' }, + * // { type: 'eos', val: '' } ] } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an AST + * @api public + */ + +micromatch.parse = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + function parse() { + var snapdragon = utils.instantiate(null, options); + parsers(snapdragon, options); + + var ast = snapdragon.parse(pattern, options); + utils.define(ast, 'snapdragon', snapdragon); + ast.input = pattern; + return ast; + } + + return memoize('parse', pattern, options, parse); +}; + +/** + * Compile the given `ast` or string with the given `options`. + * + * ```js + * var mm = require('micromatch'); + * mm.compile(ast[, options]); + * + * var ast = mm.parse('a/{b,c}/d'); + * console.log(mm.compile(ast)); + * // { options: { source: 'string' }, + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // brace: [Function], + * // 'brace.open': [Function], + * // text: [Function], + * // 'brace.close': [Function] }, + * // output: [ 'a/(b|c)/d' ], + * // ast: + * // { ... }, + * // parsingErrors: [] } + * ``` + * @param {Object|String} `ast` + * @param {Object} `options` + * @return {Object} Returns an object that has an `output` property with the compiled string. + * @api public + */ + +micromatch.compile = function(ast, options) { + if (typeof ast === 'string') { + ast = micromatch.parse(ast, options); + } + + return memoize('compile', ast.input, options, function() { + var snapdragon = utils.instantiate(ast, options); + compilers(snapdragon, options); + return snapdragon.compile(ast, options); + }); +}; + +/** + * Clear the regex cache. + * + * ```js + * mm.clearCache(); + * ``` + * @api public + */ + +micromatch.clearCache = function() { + micromatch.cache.caches = {}; +}; + +/** + * Returns true if the given value is effectively an empty string + */ + +function isEmptyString(val) { + return String(val) === '' || String(val) === './'; +} + +/** + * Compose a matcher function with the given patterns. + * This allows matcher functions to be compiled once and + * called multiple times. + */ + +function compose(patterns, options, matcher) { + var matchers; + + return memoize('compose', String(patterns), options, function() { + return function(file) { + // delay composition until it's invoked the first time, + // after that it won't be called again + if (!matchers) { + matchers = []; + for (var i = 0; i < patterns.length; i++) { + matchers.push(matcher(patterns[i], options)); + } + } + + var len = matchers.length; + while (len--) { + if (matchers[len](file) === true) { + return true; + } + } + return false; + }; + }); +} + +/** + * Memoize a generated regex or function. A unique key is generated + * from the `type` (usually method name), the `pattern`, and + * user-defined options. + */ + +function memoize(type, pattern, options, fn) { + var key = utils.createKey(type + '=' + pattern, options); + + if (options && options.cache === false) { + return fn(pattern, options); + } + + if (cache.has(type, key)) { + return cache.get(type, key); + } + + var val = fn(pattern, options); + cache.set(type, key, val); + return val; +} + +/** + * Expose compiler, parser and cache on `micromatch` + */ + +micromatch.compilers = compilers; +micromatch.parsers = parsers; +micromatch.caches = cache.caches; + +/** + * Expose `micromatch` + * @type {Function} + */ + +module.exports = micromatch; diff --git a/front/frontend/node_modules/micromatch/lib/.DS_Store b/front/frontend/node_modules/micromatch/lib/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/front/frontend/node_modules/micromatch/lib/.DS_Store differ diff --git a/front/frontend/node_modules/micromatch/lib/cache.js b/front/frontend/node_modules/micromatch/lib/cache.js new file mode 100644 index 0000000..fffc4c1 --- /dev/null +++ b/front/frontend/node_modules/micromatch/lib/cache.js @@ -0,0 +1 @@ +module.exports = new (require('fragment-cache'))(); diff --git a/front/frontend/node_modules/micromatch/lib/compilers.js b/front/frontend/node_modules/micromatch/lib/compilers.js new file mode 100644 index 0000000..85cda4f --- /dev/null +++ b/front/frontend/node_modules/micromatch/lib/compilers.js @@ -0,0 +1,77 @@ +'use strict'; + +var nanomatch = require('nanomatch'); +var extglob = require('extglob'); + +module.exports = function(snapdragon) { + var compilers = snapdragon.compiler.compilers; + var opts = snapdragon.options; + + // register nanomatch compilers + snapdragon.use(nanomatch.compilers); + + // get references to some specific nanomatch compilers before they + // are overridden by the extglob and/or custom compilers + var escape = compilers.escape; + var qmark = compilers.qmark; + var slash = compilers.slash; + var star = compilers.star; + var text = compilers.text; + var plus = compilers.plus; + var dot = compilers.dot; + + // register extglob compilers or escape exglobs if disabled + if (opts.extglob === false || opts.noext === true) { + snapdragon.compiler.use(escapeExtglobs); + } else { + snapdragon.use(extglob.compilers); + } + + snapdragon.use(function() { + this.options.star = this.options.star || function(/*node*/) { + return '[^\\\\/]*?'; + }; + }); + + // custom micromatch compilers + snapdragon.compiler + + // reset referenced compiler + .set('dot', dot) + .set('escape', escape) + .set('plus', plus) + .set('slash', slash) + .set('qmark', qmark) + .set('star', star) + .set('text', text); +}; + +function escapeExtglobs(compiler) { + compiler.set('paren', function(node) { + var val = ''; + visit(node, function(tok) { + if (tok.val) val += (/^\W/.test(tok.val) ? '\\' : '') + tok.val; + }); + return this.emit(val, node); + }); + + /** + * Visit `node` with the given `fn` + */ + + function visit(node, fn) { + return node.nodes ? mapVisit(node.nodes, fn) : fn(node); + } + + /** + * Map visit over array of `nodes`. + */ + + function mapVisit(nodes, fn) { + var len = nodes.length; + var idx = -1; + while (++idx < len) { + visit(nodes[idx], fn); + } + } +} diff --git a/front/frontend/node_modules/micromatch/lib/parsers.js b/front/frontend/node_modules/micromatch/lib/parsers.js new file mode 100644 index 0000000..f80498c --- /dev/null +++ b/front/frontend/node_modules/micromatch/lib/parsers.js @@ -0,0 +1,83 @@ +'use strict'; + +var extglob = require('extglob'); +var nanomatch = require('nanomatch'); +var regexNot = require('regex-not'); +var toRegex = require('to-regex'); +var not; + +/** + * Characters to use in negation regex (we want to "not" match + * characters that are matched by other parsers) + */ + +var TEXT = '([!@*?+]?\\(|\\)|\\[:?(?=.*?:?\\])|:?\\]|[*+?!^$.\\\\/])+'; +var createNotRegex = function(opts) { + return not || (not = textRegex(TEXT)); +}; + +/** + * Parsers + */ + +module.exports = function(snapdragon) { + var parsers = snapdragon.parser.parsers; + + // register nanomatch parsers + snapdragon.use(nanomatch.parsers); + + // get references to some specific nanomatch parsers before they + // are overridden by the extglob and/or parsers + var escape = parsers.escape; + var slash = parsers.slash; + var qmark = parsers.qmark; + var plus = parsers.plus; + var star = parsers.star; + var dot = parsers.dot; + + // register extglob parsers + snapdragon.use(extglob.parsers); + + // custom micromatch parsers + snapdragon.parser + .use(function() { + // override "notRegex" created in nanomatch parser + this.notRegex = /^\!+(?!\()/; + }) + // reset the referenced parsers + .capture('escape', escape) + .capture('slash', slash) + .capture('qmark', qmark) + .capture('star', star) + .capture('plus', plus) + .capture('dot', dot) + + /** + * Override `text` parser + */ + + .capture('text', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(createNotRegex(this.options)); + if (!m || !m[0]) return; + + // escape regex boundary characters and simple brackets + var val = m[0].replace(/([[\]^$])/g, '\\$1'); + + return pos({ + type: 'text', + val: val + }); + }); +}; + +/** + * Create text regex + */ + +function textRegex(pattern) { + var notStr = regexNot.create(pattern, {contains: true, strictClose: false}); + var prefix = '(?:[\\^]|\\\\|'; + return toRegex(prefix + notStr + ')', {strictClose: false}); +} diff --git a/front/frontend/node_modules/micromatch/lib/utils.js b/front/frontend/node_modules/micromatch/lib/utils.js new file mode 100644 index 0000000..f0ba917 --- /dev/null +++ b/front/frontend/node_modules/micromatch/lib/utils.js @@ -0,0 +1,309 @@ +'use strict'; + +var utils = module.exports; +var path = require('path'); + +/** + * Module dependencies + */ + +var Snapdragon = require('snapdragon'); +utils.define = require('define-property'); +utils.diff = require('arr-diff'); +utils.extend = require('extend-shallow'); +utils.pick = require('object.pick'); +utils.typeOf = require('kind-of'); +utils.unique = require('array-unique'); + +/** + * Returns true if the platform is windows, or `path.sep` is `\\`. + * This is defined as a function to allow `path.sep` to be set in unit tests, + * or by the user, if there is a reason to do so. + * @return {Boolean} + */ + +utils.isWindows = function() { + return path.sep === '\\' || process.platform === 'win32'; +}; + +/** + * Get the `Snapdragon` instance to use + */ + +utils.instantiate = function(ast, options) { + var snapdragon; + // if an instance was created by `.parse`, use that instance + if (utils.typeOf(ast) === 'object' && ast.snapdragon) { + snapdragon = ast.snapdragon; + // if the user supplies an instance on options, use that instance + } else if (utils.typeOf(options) === 'object' && options.snapdragon) { + snapdragon = options.snapdragon; + // create a new instance + } else { + snapdragon = new Snapdragon(options); + } + + utils.define(snapdragon, 'parse', function(str, options) { + var parsed = Snapdragon.prototype.parse.apply(this, arguments); + parsed.input = str; + + // escape unmatched brace/bracket/parens + var last = this.parser.stack.pop(); + if (last && this.options.strictErrors !== true) { + var open = last.nodes[0]; + var inner = last.nodes[1]; + if (last.type === 'bracket') { + if (inner.val.charAt(0) === '[') { + inner.val = '\\' + inner.val; + } + + } else { + open.val = '\\' + open.val; + var sibling = open.parent.nodes[1]; + if (sibling.type === 'star') { + sibling.loose = true; + } + } + } + + // add non-enumerable parser reference + utils.define(parsed, 'parser', this.parser); + return parsed; + }); + + return snapdragon; +}; + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +utils.createKey = function(pattern, options) { + if (utils.typeOf(options) !== 'object') { + return pattern; + } + var val = pattern; + var keys = Object.keys(options); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + val += ';' + key + '=' + String(options[key]); + } + return val; +}; + +/** + * Cast `val` to an array + * @return {Array} + */ + +utils.arrayify = function(val) { + if (typeof val === 'string') return [val]; + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isString = function(val) { + return typeof val === 'string'; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isObject = function(val) { + return utils.typeOf(val) === 'object'; +}; + +/** + * Returns true if the given `str` has special characters + */ + +utils.hasSpecialChars = function(str) { + return /(?:(?:(^|\/)[!.])|[*?+()|\[\]{}]|[+@]\()/.test(str); +}; + +/** + * Escape regex characters in the given string + */ + +utils.escapeRegex = function(str) { + return str.replace(/[-[\]{}()^$|*+?.\\\/\s]/g, '\\$&'); +}; + +/** + * Normalize slashes in the given filepath. + * + * @param {String} `filepath` + * @return {String} + */ + +utils.toPosixPath = function(str) { + return str.replace(/\\+/g, '/'); +}; + +/** + * Strip backslashes before special characters in a string. + * + * @param {String} `str` + * @return {String} + */ + +utils.unescape = function(str) { + return utils.toPosixPath(str.replace(/\\(?=[*+?!.])/g, '')); +}; + +/** + * Strip the prefix from a filepath + * @param {String} `fp` + * @return {String} + */ + +utils.stripPrefix = function(str) { + if (str.charAt(0) !== '.') { + return str; + } + var ch = str.charAt(1); + if (utils.isSlash(ch)) { + return str.slice(2); + } + return str; +}; + +/** + * Returns true if the given str is an escaped or + * unescaped path character + */ + +utils.isSlash = function(str) { + return str === '/' || str === '\\/' || str === '\\' || str === '\\\\'; +}; + +/** + * Returns a function that returns true if the given + * pattern matches or contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.matchPath = function(pattern, options) { + return (options && options.contains) + ? utils.containsPattern(pattern, options) + : utils.equalsPattern(pattern, options); +}; + +/** + * Returns true if the given (original) filepath or unixified path are equal + * to the given pattern. + */ + +utils._equals = function(filepath, unixPath, pattern) { + return pattern === filepath || pattern === unixPath; +}; + +/** + * Returns true if the given (original) filepath or unixified path contain + * the given pattern. + */ + +utils._contains = function(filepath, unixPath, pattern) { + return filepath.indexOf(pattern) !== -1 || unixPath.indexOf(pattern) !== -1; +}; + +/** + * Returns a function that returns true if the given + * pattern is the same as a given `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.equalsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function fn(filepath) { + var equal = utils._equals(filepath, unixify(filepath), pattern); + if (equal === true || options.nocase !== true) { + return equal; + } + var lower = filepath.toLowerCase(); + return utils._equals(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * pattern contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.containsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function(filepath) { + var contains = utils._contains(filepath, unixify(filepath), pattern); + if (contains === true || options.nocase !== true) { + return contains; + } + var lower = filepath.toLowerCase(); + return utils._contains(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * regex matches the `filename` of a file path. + * + * @param {RegExp} `re` Matching regex + * @return {Function} + */ + +utils.matchBasename = function(re) { + return function(filepath) { + return re.test(path.basename(filepath)); + }; +}; + +/** + * Determines the filepath to return based on the provided options. + * @return {any} + */ + +utils.value = function(str, unixify, options) { + if (options && options.unixify === false) { + return str; + } + return unixify(str); +}; + +/** + * Returns a function that normalizes slashes in a string to forward + * slashes, strips `./` from beginning of paths, and optionally unescapes + * special characters. + * @return {Function} + */ + +utils.unixify = function(options) { + options = options || {}; + return function(filepath) { + if (utils.isWindows() || options.unixify === true) { + filepath = utils.toPosixPath(filepath); + } + if (options.stripPrefix !== false) { + filepath = utils.stripPrefix(filepath); + } + if (options.unescape === true) { + filepath = utils.unescape(filepath); + } + return filepath; + }; +}; diff --git a/front/frontend/node_modules/micromatch/node_modules/extend-shallow/LICENSE b/front/frontend/node_modules/micromatch/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/front/frontend/node_modules/micromatch/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/micromatch/node_modules/extend-shallow/README.md b/front/frontend/node_modules/micromatch/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/front/frontend/node_modules/micromatch/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/micromatch/node_modules/extend-shallow/index.js b/front/frontend/node_modules/micromatch/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/front/frontend/node_modules/micromatch/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/front/frontend/node_modules/micromatch/node_modules/extend-shallow/package.json b/front/frontend/node_modules/micromatch/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e5e9105 --- /dev/null +++ b/front/frontend/node_modules/micromatch/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/micromatch/node_modules/is-extendable/LICENSE b/front/frontend/node_modules/micromatch/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/front/frontend/node_modules/micromatch/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/front/frontend/node_modules/micromatch/node_modules/is-extendable/README.md b/front/frontend/node_modules/micromatch/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/front/frontend/node_modules/micromatch/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/micromatch/node_modules/is-extendable/index.d.ts b/front/frontend/node_modules/micromatch/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/front/frontend/node_modules/micromatch/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/front/frontend/node_modules/micromatch/node_modules/is-extendable/index.js b/front/frontend/node_modules/micromatch/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/front/frontend/node_modules/micromatch/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/front/frontend/node_modules/micromatch/node_modules/is-extendable/package.json b/front/frontend/node_modules/micromatch/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/front/frontend/node_modules/micromatch/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/micromatch/node_modules/kind-of/CHANGELOG.md b/front/frontend/node_modules/micromatch/node_modules/kind-of/CHANGELOG.md new file mode 100644 index 0000000..01687d5 --- /dev/null +++ b/front/frontend/node_modules/micromatch/node_modules/kind-of/CHANGELOG.md @@ -0,0 +1,160 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
    + Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
    + +
    + Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
    + +## [6.0.3] - 2020-01-16 + +- Merge pull request #31 for issue #30 + +## [6.0.0] - 2017-10-13 + +- refactor code to be more performant +- refactor benchmarks + +## [5.1.0] - 2017-10-13 + +**Added** + +- Merge pull request #15 from aretecode/patch-1 +- adds support and tests for string & array iterators + +**Changed** + +- updates benchmarks + +## [5.0.2] - 2017-08-02 + +- Merge pull request #14 from struct78/master +- Added `undefined` check + +## [5.0.0] - 2017-06-21 + +- Merge pull request #12 from aretecode/iterator +- Set Iterator + Map Iterator +- streamline `isbuffer`, minor edits + +## [4.0.0] - 2017-05-19 + +- Merge pull request #8 from tunnckoCore/master +- update deps + +## [3.2.2] - 2017-05-16 + +- fix version + +## [3.2.1] - 2017-05-16 + +- add browserify + +## [3.2.0] - 2017-04-25 + +- Merge pull request #10 from ksheedlo/unrequire-buffer +- add `promise` support and tests +- Remove unnecessary `Buffer` check + +## [3.1.0] - 2016-12-07 + +- Merge pull request #7 from laggingreflex/err +- add support for `error` and tests +- run update + +## [3.0.4] - 2016-07-29 + +- move tests +- run update + +## [3.0.3] - 2016-05-03 + +- fix prepublish script +- remove unused dep + +## [3.0.0] - 2015-11-17 + +- add typed array support +- Merge pull request #5 from miguelmota/typed-arrays +- adds new tests + +## [2.0.1] - 2015-08-21 + +- use `is-buffer` module + +## [2.0.0] - 2015-05-31 + +- Create fallback for `Array.isArray` if used as a browser package +- Merge pull request #2 from dtothefp/patch-1 +- Merge pull request #3 from pdehaan/patch-1 +- Merge branch 'master' of https://github.com/chorks/kind-of into chorks-master +- optimizations, mostly date and regex + +## [1.1.0] - 2015-02-09 + +- adds `buffer` support +- adds tests for `buffer` + +## [1.0.0] - 2015-01-19 + +- update benchmarks +- optimizations based on benchmarks + +## [0.1.2] - 2014-10-26 + +- return `typeof` value if it's not an object. very slight speed improvement +- use `.slice` +- adds benchmarks + +## [0.1.0] - 2014-9-26 + +- first commit + +[6.0.0]: https://github.com/jonschlinkert/kind-of/compare/5.1.0...6.0.0 +[5.1.0]: https://github.com/jonschlinkert/kind-of/compare/5.0.2...5.1.0 +[5.0.2]: https://github.com/jonschlinkert/kind-of/compare/5.0.1...5.0.2 +[5.0.1]: https://github.com/jonschlinkert/kind-of/compare/5.0.0...5.0.1 +[5.0.0]: https://github.com/jonschlinkert/kind-of/compare/4.0.0...5.0.0 +[4.0.0]: https://github.com/jonschlinkert/kind-of/compare/3.2.2...4.0.0 +[3.2.2]: https://github.com/jonschlinkert/kind-of/compare/3.2.1...3.2.2 +[3.2.1]: https://github.com/jonschlinkert/kind-of/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/jonschlinkert/kind-of/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/jonschlinkert/kind-of/compare/3.0.4...3.1.0 +[3.0.4]: https://github.com/jonschlinkert/kind-of/compare/3.0.3...3.0.4 +[3.0.3]: https://github.com/jonschlinkert/kind-of/compare/3.0.0...3.0.3 +[3.0.0]: https://github.com/jonschlinkert/kind-of/compare/2.0.1...3.0.0 +[2.0.1]: https://github.com/jonschlinkert/kind-of/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/jonschlinkert/kind-of/compare/1.1.0...2.0.0 +[1.1.0]: https://github.com/jonschlinkert/kind-of/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...1.0.0 +[0.1.2]: https://github.com/jonschlinkert/kind-of/compare/0.1.0...0.1.2 +[0.1.0]: https://github.com/jonschlinkert/kind-of/commit/2fae09b0b19b1aadb558e9be39f0c3ef6034eb87 + +[Unreleased]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/front/frontend/node_modules/micromatch/node_modules/kind-of/LICENSE b/front/frontend/node_modules/micromatch/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/front/frontend/node_modules/micromatch/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/micromatch/node_modules/kind-of/README.md b/front/frontend/node_modules/micromatch/node_modules/kind-of/README.md new file mode 100644 index 0000000..0411dc5 --- /dev/null +++ b/front/frontend/node_modules/micromatch/node_modules/kind-of/README.md @@ -0,0 +1,367 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, es6, and browser ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(new Error('error')); +//=> 'error' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'generatorfunction' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). + +```bash +# arguments (32 bytes) + kind-of x 17,024,098 ops/sec ±1.90% (86 runs sampled) + lib-type-of x 11,926,235 ops/sec ±1.34% (83 runs sampled) + lib-typeof x 9,245,257 ops/sec ±1.22% (87 runs sampled) + + fastest is kind-of (by 161% avg) + +# array (22 bytes) + kind-of x 17,196,492 ops/sec ±1.07% (88 runs sampled) + lib-type-of x 8,838,283 ops/sec ±1.02% (87 runs sampled) + lib-typeof x 8,677,848 ops/sec ±0.87% (87 runs sampled) + + fastest is kind-of (by 196% avg) + +# boolean (24 bytes) + kind-of x 16,841,600 ops/sec ±1.10% (86 runs sampled) + lib-type-of x 8,096,787 ops/sec ±0.95% (87 runs sampled) + lib-typeof x 8,423,345 ops/sec ±1.15% (86 runs sampled) + + fastest is kind-of (by 204% avg) + +# buffer (38 bytes) + kind-of x 14,848,060 ops/sec ±1.05% (86 runs sampled) + lib-type-of x 3,671,577 ops/sec ±1.49% (87 runs sampled) + lib-typeof x 8,360,236 ops/sec ±1.24% (86 runs sampled) + + fastest is kind-of (by 247% avg) + +# date (30 bytes) + kind-of x 16,067,761 ops/sec ±1.58% (86 runs sampled) + lib-type-of x 8,954,436 ops/sec ±1.40% (87 runs sampled) + lib-typeof x 8,488,307 ops/sec ±1.51% (84 runs sampled) + + fastest is kind-of (by 184% avg) + +# error (36 bytes) + kind-of x 9,634,090 ops/sec ±1.12% (89 runs sampled) + lib-type-of x 7,735,624 ops/sec ±1.32% (86 runs sampled) + lib-typeof x 7,442,160 ops/sec ±1.11% (90 runs sampled) + + fastest is kind-of (by 127% avg) + +# function (34 bytes) + kind-of x 10,031,494 ops/sec ±1.27% (86 runs sampled) + lib-type-of x 9,502,757 ops/sec ±1.17% (89 runs sampled) + lib-typeof x 8,278,985 ops/sec ±1.08% (88 runs sampled) + + fastest is kind-of (by 113% avg) + +# null (24 bytes) + kind-of x 18,159,808 ops/sec ±1.92% (86 runs sampled) + lib-type-of x 12,927,635 ops/sec ±1.01% (88 runs sampled) + lib-typeof x 7,958,234 ops/sec ±1.21% (89 runs sampled) + + fastest is kind-of (by 174% avg) + +# number (22 bytes) + kind-of x 17,846,779 ops/sec ±0.91% (85 runs sampled) + lib-type-of x 3,316,636 ops/sec ±1.19% (86 runs sampled) + lib-typeof x 2,329,477 ops/sec ±2.21% (85 runs sampled) + + fastest is kind-of (by 632% avg) + +# object-plain (47 bytes) + kind-of x 7,085,155 ops/sec ±1.05% (88 runs sampled) + lib-type-of x 8,870,930 ops/sec ±1.06% (83 runs sampled) + lib-typeof x 8,716,024 ops/sec ±1.05% (87 runs sampled) + + fastest is lib-type-of (by 112% avg) + +# regex (25 bytes) + kind-of x 14,196,052 ops/sec ±1.65% (84 runs sampled) + lib-type-of x 9,554,164 ops/sec ±1.25% (88 runs sampled) + lib-typeof x 8,359,691 ops/sec ±1.07% (87 runs sampled) + + fastest is kind-of (by 158% avg) + +# string (33 bytes) + kind-of x 16,131,428 ops/sec ±1.41% (85 runs sampled) + lib-type-of x 7,273,172 ops/sec ±1.05% (87 runs sampled) + lib-typeof x 7,382,635 ops/sec ±1.17% (85 runs sampled) + + fastest is kind-of (by 220% avg) + +# symbol (34 bytes) + kind-of x 17,011,537 ops/sec ±1.24% (86 runs sampled) + lib-type-of x 3,492,454 ops/sec ±1.23% (89 runs sampled) + lib-typeof x 7,471,235 ops/sec ±2.48% (87 runs sampled) + + fastest is kind-of (by 310% avg) + +# template-strings (36 bytes) + kind-of x 15,434,250 ops/sec ±1.46% (83 runs sampled) + lib-type-of x 7,157,907 ops/sec ±0.97% (87 runs sampled) + lib-typeof x 7,517,986 ops/sec ±0.92% (86 runs sampled) + + fastest is kind-of (by 210% avg) + +# undefined (29 bytes) + kind-of x 19,167,115 ops/sec ±1.71% (87 runs sampled) + lib-type-of x 15,477,740 ops/sec ±1.63% (85 runs sampled) + lib-typeof x 19,075,495 ops/sec ±1.17% (83 runs sampled) + + fastest is lib-typeof,kind-of + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of seems to be more consistently "correct" than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly identifies instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/micromatch/is-glob) | [homepage](https://github.com/micromatch/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 102 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [tunnckoCore](https://github.com/tunnckoCore) | +| 1 | [xiaofen9](https://github.com/xiaofen9) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2020, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on January 16, 2020._ \ No newline at end of file diff --git a/front/frontend/node_modules/micromatch/node_modules/kind-of/index.js b/front/frontend/node_modules/micromatch/node_modules/kind-of/index.js new file mode 100644 index 0000000..dfa799b --- /dev/null +++ b/front/frontend/node_modules/micromatch/node_modules/kind-of/index.js @@ -0,0 +1,129 @@ +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} diff --git a/front/frontend/node_modules/micromatch/node_modules/kind-of/package.json b/front/frontend/node_modules/micromatch/node_modules/kind-of/package.json new file mode 100644 index 0000000..5820cad --- /dev/null +++ b/front/frontend/node_modules/micromatch/node_modules/kind-of/package.json @@ -0,0 +1,88 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "6.0.3", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "browserify": "^14.4.0", + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1", + "write": "^1.0.3" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + } +} diff --git a/front/frontend/node_modules/micromatch/package.json b/front/frontend/node_modules/micromatch/package.json new file mode 100644 index 0000000..4475155 --- /dev/null +++ b/front/frontend/node_modules/micromatch/package.json @@ -0,0 +1,147 @@ +{ + "name": "micromatch", + "description": "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.", + "version": "3.1.10", + "homepage": "https://github.com/micromatch/micromatch", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Amila Welihinda (amilajack.com)", + "Bogdan Chadkin (https://github.com/TrySound)", + "Brian Woodward (https://twitter.com/doowb)", + "Devon Govett (http://badassjs.com)", + "Elan Shanker (https://github.com/es128)", + "Fabrício Matté (https://ultcombo.js.org)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Martin Kolárik (https://kolarik.sk)", + "Olsten Larck (https://i.am.charlike.online)", + "Paul Miller (paulmillr.com)", + "Tom Byrer (https://github.com/tomByrer)", + "Tyler Akins (http://rumkin.com)", + "(https://github.com/DianeLooney)" + ], + "repository": "micromatch/micromatch", + "bugs": { + "url": "https://github.com/micromatch/micromatch/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "devDependencies": { + "bash-match": "^1.0.2", + "for-own": "^1.0.0", + "gulp": "^3.9.1", + "gulp-format-md": "^1.0.0", + "gulp-istanbul": "^1.1.3", + "gulp-mocha": "^5.0.0", + "gulp-unused": "^0.2.1", + "is-windows": "^1.0.2", + "minimatch": "^3.0.4", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "multimatch": "^2.1.0" + }, + "keywords": [ + "bash", + "expand", + "expansion", + "expression", + "file", + "files", + "filter", + "find", + "glob", + "globbing", + "globs", + "globstar", + "match", + "matcher", + "matches", + "matching", + "micromatch", + "minimatch", + "multimatch", + "path", + "pattern", + "patterns", + "regex", + "regexp", + "regular", + "shell", + "wildcard" + ], + "lintDeps": { + "dependencies": { + "options": { + "lock": { + "snapdragon": "^0.8.1" + } + } + }, + "devDependencies": { + "files": { + "options": { + "ignore": [ + "benchmark/**" + ] + } + } + } + }, + "verb": { + "toc": "collapsible", + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "helpers": [ + "./benchmark/helper.js" + ], + "related": { + "list": [ + "braces", + "expand-brackets", + "extglob", + "fill-range", + "nanomatch" + ] + }, + "lint": { + "reflinks": true + }, + "reflinks": [ + "expand-brackets", + "extglob", + "glob-object", + "minimatch", + "multimatch", + "snapdragon" + ] + } +} diff --git a/front/frontend/node_modules/mime-db/HISTORY.md b/front/frontend/node_modules/mime-db/HISTORY.md new file mode 100644 index 0000000..fb35bec --- /dev/null +++ b/front/frontend/node_modules/mime-db/HISTORY.md @@ -0,0 +1,541 @@ +1.54.0 / 2025-03-17 +=================== + + * Update mime type for DCM format (#362) + * mark application/octet-stream as compressible (#163) + * Fix typo in application/x-zip-compressed mimetype (#359) + * Add mime-type for Jupyter notebooks (#282) + * Add Google Drive MIME types (#311) + * Add .blend file type (#338) + * Add support for the FBX file extension (#342) + * Add Adobe DNG file (#340) + * Add Procreate Brush and Brush Set file Types (#339) + * Add support for Procreate Dreams (#341) + * replace got with undici (#352) + * Added extensions list for model/step (#293) + * Add m4b as a type of audio/mp4 (#357) + * windows 11 application/x-zip-compressed (#346) + * add dotLottie mime type (#351) + * Add some MS-related extensions and types (#336) + +1.53.0 / 2024-07-12 +=================== + + * Add extension `.sql` to `application/sql` + * Add extensions `.aac` and `.adts` to `audio/aac` + * Add extensions `.js` and `.mjs` to `text/javascript` + * Add extensions for `application/mp4` from IANA + * Add extensions from IANA for more MIME types + * Add Microsoft app installer types and extensions + * Add new upstream MIME types + * Fix extensions for `text/markdown` to match IANA + * Remove extension `.mjs` from `application/javascript` + * Remove obsolete MIME types from IANA data + +1.52.0 / 2022-02-21 +=================== + + * Add extensions from IANA for more `image/*` types + * Add extension `.asc` to `application/pgp-keys` + * Add extensions to various XML types + * Add new upstream MIME types + +1.51.0 / 2021-11-08 +=================== + + * Add new upstream MIME types + * Mark `image/vnd.microsoft.icon` as compressible + * Mark `image/vnd.ms-dds` as compressible + +1.50.0 / 2021-09-15 +=================== + + * Add deprecated iWorks mime types and extensions + * Add new upstream MIME types + +1.49.0 / 2021-07-26 +=================== + + * Add extension `.trig` to `application/trig` + * Add new upstream MIME types + +1.48.0 / 2021-05-30 +=================== + + * Add extension `.mvt` to `application/vnd.mapbox-vector-tile` + * Add new upstream MIME types + * Mark `text/yaml` as compressible + +1.47.0 / 2021-04-01 +=================== + + * Add new upstream MIME types + * Remove ambiguous extensions from IANA for `application/*+xml` types + * Update primary extension to `.es` for `application/ecmascript` + +1.46.0 / 2021-02-13 +=================== + + * Add extension `.amr` to `audio/amr` + * Add extension `.m4s` to `video/iso.segment` + * Add extension `.opus` to `audio/ogg` + * Add new upstream MIME types + +1.45.0 / 2020-09-22 +=================== + + * Add `application/ubjson` with extension `.ubj` + * Add `image/avif` with extension `.avif` + * Add `image/ktx2` with extension `.ktx2` + * Add extension `.dbf` to `application/vnd.dbf` + * Add extension `.rar` to `application/vnd.rar` + * Add extension `.td` to `application/urc-targetdesc+xml` + * Add new upstream MIME types + * Fix extension of `application/vnd.apple.keynote` to be `.key` + +1.44.0 / 2020-04-22 +=================== + + * Add charsets from IANA + * Add extension `.cjs` to `application/node` + * Add new upstream MIME types + +1.43.0 / 2020-01-05 +=================== + + * Add `application/x-keepass2` with extension `.kdbx` + * Add extension `.mxmf` to `audio/mobile-xmf` + * Add extensions from IANA for `application/*+xml` types + * Add new upstream MIME types + +1.42.0 / 2019-09-25 +=================== + + * Add `image/vnd.ms-dds` with extension `.dds` + * Add new upstream MIME types + * Remove compressible from `multipart/mixed` + +1.41.0 / 2019-08-30 +=================== + + * Add new upstream MIME types + * Add `application/toml` with extension `.toml` + * Mark `font/ttf` as compressible + +1.40.0 / 2019-04-20 +=================== + + * Add extensions from IANA for `model/*` types + * Add `text/mdx` with extension `.mdx` + +1.39.0 / 2019-04-04 +=================== + + * Add extensions `.siv` and `.sieve` to `application/sieve` + * Add new upstream MIME types + +1.38.0 / 2019-02-04 +=================== + + * Add extension `.nq` to `application/n-quads` + * Add extension `.nt` to `application/n-triples` + * Add new upstream MIME types + * Mark `text/less` as compressible + +1.37.0 / 2018-10-19 +=================== + + * Add extensions to HEIC image types + * Add new upstream MIME types + +1.36.0 / 2018-08-20 +=================== + + * Add Apple file extensions from IANA + * Add extensions from IANA for `image/*` types + * Add new upstream MIME types + +1.35.0 / 2018-07-15 +=================== + + * Add extension `.owl` to `application/rdf+xml` + * Add new upstream MIME types + - Removes extension `.woff` from `application/font-woff` + +1.34.0 / 2018-06-03 +=================== + + * Add extension `.csl` to `application/vnd.citationstyles.style+xml` + * Add extension `.es` to `application/ecmascript` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/turtle` + * Mark all XML-derived types as compressible + +1.33.0 / 2018-02-15 +=================== + + * Add extensions from IANA for `message/*` types + * Add new upstream MIME types + * Fix some incorrect OOXML types + * Remove `application/font-woff2` + +1.32.0 / 2017-11-29 +=================== + + * Add new upstream MIME types + * Update `text/hjson` to registered `application/hjson` + * Add `text/shex` with extension `.shex` + +1.31.0 / 2017-10-25 +=================== + + * Add `application/raml+yaml` with extension `.raml` + * Add `application/wasm` with extension `.wasm` + * Add new `font` type from IANA + * Add new upstream font extensions + * Add new upstream MIME types + * Add extensions for JPEG-2000 images + +1.30.0 / 2017-08-27 +=================== + + * Add `application/vnd.ms-outlook` + * Add `application/x-arj` + * Add extension `.mjs` to `application/javascript` + * Add glTF types and extensions + * Add new upstream MIME types + * Add `text/x-org` + * Add VirtualBox MIME types + * Fix `source` records for `video/*` types that are IANA + * Update `font/opentype` to registered `font/otf` + +1.29.0 / 2017-07-10 +=================== + + * Add `application/fido.trusted-apps+json` + * Add extension `.wadl` to `application/vnd.sun.wadl+xml` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/css` + +1.28.0 / 2017-05-14 +=================== + + * Add new upstream MIME types + * Add extension `.gz` to `application/gzip` + * Update extensions `.md` and `.markdown` to be `text/markdown` + +1.27.0 / 2017-03-16 +=================== + + * Add new upstream MIME types + * Add `image/apng` with extension `.apng` + +1.26.0 / 2017-01-14 +=================== + + * Add new upstream MIME types + * Add extension `.geojson` to `application/geo+json` + +1.25.0 / 2016-11-11 +=================== + + * Add new upstream MIME types + +1.24.0 / 2016-09-18 +=================== + + * Add `audio/mp3` + * Add new upstream MIME types + +1.23.0 / 2016-05-01 +=================== + + * Add new upstream MIME types + * Add extension `.3gpp` to `audio/3gpp` + +1.22.0 / 2016-02-15 +=================== + + * Add `text/slim` + * Add extension `.rng` to `application/xml` + * Add new upstream MIME types + * Fix extension of `application/dash+xml` to be `.mpd` + * Update primary extension to `.m4a` for `audio/mp4` + +1.21.0 / 2016-01-06 +=================== + + * Add Google document types + * Add new upstream MIME types + +1.20.0 / 2015-11-10 +=================== + + * Add `text/x-suse-ymp` + * Add new upstream MIME types + +1.19.0 / 2015-09-17 +=================== + + * Add `application/vnd.apple.pkpass` + * Add new upstream MIME types + +1.18.0 / 2015-09-03 +=================== + + * Add new upstream MIME types + +1.17.0 / 2015-08-13 +=================== + + * Add `application/x-msdos-program` + * Add `audio/g711-0` + * Add `image/vnd.mozilla.apng` + * Add extension `.exe` to `application/x-msdos-program` + +1.16.0 / 2015-07-29 +=================== + + * Add `application/vnd.uri-map` + +1.15.0 / 2015-07-13 +=================== + + * Add `application/x-httpd-php` + +1.14.0 / 2015-06-25 +=================== + + * Add `application/scim+json` + * Add `application/vnd.3gpp.ussd+xml` + * Add `application/vnd.biopax.rdf+xml` + * Add `text/x-processing` + +1.13.0 / 2015-06-07 +=================== + + * Add nginx as a source + * Add `application/x-cocoa` + * Add `application/x-java-archive-diff` + * Add `application/x-makeself` + * Add `application/x-perl` + * Add `application/x-pilot` + * Add `application/x-redhat-package-manager` + * Add `application/x-sea` + * Add `audio/x-m4a` + * Add `audio/x-realaudio` + * Add `image/x-jng` + * Add `text/mathml` + +1.12.0 / 2015-06-05 +=================== + + * Add `application/bdoc` + * Add `application/vnd.hyperdrive+json` + * Add `application/x-bdoc` + * Add extension `.rtf` to `text/rtf` + +1.11.0 / 2015-05-31 +=================== + + * Add `audio/wav` + * Add `audio/wave` + * Add extension `.litcoffee` to `text/coffeescript` + * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` + * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` + +1.10.0 / 2015-05-19 +=================== + + * Add `application/vnd.balsamiq.bmpr` + * Add `application/vnd.microsoft.portable-executable` + * Add `application/x-ns-proxy-autoconfig` + +1.9.1 / 2015-04-19 +================== + + * Remove `.json` extension from `application/manifest+json` + - This is causing bugs downstream + +1.9.0 / 2015-04-19 +================== + + * Add `application/manifest+json` + * Add `application/vnd.micro+json` + * Add `image/vnd.zbrush.pcx` + * Add `image/x-ms-bmp` + +1.8.0 / 2015-03-13 +================== + + * Add `application/vnd.citationstyles.style+xml` + * Add `application/vnd.fastcopy-disk-image` + * Add `application/vnd.gov.sk.xmldatacontainer+xml` + * Add extension `.jsonld` to `application/ld+json` + +1.7.0 / 2015-02-08 +================== + + * Add `application/vnd.gerber` + * Add `application/vnd.msa-disk-image` + +1.6.1 / 2015-02-05 +================== + + * Community extensions ownership transferred from `node-mime` + +1.6.0 / 2015-01-29 +================== + + * Add `application/jose` + * Add `application/jose+json` + * Add `application/json-seq` + * Add `application/jwk+json` + * Add `application/jwk-set+json` + * Add `application/jwt` + * Add `application/rdap+json` + * Add `application/vnd.gov.sk.e-form+xml` + * Add `application/vnd.ims.imsccv1p3` + +1.5.0 / 2014-12-30 +================== + + * Add `application/vnd.oracle.resource+json` + * Fix various invalid MIME type entries + - `application/mbox+xml` + - `application/oscp-response` + - `application/vwg-multiplexed` + - `audio/g721` + +1.4.0 / 2014-12-21 +================== + + * Add `application/vnd.ims.imsccv1p2` + * Fix various invalid MIME type entries + - `application/vnd-acucobol` + - `application/vnd-curl` + - `application/vnd-dart` + - `application/vnd-dxr` + - `application/vnd-fdf` + - `application/vnd-mif` + - `application/vnd-sema` + - `application/vnd-wap-wmlc` + - `application/vnd.adobe.flash-movie` + - `application/vnd.dece-zip` + - `application/vnd.dvb_service` + - `application/vnd.micrografx-igx` + - `application/vnd.sealed-doc` + - `application/vnd.sealed-eml` + - `application/vnd.sealed-mht` + - `application/vnd.sealed-ppt` + - `application/vnd.sealed-tiff` + - `application/vnd.sealed-xls` + - `application/vnd.sealedmedia.softseal-html` + - `application/vnd.sealedmedia.softseal-pdf` + - `application/vnd.wap-slc` + - `application/vnd.wap-wbxml` + - `audio/vnd.sealedmedia.softseal-mpeg` + - `image/vnd-djvu` + - `image/vnd-svf` + - `image/vnd-wap-wbmp` + - `image/vnd.sealed-png` + - `image/vnd.sealedmedia.softseal-gif` + - `image/vnd.sealedmedia.softseal-jpg` + - `model/vnd-dwf` + - `model/vnd.parasolid.transmit-binary` + - `model/vnd.parasolid.transmit-text` + - `text/vnd-a` + - `text/vnd-curl` + - `text/vnd.wap-wml` + * Remove example template MIME types + - `application/example` + - `audio/example` + - `image/example` + - `message/example` + - `model/example` + - `multipart/example` + - `text/example` + - `video/example` + +1.3.1 / 2014-12-16 +================== + + * Fix missing extensions + - `application/json5` + - `text/hjson` + +1.3.0 / 2014-12-07 +================== + + * Add `application/a2l` + * Add `application/aml` + * Add `application/atfx` + * Add `application/atxml` + * Add `application/cdfx+xml` + * Add `application/dii` + * Add `application/json5` + * Add `application/lxf` + * Add `application/mf4` + * Add `application/vnd.apache.thrift.compact` + * Add `application/vnd.apache.thrift.json` + * Add `application/vnd.coffeescript` + * Add `application/vnd.enphase.envoy` + * Add `application/vnd.ims.imsccv1p1` + * Add `text/csv-schema` + * Add `text/hjson` + * Add `text/markdown` + * Add `text/yaml` + +1.2.0 / 2014-11-09 +================== + + * Add `application/cea` + * Add `application/dit` + * Add `application/vnd.gov.sk.e-form+zip` + * Add `application/vnd.tmd.mediaflex.api+xml` + * Type `application/epub+zip` is now IANA-registered + +1.1.2 / 2014-10-23 +================== + + * Rebuild database for `application/x-www-form-urlencoded` change + +1.1.1 / 2014-10-20 +================== + + * Mark `application/x-www-form-urlencoded` as compressible. + +1.1.0 / 2014-09-28 +================== + + * Add `application/font-woff2` + +1.0.3 / 2014-09-25 +================== + + * Fix engine requirement in package + +1.0.2 / 2014-09-25 +================== + + * Add `application/coap-group+json` + * Add `application/dcd` + * Add `application/vnd.apache.thrift.binary` + * Add `image/vnd.tencent.tap` + * Mark all JSON-derived types as compressible + * Update `text/vtt` data + +1.0.1 / 2014-08-30 +================== + + * Fix extension ordering + +1.0.0 / 2014-08-30 +================== + + * Add `application/atf` + * Add `application/merge-patch+json` + * Add `multipart/x-mixed-replace` + * Add `source: 'apache'` metadata + * Add `source: 'iana'` metadata + * Remove badly-assumed charset data diff --git a/front/frontend/node_modules/mime-db/LICENSE b/front/frontend/node_modules/mime-db/LICENSE new file mode 100644 index 0000000..0751cb1 --- /dev/null +++ b/front/frontend/node_modules/mime-db/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015-2022 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/mime-db/README.md b/front/frontend/node_modules/mime-db/README.md new file mode 100644 index 0000000..ee93fa0 --- /dev/null +++ b/front/frontend/node_modules/mime-db/README.md @@ -0,0 +1,109 @@ +# mime-db + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][ci-image]][ci-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +This is a large database of mime types and information about them. +It consists of a single, public JSON file and does not include any logic, +allowing it to remain as un-opinionated as possible with an API. +It aggregates data from the following sources: + +- https://www.iana.org/assignments/media-types/media-types.xhtml +- https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types +- https://hg.nginx.org/nginx/raw-file/default/conf/mime.types + +## Installation + +```bash +npm install mime-db +``` + +### Database Download + +If you intend to use this in a web browser, you can conveniently access the JSON file via [jsDelivr](https://www.jsdelivr.com/), a popular CDN (Content Delivery Network). To ensure stability and compatibility, it is advisable to specify [a release tag](https://github.com/jshttp/mime-db/tags) instead of using the 'master' branch. This is because the JSON file's format might change in future updates, and relying on a specific release tag will prevent potential issues arising from these changes. + +``` +https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json +``` + +## Usage + +```js +var db = require('mime-db') + +// grab data on .js files +var data = db['application/javascript'] +``` + +## Data Structure + +The JSON file is a map lookup for lowercased mime types. +Each mime type has the following properties: + +- `.source` - where the mime type is defined. + If not set, it's probably a custom media type. + - `apache` - [Apache common media types](https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) + - `iana` - [IANA-defined media types](https://www.iana.org/assignments/media-types/media-types.xhtml) + - `nginx` - [nginx media types](https://hg.nginx.org/nginx/raw-file/default/conf/mime.types) +- `.extensions[]` - known extensions associated with this mime type. +- `.compressible` - whether a file of this type can be gzipped. +- `.charset` - the default charset associated with this type, if any. + +If unknown, every property could be `undefined`. + +## Note on MIME Type Data and Semver + +This package considers the programmatic api as the semver compatibility. This means the MIME type resolution is *not* considered +in the semver bumps. This means that if you want to pin your `mime-db` data you will need to do it in your application. While +this expectation was not set in docs until now, it is how the pacakge operated, so we do not feel this is a breaking change. + +## Contributing + +The primary way to contribute to this database is by updating the data in +one of the upstream sources. The database is updated from the upstreams +periodically and will pull in any changes. + +### Registering Media Types + +The best way to get new media types included in this library is to register +them with the IANA. The community registration procedure is outlined in +[RFC 6838 section 5](https://tools.ietf.org/html/rfc6838#section-5). Types +registered with the IANA are automatically pulled into this library. + +### Direct Inclusion + +If that is not possible / feasible, they can be added directly here as a +"custom" type. To do this, it is required to have a primary source that +definitively lists the media type. If an extension is going to be listed as +associated with this media type, the source must definitively link the +media type and extension as well. + +To edit the database, only make PRs against `src/custom-types.json` or +`src/custom-suffix.json`. + +The `src/custom-types.json` file is a JSON object with the MIME type as the +keys and the values being an object with the following keys: + +- `compressible` - leave out if you don't know, otherwise `true`/`false` to + indicate whether the data represented by the type is typically compressible. +- `extensions` - include an array of file extensions that are associated with + the type. +- `notes` - human-readable notes about the type, typically what the type is. +- `sources` - include an array of URLs of where the MIME type and the associated + extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source); + links to type aggregating sites and Wikipedia are _not acceptable_. + +To update the build, run `npm run build`. + +[ci-image]: https://badgen.net/github/checks/jshttp/mime-db/master?label=ci +[ci-url]: https://github.com/jshttp/mime-db/actions/workflows/ci.yml +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master +[node-image]: https://badgen.net/npm/node/mime-db +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-db +[npm-url]: https://npmjs.org/package/mime-db +[npm-version-image]: https://badgen.net/npm/v/mime-db diff --git a/front/frontend/node_modules/mime-db/db.json b/front/frontend/node_modules/mime-db/db.json new file mode 100644 index 0000000..7e74733 --- /dev/null +++ b/front/frontend/node_modules/mime-db/db.json @@ -0,0 +1,9342 @@ +{ + "application/1d-interleaved-parityfec": { + "source": "iana" + }, + "application/3gpdash-qoe-report+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/3gpp-ims+xml": { + "source": "iana", + "compressible": true + }, + "application/3gpphal+json": { + "source": "iana", + "compressible": true + }, + "application/3gpphalforms+json": { + "source": "iana", + "compressible": true + }, + "application/a2l": { + "source": "iana" + }, + "application/ace+cbor": { + "source": "iana" + }, + "application/ace+json": { + "source": "iana", + "compressible": true + }, + "application/ace-groupcomm+cbor": { + "source": "iana" + }, + "application/ace-trl+cbor": { + "source": "iana" + }, + "application/activemessage": { + "source": "iana" + }, + "application/activity+json": { + "source": "iana", + "compressible": true + }, + "application/aif+cbor": { + "source": "iana" + }, + "application/aif+json": { + "source": "iana", + "compressible": true + }, + "application/alto-cdni+json": { + "source": "iana", + "compressible": true + }, + "application/alto-cdnifilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-directory+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcost+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcostparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointprop+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointpropparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-error+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-propmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-propmapparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-tips+json": { + "source": "iana", + "compressible": true + }, + "application/alto-tipsparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamcontrol+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamparams+json": { + "source": "iana", + "compressible": true + }, + "application/aml": { + "source": "iana" + }, + "application/andrew-inset": { + "source": "iana", + "extensions": ["ez"] + }, + "application/appinstaller": { + "compressible": false, + "extensions": ["appinstaller"] + }, + "application/applefile": { + "source": "iana" + }, + "application/applixware": { + "source": "apache", + "extensions": ["aw"] + }, + "application/appx": { + "compressible": false, + "extensions": ["appx"] + }, + "application/appxbundle": { + "compressible": false, + "extensions": ["appxbundle"] + }, + "application/at+jwt": { + "source": "iana" + }, + "application/atf": { + "source": "iana" + }, + "application/atfx": { + "source": "iana" + }, + "application/atom+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atom"] + }, + "application/atomcat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomcat"] + }, + "application/atomdeleted+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomdeleted"] + }, + "application/atomicmail": { + "source": "iana" + }, + "application/atomsvc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomsvc"] + }, + "application/atsc-dwd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dwd"] + }, + "application/atsc-dynamic-event-message": { + "source": "iana" + }, + "application/atsc-held+xml": { + "source": "iana", + "compressible": true, + "extensions": ["held"] + }, + "application/atsc-rdt+json": { + "source": "iana", + "compressible": true + }, + "application/atsc-rsat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsat"] + }, + "application/atxml": { + "source": "iana" + }, + "application/auth-policy+xml": { + "source": "iana", + "compressible": true + }, + "application/automationml-aml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["aml"] + }, + "application/automationml-amlx+zip": { + "source": "iana", + "compressible": false, + "extensions": ["amlx"] + }, + "application/bacnet-xdd+zip": { + "source": "iana", + "compressible": false + }, + "application/batch-smtp": { + "source": "iana" + }, + "application/bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/beep+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/bufr": { + "source": "iana" + }, + "application/c2pa": { + "source": "iana" + }, + "application/calendar+json": { + "source": "iana", + "compressible": true + }, + "application/calendar+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xcs"] + }, + "application/call-completion": { + "source": "iana" + }, + "application/cals-1840": { + "source": "iana" + }, + "application/captive+json": { + "source": "iana", + "compressible": true + }, + "application/cbor": { + "source": "iana" + }, + "application/cbor-seq": { + "source": "iana" + }, + "application/cccex": { + "source": "iana" + }, + "application/ccmp+xml": { + "source": "iana", + "compressible": true + }, + "application/ccxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ccxml"] + }, + "application/cda+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/cdfx+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdfx"] + }, + "application/cdmi-capability": { + "source": "iana", + "extensions": ["cdmia"] + }, + "application/cdmi-container": { + "source": "iana", + "extensions": ["cdmic"] + }, + "application/cdmi-domain": { + "source": "iana", + "extensions": ["cdmid"] + }, + "application/cdmi-object": { + "source": "iana", + "extensions": ["cdmio"] + }, + "application/cdmi-queue": { + "source": "iana", + "extensions": ["cdmiq"] + }, + "application/cdni": { + "source": "iana" + }, + "application/ce+cbor": { + "source": "iana" + }, + "application/cea": { + "source": "iana" + }, + "application/cea-2018+xml": { + "source": "iana", + "compressible": true + }, + "application/cellml+xml": { + "source": "iana", + "compressible": true + }, + "application/cfw": { + "source": "iana" + }, + "application/cid-edhoc+cbor-seq": { + "source": "iana" + }, + "application/city+json": { + "source": "iana", + "compressible": true + }, + "application/city+json-seq": { + "source": "iana" + }, + "application/clr": { + "source": "iana" + }, + "application/clue+xml": { + "source": "iana", + "compressible": true + }, + "application/clue_info+xml": { + "source": "iana", + "compressible": true + }, + "application/cms": { + "source": "iana" + }, + "application/cnrp+xml": { + "source": "iana", + "compressible": true + }, + "application/coap-eap": { + "source": "iana" + }, + "application/coap-group+json": { + "source": "iana", + "compressible": true + }, + "application/coap-payload": { + "source": "iana" + }, + "application/commonground": { + "source": "iana" + }, + "application/concise-problem-details+cbor": { + "source": "iana" + }, + "application/conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/cose": { + "source": "iana" + }, + "application/cose-key": { + "source": "iana" + }, + "application/cose-key-set": { + "source": "iana" + }, + "application/cose-x509": { + "source": "iana" + }, + "application/cpl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cpl"] + }, + "application/csrattrs": { + "source": "iana" + }, + "application/csta+xml": { + "source": "iana", + "compressible": true + }, + "application/cstadata+xml": { + "source": "iana", + "compressible": true + }, + "application/csvm+json": { + "source": "iana", + "compressible": true + }, + "application/cu-seeme": { + "source": "apache", + "extensions": ["cu"] + }, + "application/cwl": { + "source": "iana", + "extensions": ["cwl"] + }, + "application/cwl+json": { + "source": "iana", + "compressible": true + }, + "application/cwl+yaml": { + "source": "iana" + }, + "application/cwt": { + "source": "iana" + }, + "application/cybercash": { + "source": "iana" + }, + "application/dart": { + "compressible": true + }, + "application/dash+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpd"] + }, + "application/dash-patch+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpp"] + }, + "application/dashdelta": { + "source": "iana" + }, + "application/davmount+xml": { + "source": "iana", + "compressible": true, + "extensions": ["davmount"] + }, + "application/dca-rft": { + "source": "iana" + }, + "application/dcd": { + "source": "iana" + }, + "application/dec-dx": { + "source": "iana" + }, + "application/dialog-info+xml": { + "source": "iana", + "compressible": true + }, + "application/dicom": { + "source": "iana", + "extensions": ["dcm"] + }, + "application/dicom+json": { + "source": "iana", + "compressible": true + }, + "application/dicom+xml": { + "source": "iana", + "compressible": true + }, + "application/dii": { + "source": "iana" + }, + "application/dit": { + "source": "iana" + }, + "application/dns": { + "source": "iana" + }, + "application/dns+json": { + "source": "iana", + "compressible": true + }, + "application/dns-message": { + "source": "iana" + }, + "application/docbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dbk"] + }, + "application/dots+cbor": { + "source": "iana" + }, + "application/dpop+jwt": { + "source": "iana" + }, + "application/dskpp+xml": { + "source": "iana", + "compressible": true + }, + "application/dssc+der": { + "source": "iana", + "extensions": ["dssc"] + }, + "application/dssc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdssc"] + }, + "application/dvcs": { + "source": "iana" + }, + "application/eat+cwt": { + "source": "iana" + }, + "application/eat+jwt": { + "source": "iana" + }, + "application/eat-bun+cbor": { + "source": "iana" + }, + "application/eat-bun+json": { + "source": "iana", + "compressible": true + }, + "application/eat-ucs+cbor": { + "source": "iana" + }, + "application/eat-ucs+json": { + "source": "iana", + "compressible": true + }, + "application/ecmascript": { + "source": "apache", + "compressible": true, + "extensions": ["ecma"] + }, + "application/edhoc+cbor-seq": { + "source": "iana" + }, + "application/edi-consent": { + "source": "iana" + }, + "application/edi-x12": { + "source": "iana", + "compressible": false + }, + "application/edifact": { + "source": "iana", + "compressible": false + }, + "application/efi": { + "source": "iana" + }, + "application/elm+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/elm+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.cap+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/emergencycalldata.comment+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.control+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.deviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.ecall.msd": { + "source": "iana" + }, + "application/emergencycalldata.legacyesn+json": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.providerinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.serviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.subscriberinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.veds+xml": { + "source": "iana", + "compressible": true + }, + "application/emma+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emma"] + }, + "application/emotionml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emotionml"] + }, + "application/encaprtp": { + "source": "iana" + }, + "application/entity-statement+jwt": { + "source": "iana" + }, + "application/epp+xml": { + "source": "iana", + "compressible": true + }, + "application/epub+zip": { + "source": "iana", + "compressible": false, + "extensions": ["epub"] + }, + "application/eshop": { + "source": "iana" + }, + "application/exi": { + "source": "iana", + "extensions": ["exi"] + }, + "application/expect-ct-report+json": { + "source": "iana", + "compressible": true + }, + "application/express": { + "source": "iana", + "extensions": ["exp"] + }, + "application/fastinfoset": { + "source": "iana" + }, + "application/fastsoap": { + "source": "iana" + }, + "application/fdf": { + "source": "iana", + "extensions": ["fdf"] + }, + "application/fdt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fdt"] + }, + "application/fhir+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fhir+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fido.trusted-apps+json": { + "compressible": true + }, + "application/fits": { + "source": "iana" + }, + "application/flexfec": { + "source": "iana" + }, + "application/font-sfnt": { + "source": "iana" + }, + "application/font-tdpfr": { + "source": "iana", + "extensions": ["pfr"] + }, + "application/font-woff": { + "source": "iana", + "compressible": false + }, + "application/framework-attributes+xml": { + "source": "iana", + "compressible": true + }, + "application/geo+json": { + "source": "iana", + "compressible": true, + "extensions": ["geojson"] + }, + "application/geo+json-seq": { + "source": "iana" + }, + "application/geopackage+sqlite3": { + "source": "iana" + }, + "application/geopose+json": { + "source": "iana", + "compressible": true + }, + "application/geoxacml+json": { + "source": "iana", + "compressible": true + }, + "application/geoxacml+xml": { + "source": "iana", + "compressible": true + }, + "application/gltf-buffer": { + "source": "iana" + }, + "application/gml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["gml"] + }, + "application/gnap-binding-jws": { + "source": "iana" + }, + "application/gnap-binding-jwsd": { + "source": "iana" + }, + "application/gnap-binding-rotation-jws": { + "source": "iana" + }, + "application/gnap-binding-rotation-jwsd": { + "source": "iana" + }, + "application/gpx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["gpx"] + }, + "application/grib": { + "source": "iana" + }, + "application/gxf": { + "source": "apache", + "extensions": ["gxf"] + }, + "application/gzip": { + "source": "iana", + "compressible": false, + "extensions": ["gz"] + }, + "application/h224": { + "source": "iana" + }, + "application/held+xml": { + "source": "iana", + "compressible": true + }, + "application/hjson": { + "extensions": ["hjson"] + }, + "application/hl7v2+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/http": { + "source": "iana" + }, + "application/hyperstudio": { + "source": "iana", + "extensions": ["stk"] + }, + "application/ibe-key-request+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pkg-reply+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pp-data": { + "source": "iana" + }, + "application/iges": { + "source": "iana" + }, + "application/im-iscomposing+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/index": { + "source": "iana" + }, + "application/index.cmd": { + "source": "iana" + }, + "application/index.obj": { + "source": "iana" + }, + "application/index.response": { + "source": "iana" + }, + "application/index.vnd": { + "source": "iana" + }, + "application/inkml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ink","inkml"] + }, + "application/iotp": { + "source": "iana" + }, + "application/ipfix": { + "source": "iana", + "extensions": ["ipfix"] + }, + "application/ipp": { + "source": "iana" + }, + "application/isup": { + "source": "iana" + }, + "application/its+xml": { + "source": "iana", + "compressible": true, + "extensions": ["its"] + }, + "application/java-archive": { + "source": "iana", + "compressible": false, + "extensions": ["jar","war","ear"] + }, + "application/java-serialized-object": { + "source": "apache", + "compressible": false, + "extensions": ["ser"] + }, + "application/java-vm": { + "source": "apache", + "compressible": false, + "extensions": ["class"] + }, + "application/javascript": { + "source": "apache", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js"] + }, + "application/jf2feed+json": { + "source": "iana", + "compressible": true + }, + "application/jose": { + "source": "iana" + }, + "application/jose+json": { + "source": "iana", + "compressible": true + }, + "application/jrd+json": { + "source": "iana", + "compressible": true + }, + "application/jscalendar+json": { + "source": "iana", + "compressible": true + }, + "application/jscontact+json": { + "source": "iana", + "compressible": true + }, + "application/json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["json","map"] + }, + "application/json-patch+json": { + "source": "iana", + "compressible": true + }, + "application/json-seq": { + "source": "iana" + }, + "application/json5": { + "extensions": ["json5"] + }, + "application/jsonml+json": { + "source": "apache", + "compressible": true, + "extensions": ["jsonml"] + }, + "application/jsonpath": { + "source": "iana" + }, + "application/jwk+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+jwt": { + "source": "iana" + }, + "application/jwt": { + "source": "iana" + }, + "application/kpml-request+xml": { + "source": "iana", + "compressible": true + }, + "application/kpml-response+xml": { + "source": "iana", + "compressible": true + }, + "application/ld+json": { + "source": "iana", + "compressible": true, + "extensions": ["jsonld"] + }, + "application/lgr+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lgr"] + }, + "application/link-format": { + "source": "iana" + }, + "application/linkset": { + "source": "iana" + }, + "application/linkset+json": { + "source": "iana", + "compressible": true + }, + "application/load-control+xml": { + "source": "iana", + "compressible": true + }, + "application/logout+jwt": { + "source": "iana" + }, + "application/lost+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lostxml"] + }, + "application/lostsync+xml": { + "source": "iana", + "compressible": true + }, + "application/lpf+zip": { + "source": "iana", + "compressible": false + }, + "application/lxf": { + "source": "iana" + }, + "application/mac-binhex40": { + "source": "iana", + "extensions": ["hqx"] + }, + "application/mac-compactpro": { + "source": "apache", + "extensions": ["cpt"] + }, + "application/macwriteii": { + "source": "iana" + }, + "application/mads+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mads"] + }, + "application/manifest+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["webmanifest"] + }, + "application/marc": { + "source": "iana", + "extensions": ["mrc"] + }, + "application/marcxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mrcx"] + }, + "application/mathematica": { + "source": "iana", + "extensions": ["ma","nb","mb"] + }, + "application/mathml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mathml"] + }, + "application/mathml-content+xml": { + "source": "iana", + "compressible": true + }, + "application/mathml-presentation+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-associated-procedure-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-deregister+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-envelope+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-protection-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-reception-report+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-schedule+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-user-service-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbox": { + "source": "iana", + "extensions": ["mbox"] + }, + "application/media-policy-dataset+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpf"] + }, + "application/media_control+xml": { + "source": "iana", + "compressible": true + }, + "application/mediaservercontrol+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mscml"] + }, + "application/merge-patch+json": { + "source": "iana", + "compressible": true + }, + "application/metalink+xml": { + "source": "apache", + "compressible": true, + "extensions": ["metalink"] + }, + "application/metalink4+xml": { + "source": "iana", + "compressible": true, + "extensions": ["meta4"] + }, + "application/mets+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mets"] + }, + "application/mf4": { + "source": "iana" + }, + "application/mikey": { + "source": "iana" + }, + "application/mipc": { + "source": "iana" + }, + "application/missing-blocks+cbor-seq": { + "source": "iana" + }, + "application/mmt-aei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["maei"] + }, + "application/mmt-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musd"] + }, + "application/mods+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mods"] + }, + "application/moss-keys": { + "source": "iana" + }, + "application/moss-signature": { + "source": "iana" + }, + "application/mosskey-data": { + "source": "iana" + }, + "application/mosskey-request": { + "source": "iana" + }, + "application/mp21": { + "source": "iana", + "extensions": ["m21","mp21"] + }, + "application/mp4": { + "source": "iana", + "extensions": ["mp4","mpg4","mp4s","m4p"] + }, + "application/mpeg4-generic": { + "source": "iana" + }, + "application/mpeg4-iod": { + "source": "iana" + }, + "application/mpeg4-iod-xmt": { + "source": "iana" + }, + "application/mrb-consumer+xml": { + "source": "iana", + "compressible": true + }, + "application/mrb-publish+xml": { + "source": "iana", + "compressible": true + }, + "application/msc-ivr+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msc-mixer+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msix": { + "compressible": false, + "extensions": ["msix"] + }, + "application/msixbundle": { + "compressible": false, + "extensions": ["msixbundle"] + }, + "application/msword": { + "source": "iana", + "compressible": false, + "extensions": ["doc","dot"] + }, + "application/mud+json": { + "source": "iana", + "compressible": true + }, + "application/multipart-core": { + "source": "iana" + }, + "application/mxf": { + "source": "iana", + "extensions": ["mxf"] + }, + "application/n-quads": { + "source": "iana", + "extensions": ["nq"] + }, + "application/n-triples": { + "source": "iana", + "extensions": ["nt"] + }, + "application/nasdata": { + "source": "iana" + }, + "application/news-checkgroups": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-groupinfo": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-transmission": { + "source": "iana" + }, + "application/nlsml+xml": { + "source": "iana", + "compressible": true + }, + "application/node": { + "source": "iana", + "extensions": ["cjs"] + }, + "application/nss": { + "source": "iana" + }, + "application/oauth-authz-req+jwt": { + "source": "iana" + }, + "application/oblivious-dns-message": { + "source": "iana" + }, + "application/ocsp-request": { + "source": "iana" + }, + "application/ocsp-response": { + "source": "iana" + }, + "application/octet-stream": { + "source": "iana", + "compressible": true, + "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] + }, + "application/oda": { + "source": "iana", + "extensions": ["oda"] + }, + "application/odm+xml": { + "source": "iana", + "compressible": true + }, + "application/odx": { + "source": "iana" + }, + "application/oebps-package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["opf"] + }, + "application/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogx"] + }, + "application/ohttp-keys": { + "source": "iana" + }, + "application/omdoc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["omdoc"] + }, + "application/onenote": { + "source": "apache", + "extensions": ["onetoc","onetoc2","onetmp","onepkg","one","onea"] + }, + "application/opc-nodeset+xml": { + "source": "iana", + "compressible": true + }, + "application/oscore": { + "source": "iana" + }, + "application/oxps": { + "source": "iana", + "extensions": ["oxps"] + }, + "application/p21": { + "source": "iana" + }, + "application/p21+zip": { + "source": "iana", + "compressible": false + }, + "application/p2p-overlay+xml": { + "source": "iana", + "compressible": true, + "extensions": ["relo"] + }, + "application/parityfec": { + "source": "iana" + }, + "application/passport": { + "source": "iana" + }, + "application/patch-ops-error+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xer"] + }, + "application/pdf": { + "source": "iana", + "compressible": false, + "extensions": ["pdf"] + }, + "application/pdx": { + "source": "iana" + }, + "application/pem-certificate-chain": { + "source": "iana" + }, + "application/pgp-encrypted": { + "source": "iana", + "compressible": false, + "extensions": ["pgp"] + }, + "application/pgp-keys": { + "source": "iana", + "extensions": ["asc"] + }, + "application/pgp-signature": { + "source": "iana", + "extensions": ["sig","asc"] + }, + "application/pics-rules": { + "source": "apache", + "extensions": ["prf"] + }, + "application/pidf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pidf-diff+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pkcs10": { + "source": "iana", + "extensions": ["p10"] + }, + "application/pkcs12": { + "source": "iana" + }, + "application/pkcs7-mime": { + "source": "iana", + "extensions": ["p7m","p7c"] + }, + "application/pkcs7-signature": { + "source": "iana", + "extensions": ["p7s"] + }, + "application/pkcs8": { + "source": "iana", + "extensions": ["p8"] + }, + "application/pkcs8-encrypted": { + "source": "iana" + }, + "application/pkix-attr-cert": { + "source": "iana", + "extensions": ["ac"] + }, + "application/pkix-cert": { + "source": "iana", + "extensions": ["cer"] + }, + "application/pkix-crl": { + "source": "iana", + "extensions": ["crl"] + }, + "application/pkix-pkipath": { + "source": "iana", + "extensions": ["pkipath"] + }, + "application/pkixcmp": { + "source": "iana", + "extensions": ["pki"] + }, + "application/pls+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pls"] + }, + "application/poc-settings+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/postscript": { + "source": "iana", + "compressible": true, + "extensions": ["ai","eps","ps"] + }, + "application/ppsp-tracker+json": { + "source": "iana", + "compressible": true + }, + "application/private-token-issuer-directory": { + "source": "iana" + }, + "application/private-token-request": { + "source": "iana" + }, + "application/private-token-response": { + "source": "iana" + }, + "application/problem+json": { + "source": "iana", + "compressible": true + }, + "application/problem+xml": { + "source": "iana", + "compressible": true + }, + "application/provenance+xml": { + "source": "iana", + "compressible": true, + "extensions": ["provx"] + }, + "application/provided-claims+jwt": { + "source": "iana" + }, + "application/prs.alvestrand.titrax-sheet": { + "source": "iana" + }, + "application/prs.cww": { + "source": "iana", + "extensions": ["cww"] + }, + "application/prs.cyn": { + "source": "iana", + "charset": "7-BIT" + }, + "application/prs.hpub+zip": { + "source": "iana", + "compressible": false + }, + "application/prs.implied-document+xml": { + "source": "iana", + "compressible": true + }, + "application/prs.implied-executable": { + "source": "iana" + }, + "application/prs.implied-object+json": { + "source": "iana", + "compressible": true + }, + "application/prs.implied-object+json-seq": { + "source": "iana" + }, + "application/prs.implied-object+yaml": { + "source": "iana" + }, + "application/prs.implied-structure": { + "source": "iana" + }, + "application/prs.mayfile": { + "source": "iana" + }, + "application/prs.nprend": { + "source": "iana" + }, + "application/prs.plucker": { + "source": "iana" + }, + "application/prs.rdf-xml-crypt": { + "source": "iana" + }, + "application/prs.vcfbzip2": { + "source": "iana" + }, + "application/prs.xsf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xsf"] + }, + "application/pskc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pskcxml"] + }, + "application/pvd+json": { + "source": "iana", + "compressible": true + }, + "application/qsig": { + "source": "iana" + }, + "application/raml+yaml": { + "compressible": true, + "extensions": ["raml"] + }, + "application/raptorfec": { + "source": "iana" + }, + "application/rdap+json": { + "source": "iana", + "compressible": true + }, + "application/rdf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rdf","owl"] + }, + "application/reginfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rif"] + }, + "application/relax-ng-compact-syntax": { + "source": "iana", + "extensions": ["rnc"] + }, + "application/remote-printing": { + "source": "apache" + }, + "application/reputon+json": { + "source": "iana", + "compressible": true + }, + "application/resolve-response+jwt": { + "source": "iana" + }, + "application/resource-lists+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rl"] + }, + "application/resource-lists-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rld"] + }, + "application/rfc+xml": { + "source": "iana", + "compressible": true + }, + "application/riscos": { + "source": "iana" + }, + "application/rlmi+xml": { + "source": "iana", + "compressible": true + }, + "application/rls-services+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rs"] + }, + "application/route-apd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rapd"] + }, + "application/route-s-tsid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sls"] + }, + "application/route-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rusd"] + }, + "application/rpki-checklist": { + "source": "iana" + }, + "application/rpki-ghostbusters": { + "source": "iana", + "extensions": ["gbr"] + }, + "application/rpki-manifest": { + "source": "iana", + "extensions": ["mft"] + }, + "application/rpki-publication": { + "source": "iana" + }, + "application/rpki-roa": { + "source": "iana", + "extensions": ["roa"] + }, + "application/rpki-signed-tal": { + "source": "iana" + }, + "application/rpki-updown": { + "source": "iana" + }, + "application/rsd+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rsd"] + }, + "application/rss+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rss"] + }, + "application/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "application/rtploopback": { + "source": "iana" + }, + "application/rtx": { + "source": "iana" + }, + "application/samlassertion+xml": { + "source": "iana", + "compressible": true + }, + "application/samlmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/sarif+json": { + "source": "iana", + "compressible": true + }, + "application/sarif-external-properties+json": { + "source": "iana", + "compressible": true + }, + "application/sbe": { + "source": "iana" + }, + "application/sbml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sbml"] + }, + "application/scaip+xml": { + "source": "iana", + "compressible": true + }, + "application/scim+json": { + "source": "iana", + "compressible": true + }, + "application/scvp-cv-request": { + "source": "iana", + "extensions": ["scq"] + }, + "application/scvp-cv-response": { + "source": "iana", + "extensions": ["scs"] + }, + "application/scvp-vp-request": { + "source": "iana", + "extensions": ["spq"] + }, + "application/scvp-vp-response": { + "source": "iana", + "extensions": ["spp"] + }, + "application/sdp": { + "source": "iana", + "extensions": ["sdp"] + }, + "application/secevent+jwt": { + "source": "iana" + }, + "application/senml+cbor": { + "source": "iana" + }, + "application/senml+json": { + "source": "iana", + "compressible": true + }, + "application/senml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["senmlx"] + }, + "application/senml-etch+cbor": { + "source": "iana" + }, + "application/senml-etch+json": { + "source": "iana", + "compressible": true + }, + "application/senml-exi": { + "source": "iana" + }, + "application/sensml+cbor": { + "source": "iana" + }, + "application/sensml+json": { + "source": "iana", + "compressible": true + }, + "application/sensml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sensmlx"] + }, + "application/sensml-exi": { + "source": "iana" + }, + "application/sep+xml": { + "source": "iana", + "compressible": true + }, + "application/sep-exi": { + "source": "iana" + }, + "application/session-info": { + "source": "iana" + }, + "application/set-payment": { + "source": "iana" + }, + "application/set-payment-initiation": { + "source": "iana", + "extensions": ["setpay"] + }, + "application/set-registration": { + "source": "iana" + }, + "application/set-registration-initiation": { + "source": "iana", + "extensions": ["setreg"] + }, + "application/sgml": { + "source": "iana" + }, + "application/sgml-open-catalog": { + "source": "iana" + }, + "application/shf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["shf"] + }, + "application/sieve": { + "source": "iana", + "extensions": ["siv","sieve"] + }, + "application/simple-filter+xml": { + "source": "iana", + "compressible": true + }, + "application/simple-message-summary": { + "source": "iana" + }, + "application/simplesymbolcontainer": { + "source": "iana" + }, + "application/sipc": { + "source": "iana" + }, + "application/slate": { + "source": "iana" + }, + "application/smil": { + "source": "apache" + }, + "application/smil+xml": { + "source": "iana", + "compressible": true, + "extensions": ["smi","smil"] + }, + "application/smpte336m": { + "source": "iana" + }, + "application/soap+fastinfoset": { + "source": "iana" + }, + "application/soap+xml": { + "source": "iana", + "compressible": true + }, + "application/sparql-query": { + "source": "iana", + "extensions": ["rq"] + }, + "application/sparql-results+xml": { + "source": "iana", + "compressible": true, + "extensions": ["srx"] + }, + "application/spdx+json": { + "source": "iana", + "compressible": true + }, + "application/spirits-event+xml": { + "source": "iana", + "compressible": true + }, + "application/sql": { + "source": "iana", + "extensions": ["sql"] + }, + "application/srgs": { + "source": "iana", + "extensions": ["gram"] + }, + "application/srgs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["grxml"] + }, + "application/sru+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sru"] + }, + "application/ssdl+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ssdl"] + }, + "application/sslkeylogfile": { + "source": "iana" + }, + "application/ssml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ssml"] + }, + "application/st2110-41": { + "source": "iana" + }, + "application/stix+json": { + "source": "iana", + "compressible": true + }, + "application/stratum": { + "source": "iana" + }, + "application/swid+cbor": { + "source": "iana" + }, + "application/swid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["swidtag"] + }, + "application/tamp-apex-update": { + "source": "iana" + }, + "application/tamp-apex-update-confirm": { + "source": "iana" + }, + "application/tamp-community-update": { + "source": "iana" + }, + "application/tamp-community-update-confirm": { + "source": "iana" + }, + "application/tamp-error": { + "source": "iana" + }, + "application/tamp-sequence-adjust": { + "source": "iana" + }, + "application/tamp-sequence-adjust-confirm": { + "source": "iana" + }, + "application/tamp-status-query": { + "source": "iana" + }, + "application/tamp-status-response": { + "source": "iana" + }, + "application/tamp-update": { + "source": "iana" + }, + "application/tamp-update-confirm": { + "source": "iana" + }, + "application/tar": { + "compressible": true + }, + "application/taxii+json": { + "source": "iana", + "compressible": true + }, + "application/td+json": { + "source": "iana", + "compressible": true + }, + "application/tei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tei","teicorpus"] + }, + "application/tetra_isi": { + "source": "iana" + }, + "application/thraud+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tfi"] + }, + "application/timestamp-query": { + "source": "iana" + }, + "application/timestamp-reply": { + "source": "iana" + }, + "application/timestamped-data": { + "source": "iana", + "extensions": ["tsd"] + }, + "application/tlsrpt+gzip": { + "source": "iana" + }, + "application/tlsrpt+json": { + "source": "iana", + "compressible": true + }, + "application/tm+json": { + "source": "iana", + "compressible": true + }, + "application/tnauthlist": { + "source": "iana" + }, + "application/toc+cbor": { + "source": "iana" + }, + "application/token-introspection+jwt": { + "source": "iana" + }, + "application/toml": { + "source": "iana", + "compressible": true, + "extensions": ["toml"] + }, + "application/trickle-ice-sdpfrag": { + "source": "iana" + }, + "application/trig": { + "source": "iana", + "extensions": ["trig"] + }, + "application/trust-chain+json": { + "source": "iana", + "compressible": true + }, + "application/trust-mark+jwt": { + "source": "iana" + }, + "application/trust-mark-delegation+jwt": { + "source": "iana" + }, + "application/ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ttml"] + }, + "application/tve-trigger": { + "source": "iana" + }, + "application/tzif": { + "source": "iana" + }, + "application/tzif-leap": { + "source": "iana" + }, + "application/ubjson": { + "compressible": false, + "extensions": ["ubj"] + }, + "application/uccs+cbor": { + "source": "iana" + }, + "application/ujcs+json": { + "source": "iana", + "compressible": true + }, + "application/ulpfec": { + "source": "iana" + }, + "application/urc-grpsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/urc-ressheet+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsheet"] + }, + "application/urc-targetdesc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["td"] + }, + "application/urc-uisocketdesc+xml": { + "source": "iana", + "compressible": true + }, + "application/vc": { + "source": "iana" + }, + "application/vc+cose": { + "source": "iana" + }, + "application/vc+jwt": { + "source": "iana" + }, + "application/vcard+json": { + "source": "iana", + "compressible": true + }, + "application/vcard+xml": { + "source": "iana", + "compressible": true + }, + "application/vemmi": { + "source": "iana" + }, + "application/vividence.scriptfile": { + "source": "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + "source": "iana", + "compressible": true, + "extensions": ["1km"] + }, + "application/vnd.1ob": { + "source": "iana" + }, + "application/vnd.3gpp-prose+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc3a+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc3ach+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc8+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-v2x-local-service-information": { + "source": "iana" + }, + "application/vnd.3gpp.5gnas": { + "source": "iana" + }, + "application/vnd.3gpp.5gsa2x": { + "source": "iana" + }, + "application/vnd.3gpp.5gsa2x-local-service-information": { + "source": "iana" + }, + "application/vnd.3gpp.5gsv2x": { + "source": "iana" + }, + "application/vnd.3gpp.5gsv2x-local-service-information": { + "source": "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.bsf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.crs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.current-location-discovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gmop+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gtpc": { + "source": "iana" + }, + "application/vnd.3gpp.interworking-data": { + "source": "iana" + }, + "application/vnd.3gpp.lpp": { + "source": "iana" + }, + "application/vnd.3gpp.mc-signalling-ear": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-payload": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-regroup+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-signalling": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-floor-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-regroup+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-signed+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-init-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-regroup+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-transmission-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mid-call+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ngap": { + "source": "iana" + }, + "application/vnd.3gpp.pfcp": { + "source": "iana" + }, + "application/vnd.3gpp.pic-bw-large": { + "source": "iana", + "extensions": ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + "source": "iana", + "extensions": ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + "source": "iana", + "extensions": ["pvb"] + }, + "application/vnd.3gpp.pinapp-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.s1ap": { + "source": "iana" + }, + "application/vnd.3gpp.seal-group-doc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.seal-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.seal-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.seal-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.seal-network-qos-management-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.seal-ue-config-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.seal-unicast-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.seal-user-profile-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.sms": { + "source": "iana" + }, + "application/vnd.3gpp.sms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-ext+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.state-and-event-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ussd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.v2x": { + "source": "iana" + }, + "application/vnd.3gpp.vae-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.sms": { + "source": "iana" + }, + "application/vnd.3gpp2.tcap": { + "source": "iana", + "extensions": ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + "source": "iana" + }, + "application/vnd.3m.post-it-notes": { + "source": "iana", + "extensions": ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + "source": "iana", + "extensions": ["aso"] + }, + "application/vnd.accpac.simply.imp": { + "source": "iana", + "extensions": ["imp"] + }, + "application/vnd.acm.addressxfer+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.acm.chatbot+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.acucobol": { + "source": "iana", + "extensions": ["acu"] + }, + "application/vnd.acucorp": { + "source": "iana", + "extensions": ["atc","acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + "source": "apache", + "compressible": false, + "extensions": ["air"] + }, + "application/vnd.adobe.flash.movie": { + "source": "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + "source": "iana", + "extensions": ["fcdt"] + }, + "application/vnd.adobe.fxp": { + "source": "iana", + "extensions": ["fxp","fxpl"] + }, + "application/vnd.adobe.partial-upload": { + "source": "iana" + }, + "application/vnd.adobe.xdp+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdp"] + }, + "application/vnd.adobe.xfdf": { + "source": "apache", + "extensions": ["xfdf"] + }, + "application/vnd.aether.imp": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata-pagedef": { + "source": "iana" + }, + "application/vnd.afpc.cmoca-cmresource": { + "source": "iana" + }, + "application/vnd.afpc.foca-charset": { + "source": "iana" + }, + "application/vnd.afpc.foca-codedfont": { + "source": "iana" + }, + "application/vnd.afpc.foca-codepage": { + "source": "iana" + }, + "application/vnd.afpc.modca": { + "source": "iana" + }, + "application/vnd.afpc.modca-cmtable": { + "source": "iana" + }, + "application/vnd.afpc.modca-formdef": { + "source": "iana" + }, + "application/vnd.afpc.modca-mediummap": { + "source": "iana" + }, + "application/vnd.afpc.modca-objectcontainer": { + "source": "iana" + }, + "application/vnd.afpc.modca-overlay": { + "source": "iana" + }, + "application/vnd.afpc.modca-pagesegment": { + "source": "iana" + }, + "application/vnd.age": { + "source": "iana", + "extensions": ["age"] + }, + "application/vnd.ah-barcode": { + "source": "apache" + }, + "application/vnd.ahead.space": { + "source": "iana", + "extensions": ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + "source": "iana", + "extensions": ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + "source": "iana", + "extensions": ["azs"] + }, + "application/vnd.amadeus+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.amazon.ebook": { + "source": "apache", + "extensions": ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + "source": "iana" + }, + "application/vnd.americandynamics.acc": { + "source": "iana", + "extensions": ["acc"] + }, + "application/vnd.amiga.ami": { + "source": "iana", + "extensions": ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.android.ota": { + "source": "iana" + }, + "application/vnd.android.package-archive": { + "source": "apache", + "compressible": false, + "extensions": ["apk"] + }, + "application/vnd.anki": { + "source": "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + "source": "iana", + "extensions": ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + "source": "apache", + "extensions": ["fti"] + }, + "application/vnd.antix.game-component": { + "source": "iana", + "extensions": ["atx"] + }, + "application/vnd.apache.arrow.file": { + "source": "iana" + }, + "application/vnd.apache.arrow.stream": { + "source": "iana" + }, + "application/vnd.apache.parquet": { + "source": "iana" + }, + "application/vnd.apache.thrift.binary": { + "source": "iana" + }, + "application/vnd.apache.thrift.compact": { + "source": "iana" + }, + "application/vnd.apache.thrift.json": { + "source": "iana" + }, + "application/vnd.apexlang": { + "source": "iana" + }, + "application/vnd.api+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.aplextor.warrp+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apothekende.reservation+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apple.installer+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpkg"] + }, + "application/vnd.apple.keynote": { + "source": "iana", + "extensions": ["key"] + }, + "application/vnd.apple.mpegurl": { + "source": "iana", + "extensions": ["m3u8"] + }, + "application/vnd.apple.numbers": { + "source": "iana", + "extensions": ["numbers"] + }, + "application/vnd.apple.pages": { + "source": "iana", + "extensions": ["pages"] + }, + "application/vnd.apple.pkpass": { + "compressible": false, + "extensions": ["pkpass"] + }, + "application/vnd.arastra.swi": { + "source": "apache" + }, + "application/vnd.aristanetworks.swi": { + "source": "iana", + "extensions": ["swi"] + }, + "application/vnd.artisan+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.artsquare": { + "source": "iana" + }, + "application/vnd.astraea-software.iota": { + "source": "iana", + "extensions": ["iota"] + }, + "application/vnd.audiograph": { + "source": "iana", + "extensions": ["aep"] + }, + "application/vnd.autodesk.fbx": { + "extensions": ["fbx"] + }, + "application/vnd.autopackage": { + "source": "iana" + }, + "application/vnd.avalon+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.avistar+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.balsamiq.bmml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["bmml"] + }, + "application/vnd.balsamiq.bmpr": { + "source": "iana" + }, + "application/vnd.banana-accounting": { + "source": "iana" + }, + "application/vnd.bbf.usp.error": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bekitzur-stech+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.belightsoft.lhzd+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.belightsoft.lhzl+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.bint.med-content": { + "source": "iana" + }, + "application/vnd.biopax.rdf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.blink-idb-value-wrapper": { + "source": "iana" + }, + "application/vnd.blueice.multipass": { + "source": "iana", + "extensions": ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + "source": "iana" + }, + "application/vnd.bluetooth.le.oob": { + "source": "iana" + }, + "application/vnd.bmi": { + "source": "iana", + "extensions": ["bmi"] + }, + "application/vnd.bpf": { + "source": "iana" + }, + "application/vnd.bpf3": { + "source": "iana" + }, + "application/vnd.businessobjects": { + "source": "iana", + "extensions": ["rep"] + }, + "application/vnd.byu.uapi+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bzip3": { + "source": "iana" + }, + "application/vnd.c3voc.schedule+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cab-jscript": { + "source": "iana" + }, + "application/vnd.canon-cpdl": { + "source": "iana" + }, + "application/vnd.canon-lips": { + "source": "iana" + }, + "application/vnd.capasystems-pg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cendio.thinlinc.clientconf": { + "source": "iana" + }, + "application/vnd.century-systems.tcp_stream": { + "source": "iana" + }, + "application/vnd.chemdraw+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdxml"] + }, + "application/vnd.chess-pgn": { + "source": "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + "source": "iana", + "extensions": ["mmd"] + }, + "application/vnd.ciedi": { + "source": "iana" + }, + "application/vnd.cinderella": { + "source": "iana", + "extensions": ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + "source": "iana" + }, + "application/vnd.citationstyles.style+xml": { + "source": "iana", + "compressible": true, + "extensions": ["csl"] + }, + "application/vnd.claymore": { + "source": "iana", + "extensions": ["cla"] + }, + "application/vnd.cloanto.rp9": { + "source": "iana", + "extensions": ["rp9"] + }, + "application/vnd.clonk.c4group": { + "source": "iana", + "extensions": ["c4g","c4d","c4f","c4p","c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + "source": "iana", + "extensions": ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + "source": "iana", + "extensions": ["c11amz"] + }, + "application/vnd.cncf.helm.chart.content.v1.tar+gzip": { + "source": "iana" + }, + "application/vnd.cncf.helm.chart.provenance.v1.prov": { + "source": "iana" + }, + "application/vnd.cncf.helm.config.v1+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.coffeescript": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet-template": { + "source": "iana" + }, + "application/vnd.collection+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.doc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.next+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.comicbook+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.comicbook-rar": { + "source": "iana" + }, + "application/vnd.commerce-battelle": { + "source": "iana" + }, + "application/vnd.commonspace": { + "source": "iana", + "extensions": ["csp"] + }, + "application/vnd.contact.cmsg": { + "source": "iana", + "extensions": ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cosmocaller": { + "source": "iana", + "extensions": ["cmc"] + }, + "application/vnd.crick.clicker": { + "source": "iana", + "extensions": ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + "source": "iana", + "extensions": ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + "source": "iana", + "extensions": ["clkp"] + }, + "application/vnd.crick.clicker.template": { + "source": "iana", + "extensions": ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + "source": "iana", + "extensions": ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wbs"] + }, + "application/vnd.cryptii.pipe+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.crypto-shade-file": { + "source": "iana" + }, + "application/vnd.cryptomator.encrypted": { + "source": "iana" + }, + "application/vnd.cryptomator.vault": { + "source": "iana" + }, + "application/vnd.ctc-posml": { + "source": "iana", + "extensions": ["pml"] + }, + "application/vnd.ctct.ws+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cups-pdf": { + "source": "iana" + }, + "application/vnd.cups-postscript": { + "source": "iana" + }, + "application/vnd.cups-ppd": { + "source": "iana", + "extensions": ["ppd"] + }, + "application/vnd.cups-raster": { + "source": "iana" + }, + "application/vnd.cups-raw": { + "source": "iana" + }, + "application/vnd.curl": { + "source": "iana" + }, + "application/vnd.curl.car": { + "source": "apache", + "extensions": ["car"] + }, + "application/vnd.curl.pcurl": { + "source": "apache", + "extensions": ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cybank": { + "source": "iana" + }, + "application/vnd.cyclonedx+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cyclonedx+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.d2l.coursepackage1p0+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.d3m-dataset": { + "source": "iana" + }, + "application/vnd.d3m-problem": { + "source": "iana" + }, + "application/vnd.dart": { + "source": "iana", + "compressible": true, + "extensions": ["dart"] + }, + "application/vnd.data-vision.rdz": { + "source": "iana", + "extensions": ["rdz"] + }, + "application/vnd.datalog": { + "source": "iana" + }, + "application/vnd.datapackage+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dataresource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dbf": { + "source": "iana", + "extensions": ["dbf"] + }, + "application/vnd.dcmp+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dcmp"] + }, + "application/vnd.debian.binary-package": { + "source": "iana" + }, + "application/vnd.dece.data": { + "source": "iana", + "extensions": ["uvf","uvvf","uvd","uvvd"] + }, + "application/vnd.dece.ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uvt","uvvt"] + }, + "application/vnd.dece.unspecified": { + "source": "iana", + "extensions": ["uvx","uvvx"] + }, + "application/vnd.dece.zip": { + "source": "iana", + "extensions": ["uvz","uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + "source": "iana", + "extensions": ["fe_launch"] + }, + "application/vnd.desmume.movie": { + "source": "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + "source": "iana" + }, + "application/vnd.dm.delegation+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dna": { + "source": "iana", + "extensions": ["dna"] + }, + "application/vnd.document+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dolby.mlp": { + "source": "apache", + "extensions": ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + "source": "iana" + }, + "application/vnd.dolby.mobile.2": { + "source": "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + "source": "iana" + }, + "application/vnd.dpgraph": { + "source": "iana", + "extensions": ["dpg"] + }, + "application/vnd.dreamfactory": { + "source": "iana", + "extensions": ["dfac"] + }, + "application/vnd.drive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ds-keypoint": { + "source": "apache", + "extensions": ["kpxx"] + }, + "application/vnd.dtg.local": { + "source": "iana" + }, + "application/vnd.dtg.local.flash": { + "source": "iana" + }, + "application/vnd.dtg.local.html": { + "source": "iana" + }, + "application/vnd.dvb.ait": { + "source": "iana", + "extensions": ["ait"] + }, + "application/vnd.dvb.dvbisl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.dvbj": { + "source": "iana" + }, + "application/vnd.dvb.esgcontainer": { + "source": "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + "source": "iana" + }, + "application/vnd.dvb.ipdcroaming": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + "source": "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-container+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-generic+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-init+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.pfr": { + "source": "iana" + }, + "application/vnd.dvb.service": { + "source": "iana", + "extensions": ["svc"] + }, + "application/vnd.dxr": { + "source": "iana" + }, + "application/vnd.dynageo": { + "source": "iana", + "extensions": ["geo"] + }, + "application/vnd.dzr": { + "source": "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + "source": "iana" + }, + "application/vnd.ecdis-update": { + "source": "iana" + }, + "application/vnd.ecip.rlp": { + "source": "iana" + }, + "application/vnd.eclipse.ditto+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ecowin.chart": { + "source": "iana", + "extensions": ["mag"] + }, + "application/vnd.ecowin.filerequest": { + "source": "iana" + }, + "application/vnd.ecowin.fileupdate": { + "source": "iana" + }, + "application/vnd.ecowin.series": { + "source": "iana" + }, + "application/vnd.ecowin.seriesrequest": { + "source": "iana" + }, + "application/vnd.ecowin.seriesupdate": { + "source": "iana" + }, + "application/vnd.efi.img": { + "source": "iana" + }, + "application/vnd.efi.iso": { + "source": "iana" + }, + "application/vnd.eln+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.emclient.accessrequest+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.enliven": { + "source": "iana", + "extensions": ["nml"] + }, + "application/vnd.enphase.envoy": { + "source": "iana" + }, + "application/vnd.eprints.data+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.epson.esf": { + "source": "iana", + "extensions": ["esf"] + }, + "application/vnd.epson.msf": { + "source": "iana", + "extensions": ["msf"] + }, + "application/vnd.epson.quickanime": { + "source": "iana", + "extensions": ["qam"] + }, + "application/vnd.epson.salt": { + "source": "iana", + "extensions": ["slt"] + }, + "application/vnd.epson.ssf": { + "source": "iana", + "extensions": ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + "source": "iana" + }, + "application/vnd.erofs": { + "source": "iana" + }, + "application/vnd.espass-espass+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.eszigno3+xml": { + "source": "iana", + "compressible": true, + "extensions": ["es3","et3"] + }, + "application/vnd.etsi.aoc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.asic-e+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.asic-s+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.cug+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvcommand+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-bc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-cod+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvservice+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsync+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mcid+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mheg5": { + "source": "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.pstn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.sci+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.simservs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.timestamp-token": { + "source": "iana" + }, + "application/vnd.etsi.tsl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.tsl.der": { + "source": "iana" + }, + "application/vnd.eu.kasparian.car+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.eudora.data": { + "source": "iana" + }, + "application/vnd.evolv.ecig.profile": { + "source": "iana" + }, + "application/vnd.evolv.ecig.settings": { + "source": "iana" + }, + "application/vnd.evolv.ecig.theme": { + "source": "iana" + }, + "application/vnd.exstream-empower+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.exstream-package": { + "source": "iana" + }, + "application/vnd.ezpix-album": { + "source": "iana", + "extensions": ["ez2"] + }, + "application/vnd.ezpix-package": { + "source": "iana", + "extensions": ["ez3"] + }, + "application/vnd.f-secure.mobile": { + "source": "iana" + }, + "application/vnd.familysearch.gedcom+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.fastcopy-disk-image": { + "source": "iana" + }, + "application/vnd.fdf": { + "source": "apache", + "extensions": ["fdf"] + }, + "application/vnd.fdsn.mseed": { + "source": "iana", + "extensions": ["mseed"] + }, + "application/vnd.fdsn.seed": { + "source": "iana", + "extensions": ["seed","dataless"] + }, + "application/vnd.fdsn.stationxml+xml": { + "source": "iana", + "charset": "XML-BASED", + "compressible": true + }, + "application/vnd.ffsns": { + "source": "iana" + }, + "application/vnd.ficlab.flb+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.filmit.zfc": { + "source": "iana" + }, + "application/vnd.fints": { + "source": "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + "source": "iana" + }, + "application/vnd.flographit": { + "source": "iana", + "extensions": ["gph"] + }, + "application/vnd.fluxtime.clip": { + "source": "iana", + "extensions": ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + "source": "iana" + }, + "application/vnd.framemaker": { + "source": "iana", + "extensions": ["fm","frame","maker","book"] + }, + "application/vnd.freelog.comic": { + "source": "iana" + }, + "application/vnd.frogans.fnc": { + "source": "apache", + "extensions": ["fnc"] + }, + "application/vnd.frogans.ltf": { + "source": "apache", + "extensions": ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + "source": "iana", + "extensions": ["fsc"] + }, + "application/vnd.fujifilm.fb.docuworks": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.docuworks.binder": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.jfi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.fujitsu.oasys": { + "source": "iana", + "extensions": ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + "source": "iana", + "extensions": ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + "source": "iana", + "extensions": ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + "source": "iana", + "extensions": ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + "source": "iana", + "extensions": ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + "source": "iana" + }, + "application/vnd.fujixerox.art4": { + "source": "iana" + }, + "application/vnd.fujixerox.ddd": { + "source": "iana", + "extensions": ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + "source": "iana", + "extensions": ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + "source": "iana", + "extensions": ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujixerox.hbpl": { + "source": "iana" + }, + "application/vnd.fut-misnet": { + "source": "iana" + }, + "application/vnd.futoin+cbor": { + "source": "iana" + }, + "application/vnd.futoin+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.fuzzysheet": { + "source": "iana", + "extensions": ["fzs"] + }, + "application/vnd.ga4gh.passport+jwt": { + "source": "iana" + }, + "application/vnd.genomatix.tuxedo": { + "source": "iana", + "extensions": ["txd"] + }, + "application/vnd.genozip": { + "source": "iana" + }, + "application/vnd.gentics.grd+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.gentoo.catmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.gentoo.ebuild": { + "source": "iana" + }, + "application/vnd.gentoo.eclass": { + "source": "iana" + }, + "application/vnd.gentoo.gpkg": { + "source": "iana" + }, + "application/vnd.gentoo.manifest": { + "source": "iana" + }, + "application/vnd.gentoo.pkgmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.gentoo.xpak": { + "source": "iana" + }, + "application/vnd.geo+json": { + "source": "apache", + "compressible": true + }, + "application/vnd.geocube+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.geogebra.file": { + "source": "iana", + "extensions": ["ggb"] + }, + "application/vnd.geogebra.pinboard": { + "source": "iana" + }, + "application/vnd.geogebra.slides": { + "source": "iana", + "extensions": ["ggs"] + }, + "application/vnd.geogebra.tool": { + "source": "iana", + "extensions": ["ggt"] + }, + "application/vnd.geometry-explorer": { + "source": "iana", + "extensions": ["gex","gre"] + }, + "application/vnd.geonext": { + "source": "iana", + "extensions": ["gxt"] + }, + "application/vnd.geoplan": { + "source": "iana", + "extensions": ["g2w"] + }, + "application/vnd.geospace": { + "source": "iana", + "extensions": ["g3w"] + }, + "application/vnd.gerber": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + "source": "iana" + }, + "application/vnd.gmx": { + "source": "iana", + "extensions": ["gmx"] + }, + "application/vnd.gnu.taler.exchange+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.gnu.taler.merchant+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.google-apps.audio": {}, + "application/vnd.google-apps.document": { + "compressible": false, + "extensions": ["gdoc"] + }, + "application/vnd.google-apps.drawing": { + "compressible": false, + "extensions": ["gdraw"] + }, + "application/vnd.google-apps.drive-sdk": { + "compressible": false + }, + "application/vnd.google-apps.file": {}, + "application/vnd.google-apps.folder": { + "compressible": false + }, + "application/vnd.google-apps.form": { + "compressible": false, + "extensions": ["gform"] + }, + "application/vnd.google-apps.fusiontable": {}, + "application/vnd.google-apps.jam": { + "compressible": false, + "extensions": ["gjam"] + }, + "application/vnd.google-apps.mail-layout": {}, + "application/vnd.google-apps.map": { + "compressible": false, + "extensions": ["gmap"] + }, + "application/vnd.google-apps.photo": {}, + "application/vnd.google-apps.presentation": { + "compressible": false, + "extensions": ["gslides"] + }, + "application/vnd.google-apps.script": { + "compressible": false, + "extensions": ["gscript"] + }, + "application/vnd.google-apps.shortcut": {}, + "application/vnd.google-apps.site": { + "compressible": false, + "extensions": ["gsite"] + }, + "application/vnd.google-apps.spreadsheet": { + "compressible": false, + "extensions": ["gsheet"] + }, + "application/vnd.google-apps.unknown": {}, + "application/vnd.google-apps.video": {}, + "application/vnd.google-earth.kml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["kml"] + }, + "application/vnd.google-earth.kmz": { + "source": "iana", + "compressible": false, + "extensions": ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.gov.sk.e-form+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdcf"] + }, + "application/vnd.gpxsee.map+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.grafeq": { + "source": "iana", + "extensions": ["gqf","gqs"] + }, + "application/vnd.gridmp": { + "source": "iana" + }, + "application/vnd.groove-account": { + "source": "iana", + "extensions": ["gac"] + }, + "application/vnd.groove-help": { + "source": "iana", + "extensions": ["ghf"] + }, + "application/vnd.groove-identity-message": { + "source": "iana", + "extensions": ["gim"] + }, + "application/vnd.groove-injector": { + "source": "iana", + "extensions": ["grv"] + }, + "application/vnd.groove-tool-message": { + "source": "iana", + "extensions": ["gtm"] + }, + "application/vnd.groove-tool-template": { + "source": "iana", + "extensions": ["tpl"] + }, + "application/vnd.groove-vcard": { + "source": "iana", + "extensions": ["vcg"] + }, + "application/vnd.hal+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hal+xml": { + "source": "iana", + "compressible": true, + "extensions": ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zmm"] + }, + "application/vnd.hbci": { + "source": "iana", + "extensions": ["hbci"] + }, + "application/vnd.hc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hcl-bireports": { + "source": "iana" + }, + "application/vnd.hdt": { + "source": "iana" + }, + "application/vnd.heroku+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hhe.lesson-player": { + "source": "iana", + "extensions": ["les"] + }, + "application/vnd.hp-hpgl": { + "source": "iana", + "extensions": ["hpgl"] + }, + "application/vnd.hp-hpid": { + "source": "iana", + "extensions": ["hpid"] + }, + "application/vnd.hp-hps": { + "source": "iana", + "extensions": ["hps"] + }, + "application/vnd.hp-jlyt": { + "source": "iana", + "extensions": ["jlt"] + }, + "application/vnd.hp-pcl": { + "source": "iana", + "extensions": ["pcl"] + }, + "application/vnd.hp-pclxl": { + "source": "iana", + "extensions": ["pclxl"] + }, + "application/vnd.hsl": { + "source": "iana" + }, + "application/vnd.httphone": { + "source": "iana" + }, + "application/vnd.hydrostatix.sof-data": { + "source": "iana", + "extensions": ["sfd-hdstx"] + }, + "application/vnd.hyper+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyper-item+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyperdrive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hzn-3d-crossword": { + "source": "iana" + }, + "application/vnd.ibm.afplinedata": { + "source": "apache" + }, + "application/vnd.ibm.electronic-media": { + "source": "iana" + }, + "application/vnd.ibm.minipay": { + "source": "iana", + "extensions": ["mpy"] + }, + "application/vnd.ibm.modcap": { + "source": "apache", + "extensions": ["afp","listafp","list3820"] + }, + "application/vnd.ibm.rights-management": { + "source": "iana", + "extensions": ["irm"] + }, + "application/vnd.ibm.secure-container": { + "source": "iana", + "extensions": ["sc"] + }, + "application/vnd.iccprofile": { + "source": "iana", + "extensions": ["icc","icm"] + }, + "application/vnd.ieee.1905": { + "source": "iana" + }, + "application/vnd.igloader": { + "source": "iana", + "extensions": ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.imagemeter.image+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.immervision-ivp": { + "source": "iana", + "extensions": ["ivp"] + }, + "application/vnd.immervision-ivu": { + "source": "iana", + "extensions": ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p2": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p3": { + "source": "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.informedcontrol.rms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.informix-visionary": { + "source": "apache" + }, + "application/vnd.infotech.project": { + "source": "iana" + }, + "application/vnd.infotech.project+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.innopath.wamp.notification": { + "source": "iana" + }, + "application/vnd.insors.igm": { + "source": "iana", + "extensions": ["igm"] + }, + "application/vnd.intercon.formnet": { + "source": "iana", + "extensions": ["xpw","xpx"] + }, + "application/vnd.intergeo": { + "source": "iana", + "extensions": ["i2g"] + }, + "application/vnd.intertrust.digibox": { + "source": "iana" + }, + "application/vnd.intertrust.nncp": { + "source": "iana" + }, + "application/vnd.intu.qbo": { + "source": "iana", + "extensions": ["qbo"] + }, + "application/vnd.intu.qfx": { + "source": "iana", + "extensions": ["qfx"] + }, + "application/vnd.ipfs.ipns-record": { + "source": "iana" + }, + "application/vnd.ipld.car": { + "source": "iana" + }, + "application/vnd.ipld.dag-cbor": { + "source": "iana" + }, + "application/vnd.ipld.dag-json": { + "source": "iana" + }, + "application/vnd.ipld.raw": { + "source": "iana" + }, + "application/vnd.iptc.g2.catalogitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.conceptitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.packageitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.planningitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ipunplugged.rcprofile": { + "source": "iana", + "extensions": ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["irp"] + }, + "application/vnd.is-xpr": { + "source": "iana", + "extensions": ["xpr"] + }, + "application/vnd.isac.fcs": { + "source": "iana", + "extensions": ["fcs"] + }, + "application/vnd.iso11783-10+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.jam": { + "source": "iana", + "extensions": ["jam"] + }, + "application/vnd.japannet-directory-service": { + "source": "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-payment-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-registration": { + "source": "iana" + }, + "application/vnd.japannet-registration-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-verification": { + "source": "iana" + }, + "application/vnd.japannet-verification-wakeup": { + "source": "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + "source": "iana", + "extensions": ["rms"] + }, + "application/vnd.jisp": { + "source": "iana", + "extensions": ["jisp"] + }, + "application/vnd.joost.joda-archive": { + "source": "iana", + "extensions": ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + "source": "iana" + }, + "application/vnd.kahootz": { + "source": "iana", + "extensions": ["ktz","ktr"] + }, + "application/vnd.kde.karbon": { + "source": "iana", + "extensions": ["karbon"] + }, + "application/vnd.kde.kchart": { + "source": "iana", + "extensions": ["chrt"] + }, + "application/vnd.kde.kformula": { + "source": "iana", + "extensions": ["kfo"] + }, + "application/vnd.kde.kivio": { + "source": "iana", + "extensions": ["flw"] + }, + "application/vnd.kde.kontour": { + "source": "iana", + "extensions": ["kon"] + }, + "application/vnd.kde.kpresenter": { + "source": "iana", + "extensions": ["kpr","kpt"] + }, + "application/vnd.kde.kspread": { + "source": "iana", + "extensions": ["ksp"] + }, + "application/vnd.kde.kword": { + "source": "iana", + "extensions": ["kwd","kwt"] + }, + "application/vnd.kdl": { + "source": "iana" + }, + "application/vnd.kenameaapp": { + "source": "iana", + "extensions": ["htke"] + }, + "application/vnd.keyman.kmp+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.keyman.kmx": { + "source": "iana" + }, + "application/vnd.kidspiration": { + "source": "iana", + "extensions": ["kia"] + }, + "application/vnd.kinar": { + "source": "iana", + "extensions": ["kne","knp"] + }, + "application/vnd.koan": { + "source": "iana", + "extensions": ["skp","skd","skt","skm"] + }, + "application/vnd.kodak-descriptor": { + "source": "iana", + "extensions": ["sse"] + }, + "application/vnd.las": { + "source": "iana" + }, + "application/vnd.las.las+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.las.las+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lasxml"] + }, + "application/vnd.laszip": { + "source": "iana" + }, + "application/vnd.ldev.productlicensing": { + "source": "iana" + }, + "application/vnd.leap+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.liberty-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.llamagraphics.life-balance.desktop": { + "source": "iana", + "extensions": ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lbe"] + }, + "application/vnd.logipipe.circuit+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.loom": { + "source": "iana" + }, + "application/vnd.lotus-1-2-3": { + "source": "iana", + "extensions": ["123"] + }, + "application/vnd.lotus-approach": { + "source": "iana", + "extensions": ["apr"] + }, + "application/vnd.lotus-freelance": { + "source": "iana", + "extensions": ["pre"] + }, + "application/vnd.lotus-notes": { + "source": "iana", + "extensions": ["nsf"] + }, + "application/vnd.lotus-organizer": { + "source": "iana", + "extensions": ["org"] + }, + "application/vnd.lotus-screencam": { + "source": "iana", + "extensions": ["scm"] + }, + "application/vnd.lotus-wordpro": { + "source": "iana", + "extensions": ["lwp"] + }, + "application/vnd.macports.portpkg": { + "source": "iana", + "extensions": ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + "source": "iana", + "extensions": ["mvt"] + }, + "application/vnd.marlin.drm.actiontoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.conftoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.license+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.mdcf": { + "source": "iana" + }, + "application/vnd.mason+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.maxar.archive.3tz+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.maxmind.maxmind-db": { + "source": "iana" + }, + "application/vnd.mcd": { + "source": "iana", + "extensions": ["mcd"] + }, + "application/vnd.mdl": { + "source": "iana" + }, + "application/vnd.mdl-mbsdf": { + "source": "iana" + }, + "application/vnd.medcalcdata": { + "source": "iana", + "extensions": ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + "source": "iana", + "extensions": ["cdkey"] + }, + "application/vnd.medicalholodeck.recordxr": { + "source": "iana" + }, + "application/vnd.meridian-slingshot": { + "source": "iana" + }, + "application/vnd.mermaid": { + "source": "iana" + }, + "application/vnd.mfer": { + "source": "iana", + "extensions": ["mwf"] + }, + "application/vnd.mfmp": { + "source": "iana", + "extensions": ["mfm"] + }, + "application/vnd.micro+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.micrografx.flo": { + "source": "iana", + "extensions": ["flo"] + }, + "application/vnd.micrografx.igx": { + "source": "iana", + "extensions": ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + "source": "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + "source": "iana" + }, + "application/vnd.miele+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.mif": { + "source": "iana", + "extensions": ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + "source": "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + "source": "iana" + }, + "application/vnd.mobius.daf": { + "source": "iana", + "extensions": ["daf"] + }, + "application/vnd.mobius.dis": { + "source": "iana", + "extensions": ["dis"] + }, + "application/vnd.mobius.mbk": { + "source": "iana", + "extensions": ["mbk"] + }, + "application/vnd.mobius.mqy": { + "source": "iana", + "extensions": ["mqy"] + }, + "application/vnd.mobius.msl": { + "source": "iana", + "extensions": ["msl"] + }, + "application/vnd.mobius.plc": { + "source": "iana", + "extensions": ["plc"] + }, + "application/vnd.mobius.txf": { + "source": "iana", + "extensions": ["txf"] + }, + "application/vnd.modl": { + "source": "iana" + }, + "application/vnd.mophun.application": { + "source": "iana", + "extensions": ["mpn"] + }, + "application/vnd.mophun.certificate": { + "source": "iana", + "extensions": ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + "source": "iana" + }, + "application/vnd.motorola.iprm": { + "source": "iana" + }, + "application/vnd.mozilla.xul+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xul"] + }, + "application/vnd.ms-3mfdocument": { + "source": "iana" + }, + "application/vnd.ms-artgalry": { + "source": "iana", + "extensions": ["cil"] + }, + "application/vnd.ms-asf": { + "source": "iana" + }, + "application/vnd.ms-cab-compressed": { + "source": "iana", + "extensions": ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + "source": "apache" + }, + "application/vnd.ms-excel": { + "source": "iana", + "compressible": false, + "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + "source": "iana", + "extensions": ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + "source": "iana", + "extensions": ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + "source": "iana", + "extensions": ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + "source": "iana", + "extensions": ["xltm"] + }, + "application/vnd.ms-fontobject": { + "source": "iana", + "compressible": true, + "extensions": ["eot"] + }, + "application/vnd.ms-htmlhelp": { + "source": "iana", + "extensions": ["chm"] + }, + "application/vnd.ms-ims": { + "source": "iana", + "extensions": ["ims"] + }, + "application/vnd.ms-lrm": { + "source": "iana", + "extensions": ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-officetheme": { + "source": "iana", + "extensions": ["thmx"] + }, + "application/vnd.ms-opentype": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-outlook": { + "compressible": false, + "extensions": ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + "source": "apache" + }, + "application/vnd.ms-pki.seccat": { + "source": "apache", + "extensions": ["cat"] + }, + "application/vnd.ms-pki.stl": { + "source": "apache", + "extensions": ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-powerpoint": { + "source": "iana", + "compressible": false, + "extensions": ["ppt","pps","pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + "source": "iana", + "extensions": ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + "source": "iana", + "extensions": ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + "source": "iana", + "extensions": ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + "source": "iana", + "extensions": ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + "source": "iana", + "extensions": ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-printing.printticket+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-printschematicket+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-project": { + "source": "iana", + "extensions": ["mpp","mpt"] + }, + "application/vnd.ms-tnef": { + "source": "iana" + }, + "application/vnd.ms-visio.viewer": { + "extensions": ["vdx"] + }, + "application/vnd.ms-windows.devicepairing": { + "source": "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + "source": "iana" + }, + "application/vnd.ms-windows.printerpairing": { + "source": "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + "source": "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + "source": "iana", + "extensions": ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + "source": "iana", + "extensions": ["dotm"] + }, + "application/vnd.ms-works": { + "source": "iana", + "extensions": ["wps","wks","wcm","wdb"] + }, + "application/vnd.ms-wpl": { + "source": "iana", + "extensions": ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + "source": "iana", + "compressible": false, + "extensions": ["xps"] + }, + "application/vnd.msa-disk-image": { + "source": "iana" + }, + "application/vnd.mseq": { + "source": "iana", + "extensions": ["mseq"] + }, + "application/vnd.msgpack": { + "source": "iana" + }, + "application/vnd.msign": { + "source": "iana" + }, + "application/vnd.multiad.creator": { + "source": "iana" + }, + "application/vnd.multiad.creator.cif": { + "source": "iana" + }, + "application/vnd.music-niff": { + "source": "iana" + }, + "application/vnd.musician": { + "source": "iana", + "extensions": ["mus"] + }, + "application/vnd.muvee.style": { + "source": "iana", + "extensions": ["msty"] + }, + "application/vnd.mynfc": { + "source": "iana", + "extensions": ["taglet"] + }, + "application/vnd.nacamar.ybrid+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nato.bindingdataobject+cbor": { + "source": "iana" + }, + "application/vnd.nato.bindingdataobject+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nato.bindingdataobject+xml": { + "source": "iana", + "compressible": true, + "extensions": ["bdo"] + }, + "application/vnd.nato.openxmlformats-package.iepd+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.ncd.control": { + "source": "iana" + }, + "application/vnd.ncd.reference": { + "source": "iana" + }, + "application/vnd.nearst.inv+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nebumind.line": { + "source": "iana" + }, + "application/vnd.nervana": { + "source": "iana" + }, + "application/vnd.netfpx": { + "source": "iana" + }, + "application/vnd.neurolanguage.nlu": { + "source": "iana", + "extensions": ["nlu"] + }, + "application/vnd.nimn": { + "source": "iana" + }, + "application/vnd.nintendo.nitro.rom": { + "source": "iana" + }, + "application/vnd.nintendo.snes.rom": { + "source": "iana" + }, + "application/vnd.nitf": { + "source": "iana", + "extensions": ["ntf","nitf"] + }, + "application/vnd.noblenet-directory": { + "source": "iana", + "extensions": ["nnd"] + }, + "application/vnd.noblenet-sealer": { + "source": "iana", + "extensions": ["nns"] + }, + "application/vnd.noblenet-web": { + "source": "iana", + "extensions": ["nnw"] + }, + "application/vnd.nokia.catalogs": { + "source": "iana" + }, + "application/vnd.nokia.conml+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.conml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.iptv.config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.isds-radio-presets": { + "source": "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.landmark+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.landmarkcollection+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.n-gage.ac+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ac"] + }, + "application/vnd.nokia.n-gage.data": { + "source": "iana", + "extensions": ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + "source": "apache", + "extensions": ["n-gage"] + }, + "application/vnd.nokia.ncd": { + "source": "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.pcd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.radio-preset": { + "source": "iana", + "extensions": ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + "source": "iana", + "extensions": ["rpss"] + }, + "application/vnd.novadigm.edm": { + "source": "iana", + "extensions": ["edm"] + }, + "application/vnd.novadigm.edx": { + "source": "iana", + "extensions": ["edx"] + }, + "application/vnd.novadigm.ext": { + "source": "iana", + "extensions": ["ext"] + }, + "application/vnd.ntt-local.content-share": { + "source": "iana" + }, + "application/vnd.ntt-local.file-transfer": { + "source": "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + "source": "iana" + }, + "application/vnd.oai.workflows": { + "source": "iana" + }, + "application/vnd.oai.workflows+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oai.workflows+yaml": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.base": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.chart": { + "source": "iana", + "extensions": ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + "source": "iana", + "extensions": ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + "source": "apache", + "extensions": ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + "source": "iana", + "extensions": ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + "source": "iana", + "extensions": ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + "source": "iana", + "compressible": false, + "extensions": ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + "source": "iana", + "extensions": ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + "source": "iana", + "extensions": ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + "source": "iana", + "extensions": ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + "source": "iana", + "extensions": ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + "source": "iana", + "compressible": false, + "extensions": ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + "source": "iana", + "extensions": ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + "source": "iana", + "compressible": false, + "extensions": ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + "source": "iana", + "extensions": ["odm"] + }, + "application/vnd.oasis.opendocument.text-master-template": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.text-template": { + "source": "iana", + "extensions": ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + "source": "iana", + "extensions": ["oth"] + }, + "application/vnd.obn": { + "source": "iana" + }, + "application/vnd.ocf+cbor": { + "source": "iana" + }, + "application/vnd.oci.image.manifest.v1+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oftn.l10n+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.cspg-hexbinary": { + "source": "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.dae.xhtml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.pae.gem": { + "source": "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.spdlist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.ueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.userprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.olpc-sugar": { + "source": "iana", + "extensions": ["xo"] + }, + "application/vnd.oma-scws-config": { + "source": "iana" + }, + "application/vnd.oma-scws-http-request": { + "source": "iana" + }, + "application/vnd.oma-scws-http-response": { + "source": "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.oma.bcast.imd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.ltkm": { + "source": "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.provisioningtrigger": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgboot": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sgdu": { + "source": "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + "source": "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.oma.bcast.sprov+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.stkm": { + "source": "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-feature-handler+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-pcc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-subs-invite+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-user-prefs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.dcd": { + "source": "iana" + }, + "application/vnd.oma.dcdc": { + "source": "iana" + }, + "application/vnd.oma.dd2+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.group-usage-list+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+cbor": { + "source": "iana" + }, + "application/vnd.oma.lwm2m+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+tlv": { + "source": "iana" + }, + "application/vnd.oma.pal+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.final-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.groups+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.push": { + "source": "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.xcap-directory+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omads-email+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-file+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-folder+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omaloc-supl-init": { + "source": "iana" + }, + "application/vnd.onepager": { + "source": "iana" + }, + "application/vnd.onepagertamp": { + "source": "iana" + }, + "application/vnd.onepagertamx": { + "source": "iana" + }, + "application/vnd.onepagertat": { + "source": "iana" + }, + "application/vnd.onepagertatp": { + "source": "iana" + }, + "application/vnd.onepagertatx": { + "source": "iana" + }, + "application/vnd.onvif.metadata": { + "source": "iana" + }, + "application/vnd.openblox.game+xml": { + "source": "iana", + "compressible": true, + "extensions": ["obgx"] + }, + "application/vnd.openblox.game-binary": { + "source": "iana" + }, + "application/vnd.openeye.oeb": { + "source": "iana" + }, + "application/vnd.openofficeorg.extension": { + "source": "apache", + "extensions": ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osm"] + }, + "application/vnd.opentimestamps.ots": { + "source": "iana" + }, + "application/vnd.openvpi.dspx+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + "source": "iana", + "extensions": ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + "source": "iana", + "extensions": ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + "source": "iana", + "extensions": ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + "source": "iana", + "compressible": false, + "extensions": ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + "source": "iana", + "extensions": ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "source": "iana", + "compressible": false, + "extensions": ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + "source": "iana", + "extensions": ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.relationships+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oracle.resource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.orange.indata": { + "source": "iana" + }, + "application/vnd.osa.netdeploy": { + "source": "iana" + }, + "application/vnd.osgeo.mapguide.package": { + "source": "iana", + "extensions": ["mgp"] + }, + "application/vnd.osgi.bundle": { + "source": "iana" + }, + "application/vnd.osgi.dp": { + "source": "iana", + "extensions": ["dp"] + }, + "application/vnd.osgi.subsystem": { + "source": "iana", + "extensions": ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oxli.countgraph": { + "source": "iana" + }, + "application/vnd.pagerduty+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.palm": { + "source": "iana", + "extensions": ["pdb","pqa","oprc"] + }, + "application/vnd.panoply": { + "source": "iana" + }, + "application/vnd.paos.xml": { + "source": "iana" + }, + "application/vnd.patentdive": { + "source": "iana" + }, + "application/vnd.patientecommsdoc": { + "source": "iana" + }, + "application/vnd.pawaafile": { + "source": "iana", + "extensions": ["paw"] + }, + "application/vnd.pcos": { + "source": "iana" + }, + "application/vnd.pg.format": { + "source": "iana", + "extensions": ["str"] + }, + "application/vnd.pg.osasli": { + "source": "iana", + "extensions": ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + "source": "iana" + }, + "application/vnd.picsel": { + "source": "iana", + "extensions": ["efif"] + }, + "application/vnd.pmi.widget": { + "source": "iana", + "extensions": ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.pocketlearn": { + "source": "iana", + "extensions": ["plf"] + }, + "application/vnd.powerbuilder6": { + "source": "iana", + "extensions": ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + "source": "iana" + }, + "application/vnd.powerbuilder7": { + "source": "iana" + }, + "application/vnd.powerbuilder7-s": { + "source": "iana" + }, + "application/vnd.powerbuilder75": { + "source": "iana" + }, + "application/vnd.powerbuilder75-s": { + "source": "iana" + }, + "application/vnd.preminet": { + "source": "iana" + }, + "application/vnd.previewsystems.box": { + "source": "iana", + "extensions": ["box"] + }, + "application/vnd.procrate.brushset": { + "extensions": ["brushset"] + }, + "application/vnd.procreate.brush": { + "extensions": ["brush"] + }, + "application/vnd.procreate.dream": { + "extensions": ["drm"] + }, + "application/vnd.proteus.magazine": { + "source": "iana", + "extensions": ["mgz"] + }, + "application/vnd.psfs": { + "source": "iana" + }, + "application/vnd.pt.mundusmundi": { + "source": "iana" + }, + "application/vnd.publishare-delta-tree": { + "source": "iana", + "extensions": ["qps"] + }, + "application/vnd.pvi.ptid1": { + "source": "iana", + "extensions": ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + "source": "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtm"] + }, + "application/vnd.qualcomm.brew-app-res": { + "source": "iana" + }, + "application/vnd.quarantainenet": { + "source": "iana" + }, + "application/vnd.quark.quarkxpress": { + "source": "iana", + "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] + }, + "application/vnd.quobject-quoxdocument": { + "source": "iana" + }, + "application/vnd.radisys.moml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-stream+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-base+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-group+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.rainstor.data": { + "source": "iana" + }, + "application/vnd.rapid": { + "source": "iana" + }, + "application/vnd.rar": { + "source": "iana", + "extensions": ["rar"] + }, + "application/vnd.realvnc.bed": { + "source": "iana", + "extensions": ["bed"] + }, + "application/vnd.recordare.musicxml": { + "source": "iana", + "extensions": ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musicxml"] + }, + "application/vnd.relpipe": { + "source": "iana" + }, + "application/vnd.renlearn.rlprint": { + "source": "iana" + }, + "application/vnd.resilient.logic": { + "source": "iana" + }, + "application/vnd.restful+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.rig.cryptonote": { + "source": "iana", + "extensions": ["cryptonote"] + }, + "application/vnd.rim.cod": { + "source": "apache", + "extensions": ["cod"] + }, + "application/vnd.rn-realmedia": { + "source": "apache", + "extensions": ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + "source": "apache", + "extensions": ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + "source": "iana", + "compressible": true, + "extensions": ["link66"] + }, + "application/vnd.rs-274x": { + "source": "iana" + }, + "application/vnd.ruckus.download": { + "source": "iana" + }, + "application/vnd.s3sms": { + "source": "iana" + }, + "application/vnd.sailingtracker.track": { + "source": "iana", + "extensions": ["st"] + }, + "application/vnd.sar": { + "source": "iana" + }, + "application/vnd.sbm.cid": { + "source": "iana" + }, + "application/vnd.sbm.mid2": { + "source": "iana" + }, + "application/vnd.scribus": { + "source": "iana" + }, + "application/vnd.sealed.3df": { + "source": "iana" + }, + "application/vnd.sealed.csf": { + "source": "iana" + }, + "application/vnd.sealed.doc": { + "source": "iana" + }, + "application/vnd.sealed.eml": { + "source": "iana" + }, + "application/vnd.sealed.mht": { + "source": "iana" + }, + "application/vnd.sealed.net": { + "source": "iana" + }, + "application/vnd.sealed.ppt": { + "source": "iana" + }, + "application/vnd.sealed.tiff": { + "source": "iana" + }, + "application/vnd.sealed.xls": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + "source": "iana" + }, + "application/vnd.seemail": { + "source": "iana", + "extensions": ["see"] + }, + "application/vnd.seis+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.sema": { + "source": "iana", + "extensions": ["sema"] + }, + "application/vnd.semd": { + "source": "iana", + "extensions": ["semd"] + }, + "application/vnd.semf": { + "source": "iana", + "extensions": ["semf"] + }, + "application/vnd.shade-save-file": { + "source": "iana" + }, + "application/vnd.shana.informed.formdata": { + "source": "iana", + "extensions": ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + "source": "iana", + "extensions": ["itp"] + }, + "application/vnd.shana.informed.interchange": { + "source": "iana", + "extensions": ["iif"] + }, + "application/vnd.shana.informed.package": { + "source": "iana", + "extensions": ["ipk"] + }, + "application/vnd.shootproof+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shopkick+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shp": { + "source": "iana" + }, + "application/vnd.shx": { + "source": "iana" + }, + "application/vnd.sigrok.session": { + "source": "iana" + }, + "application/vnd.simtech-mindmapper": { + "source": "iana", + "extensions": ["twd","twds"] + }, + "application/vnd.siren+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.sketchometry": { + "source": "iana" + }, + "application/vnd.smaf": { + "source": "iana", + "extensions": ["mmf"] + }, + "application/vnd.smart.notebook": { + "source": "iana" + }, + "application/vnd.smart.teacher": { + "source": "iana", + "extensions": ["teacher"] + }, + "application/vnd.smintio.portals.archive": { + "source": "iana" + }, + "application/vnd.snesdev-page-table": { + "source": "iana" + }, + "application/vnd.software602.filler.form+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fo"] + }, + "application/vnd.software602.filler.form-xml-zip": { + "source": "iana" + }, + "application/vnd.solent.sdkm+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sdkm","sdkd"] + }, + "application/vnd.spotfire.dxp": { + "source": "iana", + "extensions": ["dxp"] + }, + "application/vnd.spotfire.sfs": { + "source": "iana", + "extensions": ["sfs"] + }, + "application/vnd.sqlite3": { + "source": "iana" + }, + "application/vnd.sss-cod": { + "source": "iana" + }, + "application/vnd.sss-dtf": { + "source": "iana" + }, + "application/vnd.sss-ntf": { + "source": "iana" + }, + "application/vnd.stardivision.calc": { + "source": "apache", + "extensions": ["sdc"] + }, + "application/vnd.stardivision.draw": { + "source": "apache", + "extensions": ["sda"] + }, + "application/vnd.stardivision.impress": { + "source": "apache", + "extensions": ["sdd"] + }, + "application/vnd.stardivision.math": { + "source": "apache", + "extensions": ["smf"] + }, + "application/vnd.stardivision.writer": { + "source": "apache", + "extensions": ["sdw","vor"] + }, + "application/vnd.stardivision.writer-global": { + "source": "apache", + "extensions": ["sgl"] + }, + "application/vnd.stepmania.package": { + "source": "iana", + "extensions": ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + "source": "iana", + "extensions": ["sm"] + }, + "application/vnd.street-stream": { + "source": "iana" + }, + "application/vnd.sun.wadl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wadl"] + }, + "application/vnd.sun.xml.calc": { + "source": "apache", + "extensions": ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + "source": "apache", + "extensions": ["stc"] + }, + "application/vnd.sun.xml.draw": { + "source": "apache", + "extensions": ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + "source": "apache", + "extensions": ["std"] + }, + "application/vnd.sun.xml.impress": { + "source": "apache", + "extensions": ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + "source": "apache", + "extensions": ["sti"] + }, + "application/vnd.sun.xml.math": { + "source": "apache", + "extensions": ["sxm"] + }, + "application/vnd.sun.xml.writer": { + "source": "apache", + "extensions": ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + "source": "apache", + "extensions": ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + "source": "apache", + "extensions": ["stw"] + }, + "application/vnd.sus-calendar": { + "source": "iana", + "extensions": ["sus","susp"] + }, + "application/vnd.svd": { + "source": "iana", + "extensions": ["svd"] + }, + "application/vnd.swiftview-ics": { + "source": "iana" + }, + "application/vnd.sybyl.mol2": { + "source": "iana" + }, + "application/vnd.sycle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.syft+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.symbian.install": { + "source": "apache", + "extensions": ["sis","sisx"] + }, + "application/vnd.syncml+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["ddf"] + }, + "application/vnd.syncml.dmtnds+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.syncml.ds.notification": { + "source": "iana" + }, + "application/vnd.tableschema+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tao.intent-module-archive": { + "source": "iana", + "extensions": ["tao"] + }, + "application/vnd.tcpdump.pcap": { + "source": "iana", + "extensions": ["pcap","cap","dmp"] + }, + "application/vnd.think-cell.ppttc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tmd.mediaflex.api+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.tml": { + "source": "iana" + }, + "application/vnd.tmobile-livetv": { + "source": "iana", + "extensions": ["tmo"] + }, + "application/vnd.tri.onesource": { + "source": "iana" + }, + "application/vnd.trid.tpt": { + "source": "iana", + "extensions": ["tpt"] + }, + "application/vnd.triscape.mxs": { + "source": "iana", + "extensions": ["mxs"] + }, + "application/vnd.trueapp": { + "source": "iana", + "extensions": ["tra"] + }, + "application/vnd.truedoc": { + "source": "iana" + }, + "application/vnd.ubisoft.webplayer": { + "source": "iana" + }, + "application/vnd.ufdl": { + "source": "iana", + "extensions": ["ufd","ufdl"] + }, + "application/vnd.uic.osdm+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.uiq.theme": { + "source": "iana", + "extensions": ["utz"] + }, + "application/vnd.umajin": { + "source": "iana", + "extensions": ["umj"] + }, + "application/vnd.unity": { + "source": "iana", + "extensions": ["unityweb"] + }, + "application/vnd.uoml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uoml","uo"] + }, + "application/vnd.uplanet.alert": { + "source": "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.channel": { + "source": "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.list": { + "source": "iana" + }, + "application/vnd.uplanet.list-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.signal": { + "source": "iana" + }, + "application/vnd.uri-map": { + "source": "iana" + }, + "application/vnd.valve.source.material": { + "source": "iana" + }, + "application/vnd.vcx": { + "source": "iana", + "extensions": ["vcx"] + }, + "application/vnd.vd-study": { + "source": "iana" + }, + "application/vnd.vectorworks": { + "source": "iana" + }, + "application/vnd.vel+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.veraison.tsm-report+cbor": { + "source": "iana" + }, + "application/vnd.veraison.tsm-report+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.verimatrix.vcas": { + "source": "iana" + }, + "application/vnd.veritone.aion+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.veryant.thin": { + "source": "iana" + }, + "application/vnd.ves.encrypted": { + "source": "iana" + }, + "application/vnd.vidsoft.vidconference": { + "source": "iana" + }, + "application/vnd.visio": { + "source": "iana", + "extensions": ["vsd","vst","vss","vsw","vsdx","vtx"] + }, + "application/vnd.visionary": { + "source": "iana", + "extensions": ["vis"] + }, + "application/vnd.vividence.scriptfile": { + "source": "iana" + }, + "application/vnd.vocalshaper.vsp4": { + "source": "iana" + }, + "application/vnd.vsf": { + "source": "iana", + "extensions": ["vsf"] + }, + "application/vnd.wap.sic": { + "source": "iana" + }, + "application/vnd.wap.slc": { + "source": "iana" + }, + "application/vnd.wap.wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["wbxml"] + }, + "application/vnd.wap.wmlc": { + "source": "iana", + "extensions": ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + "source": "iana", + "extensions": ["wmlsc"] + }, + "application/vnd.wasmflow.wafl": { + "source": "iana" + }, + "application/vnd.webturbo": { + "source": "iana", + "extensions": ["wtb"] + }, + "application/vnd.wfa.dpp": { + "source": "iana" + }, + "application/vnd.wfa.p2p": { + "source": "iana" + }, + "application/vnd.wfa.wsc": { + "source": "iana" + }, + "application/vnd.windows.devicepairing": { + "source": "iana" + }, + "application/vnd.wmc": { + "source": "iana" + }, + "application/vnd.wmf.bootstrap": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica.package": { + "source": "iana" + }, + "application/vnd.wolfram.player": { + "source": "iana", + "extensions": ["nbp"] + }, + "application/vnd.wordlift": { + "source": "iana" + }, + "application/vnd.wordperfect": { + "source": "iana", + "extensions": ["wpd"] + }, + "application/vnd.wqd": { + "source": "iana", + "extensions": ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + "source": "iana" + }, + "application/vnd.wt.stf": { + "source": "iana", + "extensions": ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + "source": "iana" + }, + "application/vnd.wv.csp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.wv.ssp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xacml+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.xara": { + "source": "iana", + "extensions": ["xar"] + }, + "application/vnd.xarin.cpj": { + "source": "iana" + }, + "application/vnd.xecrets-encrypted": { + "source": "iana" + }, + "application/vnd.xfdl": { + "source": "iana", + "extensions": ["xfdl"] + }, + "application/vnd.xfdl.webform": { + "source": "iana" + }, + "application/vnd.xmi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xmpie.cpkg": { + "source": "iana" + }, + "application/vnd.xmpie.dpkg": { + "source": "iana" + }, + "application/vnd.xmpie.plan": { + "source": "iana" + }, + "application/vnd.xmpie.ppkg": { + "source": "iana" + }, + "application/vnd.xmpie.xlim": { + "source": "iana" + }, + "application/vnd.yamaha.hv-dic": { + "source": "iana", + "extensions": ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + "source": "iana", + "extensions": ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + "source": "iana", + "extensions": ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + "source": "iana", + "extensions": ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + "source": "iana" + }, + "application/vnd.yamaha.smaf-audio": { + "source": "iana", + "extensions": ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + "source": "iana", + "extensions": ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + "source": "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + "source": "iana" + }, + "application/vnd.yaoweme": { + "source": "iana" + }, + "application/vnd.yellowriver-custom-menu": { + "source": "iana", + "extensions": ["cmp"] + }, + "application/vnd.zul": { + "source": "iana", + "extensions": ["zir","zirz"] + }, + "application/vnd.zzazz.deck+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zaz"] + }, + "application/voicexml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["vxml"] + }, + "application/voucher-cms+json": { + "source": "iana", + "compressible": true + }, + "application/voucher-jws+json": { + "source": "iana", + "compressible": true + }, + "application/vp": { + "source": "iana" + }, + "application/vp+cose": { + "source": "iana" + }, + "application/vp+jwt": { + "source": "iana" + }, + "application/vq-rtcpxr": { + "source": "iana" + }, + "application/wasm": { + "source": "iana", + "compressible": true, + "extensions": ["wasm"] + }, + "application/watcherinfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wif"] + }, + "application/webpush-options+json": { + "source": "iana", + "compressible": true + }, + "application/whoispp-query": { + "source": "iana" + }, + "application/whoispp-response": { + "source": "iana" + }, + "application/widget": { + "source": "iana", + "extensions": ["wgt"] + }, + "application/winhlp": { + "source": "apache", + "extensions": ["hlp"] + }, + "application/wita": { + "source": "iana" + }, + "application/wordperfect5.1": { + "source": "iana" + }, + "application/wsdl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wsdl"] + }, + "application/wspolicy+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wspolicy"] + }, + "application/x-7z-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["7z"] + }, + "application/x-abiword": { + "source": "apache", + "extensions": ["abw"] + }, + "application/x-ace-compressed": { + "source": "apache", + "extensions": ["ace"] + }, + "application/x-amf": { + "source": "apache" + }, + "application/x-apple-diskimage": { + "source": "apache", + "extensions": ["dmg"] + }, + "application/x-arj": { + "compressible": false, + "extensions": ["arj"] + }, + "application/x-authorware-bin": { + "source": "apache", + "extensions": ["aab","x32","u32","vox"] + }, + "application/x-authorware-map": { + "source": "apache", + "extensions": ["aam"] + }, + "application/x-authorware-seg": { + "source": "apache", + "extensions": ["aas"] + }, + "application/x-bcpio": { + "source": "apache", + "extensions": ["bcpio"] + }, + "application/x-bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/x-bittorrent": { + "source": "apache", + "extensions": ["torrent"] + }, + "application/x-blender": { + "extensions": ["blend"] + }, + "application/x-blorb": { + "source": "apache", + "extensions": ["blb","blorb"] + }, + "application/x-bzip": { + "source": "apache", + "compressible": false, + "extensions": ["bz"] + }, + "application/x-bzip2": { + "source": "apache", + "compressible": false, + "extensions": ["bz2","boz"] + }, + "application/x-cbr": { + "source": "apache", + "extensions": ["cbr","cba","cbt","cbz","cb7"] + }, + "application/x-cdlink": { + "source": "apache", + "extensions": ["vcd"] + }, + "application/x-cfs-compressed": { + "source": "apache", + "extensions": ["cfs"] + }, + "application/x-chat": { + "source": "apache", + "extensions": ["chat"] + }, + "application/x-chess-pgn": { + "source": "apache", + "extensions": ["pgn"] + }, + "application/x-chrome-extension": { + "extensions": ["crx"] + }, + "application/x-cocoa": { + "source": "nginx", + "extensions": ["cco"] + }, + "application/x-compress": { + "source": "apache" + }, + "application/x-compressed": { + "extensions": ["rar"] + }, + "application/x-conference": { + "source": "apache", + "extensions": ["nsc"] + }, + "application/x-cpio": { + "source": "apache", + "extensions": ["cpio"] + }, + "application/x-csh": { + "source": "apache", + "extensions": ["csh"] + }, + "application/x-deb": { + "compressible": false + }, + "application/x-debian-package": { + "source": "apache", + "extensions": ["deb","udeb"] + }, + "application/x-dgc-compressed": { + "source": "apache", + "extensions": ["dgc"] + }, + "application/x-director": { + "source": "apache", + "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] + }, + "application/x-doom": { + "source": "apache", + "extensions": ["wad"] + }, + "application/x-dtbncx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ncx"] + }, + "application/x-dtbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dtb"] + }, + "application/x-dtbresource+xml": { + "source": "apache", + "compressible": true, + "extensions": ["res"] + }, + "application/x-dvi": { + "source": "apache", + "compressible": false, + "extensions": ["dvi"] + }, + "application/x-envoy": { + "source": "apache", + "extensions": ["evy"] + }, + "application/x-eva": { + "source": "apache", + "extensions": ["eva"] + }, + "application/x-font-bdf": { + "source": "apache", + "extensions": ["bdf"] + }, + "application/x-font-dos": { + "source": "apache" + }, + "application/x-font-framemaker": { + "source": "apache" + }, + "application/x-font-ghostscript": { + "source": "apache", + "extensions": ["gsf"] + }, + "application/x-font-libgrx": { + "source": "apache" + }, + "application/x-font-linux-psf": { + "source": "apache", + "extensions": ["psf"] + }, + "application/x-font-pcf": { + "source": "apache", + "extensions": ["pcf"] + }, + "application/x-font-snf": { + "source": "apache", + "extensions": ["snf"] + }, + "application/x-font-speedo": { + "source": "apache" + }, + "application/x-font-sunos-news": { + "source": "apache" + }, + "application/x-font-type1": { + "source": "apache", + "extensions": ["pfa","pfb","pfm","afm"] + }, + "application/x-font-vfont": { + "source": "apache" + }, + "application/x-freearc": { + "source": "apache", + "extensions": ["arc"] + }, + "application/x-futuresplash": { + "source": "apache", + "extensions": ["spl"] + }, + "application/x-gca-compressed": { + "source": "apache", + "extensions": ["gca"] + }, + "application/x-glulx": { + "source": "apache", + "extensions": ["ulx"] + }, + "application/x-gnumeric": { + "source": "apache", + "extensions": ["gnumeric"] + }, + "application/x-gramps-xml": { + "source": "apache", + "extensions": ["gramps"] + }, + "application/x-gtar": { + "source": "apache", + "extensions": ["gtar"] + }, + "application/x-gzip": { + "source": "apache" + }, + "application/x-hdf": { + "source": "apache", + "extensions": ["hdf"] + }, + "application/x-httpd-php": { + "compressible": true, + "extensions": ["php"] + }, + "application/x-install-instructions": { + "source": "apache", + "extensions": ["install"] + }, + "application/x-ipynb+json": { + "compressible": true, + "extensions": ["ipynb"] + }, + "application/x-iso9660-image": { + "source": "apache", + "extensions": ["iso"] + }, + "application/x-iwork-keynote-sffkey": { + "extensions": ["key"] + }, + "application/x-iwork-numbers-sffnumbers": { + "extensions": ["numbers"] + }, + "application/x-iwork-pages-sffpages": { + "extensions": ["pages"] + }, + "application/x-java-archive-diff": { + "source": "nginx", + "extensions": ["jardiff"] + }, + "application/x-java-jnlp-file": { + "source": "apache", + "compressible": false, + "extensions": ["jnlp"] + }, + "application/x-javascript": { + "compressible": true + }, + "application/x-keepass2": { + "extensions": ["kdbx"] + }, + "application/x-latex": { + "source": "apache", + "compressible": false, + "extensions": ["latex"] + }, + "application/x-lua-bytecode": { + "extensions": ["luac"] + }, + "application/x-lzh-compressed": { + "source": "apache", + "extensions": ["lzh","lha"] + }, + "application/x-makeself": { + "source": "nginx", + "extensions": ["run"] + }, + "application/x-mie": { + "source": "apache", + "extensions": ["mie"] + }, + "application/x-mobipocket-ebook": { + "source": "apache", + "extensions": ["prc","mobi"] + }, + "application/x-mpegurl": { + "compressible": false + }, + "application/x-ms-application": { + "source": "apache", + "extensions": ["application"] + }, + "application/x-ms-shortcut": { + "source": "apache", + "extensions": ["lnk"] + }, + "application/x-ms-wmd": { + "source": "apache", + "extensions": ["wmd"] + }, + "application/x-ms-wmz": { + "source": "apache", + "extensions": ["wmz"] + }, + "application/x-ms-xbap": { + "source": "apache", + "extensions": ["xbap"] + }, + "application/x-msaccess": { + "source": "apache", + "extensions": ["mdb"] + }, + "application/x-msbinder": { + "source": "apache", + "extensions": ["obd"] + }, + "application/x-mscardfile": { + "source": "apache", + "extensions": ["crd"] + }, + "application/x-msclip": { + "source": "apache", + "extensions": ["clp"] + }, + "application/x-msdos-program": { + "extensions": ["exe"] + }, + "application/x-msdownload": { + "source": "apache", + "extensions": ["exe","dll","com","bat","msi"] + }, + "application/x-msmediaview": { + "source": "apache", + "extensions": ["mvb","m13","m14"] + }, + "application/x-msmetafile": { + "source": "apache", + "extensions": ["wmf","wmz","emf","emz"] + }, + "application/x-msmoney": { + "source": "apache", + "extensions": ["mny"] + }, + "application/x-mspublisher": { + "source": "apache", + "extensions": ["pub"] + }, + "application/x-msschedule": { + "source": "apache", + "extensions": ["scd"] + }, + "application/x-msterminal": { + "source": "apache", + "extensions": ["trm"] + }, + "application/x-mswrite": { + "source": "apache", + "extensions": ["wri"] + }, + "application/x-netcdf": { + "source": "apache", + "extensions": ["nc","cdf"] + }, + "application/x-ns-proxy-autoconfig": { + "compressible": true, + "extensions": ["pac"] + }, + "application/x-nzb": { + "source": "apache", + "extensions": ["nzb"] + }, + "application/x-perl": { + "source": "nginx", + "extensions": ["pl","pm"] + }, + "application/x-pilot": { + "source": "nginx", + "extensions": ["prc","pdb"] + }, + "application/x-pkcs12": { + "source": "apache", + "compressible": false, + "extensions": ["p12","pfx"] + }, + "application/x-pkcs7-certificates": { + "source": "apache", + "extensions": ["p7b","spc"] + }, + "application/x-pkcs7-certreqresp": { + "source": "apache", + "extensions": ["p7r"] + }, + "application/x-pki-message": { + "source": "iana" + }, + "application/x-rar-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["rar"] + }, + "application/x-redhat-package-manager": { + "source": "nginx", + "extensions": ["rpm"] + }, + "application/x-research-info-systems": { + "source": "apache", + "extensions": ["ris"] + }, + "application/x-sea": { + "source": "nginx", + "extensions": ["sea"] + }, + "application/x-sh": { + "source": "apache", + "compressible": true, + "extensions": ["sh"] + }, + "application/x-shar": { + "source": "apache", + "extensions": ["shar"] + }, + "application/x-shockwave-flash": { + "source": "apache", + "compressible": false, + "extensions": ["swf"] + }, + "application/x-silverlight-app": { + "source": "apache", + "extensions": ["xap"] + }, + "application/x-sql": { + "source": "apache", + "extensions": ["sql"] + }, + "application/x-stuffit": { + "source": "apache", + "compressible": false, + "extensions": ["sit"] + }, + "application/x-stuffitx": { + "source": "apache", + "extensions": ["sitx"] + }, + "application/x-subrip": { + "source": "apache", + "extensions": ["srt"] + }, + "application/x-sv4cpio": { + "source": "apache", + "extensions": ["sv4cpio"] + }, + "application/x-sv4crc": { + "source": "apache", + "extensions": ["sv4crc"] + }, + "application/x-t3vm-image": { + "source": "apache", + "extensions": ["t3"] + }, + "application/x-tads": { + "source": "apache", + "extensions": ["gam"] + }, + "application/x-tar": { + "source": "apache", + "compressible": true, + "extensions": ["tar"] + }, + "application/x-tcl": { + "source": "apache", + "extensions": ["tcl","tk"] + }, + "application/x-tex": { + "source": "apache", + "extensions": ["tex"] + }, + "application/x-tex-tfm": { + "source": "apache", + "extensions": ["tfm"] + }, + "application/x-texinfo": { + "source": "apache", + "extensions": ["texinfo","texi"] + }, + "application/x-tgif": { + "source": "apache", + "extensions": ["obj"] + }, + "application/x-ustar": { + "source": "apache", + "extensions": ["ustar"] + }, + "application/x-virtualbox-hdd": { + "compressible": true, + "extensions": ["hdd"] + }, + "application/x-virtualbox-ova": { + "compressible": true, + "extensions": ["ova"] + }, + "application/x-virtualbox-ovf": { + "compressible": true, + "extensions": ["ovf"] + }, + "application/x-virtualbox-vbox": { + "compressible": true, + "extensions": ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + "compressible": false, + "extensions": ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + "compressible": true, + "extensions": ["vdi"] + }, + "application/x-virtualbox-vhd": { + "compressible": true, + "extensions": ["vhd"] + }, + "application/x-virtualbox-vmdk": { + "compressible": true, + "extensions": ["vmdk"] + }, + "application/x-wais-source": { + "source": "apache", + "extensions": ["src"] + }, + "application/x-web-app-manifest+json": { + "compressible": true, + "extensions": ["webapp"] + }, + "application/x-www-form-urlencoded": { + "source": "iana", + "compressible": true + }, + "application/x-x509-ca-cert": { + "source": "iana", + "extensions": ["der","crt","pem"] + }, + "application/x-x509-ca-ra-cert": { + "source": "iana" + }, + "application/x-x509-next-ca-cert": { + "source": "iana" + }, + "application/x-xfig": { + "source": "apache", + "extensions": ["fig"] + }, + "application/x-xliff+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xlf"] + }, + "application/x-xpinstall": { + "source": "apache", + "compressible": false, + "extensions": ["xpi"] + }, + "application/x-xz": { + "source": "apache", + "extensions": ["xz"] + }, + "application/x-zip-compressed": { + "extensions": ["zip"] + }, + "application/x-zmachine": { + "source": "apache", + "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] + }, + "application/x400-bp": { + "source": "iana" + }, + "application/xacml+xml": { + "source": "iana", + "compressible": true + }, + "application/xaml+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xaml"] + }, + "application/xcap-att+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xav"] + }, + "application/xcap-caps+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xca"] + }, + "application/xcap-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdf"] + }, + "application/xcap-el+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xel"] + }, + "application/xcap-error+xml": { + "source": "iana", + "compressible": true + }, + "application/xcap-ns+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xns"] + }, + "application/xcon-conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/xcon-conference-info-diff+xml": { + "source": "iana", + "compressible": true + }, + "application/xenc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xenc"] + }, + "application/xfdf": { + "source": "iana", + "extensions": ["xfdf"] + }, + "application/xhtml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtml","xht"] + }, + "application/xhtml-voice+xml": { + "source": "apache", + "compressible": true + }, + "application/xliff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xlf"] + }, + "application/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml","xsl","xsd","rng"] + }, + "application/xml-dtd": { + "source": "iana", + "compressible": true, + "extensions": ["dtd"] + }, + "application/xml-external-parsed-entity": { + "source": "iana" + }, + "application/xml-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/xmpp+xml": { + "source": "iana", + "compressible": true + }, + "application/xop+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xop"] + }, + "application/xproc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xpl"] + }, + "application/xslt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xsl","xslt"] + }, + "application/xspf+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xspf"] + }, + "application/xv+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mxml","xhvml","xvml","xvm"] + }, + "application/yaml": { + "source": "iana" + }, + "application/yang": { + "source": "iana", + "extensions": ["yang"] + }, + "application/yang-data+cbor": { + "source": "iana" + }, + "application/yang-data+json": { + "source": "iana", + "compressible": true + }, + "application/yang-data+xml": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+json": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/yang-sid+json": { + "source": "iana", + "compressible": true + }, + "application/yin+xml": { + "source": "iana", + "compressible": true, + "extensions": ["yin"] + }, + "application/zip": { + "source": "iana", + "compressible": false, + "extensions": ["zip"] + }, + "application/zip+dotlottie": { + "extensions": ["lottie"] + }, + "application/zlib": { + "source": "iana" + }, + "application/zstd": { + "source": "iana" + }, + "audio/1d-interleaved-parityfec": { + "source": "iana" + }, + "audio/32kadpcm": { + "source": "iana" + }, + "audio/3gpp": { + "source": "iana", + "compressible": false, + "extensions": ["3gpp"] + }, + "audio/3gpp2": { + "source": "iana" + }, + "audio/aac": { + "source": "iana", + "extensions": ["adts","aac"] + }, + "audio/ac3": { + "source": "iana" + }, + "audio/adpcm": { + "source": "apache", + "extensions": ["adp"] + }, + "audio/amr": { + "source": "iana", + "extensions": ["amr"] + }, + "audio/amr-wb": { + "source": "iana" + }, + "audio/amr-wb+": { + "source": "iana" + }, + "audio/aptx": { + "source": "iana" + }, + "audio/asc": { + "source": "iana" + }, + "audio/atrac-advanced-lossless": { + "source": "iana" + }, + "audio/atrac-x": { + "source": "iana" + }, + "audio/atrac3": { + "source": "iana" + }, + "audio/basic": { + "source": "iana", + "compressible": false, + "extensions": ["au","snd"] + }, + "audio/bv16": { + "source": "iana" + }, + "audio/bv32": { + "source": "iana" + }, + "audio/clearmode": { + "source": "iana" + }, + "audio/cn": { + "source": "iana" + }, + "audio/dat12": { + "source": "iana" + }, + "audio/dls": { + "source": "iana" + }, + "audio/dsr-es201108": { + "source": "iana" + }, + "audio/dsr-es202050": { + "source": "iana" + }, + "audio/dsr-es202211": { + "source": "iana" + }, + "audio/dsr-es202212": { + "source": "iana" + }, + "audio/dv": { + "source": "iana" + }, + "audio/dvi4": { + "source": "iana" + }, + "audio/eac3": { + "source": "iana" + }, + "audio/encaprtp": { + "source": "iana" + }, + "audio/evrc": { + "source": "iana" + }, + "audio/evrc-qcp": { + "source": "iana" + }, + "audio/evrc0": { + "source": "iana" + }, + "audio/evrc1": { + "source": "iana" + }, + "audio/evrcb": { + "source": "iana" + }, + "audio/evrcb0": { + "source": "iana" + }, + "audio/evrcb1": { + "source": "iana" + }, + "audio/evrcnw": { + "source": "iana" + }, + "audio/evrcnw0": { + "source": "iana" + }, + "audio/evrcnw1": { + "source": "iana" + }, + "audio/evrcwb": { + "source": "iana" + }, + "audio/evrcwb0": { + "source": "iana" + }, + "audio/evrcwb1": { + "source": "iana" + }, + "audio/evs": { + "source": "iana" + }, + "audio/flac": { + "source": "iana" + }, + "audio/flexfec": { + "source": "iana" + }, + "audio/fwdred": { + "source": "iana" + }, + "audio/g711-0": { + "source": "iana" + }, + "audio/g719": { + "source": "iana" + }, + "audio/g722": { + "source": "iana" + }, + "audio/g7221": { + "source": "iana" + }, + "audio/g723": { + "source": "iana" + }, + "audio/g726-16": { + "source": "iana" + }, + "audio/g726-24": { + "source": "iana" + }, + "audio/g726-32": { + "source": "iana" + }, + "audio/g726-40": { + "source": "iana" + }, + "audio/g728": { + "source": "iana" + }, + "audio/g729": { + "source": "iana" + }, + "audio/g7291": { + "source": "iana" + }, + "audio/g729d": { + "source": "iana" + }, + "audio/g729e": { + "source": "iana" + }, + "audio/gsm": { + "source": "iana" + }, + "audio/gsm-efr": { + "source": "iana" + }, + "audio/gsm-hr-08": { + "source": "iana" + }, + "audio/ilbc": { + "source": "iana" + }, + "audio/ip-mr_v2.5": { + "source": "iana" + }, + "audio/isac": { + "source": "apache" + }, + "audio/l16": { + "source": "iana" + }, + "audio/l20": { + "source": "iana" + }, + "audio/l24": { + "source": "iana", + "compressible": false + }, + "audio/l8": { + "source": "iana" + }, + "audio/lpc": { + "source": "iana" + }, + "audio/matroska": { + "source": "iana" + }, + "audio/melp": { + "source": "iana" + }, + "audio/melp1200": { + "source": "iana" + }, + "audio/melp2400": { + "source": "iana" + }, + "audio/melp600": { + "source": "iana" + }, + "audio/mhas": { + "source": "iana" + }, + "audio/midi": { + "source": "apache", + "extensions": ["mid","midi","kar","rmi"] + }, + "audio/midi-clip": { + "source": "iana" + }, + "audio/mobile-xmf": { + "source": "iana", + "extensions": ["mxmf"] + }, + "audio/mp3": { + "compressible": false, + "extensions": ["mp3"] + }, + "audio/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["m4a","mp4a","m4b"] + }, + "audio/mp4a-latm": { + "source": "iana" + }, + "audio/mpa": { + "source": "iana" + }, + "audio/mpa-robust": { + "source": "iana" + }, + "audio/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] + }, + "audio/mpeg4-generic": { + "source": "iana" + }, + "audio/musepack": { + "source": "apache" + }, + "audio/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["oga","ogg","spx","opus"] + }, + "audio/opus": { + "source": "iana" + }, + "audio/parityfec": { + "source": "iana" + }, + "audio/pcma": { + "source": "iana" + }, + "audio/pcma-wb": { + "source": "iana" + }, + "audio/pcmu": { + "source": "iana" + }, + "audio/pcmu-wb": { + "source": "iana" + }, + "audio/prs.sid": { + "source": "iana" + }, + "audio/qcelp": { + "source": "iana" + }, + "audio/raptorfec": { + "source": "iana" + }, + "audio/red": { + "source": "iana" + }, + "audio/rtp-enc-aescm128": { + "source": "iana" + }, + "audio/rtp-midi": { + "source": "iana" + }, + "audio/rtploopback": { + "source": "iana" + }, + "audio/rtx": { + "source": "iana" + }, + "audio/s3m": { + "source": "apache", + "extensions": ["s3m"] + }, + "audio/scip": { + "source": "iana" + }, + "audio/silk": { + "source": "apache", + "extensions": ["sil"] + }, + "audio/smv": { + "source": "iana" + }, + "audio/smv-qcp": { + "source": "iana" + }, + "audio/smv0": { + "source": "iana" + }, + "audio/sofa": { + "source": "iana" + }, + "audio/sp-midi": { + "source": "iana" + }, + "audio/speex": { + "source": "iana" + }, + "audio/t140c": { + "source": "iana" + }, + "audio/t38": { + "source": "iana" + }, + "audio/telephone-event": { + "source": "iana" + }, + "audio/tetra_acelp": { + "source": "iana" + }, + "audio/tetra_acelp_bb": { + "source": "iana" + }, + "audio/tone": { + "source": "iana" + }, + "audio/tsvcis": { + "source": "iana" + }, + "audio/uemclip": { + "source": "iana" + }, + "audio/ulpfec": { + "source": "iana" + }, + "audio/usac": { + "source": "iana" + }, + "audio/vdvi": { + "source": "iana" + }, + "audio/vmr-wb": { + "source": "iana" + }, + "audio/vnd.3gpp.iufp": { + "source": "iana" + }, + "audio/vnd.4sb": { + "source": "iana" + }, + "audio/vnd.audiokoz": { + "source": "iana" + }, + "audio/vnd.celp": { + "source": "iana" + }, + "audio/vnd.cisco.nse": { + "source": "iana" + }, + "audio/vnd.cmles.radio-events": { + "source": "iana" + }, + "audio/vnd.cns.anp1": { + "source": "iana" + }, + "audio/vnd.cns.inf1": { + "source": "iana" + }, + "audio/vnd.dece.audio": { + "source": "iana", + "extensions": ["uva","uvva"] + }, + "audio/vnd.digital-winds": { + "source": "iana", + "extensions": ["eol"] + }, + "audio/vnd.dlna.adts": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.1": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.2": { + "source": "iana" + }, + "audio/vnd.dolby.mlp": { + "source": "iana" + }, + "audio/vnd.dolby.mps": { + "source": "iana" + }, + "audio/vnd.dolby.pl2": { + "source": "iana" + }, + "audio/vnd.dolby.pl2x": { + "source": "iana" + }, + "audio/vnd.dolby.pl2z": { + "source": "iana" + }, + "audio/vnd.dolby.pulse.1": { + "source": "iana" + }, + "audio/vnd.dra": { + "source": "iana", + "extensions": ["dra"] + }, + "audio/vnd.dts": { + "source": "iana", + "extensions": ["dts"] + }, + "audio/vnd.dts.hd": { + "source": "iana", + "extensions": ["dtshd"] + }, + "audio/vnd.dts.uhd": { + "source": "iana" + }, + "audio/vnd.dvb.file": { + "source": "iana" + }, + "audio/vnd.everad.plj": { + "source": "iana" + }, + "audio/vnd.hns.audio": { + "source": "iana" + }, + "audio/vnd.lucent.voice": { + "source": "iana", + "extensions": ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + "source": "iana", + "extensions": ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + "source": "iana" + }, + "audio/vnd.nortel.vbk": { + "source": "iana" + }, + "audio/vnd.nuera.ecelp4800": { + "source": "iana", + "extensions": ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + "source": "iana", + "extensions": ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + "source": "iana", + "extensions": ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + "source": "iana" + }, + "audio/vnd.presonus.multitrack": { + "source": "iana" + }, + "audio/vnd.qcelp": { + "source": "apache" + }, + "audio/vnd.rhetorex.32kadpcm": { + "source": "iana" + }, + "audio/vnd.rip": { + "source": "iana", + "extensions": ["rip"] + }, + "audio/vnd.rn-realaudio": { + "compressible": false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + "source": "iana" + }, + "audio/vnd.vmx.cvsd": { + "source": "iana" + }, + "audio/vnd.wave": { + "compressible": false + }, + "audio/vorbis": { + "source": "iana", + "compressible": false + }, + "audio/vorbis-config": { + "source": "iana" + }, + "audio/wav": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/wave": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/webm": { + "source": "apache", + "compressible": false, + "extensions": ["weba"] + }, + "audio/x-aac": { + "source": "apache", + "compressible": false, + "extensions": ["aac"] + }, + "audio/x-aiff": { + "source": "apache", + "extensions": ["aif","aiff","aifc"] + }, + "audio/x-caf": { + "source": "apache", + "compressible": false, + "extensions": ["caf"] + }, + "audio/x-flac": { + "source": "apache", + "extensions": ["flac"] + }, + "audio/x-m4a": { + "source": "nginx", + "extensions": ["m4a"] + }, + "audio/x-matroska": { + "source": "apache", + "extensions": ["mka"] + }, + "audio/x-mpegurl": { + "source": "apache", + "extensions": ["m3u"] + }, + "audio/x-ms-wax": { + "source": "apache", + "extensions": ["wax"] + }, + "audio/x-ms-wma": { + "source": "apache", + "extensions": ["wma"] + }, + "audio/x-pn-realaudio": { + "source": "apache", + "extensions": ["ram","ra"] + }, + "audio/x-pn-realaudio-plugin": { + "source": "apache", + "extensions": ["rmp"] + }, + "audio/x-realaudio": { + "source": "nginx", + "extensions": ["ra"] + }, + "audio/x-tta": { + "source": "apache" + }, + "audio/x-wav": { + "source": "apache", + "extensions": ["wav"] + }, + "audio/xm": { + "source": "apache", + "extensions": ["xm"] + }, + "chemical/x-cdx": { + "source": "apache", + "extensions": ["cdx"] + }, + "chemical/x-cif": { + "source": "apache", + "extensions": ["cif"] + }, + "chemical/x-cmdf": { + "source": "apache", + "extensions": ["cmdf"] + }, + "chemical/x-cml": { + "source": "apache", + "extensions": ["cml"] + }, + "chemical/x-csml": { + "source": "apache", + "extensions": ["csml"] + }, + "chemical/x-pdb": { + "source": "apache" + }, + "chemical/x-xyz": { + "source": "apache", + "extensions": ["xyz"] + }, + "font/collection": { + "source": "iana", + "extensions": ["ttc"] + }, + "font/otf": { + "source": "iana", + "compressible": true, + "extensions": ["otf"] + }, + "font/sfnt": { + "source": "iana" + }, + "font/ttf": { + "source": "iana", + "compressible": true, + "extensions": ["ttf"] + }, + "font/woff": { + "source": "iana", + "extensions": ["woff"] + }, + "font/woff2": { + "source": "iana", + "extensions": ["woff2"] + }, + "image/aces": { + "source": "iana", + "extensions": ["exr"] + }, + "image/apng": { + "source": "iana", + "compressible": false, + "extensions": ["apng"] + }, + "image/avci": { + "source": "iana", + "extensions": ["avci"] + }, + "image/avcs": { + "source": "iana", + "extensions": ["avcs"] + }, + "image/avif": { + "source": "iana", + "compressible": false, + "extensions": ["avif"] + }, + "image/bmp": { + "source": "iana", + "compressible": true, + "extensions": ["bmp","dib"] + }, + "image/cgm": { + "source": "iana", + "extensions": ["cgm"] + }, + "image/dicom-rle": { + "source": "iana", + "extensions": ["drle"] + }, + "image/dpx": { + "source": "iana", + "extensions": ["dpx"] + }, + "image/emf": { + "source": "iana", + "extensions": ["emf"] + }, + "image/fits": { + "source": "iana", + "extensions": ["fits"] + }, + "image/g3fax": { + "source": "iana", + "extensions": ["g3"] + }, + "image/gif": { + "source": "iana", + "compressible": false, + "extensions": ["gif"] + }, + "image/heic": { + "source": "iana", + "extensions": ["heic"] + }, + "image/heic-sequence": { + "source": "iana", + "extensions": ["heics"] + }, + "image/heif": { + "source": "iana", + "extensions": ["heif"] + }, + "image/heif-sequence": { + "source": "iana", + "extensions": ["heifs"] + }, + "image/hej2k": { + "source": "iana", + "extensions": ["hej2"] + }, + "image/ief": { + "source": "iana", + "extensions": ["ief"] + }, + "image/j2c": { + "source": "iana" + }, + "image/jaii": { + "source": "iana", + "extensions": ["jaii"] + }, + "image/jais": { + "source": "iana", + "extensions": ["jais"] + }, + "image/jls": { + "source": "iana", + "extensions": ["jls"] + }, + "image/jp2": { + "source": "iana", + "compressible": false, + "extensions": ["jp2","jpg2"] + }, + "image/jpeg": { + "source": "iana", + "compressible": false, + "extensions": ["jpg","jpeg","jpe"] + }, + "image/jph": { + "source": "iana", + "extensions": ["jph"] + }, + "image/jphc": { + "source": "iana", + "extensions": ["jhc"] + }, + "image/jpm": { + "source": "iana", + "compressible": false, + "extensions": ["jpm","jpgm"] + }, + "image/jpx": { + "source": "iana", + "compressible": false, + "extensions": ["jpx","jpf"] + }, + "image/jxl": { + "source": "iana", + "extensions": ["jxl"] + }, + "image/jxr": { + "source": "iana", + "extensions": ["jxr"] + }, + "image/jxra": { + "source": "iana", + "extensions": ["jxra"] + }, + "image/jxrs": { + "source": "iana", + "extensions": ["jxrs"] + }, + "image/jxs": { + "source": "iana", + "extensions": ["jxs"] + }, + "image/jxsc": { + "source": "iana", + "extensions": ["jxsc"] + }, + "image/jxsi": { + "source": "iana", + "extensions": ["jxsi"] + }, + "image/jxss": { + "source": "iana", + "extensions": ["jxss"] + }, + "image/ktx": { + "source": "iana", + "extensions": ["ktx"] + }, + "image/ktx2": { + "source": "iana", + "extensions": ["ktx2"] + }, + "image/naplps": { + "source": "iana" + }, + "image/pjpeg": { + "compressible": false, + "extensions": ["jfif"] + }, + "image/png": { + "source": "iana", + "compressible": false, + "extensions": ["png"] + }, + "image/prs.btif": { + "source": "iana", + "extensions": ["btif","btf"] + }, + "image/prs.pti": { + "source": "iana", + "extensions": ["pti"] + }, + "image/pwg-raster": { + "source": "iana" + }, + "image/sgi": { + "source": "apache", + "extensions": ["sgi"] + }, + "image/svg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["svg","svgz"] + }, + "image/t38": { + "source": "iana", + "extensions": ["t38"] + }, + "image/tiff": { + "source": "iana", + "compressible": false, + "extensions": ["tif","tiff"] + }, + "image/tiff-fx": { + "source": "iana", + "extensions": ["tfx"] + }, + "image/vnd.adobe.photoshop": { + "source": "iana", + "compressible": true, + "extensions": ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + "source": "iana", + "extensions": ["azv"] + }, + "image/vnd.clip": { + "source": "iana" + }, + "image/vnd.cns.inf2": { + "source": "iana" + }, + "image/vnd.dece.graphic": { + "source": "iana", + "extensions": ["uvi","uvvi","uvg","uvvg"] + }, + "image/vnd.djvu": { + "source": "iana", + "extensions": ["djvu","djv"] + }, + "image/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "image/vnd.dwg": { + "source": "iana", + "extensions": ["dwg"] + }, + "image/vnd.dxf": { + "source": "iana", + "extensions": ["dxf"] + }, + "image/vnd.fastbidsheet": { + "source": "iana", + "extensions": ["fbs"] + }, + "image/vnd.fpx": { + "source": "iana", + "extensions": ["fpx"] + }, + "image/vnd.fst": { + "source": "iana", + "extensions": ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + "source": "iana", + "extensions": ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + "source": "iana", + "extensions": ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + "source": "iana" + }, + "image/vnd.microsoft.icon": { + "source": "iana", + "compressible": true, + "extensions": ["ico"] + }, + "image/vnd.mix": { + "source": "iana" + }, + "image/vnd.mozilla.apng": { + "source": "iana" + }, + "image/vnd.ms-dds": { + "compressible": true, + "extensions": ["dds"] + }, + "image/vnd.ms-modi": { + "source": "iana", + "extensions": ["mdi"] + }, + "image/vnd.ms-photo": { + "source": "apache", + "extensions": ["wdp"] + }, + "image/vnd.net-fpx": { + "source": "iana", + "extensions": ["npx"] + }, + "image/vnd.pco.b16": { + "source": "iana", + "extensions": ["b16"] + }, + "image/vnd.radiance": { + "source": "iana" + }, + "image/vnd.sealed.png": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + "source": "iana" + }, + "image/vnd.svf": { + "source": "iana" + }, + "image/vnd.tencent.tap": { + "source": "iana", + "extensions": ["tap"] + }, + "image/vnd.valve.source.texture": { + "source": "iana", + "extensions": ["vtf"] + }, + "image/vnd.wap.wbmp": { + "source": "iana", + "extensions": ["wbmp"] + }, + "image/vnd.xiff": { + "source": "iana", + "extensions": ["xif"] + }, + "image/vnd.zbrush.pcx": { + "source": "iana", + "extensions": ["pcx"] + }, + "image/webp": { + "source": "iana", + "extensions": ["webp"] + }, + "image/wmf": { + "source": "iana", + "extensions": ["wmf"] + }, + "image/x-3ds": { + "source": "apache", + "extensions": ["3ds"] + }, + "image/x-adobe-dng": { + "extensions": ["dng"] + }, + "image/x-cmu-raster": { + "source": "apache", + "extensions": ["ras"] + }, + "image/x-cmx": { + "source": "apache", + "extensions": ["cmx"] + }, + "image/x-emf": { + "source": "iana" + }, + "image/x-freehand": { + "source": "apache", + "extensions": ["fh","fhc","fh4","fh5","fh7"] + }, + "image/x-icon": { + "source": "apache", + "compressible": true, + "extensions": ["ico"] + }, + "image/x-jng": { + "source": "nginx", + "extensions": ["jng"] + }, + "image/x-mrsid-image": { + "source": "apache", + "extensions": ["sid"] + }, + "image/x-ms-bmp": { + "source": "nginx", + "compressible": true, + "extensions": ["bmp"] + }, + "image/x-pcx": { + "source": "apache", + "extensions": ["pcx"] + }, + "image/x-pict": { + "source": "apache", + "extensions": ["pic","pct"] + }, + "image/x-portable-anymap": { + "source": "apache", + "extensions": ["pnm"] + }, + "image/x-portable-bitmap": { + "source": "apache", + "extensions": ["pbm"] + }, + "image/x-portable-graymap": { + "source": "apache", + "extensions": ["pgm"] + }, + "image/x-portable-pixmap": { + "source": "apache", + "extensions": ["ppm"] + }, + "image/x-rgb": { + "source": "apache", + "extensions": ["rgb"] + }, + "image/x-tga": { + "source": "apache", + "extensions": ["tga"] + }, + "image/x-wmf": { + "source": "iana" + }, + "image/x-xbitmap": { + "source": "apache", + "extensions": ["xbm"] + }, + "image/x-xcf": { + "compressible": false + }, + "image/x-xpixmap": { + "source": "apache", + "extensions": ["xpm"] + }, + "image/x-xwindowdump": { + "source": "apache", + "extensions": ["xwd"] + }, + "message/bhttp": { + "source": "iana" + }, + "message/cpim": { + "source": "iana" + }, + "message/delivery-status": { + "source": "iana" + }, + "message/disposition-notification": { + "source": "iana", + "extensions": [ + "disposition-notification" + ] + }, + "message/external-body": { + "source": "iana" + }, + "message/feedback-report": { + "source": "iana" + }, + "message/global": { + "source": "iana", + "extensions": ["u8msg"] + }, + "message/global-delivery-status": { + "source": "iana", + "extensions": ["u8dsn"] + }, + "message/global-disposition-notification": { + "source": "iana", + "extensions": ["u8mdn"] + }, + "message/global-headers": { + "source": "iana", + "extensions": ["u8hdr"] + }, + "message/http": { + "source": "iana", + "compressible": false + }, + "message/imdn+xml": { + "source": "iana", + "compressible": true + }, + "message/mls": { + "source": "iana" + }, + "message/news": { + "source": "apache" + }, + "message/ohttp-req": { + "source": "iana" + }, + "message/ohttp-res": { + "source": "iana" + }, + "message/partial": { + "source": "iana", + "compressible": false + }, + "message/rfc822": { + "source": "iana", + "compressible": true, + "extensions": ["eml","mime","mht","mhtml"] + }, + "message/s-http": { + "source": "apache" + }, + "message/sip": { + "source": "iana" + }, + "message/sipfrag": { + "source": "iana" + }, + "message/tracking-status": { + "source": "iana" + }, + "message/vnd.si.simp": { + "source": "apache" + }, + "message/vnd.wfa.wsc": { + "source": "iana", + "extensions": ["wsc"] + }, + "model/3mf": { + "source": "iana", + "extensions": ["3mf"] + }, + "model/e57": { + "source": "iana" + }, + "model/gltf+json": { + "source": "iana", + "compressible": true, + "extensions": ["gltf"] + }, + "model/gltf-binary": { + "source": "iana", + "compressible": true, + "extensions": ["glb"] + }, + "model/iges": { + "source": "iana", + "compressible": false, + "extensions": ["igs","iges"] + }, + "model/jt": { + "source": "iana", + "extensions": ["jt"] + }, + "model/mesh": { + "source": "iana", + "compressible": false, + "extensions": ["msh","mesh","silo"] + }, + "model/mtl": { + "source": "iana", + "extensions": ["mtl"] + }, + "model/obj": { + "source": "iana", + "extensions": ["obj"] + }, + "model/prc": { + "source": "iana", + "extensions": ["prc"] + }, + "model/step": { + "source": "iana", + "extensions": ["step","stp","stpnc","p21","210"] + }, + "model/step+xml": { + "source": "iana", + "compressible": true, + "extensions": ["stpx"] + }, + "model/step+zip": { + "source": "iana", + "compressible": false, + "extensions": ["stpz"] + }, + "model/step-xml+zip": { + "source": "iana", + "compressible": false, + "extensions": ["stpxz"] + }, + "model/stl": { + "source": "iana", + "extensions": ["stl"] + }, + "model/u3d": { + "source": "iana", + "extensions": ["u3d"] + }, + "model/vnd.bary": { + "source": "iana", + "extensions": ["bary"] + }, + "model/vnd.cld": { + "source": "iana", + "extensions": ["cld"] + }, + "model/vnd.collada+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dae"] + }, + "model/vnd.dwf": { + "source": "iana", + "extensions": ["dwf"] + }, + "model/vnd.flatland.3dml": { + "source": "iana" + }, + "model/vnd.gdl": { + "source": "iana", + "extensions": ["gdl"] + }, + "model/vnd.gs-gdl": { + "source": "apache" + }, + "model/vnd.gs.gdl": { + "source": "iana" + }, + "model/vnd.gtw": { + "source": "iana", + "extensions": ["gtw"] + }, + "model/vnd.moml+xml": { + "source": "iana", + "compressible": true + }, + "model/vnd.mts": { + "source": "iana", + "extensions": ["mts"] + }, + "model/vnd.opengex": { + "source": "iana", + "extensions": ["ogex"] + }, + "model/vnd.parasolid.transmit.binary": { + "source": "iana", + "extensions": ["x_b"] + }, + "model/vnd.parasolid.transmit.text": { + "source": "iana", + "extensions": ["x_t"] + }, + "model/vnd.pytha.pyox": { + "source": "iana", + "extensions": ["pyo","pyox"] + }, + "model/vnd.rosette.annotated-data-model": { + "source": "iana" + }, + "model/vnd.sap.vds": { + "source": "iana", + "extensions": ["vds"] + }, + "model/vnd.usda": { + "source": "iana", + "extensions": ["usda"] + }, + "model/vnd.usdz+zip": { + "source": "iana", + "compressible": false, + "extensions": ["usdz"] + }, + "model/vnd.valve.source.compiled-map": { + "source": "iana", + "extensions": ["bsp"] + }, + "model/vnd.vtu": { + "source": "iana", + "extensions": ["vtu"] + }, + "model/vrml": { + "source": "iana", + "compressible": false, + "extensions": ["wrl","vrml"] + }, + "model/x3d+binary": { + "source": "apache", + "compressible": false, + "extensions": ["x3db","x3dbz"] + }, + "model/x3d+fastinfoset": { + "source": "iana", + "extensions": ["x3db"] + }, + "model/x3d+vrml": { + "source": "apache", + "compressible": false, + "extensions": ["x3dv","x3dvz"] + }, + "model/x3d+xml": { + "source": "iana", + "compressible": true, + "extensions": ["x3d","x3dz"] + }, + "model/x3d-vrml": { + "source": "iana", + "extensions": ["x3dv"] + }, + "multipart/alternative": { + "source": "iana", + "compressible": false + }, + "multipart/appledouble": { + "source": "iana" + }, + "multipart/byteranges": { + "source": "iana" + }, + "multipart/digest": { + "source": "iana" + }, + "multipart/encrypted": { + "source": "iana", + "compressible": false + }, + "multipart/form-data": { + "source": "iana", + "compressible": false + }, + "multipart/header-set": { + "source": "iana" + }, + "multipart/mixed": { + "source": "iana" + }, + "multipart/multilingual": { + "source": "iana" + }, + "multipart/parallel": { + "source": "iana" + }, + "multipart/related": { + "source": "iana", + "compressible": false + }, + "multipart/report": { + "source": "iana" + }, + "multipart/signed": { + "source": "iana", + "compressible": false + }, + "multipart/vnd.bint.med-plus": { + "source": "iana" + }, + "multipart/voice-message": { + "source": "iana" + }, + "multipart/x-mixed-replace": { + "source": "iana" + }, + "text/1d-interleaved-parityfec": { + "source": "iana" + }, + "text/cache-manifest": { + "source": "iana", + "compressible": true, + "extensions": ["appcache","manifest"] + }, + "text/calendar": { + "source": "iana", + "extensions": ["ics","ifb"] + }, + "text/calender": { + "compressible": true + }, + "text/cmd": { + "compressible": true + }, + "text/coffeescript": { + "extensions": ["coffee","litcoffee"] + }, + "text/cql": { + "source": "iana" + }, + "text/cql-expression": { + "source": "iana" + }, + "text/cql-identifier": { + "source": "iana" + }, + "text/css": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["css"] + }, + "text/csv": { + "source": "iana", + "compressible": true, + "extensions": ["csv"] + }, + "text/csv-schema": { + "source": "iana" + }, + "text/directory": { + "source": "iana" + }, + "text/dns": { + "source": "iana" + }, + "text/ecmascript": { + "source": "apache" + }, + "text/encaprtp": { + "source": "iana" + }, + "text/enriched": { + "source": "iana" + }, + "text/fhirpath": { + "source": "iana" + }, + "text/flexfec": { + "source": "iana" + }, + "text/fwdred": { + "source": "iana" + }, + "text/gff3": { + "source": "iana" + }, + "text/grammar-ref-list": { + "source": "iana" + }, + "text/hl7v2": { + "source": "iana" + }, + "text/html": { + "source": "iana", + "compressible": true, + "extensions": ["html","htm","shtml"] + }, + "text/jade": { + "extensions": ["jade"] + }, + "text/javascript": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js","mjs"] + }, + "text/jcr-cnd": { + "source": "iana" + }, + "text/jsx": { + "compressible": true, + "extensions": ["jsx"] + }, + "text/less": { + "compressible": true, + "extensions": ["less"] + }, + "text/markdown": { + "source": "iana", + "compressible": true, + "extensions": ["md","markdown"] + }, + "text/mathml": { + "source": "nginx", + "extensions": ["mml"] + }, + "text/mdx": { + "compressible": true, + "extensions": ["mdx"] + }, + "text/mizar": { + "source": "iana" + }, + "text/n3": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["n3"] + }, + "text/parameters": { + "source": "iana", + "charset": "UTF-8" + }, + "text/parityfec": { + "source": "iana" + }, + "text/plain": { + "source": "iana", + "compressible": true, + "extensions": ["txt","text","conf","def","list","log","in","ini"] + }, + "text/provenance-notation": { + "source": "iana", + "charset": "UTF-8" + }, + "text/prs.fallenstein.rst": { + "source": "iana" + }, + "text/prs.lines.tag": { + "source": "iana", + "extensions": ["dsc"] + }, + "text/prs.prop.logic": { + "source": "iana" + }, + "text/prs.texi": { + "source": "iana" + }, + "text/raptorfec": { + "source": "iana" + }, + "text/red": { + "source": "iana" + }, + "text/rfc822-headers": { + "source": "iana" + }, + "text/richtext": { + "source": "iana", + "compressible": true, + "extensions": ["rtx"] + }, + "text/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "text/rtp-enc-aescm128": { + "source": "iana" + }, + "text/rtploopback": { + "source": "iana" + }, + "text/rtx": { + "source": "iana" + }, + "text/sgml": { + "source": "iana", + "extensions": ["sgml","sgm"] + }, + "text/shaclc": { + "source": "iana" + }, + "text/shex": { + "source": "iana", + "extensions": ["shex"] + }, + "text/slim": { + "extensions": ["slim","slm"] + }, + "text/spdx": { + "source": "iana", + "extensions": ["spdx"] + }, + "text/strings": { + "source": "iana" + }, + "text/stylus": { + "extensions": ["stylus","styl"] + }, + "text/t140": { + "source": "iana" + }, + "text/tab-separated-values": { + "source": "iana", + "compressible": true, + "extensions": ["tsv"] + }, + "text/troff": { + "source": "iana", + "extensions": ["t","tr","roff","man","me","ms"] + }, + "text/turtle": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["ttl"] + }, + "text/ulpfec": { + "source": "iana" + }, + "text/uri-list": { + "source": "iana", + "compressible": true, + "extensions": ["uri","uris","urls"] + }, + "text/vcard": { + "source": "iana", + "compressible": true, + "extensions": ["vcard"] + }, + "text/vnd.a": { + "source": "iana" + }, + "text/vnd.abc": { + "source": "iana" + }, + "text/vnd.ascii-art": { + "source": "iana" + }, + "text/vnd.curl": { + "source": "iana", + "extensions": ["curl"] + }, + "text/vnd.curl.dcurl": { + "source": "apache", + "extensions": ["dcurl"] + }, + "text/vnd.curl.mcurl": { + "source": "apache", + "extensions": ["mcurl"] + }, + "text/vnd.curl.scurl": { + "source": "apache", + "extensions": ["scurl"] + }, + "text/vnd.debian.copyright": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.dmclientscript": { + "source": "iana" + }, + "text/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.exchangeable": { + "source": "iana" + }, + "text/vnd.familysearch.gedcom": { + "source": "iana", + "extensions": ["ged"] + }, + "text/vnd.ficlab.flt": { + "source": "iana" + }, + "text/vnd.fly": { + "source": "iana", + "extensions": ["fly"] + }, + "text/vnd.fmi.flexstor": { + "source": "iana", + "extensions": ["flx"] + }, + "text/vnd.gml": { + "source": "iana" + }, + "text/vnd.graphviz": { + "source": "iana", + "extensions": ["gv"] + }, + "text/vnd.hans": { + "source": "iana" + }, + "text/vnd.hgl": { + "source": "iana" + }, + "text/vnd.in3d.3dml": { + "source": "iana", + "extensions": ["3dml"] + }, + "text/vnd.in3d.spot": { + "source": "iana", + "extensions": ["spot"] + }, + "text/vnd.iptc.newsml": { + "source": "iana" + }, + "text/vnd.iptc.nitf": { + "source": "iana" + }, + "text/vnd.latex-z": { + "source": "iana" + }, + "text/vnd.motorola.reflex": { + "source": "iana" + }, + "text/vnd.ms-mediapackage": { + "source": "iana" + }, + "text/vnd.net2phone.commcenter.command": { + "source": "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + "source": "iana" + }, + "text/vnd.senx.warpscript": { + "source": "iana" + }, + "text/vnd.si.uricatalogue": { + "source": "apache" + }, + "text/vnd.sosi": { + "source": "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["jad"] + }, + "text/vnd.trolltech.linguist": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.vcf": { + "source": "iana" + }, + "text/vnd.wap.si": { + "source": "iana" + }, + "text/vnd.wap.sl": { + "source": "iana" + }, + "text/vnd.wap.wml": { + "source": "iana", + "extensions": ["wml"] + }, + "text/vnd.wap.wmlscript": { + "source": "iana", + "extensions": ["wmls"] + }, + "text/vnd.zoo.kcl": { + "source": "iana" + }, + "text/vtt": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["vtt"] + }, + "text/wgsl": { + "source": "iana", + "extensions": ["wgsl"] + }, + "text/x-asm": { + "source": "apache", + "extensions": ["s","asm"] + }, + "text/x-c": { + "source": "apache", + "extensions": ["c","cc","cxx","cpp","h","hh","dic"] + }, + "text/x-component": { + "source": "nginx", + "extensions": ["htc"] + }, + "text/x-fortran": { + "source": "apache", + "extensions": ["f","for","f77","f90"] + }, + "text/x-gwt-rpc": { + "compressible": true + }, + "text/x-handlebars-template": { + "extensions": ["hbs"] + }, + "text/x-java-source": { + "source": "apache", + "extensions": ["java"] + }, + "text/x-jquery-tmpl": { + "compressible": true + }, + "text/x-lua": { + "extensions": ["lua"] + }, + "text/x-markdown": { + "compressible": true, + "extensions": ["mkd"] + }, + "text/x-nfo": { + "source": "apache", + "extensions": ["nfo"] + }, + "text/x-opml": { + "source": "apache", + "extensions": ["opml"] + }, + "text/x-org": { + "compressible": true, + "extensions": ["org"] + }, + "text/x-pascal": { + "source": "apache", + "extensions": ["p","pas"] + }, + "text/x-processing": { + "compressible": true, + "extensions": ["pde"] + }, + "text/x-sass": { + "extensions": ["sass"] + }, + "text/x-scss": { + "extensions": ["scss"] + }, + "text/x-setext": { + "source": "apache", + "extensions": ["etx"] + }, + "text/x-sfv": { + "source": "apache", + "extensions": ["sfv"] + }, + "text/x-suse-ymp": { + "compressible": true, + "extensions": ["ymp"] + }, + "text/x-uuencode": { + "source": "apache", + "extensions": ["uu"] + }, + "text/x-vcalendar": { + "source": "apache", + "extensions": ["vcs"] + }, + "text/x-vcard": { + "source": "apache", + "extensions": ["vcf"] + }, + "text/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml"] + }, + "text/xml-external-parsed-entity": { + "source": "iana" + }, + "text/yaml": { + "compressible": true, + "extensions": ["yaml","yml"] + }, + "video/1d-interleaved-parityfec": { + "source": "iana" + }, + "video/3gpp": { + "source": "iana", + "extensions": ["3gp","3gpp"] + }, + "video/3gpp-tt": { + "source": "iana" + }, + "video/3gpp2": { + "source": "iana", + "extensions": ["3g2"] + }, + "video/av1": { + "source": "iana" + }, + "video/bmpeg": { + "source": "iana" + }, + "video/bt656": { + "source": "iana" + }, + "video/celb": { + "source": "iana" + }, + "video/dv": { + "source": "iana" + }, + "video/encaprtp": { + "source": "iana" + }, + "video/evc": { + "source": "iana" + }, + "video/ffv1": { + "source": "iana" + }, + "video/flexfec": { + "source": "iana" + }, + "video/h261": { + "source": "iana", + "extensions": ["h261"] + }, + "video/h263": { + "source": "iana", + "extensions": ["h263"] + }, + "video/h263-1998": { + "source": "iana" + }, + "video/h263-2000": { + "source": "iana" + }, + "video/h264": { + "source": "iana", + "extensions": ["h264"] + }, + "video/h264-rcdo": { + "source": "iana" + }, + "video/h264-svc": { + "source": "iana" + }, + "video/h265": { + "source": "iana" + }, + "video/h266": { + "source": "iana" + }, + "video/iso.segment": { + "source": "iana", + "extensions": ["m4s"] + }, + "video/jpeg": { + "source": "iana", + "extensions": ["jpgv"] + }, + "video/jpeg2000": { + "source": "iana" + }, + "video/jpm": { + "source": "apache", + "extensions": ["jpm","jpgm"] + }, + "video/jxsv": { + "source": "iana" + }, + "video/lottie+json": { + "source": "iana", + "compressible": true + }, + "video/matroska": { + "source": "iana" + }, + "video/matroska-3d": { + "source": "iana" + }, + "video/mj2": { + "source": "iana", + "extensions": ["mj2","mjp2"] + }, + "video/mp1s": { + "source": "iana" + }, + "video/mp2p": { + "source": "iana" + }, + "video/mp2t": { + "source": "iana", + "extensions": ["ts","m2t","m2ts","mts"] + }, + "video/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["mp4","mp4v","mpg4"] + }, + "video/mp4v-es": { + "source": "iana" + }, + "video/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpeg","mpg","mpe","m1v","m2v"] + }, + "video/mpeg4-generic": { + "source": "iana" + }, + "video/mpv": { + "source": "iana" + }, + "video/nv": { + "source": "iana" + }, + "video/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogv"] + }, + "video/parityfec": { + "source": "iana" + }, + "video/pointer": { + "source": "iana" + }, + "video/quicktime": { + "source": "iana", + "compressible": false, + "extensions": ["qt","mov"] + }, + "video/raptorfec": { + "source": "iana" + }, + "video/raw": { + "source": "iana" + }, + "video/rtp-enc-aescm128": { + "source": "iana" + }, + "video/rtploopback": { + "source": "iana" + }, + "video/rtx": { + "source": "iana" + }, + "video/scip": { + "source": "iana" + }, + "video/smpte291": { + "source": "iana" + }, + "video/smpte292m": { + "source": "iana" + }, + "video/ulpfec": { + "source": "iana" + }, + "video/vc1": { + "source": "iana" + }, + "video/vc2": { + "source": "iana" + }, + "video/vnd.cctv": { + "source": "iana" + }, + "video/vnd.dece.hd": { + "source": "iana", + "extensions": ["uvh","uvvh"] + }, + "video/vnd.dece.mobile": { + "source": "iana", + "extensions": ["uvm","uvvm"] + }, + "video/vnd.dece.mp4": { + "source": "iana" + }, + "video/vnd.dece.pd": { + "source": "iana", + "extensions": ["uvp","uvvp"] + }, + "video/vnd.dece.sd": { + "source": "iana", + "extensions": ["uvs","uvvs"] + }, + "video/vnd.dece.video": { + "source": "iana", + "extensions": ["uvv","uvvv"] + }, + "video/vnd.directv.mpeg": { + "source": "iana" + }, + "video/vnd.directv.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dlna.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dvb.file": { + "source": "iana", + "extensions": ["dvb"] + }, + "video/vnd.fvt": { + "source": "iana", + "extensions": ["fvt"] + }, + "video/vnd.hns.video": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsavc": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + "source": "iana" + }, + "video/vnd.motorola.video": { + "source": "iana" + }, + "video/vnd.motorola.videop": { + "source": "iana" + }, + "video/vnd.mpegurl": { + "source": "iana", + "extensions": ["mxu","m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + "source": "iana", + "extensions": ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + "source": "iana" + }, + "video/vnd.nokia.mp4vr": { + "source": "iana" + }, + "video/vnd.nokia.videovoip": { + "source": "iana" + }, + "video/vnd.objectvideo": { + "source": "iana" + }, + "video/vnd.planar": { + "source": "iana" + }, + "video/vnd.radgamettools.bink": { + "source": "iana" + }, + "video/vnd.radgamettools.smacker": { + "source": "apache" + }, + "video/vnd.sealed.mpeg1": { + "source": "iana" + }, + "video/vnd.sealed.mpeg4": { + "source": "iana" + }, + "video/vnd.sealed.swf": { + "source": "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + "source": "iana" + }, + "video/vnd.uvvu.mp4": { + "source": "iana", + "extensions": ["uvu","uvvu"] + }, + "video/vnd.vivo": { + "source": "iana", + "extensions": ["viv"] + }, + "video/vnd.youtube.yt": { + "source": "iana" + }, + "video/vp8": { + "source": "iana" + }, + "video/vp9": { + "source": "iana" + }, + "video/webm": { + "source": "apache", + "compressible": false, + "extensions": ["webm"] + }, + "video/x-f4v": { + "source": "apache", + "extensions": ["f4v"] + }, + "video/x-fli": { + "source": "apache", + "extensions": ["fli"] + }, + "video/x-flv": { + "source": "apache", + "compressible": false, + "extensions": ["flv"] + }, + "video/x-m4v": { + "source": "apache", + "extensions": ["m4v"] + }, + "video/x-matroska": { + "source": "apache", + "compressible": false, + "extensions": ["mkv","mk3d","mks"] + }, + "video/x-mng": { + "source": "apache", + "extensions": ["mng"] + }, + "video/x-ms-asf": { + "source": "apache", + "extensions": ["asf","asx"] + }, + "video/x-ms-vob": { + "source": "apache", + "extensions": ["vob"] + }, + "video/x-ms-wm": { + "source": "apache", + "extensions": ["wm"] + }, + "video/x-ms-wmv": { + "source": "apache", + "compressible": false, + "extensions": ["wmv"] + }, + "video/x-ms-wmx": { + "source": "apache", + "extensions": ["wmx"] + }, + "video/x-ms-wvx": { + "source": "apache", + "extensions": ["wvx"] + }, + "video/x-msvideo": { + "source": "apache", + "extensions": ["avi"] + }, + "video/x-sgi-movie": { + "source": "apache", + "extensions": ["movie"] + }, + "video/x-smv": { + "source": "apache", + "extensions": ["smv"] + }, + "x-conference/x-cooltalk": { + "source": "apache", + "extensions": ["ice"] + }, + "x-shader/x-fragment": { + "compressible": true + }, + "x-shader/x-vertex": { + "compressible": true + } +} diff --git a/front/frontend/node_modules/mime-db/index.js b/front/frontend/node_modules/mime-db/index.js new file mode 100644 index 0000000..ec2be30 --- /dev/null +++ b/front/frontend/node_modules/mime-db/index.js @@ -0,0 +1,12 @@ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = require('./db.json') diff --git a/front/frontend/node_modules/mime-db/package.json b/front/frontend/node_modules/mime-db/package.json new file mode 100644 index 0000000..289a370 --- /dev/null +++ b/front/frontend/node_modules/mime-db/package.json @@ -0,0 +1,56 @@ +{ + "name": "mime-db", + "description": "Media Type Database", + "version": "1.54.0", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)", + "Robert Kieffer (http://github.com/broofa)" + ], + "license": "MIT", + "keywords": [ + "mime", + "db", + "type", + "types", + "database", + "charset", + "charsets" + ], + "repository": "jshttp/mime-db", + "devDependencies": { + "csv-parse": "4.16.3", + "eslint": "8.32.0", + "eslint-config-standard": "15.0.1", + "eslint-plugin-import": "2.27.5", + "eslint-plugin-markdown": "3.0.0", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "6.1.1", + "eslint-plugin-standard": "4.1.0", + "media-typer": "1.1.0", + "mocha": "10.2.0", + "nyc": "15.1.0", + "stream-to-array": "2.3.0", + "undici": "7.1.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "db.json", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "build": "node scripts/build", + "fetch": "node scripts/fetch-apache && node scripts/fetch-iana && node scripts/fetch-nginx", + "lint": "eslint .", + "test": "mocha --reporter spec --check-leaks test/", + "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "update": "npm run fetch && npm run build", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/front/frontend/node_modules/mime-types/HISTORY.md b/front/frontend/node_modules/mime-types/HISTORY.md new file mode 100644 index 0000000..18473e4 --- /dev/null +++ b/front/frontend/node_modules/mime-types/HISTORY.md @@ -0,0 +1,421 @@ +3.0.1 / 2025-03-26 +=================== + +* deps: mime-db@1.54.0 + +3.0.0 / 2024-08-31 +=================== + +* Drop support for node <18 +* deps: mime-db@1.53.0 +* resolve extension conflicts with mime-score (#119) + * asc -> application/pgp-signature is now application/pgp-keys + * mpp -> application/vnd.ms-project is now application/dash-patch+xml + * ac -> application/vnd.nokia.n-gage.ac+xml is now application/pkix-attr-cert + * bdoc -> application/x-bdoc is now application/bdoc + * wmz -> application/x-msmetafile is now application/x-ms-wmz + * xsl -> application/xslt+xml is now application/xml + * wav -> audio/wave is now audio/wav + * rtf -> text/rtf is now application/rtf + * xml -> text/xml is now application/xml + * mp4 -> video/mp4 is now application/mp4 + * mpg4 -> video/mp4 is now application/mp4 + + +2.1.35 / 2022-03-12 +=================== + + * deps: mime-db@1.52.0 + - Add extensions from IANA for more `image/*` types + - Add extension `.asc` to `application/pgp-keys` + - Add extensions to various XML types + - Add new upstream MIME types + +2.1.34 / 2021-11-08 +=================== + + * deps: mime-db@1.51.0 + - Add new upstream MIME types + +2.1.33 / 2021-10-01 +=================== + + * deps: mime-db@1.50.0 + - Add deprecated iWorks mime types and extensions + - Add new upstream MIME types + +2.1.32 / 2021-07-27 +=================== + + * deps: mime-db@1.49.0 + - Add extension `.trig` to `application/trig` + - Add new upstream MIME types + +2.1.31 / 2021-06-01 +=================== + + * deps: mime-db@1.48.0 + - Add extension `.mvt` to `application/vnd.mapbox-vector-tile` + - Add new upstream MIME types + +2.1.30 / 2021-04-02 +=================== + + * deps: mime-db@1.47.0 + - Add extension `.amr` to `audio/amr` + - Remove ambigious extensions from IANA for `application/*+xml` types + - Update primary extension to `.es` for `application/ecmascript` + +2.1.29 / 2021-02-17 +=================== + + * deps: mime-db@1.46.0 + - Add extension `.amr` to `audio/amr` + - Add extension `.m4s` to `video/iso.segment` + - Add extension `.opus` to `audio/ogg` + - Add new upstream MIME types + +2.1.28 / 2021-01-01 +=================== + + * deps: mime-db@1.45.0 + - Add `application/ubjson` with extension `.ubj` + - Add `image/avif` with extension `.avif` + - Add `image/ktx2` with extension `.ktx2` + - Add extension `.dbf` to `application/vnd.dbf` + - Add extension `.rar` to `application/vnd.rar` + - Add extension `.td` to `application/urc-targetdesc+xml` + - Add new upstream MIME types + - Fix extension of `application/vnd.apple.keynote` to be `.key` + +2.1.27 / 2020-04-23 +=================== + + * deps: mime-db@1.44.0 + - Add charsets from IANA + - Add extension `.cjs` to `application/node` + - Add new upstream MIME types + +2.1.26 / 2020-01-05 +=================== + + * deps: mime-db@1.43.0 + - Add `application/x-keepass2` with extension `.kdbx` + - Add extension `.mxmf` to `audio/mobile-xmf` + - Add extensions from IANA for `application/*+xml` types + - Add new upstream MIME types + +2.1.25 / 2019-11-12 +=================== + + * deps: mime-db@1.42.0 + - Add new upstream MIME types + - Add `application/toml` with extension `.toml` + - Add `image/vnd.ms-dds` with extension `.dds` + +2.1.24 / 2019-04-20 +=================== + + * deps: mime-db@1.40.0 + - Add extensions from IANA for `model/*` types + - Add `text/mdx` with extension `.mdx` + +2.1.23 / 2019-04-17 +=================== + + * deps: mime-db@~1.39.0 + - Add extensions `.siv` and `.sieve` to `application/sieve` + - Add new upstream MIME types + +2.1.22 / 2019-02-14 +=================== + + * deps: mime-db@~1.38.0 + - Add extension `.nq` to `application/n-quads` + - Add extension `.nt` to `application/n-triples` + - Add new upstream MIME types + +2.1.21 / 2018-10-19 +=================== + + * deps: mime-db@~1.37.0 + - Add extensions to HEIC image types + - Add new upstream MIME types + +2.1.20 / 2018-08-26 +=================== + + * deps: mime-db@~1.36.0 + - Add Apple file extensions from IANA + - Add extensions from IANA for `image/*` types + - Add new upstream MIME types + +2.1.19 / 2018-07-17 +=================== + + * deps: mime-db@~1.35.0 + - Add extension `.csl` to `application/vnd.citationstyles.style+xml` + - Add extension `.es` to `application/ecmascript` + - Add extension `.owl` to `application/rdf+xml` + - Add new upstream MIME types + - Add UTF-8 as default charset for `text/turtle` + +2.1.18 / 2018-02-16 +=================== + + * deps: mime-db@~1.33.0 + - Add `application/raml+yaml` with extension `.raml` + - Add `application/wasm` with extension `.wasm` + - Add `text/shex` with extension `.shex` + - Add extensions for JPEG-2000 images + - Add extensions from IANA for `message/*` types + - Add new upstream MIME types + - Update font MIME types + - Update `text/hjson` to registered `application/hjson` + +2.1.17 / 2017-09-01 +=================== + + * deps: mime-db@~1.30.0 + - Add `application/vnd.ms-outlook` + - Add `application/x-arj` + - Add extension `.mjs` to `application/javascript` + - Add glTF types and extensions + - Add new upstream MIME types + - Add `text/x-org` + - Add VirtualBox MIME types + - Fix `source` records for `video/*` types that are IANA + - Update `font/opentype` to registered `font/otf` + +2.1.16 / 2017-07-24 +=================== + + * deps: mime-db@~1.29.0 + - Add `application/fido.trusted-apps+json` + - Add extension `.wadl` to `application/vnd.sun.wadl+xml` + - Add extension `.gz` to `application/gzip` + - Add new upstream MIME types + - Update extensions `.md` and `.markdown` to be `text/markdown` + +2.1.15 / 2017-03-23 +=================== + + * deps: mime-db@~1.27.0 + - Add new mime types + - Add `image/apng` + +2.1.14 / 2017-01-14 +=================== + + * deps: mime-db@~1.26.0 + - Add new mime types + +2.1.13 / 2016-11-18 +=================== + + * deps: mime-db@~1.25.0 + - Add new mime types + +2.1.12 / 2016-09-18 +=================== + + * deps: mime-db@~1.24.0 + - Add new mime types + - Add `audio/mp3` + +2.1.11 / 2016-05-01 +=================== + + * deps: mime-db@~1.23.0 + - Add new mime types + +2.1.10 / 2016-02-15 +=================== + + * deps: mime-db@~1.22.0 + - Add new mime types + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + +2.1.9 / 2016-01-06 +================== + + * deps: mime-db@~1.21.0 + - Add new mime types + +2.1.8 / 2015-11-30 +================== + + * deps: mime-db@~1.20.0 + - Add new mime types + +2.1.7 / 2015-09-20 +================== + + * deps: mime-db@~1.19.0 + - Add new mime types + +2.1.6 / 2015-09-03 +================== + + * deps: mime-db@~1.18.0 + - Add new mime types + +2.1.5 / 2015-08-20 +================== + + * deps: mime-db@~1.17.0 + - Add new mime types + +2.1.4 / 2015-07-30 +================== + + * deps: mime-db@~1.16.0 + - Add new mime types + +2.1.3 / 2015-07-13 +================== + + * deps: mime-db@~1.15.0 + - Add new mime types + +2.1.2 / 2015-06-25 +================== + + * deps: mime-db@~1.14.0 + - Add new mime types + +2.1.1 / 2015-06-08 +================== + + * perf: fix deopt during mapping + +2.1.0 / 2015-06-07 +================== + + * Fix incorrectly treating extension-less file name as extension + - i.e. `'path/to/json'` will no longer return `application/json` + * Fix `.charset(type)` to accept parameters + * Fix `.charset(type)` to match case-insensitive + * Improve generation of extension to MIME mapping + * Refactor internals for readability and no argument reassignment + * Prefer `application/*` MIME types from the same source + * Prefer any type over `application/octet-stream` + * deps: mime-db@~1.13.0 + - Add nginx as a source + - Add new mime types + +2.0.14 / 2015-06-06 +=================== + + * deps: mime-db@~1.12.0 + - Add new mime types + +2.0.13 / 2015-05-31 +=================== + + * deps: mime-db@~1.11.0 + - Add new mime types + +2.0.12 / 2015-05-19 +=================== + + * deps: mime-db@~1.10.0 + - Add new mime types + +2.0.11 / 2015-05-05 +=================== + + * deps: mime-db@~1.9.1 + - Add new mime types + +2.0.10 / 2015-03-13 +=================== + + * deps: mime-db@~1.8.0 + - Add new mime types + +2.0.9 / 2015-02-09 +================== + + * deps: mime-db@~1.7.0 + - Add new mime types + - Community extensions ownership transferred from `node-mime` + +2.0.8 / 2015-01-29 +================== + + * deps: mime-db@~1.6.0 + - Add new mime types + +2.0.7 / 2014-12-30 +================== + + * deps: mime-db@~1.5.0 + - Add new mime types + - Fix various invalid MIME type entries + +2.0.6 / 2014-12-30 +================== + + * deps: mime-db@~1.4.0 + - Add new mime types + - Fix various invalid MIME type entries + - Remove example template MIME types + +2.0.5 / 2014-12-29 +================== + + * deps: mime-db@~1.3.1 + - Fix missing extensions + +2.0.4 / 2014-12-10 +================== + + * deps: mime-db@~1.3.0 + - Add new mime types + +2.0.3 / 2014-11-09 +================== + + * deps: mime-db@~1.2.0 + - Add new mime types + +2.0.2 / 2014-09-28 +================== + + * deps: mime-db@~1.1.0 + - Add new mime types + - Update charsets + +2.0.1 / 2014-09-07 +================== + + * Support Node.js 0.6 + +2.0.0 / 2014-09-02 +================== + + * Use `mime-db` + * Remove `.define()` + +1.0.2 / 2014-08-04 +================== + + * Set charset=utf-8 for `text/javascript` + +1.0.1 / 2014-06-24 +================== + + * Add `text/jsx` type + +1.0.0 / 2014-05-12 +================== + + * Return `false` for unknown types + * Set charset=utf-8 for `application/json` + +0.1.0 / 2014-05-02 +================== + + * Initial release diff --git a/front/frontend/node_modules/mime-types/LICENSE b/front/frontend/node_modules/mime-types/LICENSE new file mode 100644 index 0000000..0616607 --- /dev/null +++ b/front/frontend/node_modules/mime-types/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/mime-types/README.md b/front/frontend/node_modules/mime-types/README.md new file mode 100644 index 0000000..222d2b5 --- /dev/null +++ b/front/frontend/node_modules/mime-types/README.md @@ -0,0 +1,126 @@ +# mime-types + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][ci-image]][ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +The ultimate javascript content-type utility. + +Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except: + +- __No fallbacks.__ Instead of naively returning the first available type, + `mime-types` simply returns `false`, so do + `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. +- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. +- No `.define()` functionality +- Bug fixes for `.lookup(path)` + +Otherwise, the API is compatible with `mime` 1.x. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install mime-types +``` + +## Note on MIME Type Data and Semver + +This package considers the programmatic api as the semver compatibility. Additionally, the package which provides the MIME data +for this package (`mime-db`) *also* considers it's programmatic api as the semver contract. This means the MIME type resolution is *not* considered +in the semver bumps. + +In the past the version of `mime-db` was pinned to give two decision points when adopting MIME data changes. This is no longer true. We still update the +`mime-db` package here as a `minor` release when necessary, but will use a `^` range going forward. This means that if you want to pin your `mime-db` data +you will need to do it in your application. While this expectation was not set in docs until now, it is how the pacakge operated, so we do not feel this is +a breaking change. + +If you wish to pin your `mime-db` version you can do that with overrides via your package manager of choice. See their documentation for how to correctly configure that. + +## Adding Types + +All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db), +so open a PR there if you'd like to add mime types. + +## API + +```js +var mime = require('mime-types') +``` + +All functions return `false` if input is invalid or not found. + +### mime.lookup(path) + +Lookup the content-type associated with a file. + +```js +mime.lookup('json') // 'application/json' +mime.lookup('.md') // 'text/markdown' +mime.lookup('file.html') // 'text/html' +mime.lookup('folder/file.js') // 'application/javascript' +mime.lookup('folder/.htaccess') // false + +mime.lookup('cats') // false +``` + +### mime.contentType(type) + +Create a full content-type header given a content-type or extension. +When given an extension, `mime.lookup` is used to get the matching +content-type, otherwise the given content-type is used. Then if the +content-type does not already have a `charset` parameter, `mime.charset` +is used to get the default charset and add to the returned content-type. + +```js +mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' +mime.contentType('file.json') // 'application/json; charset=utf-8' +mime.contentType('text/html') // 'text/html; charset=utf-8' +mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1' + +// from a full path +mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' +``` + +### mime.extension(type) + +Get the default extension for a content-type. + +```js +mime.extension('application/octet-stream') // 'bin' +``` + +### mime.charset(type) + +Lookup the implied default charset of a content-type. + +```js +mime.charset('text/markdown') // 'UTF-8' +``` + +### var type = mime.types[extension] + +A map of content-types by extension. + +### [extensions...] = mime.extensions[type] + +A map of extensions by content-type. + +## License + +[MIT](LICENSE) + +[ci-image]: https://badgen.net/github/checks/jshttp/mime-types/master?label=ci +[ci-url]: https://github.com/jshttp/mime-types/actions/workflows/ci.yml +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master +[node-version-image]: https://badgen.net/npm/node/mime-types +[node-version-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-types +[npm-url]: https://npmjs.org/package/mime-types +[npm-version-image]: https://badgen.net/npm/v/mime-types diff --git a/front/frontend/node_modules/mime-types/index.js b/front/frontend/node_modules/mime-types/index.js new file mode 100644 index 0000000..c348cb6 --- /dev/null +++ b/front/frontend/node_modules/mime-types/index.js @@ -0,0 +1,211 @@ +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var db = require('mime-db') +var extname = require('path').extname +var mimeScore = require('./mimeScore') + +/** + * Module variables. + * @private + */ + +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) +exports._extensionConflicts = [] + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 ? exports.lookup(str) : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .slice(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps (extensions, types) { + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + types[extension] = _preferredType(extension, types[extension], type) + + // DELETE (eventually): Capture extension->type maps that change as a + // result of switching to mime-score. This is just to help make reviewing + // PR #119 easier, and can be removed once that PR is approved. + const legacyType = _preferredTypeLegacy( + extension, + types[extension], + type + ) + if (legacyType !== types[extension]) { + exports._extensionConflicts.push([extension, legacyType, types[extension]]) + } + } + }) +} + +// Resolve type conflict using mime-score +function _preferredType (ext, type0, type1) { + var score0 = type0 ? mimeScore(type0, db[type0].source) : 0 + var score1 = type1 ? mimeScore(type1, db[type1].source) : 0 + + return score0 > score1 ? type0 : type1 +} + +// Resolve type conflict using pre-mime-score logic +function _preferredTypeLegacy (ext, type0, type1) { + var SOURCE_RANK = ['nginx', 'apache', undefined, 'iana'] + + var score0 = type0 ? SOURCE_RANK.indexOf(db[type0].source) : 0 + var score1 = type1 ? SOURCE_RANK.indexOf(db[type1].source) : 0 + + if ( + exports.types[extension] !== 'application/octet-stream' && + (score0 > score1 || + (score0 === score1 && + exports.types[extension]?.slice(0, 12) === 'application/')) + ) { + return type0 + } + + return score0 > score1 ? type0 : type1 +} diff --git a/front/frontend/node_modules/mime-types/mimeScore.js b/front/frontend/node_modules/mime-types/mimeScore.js new file mode 100644 index 0000000..e2ecc66 --- /dev/null +++ b/front/frontend/node_modules/mime-types/mimeScore.js @@ -0,0 +1,52 @@ +// 'mime-score' back-ported to CommonJS + +// Score RFC facets (see https://tools.ietf.org/html/rfc6838#section-3) +var FACET_SCORES = { + 'prs.': 100, + 'x-': 200, + 'x.': 300, + 'vnd.': 400, + default: 900 +} + +// Score mime source (Logic originally from `jshttp/mime-types` module) +var SOURCE_SCORES = { + nginx: 10, + apache: 20, + iana: 40, + default: 30 // definitions added by `jshttp/mime-db` project? +} + +var TYPE_SCORES = { + // prefer application/xml over text/xml + // prefer application/rtf over text/rtf + application: 1, + + // prefer font/woff over application/font-woff + font: 2, + + default: 0 +} + +/** + * Get each component of the score for a mime type. The sum of these is the + * total score. The higher the score, the more "official" the type. + */ +module.exports = function mimeScore (mimeType, source = 'default') { + if (mimeType === 'application/octet-stream') { + return 0 + } + + const [type, subtype] = mimeType.split('/') + + const facet = subtype.replace(/(\.|x-).*/, '$1') + + const facetScore = FACET_SCORES[facet] || FACET_SCORES.default + const sourceScore = SOURCE_SCORES[source] || SOURCE_SCORES.default + const typeScore = TYPE_SCORES[type] || TYPE_SCORES.default + + // All else being equal prefer shorter types + const lengthScore = 1 - mimeType.length / 100 + + return facetScore + sourceScore + typeScore + lengthScore +} diff --git a/front/frontend/node_modules/mime-types/package.json b/front/frontend/node_modules/mime-types/package.json new file mode 100644 index 0000000..79481ae --- /dev/null +++ b/front/frontend/node_modules/mime-types/package.json @@ -0,0 +1,45 @@ +{ + "name": "mime-types", + "description": "The ultimate javascript content-type utility.", + "version": "3.0.1", + "contributors": [ + "Douglas Christopher Wilson ", + "Jeremiah Senkpiel (https://searchbeam.jit.su)", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "keywords": [ + "mime", + "types" + ], + "repository": "jshttp/mime-types", + "dependencies": { + "mime-db": "^1.54.0" + }, + "devDependencies": { + "eslint": "8.33.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.27.5", + "eslint-plugin-markdown": "3.0.0", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "6.1.1", + "eslint-plugin-standard": "4.1.0", + "mocha": "10.2.0", + "nyc": "15.1.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js", + "mimeScore.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec test/test.js", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/front/frontend/node_modules/mixin-deep/LICENSE b/front/frontend/node_modules/mixin-deep/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/front/frontend/node_modules/mixin-deep/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/mixin-deep/README.md b/front/frontend/node_modules/mixin-deep/README.md new file mode 100644 index 0000000..111bde0 --- /dev/null +++ b/front/frontend/node_modules/mixin-deep/README.md @@ -0,0 +1,80 @@ +# mixin-deep [![NPM version](https://img.shields.io/npm/v/mixin-deep.svg?style=flat)](https://www.npmjs.com/package/mixin-deep) [![NPM monthly downloads](https://img.shields.io/npm/dm/mixin-deep.svg?style=flat)](https://npmjs.org/package/mixin-deep) [![NPM total downloads](https://img.shields.io/npm/dt/mixin-deep.svg?style=flat)](https://npmjs.org/package/mixin-deep) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/mixin-deep.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/mixin-deep) + +> Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save mixin-deep +``` + +## Usage + +```js +var mixinDeep = require('mixin-deep'); + +mixinDeep({a: {aa: 'aa'}}, {a: {bb: 'bb'}}, {a: {cc: 'cc'}}); +//=> { a: { aa: 'aa', bb: 'bb', cc: 'cc' } } +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [defaults-deep](https://www.npmjs.com/package/defaults-deep): Like `extend` but recursively copies only the missing properties/values to the target object. | [homepage](https://github.com/jonschlinkert/defaults-deep "Like `extend` but recursively copies only the missing properties/values to the target object.") +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") +* [mixin-object](https://www.npmjs.com/package/mixin-object): Mixin the own and inherited properties of other objects onto the first object. Pass an… [more](https://github.com/jonschlinkert/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object "Mixin the own and inherited properties of other objects onto the first object. Pass an empty object as the first arg to shallow clone.") + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on December 09, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/mixin-deep/index.js b/front/frontend/node_modules/mixin-deep/index.js new file mode 100644 index 0000000..47face2 --- /dev/null +++ b/front/frontend/node_modules/mixin-deep/index.js @@ -0,0 +1,64 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var forIn = require('for-in'); + +function mixinDeep(target, objects) { + var len = arguments.length, i = 0; + while (++i < len) { + var obj = arguments[i]; + if (isObject(obj)) { + forIn(obj, copy, target); + } + } + return target; +} + +/** + * Copy properties from the source object to the + * target object. + * + * @param {*} `val` + * @param {String} `key` + */ + +function copy(val, key) { + if (!isValidKey(key)) { + return; + } + + var obj = this[key]; + if (isObject(val) && isObject(obj)) { + mixinDeep(obj, val); + } else { + this[key] = val; + } +} + +/** + * Returns true if `val` is an object or function. + * + * @param {any} val + * @return {Boolean} + */ + +function isObject(val) { + return isExtendable(val) && !Array.isArray(val); +} + +/** + * Returns true if `key` is a valid key to use when extending objects. + * + * @param {String} `key` + * @return {Boolean} + */ + +function isValidKey(key) { + return key !== '__proto__' && key !== 'constructor' && key !== 'prototype'; +}; + +/** + * Expose `mixinDeep` + */ + +module.exports = mixinDeep; diff --git a/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/LICENSE b/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/README.md b/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/index.d.ts b/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/index.js b/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/package.json b/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/front/frontend/node_modules/mixin-deep/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/mixin-deep/package.json b/front/frontend/node_modules/mixin-deep/package.json new file mode 100644 index 0000000..0581c46 --- /dev/null +++ b/front/frontend/node_modules/mixin-deep/package.json @@ -0,0 +1,65 @@ +{ + "name": "mixin-deep", + "description": "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.", + "version": "1.3.2", + "homepage": "https://github.com/jonschlinkert/mixin-deep", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/mixin-deep", + "bugs": { + "url": "https://github.com/jonschlinkert/mixin-deep/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3", + "should": "^13.1.3" + }, + "keywords": [ + "deep", + "extend", + "key", + "keys", + "merge", + "mixin", + "object", + "prop", + "properties", + "util", + "values" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "defaults-deep", + "extend-shallow", + "merge-deep", + "mixin-object" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/morgan/HISTORY.md b/front/frontend/node_modules/morgan/HISTORY.md new file mode 100644 index 0000000..817cc71 --- /dev/null +++ b/front/frontend/node_modules/morgan/HISTORY.md @@ -0,0 +1,221 @@ +1.10.1 / 2025-07-17 +=================== + + * deps: on-headers@~1.1.0 + - Fix [CVE-2025-7339](https://www.cve.org/CVERecord?id=CVE-2025-7339) ([GHSA-76c9-3jph-rj3q](https://github.com/expressjs/multer/security/advisories/GHSA-76c9-3jph-rj3q)) + +1.10.0 / 2020-03-20 +=================== + + * Add `:total-time` token + * Fix trailing space in colored status code for `dev` format + * deps: basic-auth@~2.0.1 + - deps: safe-buffer@5.1.2 + * deps: depd@~2.0.0 + - Replace internal `eval` usage with `Function` constructor + - Use instance methods on `process` to check for listeners + * deps: on-headers@~1.0.2 + - Fix `res.writeHead` patch missing return value + +1.9.1 / 2018-09-10 +================== + + * Fix using special characters in format + * deps: depd@~1.1.2 + - perf: remove argument reassignment + +1.9.0 / 2017-09-26 +================== + + * Use `res.headersSent` when available + * deps: basic-auth@~2.0.0 + - Use `safe-buffer` for improved Buffer API + * deps: debug@2.6.9 + * deps: depd@~1.1.1 + - Remove unnecessary `Buffer` loading + +1.8.2 / 2017-05-23 +================== + + * deps: debug@2.6.8 + - Fix `DEBUG_MAX_ARRAY_LENGTH` + - deps: ms@2.0.0 + +1.8.1 / 2017-02-04 +================== + + * deps: debug@2.6.1 + - Fix deprecation messages in WebStorm and other editors + - Undeprecate `DEBUG_FD` set to `1` or `2` + +1.8.0 / 2017-02-04 +================== + + * Fix sending unnecessary `undefined` argument to token functions + * deps: basic-auth@~1.1.0 + * deps: debug@2.6.0 + - Allow colors in workers + - Deprecated `DEBUG_FD` environment variable + - Fix error when running under React Native + - Use same color for same namespace + - deps: ms@0.7.2 + * perf: enable strict mode in compiled functions + +1.7.0 / 2016-02-18 +================== + + * Add `digits` argument to `response-time` token + * deps: depd@~1.1.0 + - Enable strict mode in more places + - Support web browser loading + * deps: on-headers@~1.0.1 + - perf: enable strict mode + +1.6.1 / 2015-07-03 +================== + + * deps: basic-auth@~1.0.3 + +1.6.0 / 2015-06-12 +================== + + * Add `morgan.compile(format)` export + * Do not color 1xx status codes in `dev` format + * Fix `response-time` token to not include response latency + * Fix `status` token incorrectly displaying before response in `dev` format + * Fix token return values to be `undefined` or a string + * Improve representation of multiple headers in `req` and `res` tokens + * Use `res.getHeader` in `res` token + * deps: basic-auth@~1.0.2 + - perf: enable strict mode + - perf: hoist regular expression + - perf: parse with regular expressions + - perf: remove argument reassignment + * deps: on-finished@~2.3.0 + - Add defined behavior for HTTP `CONNECT` requests + - Add defined behavior for HTTP `Upgrade` requests + - deps: ee-first@1.1.1 + * pref: enable strict mode + * pref: reduce function closure scopes + * pref: remove dynamic compile on every request for `dev` format + * pref: remove an argument reassignment + * pref: skip function call without `skip` option + +1.5.3 / 2015-05-10 +================== + + * deps: basic-auth@~1.0.1 + * deps: debug@~2.2.0 + - deps: ms@0.7.1 + * deps: depd@~1.0.1 + * deps: on-finished@~2.2.1 + - Fix `isFinished(req)` when data buffered + +1.5.2 / 2015-03-15 +================== + + * deps: debug@~2.1.3 + - Fix high intensity foreground color for bold + - deps: ms@0.7.0 + +1.5.1 / 2014-12-31 +================== + + * deps: debug@~2.1.1 + * deps: on-finished@~2.2.0 + +1.5.0 / 2014-11-06 +================== + + * Add multiple date formats + - `clf` for the common log format + - `iso` for the common ISO 8601 date time format + - `web` for the common RFC 1123 date time format + * Deprecate `buffer` option + * Fix date format in `common` and `combined` formats + * Fix token arguments to accept values with `"` + +1.4.1 / 2014-10-22 +================== + + * deps: on-finished@~2.1.1 + - Fix handling of pipelined requests + +1.4.0 / 2014-10-16 +================== + + * Add `debug` messages + * deps: depd@~1.0.0 + +1.3.2 / 2014-09-27 +================== + + * Fix `req.ip` integration when `immediate: false` + +1.3.1 / 2014-09-14 +================== + + * Remove un-used `bytes` dependency + * deps: depd@0.4.5 + +1.3.0 / 2014-09-01 +================== + + * Assert if `format` is not a function or string + +1.2.3 / 2014-08-16 +================== + + * deps: on-finished@2.1.0 + +1.2.2 / 2014-07-27 +================== + + * deps: depd@0.4.4 + - Work-around v8 generating empty stack traces + +1.2.1 / 2014-07-26 +================== + + * deps: depd@0.4.3 + - Fix exception when global `Error.stackTraceLimit` is too low + +1.2.0 / 2014-07-19 +================== + + * Add `:remote-user` token + * Add `combined` log format + * Add `common` log format + * Add `morgan(format, options)` function signature + * Deprecate `default` format -- use `combined` format instead + * Deprecate not providing a format + * Remove non-standard grey color from `dev` format + +1.1.1 / 2014-05-20 +================== + + * simplify method to get remote address + +1.1.0 / 2014-05-18 +================== + + * "dev" format will use same tokens as other formats + * `:response-time` token is now empty when immediate used + * `:response-time` token is now monotonic + * `:response-time` token has precision to 1 μs + * fix `:status` + immediate output in node.js 0.8 + * improve `buffer` option to prevent indefinite event loop holding + * deps: bytes@1.0.0 + - add negative support + +1.0.1 / 2014-05-04 +================== + + * Make buffer unique per morgan instance + * deps: bytes@0.3.0 + * added terabyte support + +1.0.0 / 2014-02-08 +================== + + * Initial release diff --git a/front/frontend/node_modules/morgan/LICENSE b/front/frontend/node_modules/morgan/LICENSE new file mode 100644 index 0000000..3fefed9 --- /dev/null +++ b/front/frontend/node_modules/morgan/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2014-2017 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/morgan/README.md b/front/frontend/node_modules/morgan/README.md new file mode 100644 index 0000000..cc63797 --- /dev/null +++ b/front/frontend/node_modules/morgan/README.md @@ -0,0 +1,436 @@ +# morgan + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Build Status][ci-image]][ci-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +HTTP request logger middleware for node.js + +> Named after [Dexter](http://en.wikipedia.org/wiki/Dexter_Morgan), a show you should not watch until completion. + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install morgan +``` + +## API + + + +```js +var morgan = require('morgan') +``` + +### morgan(format, options) + +Create a new morgan logger middleware function using the given `format` and `options`. +The `format` argument may be a string of a predefined name (see below for the names), +a string of a format string, or a function that will produce a log entry. + +The `format` function will be called with three arguments `tokens`, `req`, and `res`, +where `tokens` is an object with all defined tokens, `req` is the HTTP request and `res` +is the HTTP response. The function is expected to return a string that will be the log +line, or `undefined` / `null` to skip logging. + +#### Using a predefined format string + + + +```js +morgan('tiny') +``` + +#### Using format string of predefined tokens + + + +```js +morgan(':method :url :status :res[content-length] - :response-time ms') +``` + +#### Using a custom format function + + + +``` js +morgan(function (tokens, req, res) { + return [ + tokens.method(req, res), + tokens.url(req, res), + tokens.status(req, res), + tokens.res(req, res, 'content-length'), '-', + tokens['response-time'](req, res), 'ms' + ].join(' ') +}) +``` + +#### Options + +Morgan accepts these properties in the options object. + +##### immediate + +Write log line on request instead of response. This means that a requests will +be logged even if the server crashes, _but data from the response (like the +response code, content length, etc.) cannot be logged_. + +##### skip + +Function to determine if logging is skipped, defaults to `false`. This function +will be called as `skip(req, res)`. + + + +```js +// EXAMPLE: only log error responses +morgan('combined', { + skip: function (req, res) { return res.statusCode < 400 } +}) +``` + +##### stream + +Output stream for writing log lines, defaults to `process.stdout`. + +#### Predefined Formats + +There are various pre-defined formats provided: + +##### combined + +Standard Apache combined log output. +``` +:remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent" +# will output +::1 - - [27/Nov/2024:06:21:42 +0000] "GET /combined HTTP/1.1" 200 2 "-" "curl/8.7.1" +``` + +##### common + +Standard Apache common log output. + +``` +:remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] +# will output +::1 - - [27/Nov/2024:06:21:46 +0000] "GET /common HTTP/1.1" 200 2 +``` + +##### dev + +Concise output colored by response status for development use. The `:status` +token will be colored green for success codes, red for server error codes, +yellow for client error codes, cyan for redirection codes, and uncolored +for information codes. + +``` +:method :url :status :response-time ms - :res[content-length] +# will output +GET /dev 200 0.224 ms - 2 +``` + +##### short + +Shorter than default, also including response time. + +``` +:remote-addr :remote-user :method :url HTTP/:http-version :status :res[content-length] - :response-time ms +# will output +::1 - GET /short HTTP/1.1 200 2 - 0.283 ms +``` + +##### tiny + +The minimal output. + +``` +:method :url :status :res[content-length] - :response-time ms +# will output +GET /tiny 200 2 - 0.188 ms +``` + +#### Tokens + +##### Creating new tokens + +To define a token, simply invoke `morgan.token()` with the name and a callback function. +This callback function is expected to return a string value. The value returned is then +available as ":type" in this case: + + + +```js +morgan.token('type', function (req, res) { return req.headers['content-type'] }) +``` + +Calling `morgan.token()` using the same name as an existing token will overwrite that +token definition. + +The token function is expected to be called with the arguments `req` and `res`, representing +the HTTP request and HTTP response. Additionally, the token can accept further arguments of +it's choosing to customize behavior. + +##### :date[format] + +The current date and time in UTC. The available formats are: + + - `clf` for the common log format (`"10/Oct/2000:13:55:36 +0000"`) + - `iso` for the common ISO 8601 date time format (`2000-10-10T13:55:36.000Z`) + - `web` for the common RFC 1123 date time format (`Tue, 10 Oct 2000 13:55:36 GMT`) + +If no format is given, then the default is `web`. + +##### :http-version + +The HTTP version of the request. + +##### :method + +The HTTP method of the request. + +##### :referrer + +The Referrer header of the request. This will use the standard mis-spelled Referer header if exists, otherwise Referrer. + +##### :remote-addr + +The remote address of the request. This will use `req.ip`, otherwise the standard `req.connection.remoteAddress` value (socket address). + +##### :remote-user + +The user authenticated as part of Basic auth for the request. + +##### :req[header] + +The given `header` of the request. If the header is not present, the +value will be displayed as `"-"` in the log. + +##### :res[header] + +The given `header` of the response. If the header is not present, the +value will be displayed as `"-"` in the log. + +##### :response-time[digits] + +The time between the request coming into `morgan` and when the response +headers are written, in milliseconds. + +The `digits` argument is a number that specifies the number of digits to +include on the number, defaulting to `3`, which provides microsecond precision. + +##### :status + +The status code of the response. + +If the request/response cycle completes before a response was sent to the +client (for example, the TCP socket closed prematurely by a client aborting +the request), then the status will be empty (displayed as `"-"` in the log). + +##### :total-time[digits] + +The time between the request coming into `morgan` and when the response +has finished being written out to the connection, in milliseconds. + +The `digits` argument is a number that specifies the number of digits to +include on the number, defaulting to `3`, which provides microsecond precision. + +##### :url + +The URL of the request. This will use `req.originalUrl` if exists, otherwise `req.url`. + +##### :user-agent + +The contents of the User-Agent header of the request. + +### morgan.compile(format) + +Compile a format string into a `format` function for use by `morgan`. A format string +is a string that represents a single log line and can utilize token syntax. +Tokens are references by `:token-name`. If tokens accept arguments, they can +be passed using `[]`, for example: `:token-name[pretty]` would pass the string +`'pretty'` as an argument to the token `token-name`. + +The function returned from `morgan.compile` takes three arguments `tokens`, `req`, and +`res`, where `tokens` is object with all defined tokens, `req` is the HTTP request and +`res` is the HTTP response. The function will return a string that will be the log line, +or `undefined` / `null` to skip logging. + +Normally formats are defined using `morgan.format(name, format)`, but for certain +advanced uses, this compile function is directly available. + +## Examples + +### express/connect + +Sample app that will log all request in the Apache combined format to STDOUT + +```js +var express = require('express') +var morgan = require('morgan') + +var app = express() + +app.use(morgan('combined')) + +app.get('/', function (req, res) { + res.send('hello, world!') +}) +``` + +### vanilla http server + +Sample app that will log all request in the Apache combined format to STDOUT + +```js +var finalhandler = require('finalhandler') +var http = require('http') +var morgan = require('morgan') + +// create "middleware" +var logger = morgan('combined') + +http.createServer(function (req, res) { + var done = finalhandler(req, res) + logger(req, res, function (err) { + if (err) return done(err) + + // respond to request + res.setHeader('content-type', 'text/plain') + res.end('hello, world!') + }) +}) +``` + +### write logs to a file + +#### single file + +Sample app that will log all requests in the Apache combined format to the file +`access.log`. + +```js +var express = require('express') +var fs = require('fs') +var morgan = require('morgan') +var path = require('path') + +var app = express() + +// create a write stream (in append mode) +var accessLogStream = fs.createWriteStream(path.join(__dirname, 'access.log'), { flags: 'a' }) + +// setup the logger +app.use(morgan('combined', { stream: accessLogStream })) + +app.get('/', function (req, res) { + res.send('hello, world!') +}) +``` + +#### log file rotation + +Sample app that will log all requests in the Apache combined format to one log +file per day in the `log/` directory using the +[rotating-file-stream module](https://www.npmjs.com/package/rotating-file-stream). + +```js +var express = require('express') +var morgan = require('morgan') +var path = require('path') +var rfs = require('rotating-file-stream') // version 2.x + +var app = express() + +// create a rotating write stream +var accessLogStream = rfs.createStream('access.log', { + interval: '1d', // rotate daily + path: path.join(__dirname, 'log') +}) + +// setup the logger +app.use(morgan('combined', { stream: accessLogStream })) + +app.get('/', function (req, res) { + res.send('hello, world!') +}) +``` + +### split / dual logging + +The `morgan` middleware can be used as many times as needed, enabling +combinations like: + + * Log entry on request and one on response + * Log all requests to file, but errors to console + * ... and more! + +Sample app that will log all requests to a file using Apache format, but +error responses are logged to the console: + +```js +var express = require('express') +var fs = require('fs') +var morgan = require('morgan') +var path = require('path') + +var app = express() + +// log only 4xx and 5xx responses to console +app.use(morgan('dev', { + skip: function (req, res) { return res.statusCode < 400 } +})) + +// log all requests to access.log +app.use(morgan('common', { + stream: fs.createWriteStream(path.join(__dirname, 'access.log'), { flags: 'a' }) +})) + +app.get('/', function (req, res) { + res.send('hello, world!') +}) +``` + +### use custom token formats + +Sample app that will use custom token formats. This adds an ID to all requests and displays it using the `:id` token. + +```js +var express = require('express') +var morgan = require('morgan') +var uuid = require('node-uuid') + +morgan.token('id', function getId (req) { + return req.id +}) + +var app = express() + +app.use(assignId) +app.use(morgan(':id :method :url :response-time')) + +app.get('/', function (req, res) { + res.send('hello, world!') +}) + +function assignId (req, res, next) { + req.id = uuid.v4() + next() +} +``` + +## License + +[MIT](LICENSE) + +[ci-image]: https://badgen.net/github/checks/expressjs/morgan/master?label=ci +[ci-url]: https://github.com/expressjs/morgan/actions/workflows/ci.yml +[coveralls-image]: https://badgen.net/coveralls/c/github/expressjs/morgan/master +[coveralls-url]: https://coveralls.io/r/expressjs/morgan?branch=master +[npm-downloads-image]: https://badgen.net/npm/dm/morgan +[npm-url]: https://npmjs.org/package/morgan +[npm-version-image]: https://badgen.net/npm/v/morgan diff --git a/front/frontend/node_modules/morgan/index.js b/front/frontend/node_modules/morgan/index.js new file mode 100644 index 0000000..b33c4f2 --- /dev/null +++ b/front/frontend/node_modules/morgan/index.js @@ -0,0 +1,544 @@ +/*! + * morgan + * Copyright(c) 2010 Sencha Inc. + * Copyright(c) 2011 TJ Holowaychuk + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = morgan +module.exports.compile = compile +module.exports.format = format +module.exports.token = token + +/** + * Module dependencies. + * @private + */ + +var auth = require('basic-auth') +var debug = require('debug')('morgan') +var deprecate = require('depd')('morgan') +var onFinished = require('on-finished') +var onHeaders = require('on-headers') + +/** + * Array of CLF month names. + * @private + */ + +var CLF_MONTH = [ + 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' +] + +/** + * Default log buffer duration. + * @private + */ + +var DEFAULT_BUFFER_DURATION = 1000 + +/** + * Create a logger middleware. + * + * @public + * @param {String|Function} format + * @param {Object} [options] + * @return {Function} middleware + */ + +function morgan (format, options) { + var fmt = format + var opts = options || {} + + if (format && typeof format === 'object') { + opts = format + fmt = opts.format || 'default' + + // smart deprecation message + deprecate('morgan(options): use morgan(' + (typeof fmt === 'string' ? JSON.stringify(fmt) : 'format') + ', options) instead') + } + + if (fmt === undefined) { + deprecate('undefined format: specify a format') + } + + // output on request instead of response + var immediate = opts.immediate + + // check if log entry should be skipped + var skip = opts.skip || false + + // format function + var formatLine = typeof fmt !== 'function' + ? getFormatFunction(fmt) + : fmt + + // stream + var buffer = opts.buffer + var stream = opts.stream || process.stdout + + // buffering support + if (buffer) { + deprecate('buffer option') + + // flush interval + var interval = typeof buffer !== 'number' + ? DEFAULT_BUFFER_DURATION + : buffer + + // swap the stream + stream = createBufferStream(stream, interval) + } + + return function logger (req, res, next) { + // request data + req._startAt = undefined + req._startTime = undefined + req._remoteAddress = getip(req) + + // response data + res._startAt = undefined + res._startTime = undefined + + // record request start + recordStartTime.call(req) + + function logRequest () { + if (skip !== false && skip(req, res)) { + debug('skip request') + return + } + + var line = formatLine(morgan, req, res) + + if (line == null) { + debug('skip line') + return + } + + debug('log request') + stream.write(line + '\n') + }; + + if (immediate) { + // immediate log + logRequest() + } else { + // record response start + onHeaders(res, recordStartTime) + + // log when response finished + onFinished(res, logRequest) + } + + next() + } +} + +/** + * Apache combined log format. + */ + +morgan.format('combined', ':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"') + +/** + * Apache common log format. + */ + +morgan.format('common', ':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length]') + +/** + * Default format. + */ + +morgan.format('default', ':remote-addr - :remote-user [:date] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"') +deprecate.property(morgan, 'default', 'default format: use combined format') + +/** + * Short format. + */ + +morgan.format('short', ':remote-addr :remote-user :method :url HTTP/:http-version :status :res[content-length] - :response-time ms') + +/** + * Tiny format. + */ + +morgan.format('tiny', ':method :url :status :res[content-length] - :response-time ms') + +/** + * dev (colored) + */ + +morgan.format('dev', function developmentFormatLine (tokens, req, res) { + // get the status code if response written + var status = headersSent(res) + ? res.statusCode + : undefined + + // get status color + var color = status >= 500 ? 31 // red + : status >= 400 ? 33 // yellow + : status >= 300 ? 36 // cyan + : status >= 200 ? 32 // green + : 0 // no color + + // get colored function + var fn = developmentFormatLine[color] + + if (!fn) { + // compile + fn = developmentFormatLine[color] = compile('\x1b[0m:method :url \x1b[' + + color + 'm:status\x1b[0m :response-time ms - :res[content-length]\x1b[0m') + } + + return fn(tokens, req, res) +}) + +/** + * request url + */ + +morgan.token('url', function getUrlToken (req) { + return req.originalUrl || req.url +}) + +/** + * request method + */ + +morgan.token('method', function getMethodToken (req) { + return req.method +}) + +/** + * response time in milliseconds + */ + +morgan.token('response-time', function getResponseTimeToken (req, res, digits) { + if (!req._startAt || !res._startAt) { + // missing request and/or response start time + return + } + + // calculate diff + var ms = (res._startAt[0] - req._startAt[0]) * 1e3 + + (res._startAt[1] - req._startAt[1]) * 1e-6 + + // return truncated value + return ms.toFixed(digits === undefined ? 3 : digits) +}) + +/** + * total time in milliseconds + */ + +morgan.token('total-time', function getTotalTimeToken (req, res, digits) { + if (!req._startAt || !res._startAt) { + // missing request and/or response start time + return + } + + // time elapsed from request start + var elapsed = process.hrtime(req._startAt) + + // cover to milliseconds + var ms = (elapsed[0] * 1e3) + (elapsed[1] * 1e-6) + + // return truncated value + return ms.toFixed(digits === undefined ? 3 : digits) +}) + +/** + * current date + */ + +morgan.token('date', function getDateToken (req, res, format) { + var date = new Date() + + switch (format || 'web') { + case 'clf': + return clfdate(date) + case 'iso': + return date.toISOString() + case 'web': + return date.toUTCString() + } +}) + +/** + * response status code + */ + +morgan.token('status', function getStatusToken (req, res) { + return headersSent(res) + ? String(res.statusCode) + : undefined +}) + +/** + * normalized referrer + */ + +morgan.token('referrer', function getReferrerToken (req) { + return req.headers.referer || req.headers.referrer +}) + +/** + * remote address + */ + +morgan.token('remote-addr', getip) + +/** + * remote user + */ + +morgan.token('remote-user', function getRemoteUserToken (req) { + // parse basic credentials + var credentials = auth(req) + + // return username + return credentials + ? credentials.name + : undefined +}) + +/** + * HTTP version + */ + +morgan.token('http-version', function getHttpVersionToken (req) { + return req.httpVersionMajor + '.' + req.httpVersionMinor +}) + +/** + * UA string + */ + +morgan.token('user-agent', function getUserAgentToken (req) { + return req.headers['user-agent'] +}) + +/** + * request header + */ + +morgan.token('req', function getRequestToken (req, res, field) { + // get header + var header = req.headers[field.toLowerCase()] + + return Array.isArray(header) + ? header.join(', ') + : header +}) + +/** + * response header + */ + +morgan.token('res', function getResponseHeader (req, res, field) { + if (!headersSent(res)) { + return undefined + } + + // get header + var header = res.getHeader(field) + + return Array.isArray(header) + ? header.join(', ') + : header +}) + +/** + * Format a Date in the common log format. + * + * @private + * @param {Date} dateTime + * @return {string} + */ + +function clfdate (dateTime) { + var date = dateTime.getUTCDate() + var hour = dateTime.getUTCHours() + var mins = dateTime.getUTCMinutes() + var secs = dateTime.getUTCSeconds() + var year = dateTime.getUTCFullYear() + + var month = CLF_MONTH[dateTime.getUTCMonth()] + + return pad2(date) + '/' + month + '/' + year + + ':' + pad2(hour) + ':' + pad2(mins) + ':' + pad2(secs) + + ' +0000' +} + +/** + * Compile a format string into a function. + * + * @param {string} format + * @return {function} + * @public + */ + +function compile (format) { + if (typeof format !== 'string') { + throw new TypeError('argument format must be a string') + } + + var fmt = String(JSON.stringify(format)) + var js = ' "use strict"\n return ' + fmt.replace(/:([-\w]{2,})(?:\[([^\]]+)\])?/g, function (_, name, arg) { + var tokenArguments = 'req, res' + var tokenFunction = 'tokens[' + String(JSON.stringify(name)) + ']' + + if (arg !== undefined) { + tokenArguments += ', ' + String(JSON.stringify(arg)) + } + + return '" +\n (' + tokenFunction + '(' + tokenArguments + ') || "-") + "' + }) + + // eslint-disable-next-line no-new-func + return new Function('tokens, req, res', js) +} + +/** + * Create a basic buffering stream. + * + * @param {object} stream + * @param {number} interval + * @public + */ + +function createBufferStream (stream, interval) { + var buf = [] + var timer = null + + // flush function + function flush () { + timer = null + stream.write(buf.join('')) + buf.length = 0 + } + + // write function + function write (str) { + if (timer === null) { + timer = setTimeout(flush, interval) + } + + buf.push(str) + } + + // return a minimal "stream" + return { write: write } +} + +/** + * Define a format with the given name. + * + * @param {string} name + * @param {string|function} fmt + * @public + */ + +function format (name, fmt) { + morgan[name] = fmt + return this +} + +/** + * Lookup and compile a named format function. + * + * @param {string} name + * @return {function} + * @public + */ + +function getFormatFunction (name) { + // lookup format + var fmt = morgan[name] || name || morgan.default + + // return compiled format + return typeof fmt !== 'function' + ? compile(fmt) + : fmt +} + +/** + * Get request IP address. + * + * @private + * @param {IncomingMessage} req + * @return {string} + */ + +function getip (req) { + return req.ip || + req._remoteAddress || + (req.connection && req.connection.remoteAddress) || + undefined +} + +/** + * Determine if the response headers have been sent. + * + * @param {object} res + * @returns {boolean} + * @private + */ + +function headersSent (res) { + // istanbul ignore next: node.js 0.8 support + return typeof res.headersSent !== 'boolean' + ? Boolean(res._header) + : res.headersSent +} + +/** + * Pad number to two digits. + * + * @private + * @param {number} num + * @return {string} + */ + +function pad2 (num) { + var str = String(num) + + // istanbul ignore next: num is current datetime + return (str.length === 1 ? '0' : '') + str +} + +/** + * Record the start time. + * @private + */ + +function recordStartTime () { + this._startAt = process.hrtime() + this._startTime = new Date() +} + +/** + * Define a token function with the given name, + * and callback fn(req, res). + * + * @param {string} name + * @param {function} fn + * @public + */ + +function token (name, fn) { + morgan[name] = fn + return this +} diff --git a/front/frontend/node_modules/morgan/package.json b/front/frontend/node_modules/morgan/package.json new file mode 100644 index 0000000..dc5519c --- /dev/null +++ b/front/frontend/node_modules/morgan/package.json @@ -0,0 +1,52 @@ +{ + "name": "morgan", + "description": "HTTP request logger middleware for node.js", + "version": "1.10.1", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "keywords": [ + "express", + "http", + "logger", + "middleware" + ], + "repository": "expressjs/morgan", + "dependencies": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.1.0" + }, + "devDependencies": { + "eslint": "6.8.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.20.2", + "eslint-plugin-markdown": "1.0.2", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "4.2.1", + "eslint-plugin-standard": "4.0.1", + "mocha": "10.4.0", + "nyc": "15.1.0", + "split": "1.0.1", + "supertest": "4.0.2" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.8.0" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --check-leaks --reporter spec", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/front/frontend/node_modules/ms/index.js b/front/frontend/node_modules/ms/index.js new file mode 100644 index 0000000..6a522b1 --- /dev/null +++ b/front/frontend/node_modules/ms/index.js @@ -0,0 +1,152 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + 'd'; + } + if (ms >= h) { + return Math.round(ms / h) + 'h'; + } + if (ms >= m) { + return Math.round(ms / m) + 'm'; + } + if (ms >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + return plural(ms, d, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name; + } + return Math.ceil(ms / n) + ' ' + name + 's'; +} diff --git a/front/frontend/node_modules/ms/license.md b/front/frontend/node_modules/ms/license.md new file mode 100644 index 0000000..69b6125 --- /dev/null +++ b/front/frontend/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/front/frontend/node_modules/ms/package.json b/front/frontend/node_modules/ms/package.json new file mode 100644 index 0000000..6a31c81 --- /dev/null +++ b/front/frontend/node_modules/ms/package.json @@ -0,0 +1,37 @@ +{ + "name": "ms", + "version": "2.0.0", + "description": "Tiny milisecond conversion utility", + "repository": "zeit/ms", + "main": "./index", + "files": [ + "index.js" + ], + "scripts": { + "precommit": "lint-staged", + "lint": "eslint lib/* bin/*", + "test": "mocha tests.js" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "license": "MIT", + "devDependencies": { + "eslint": "3.19.0", + "expect.js": "0.3.1", + "husky": "0.13.3", + "lint-staged": "3.4.1", + "mocha": "3.4.1" + } +} diff --git a/front/frontend/node_modules/ms/readme.md b/front/frontend/node_modules/ms/readme.md new file mode 100644 index 0000000..84a9974 --- /dev/null +++ b/front/frontend/node_modules/ms/readme.md @@ -0,0 +1,51 @@ +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +``` + +### Convert from milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(ms('10 hours')) // "10h" +``` + +### Time format written-out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [node](https://nodejs.org) and in the browser. +- If a number is supplied to `ms`, a string with a unit is returned. +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). +- If you pass a string with a number and a valid unit, the number of equivalent ms is returned. + +## Caught a bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/front/frontend/node_modules/nanomatch/CHANGELOG.md b/front/frontend/node_modules/nanomatch/CHANGELOG.md new file mode 100644 index 0000000..8c3aead --- /dev/null +++ b/front/frontend/node_modules/nanomatch/CHANGELOG.md @@ -0,0 +1,57 @@ +## History + +### key + +Changelog entries are classified using the following labels _(from [keep-a-changelog][]_): + +- `added`: for new features +- `changed`: for changes in existing functionality +- `deprecated`: for once-stable features removed in upcoming releases +- `removed`: for deprecated features removed in this release +- `fixed`: for any bug fixes +- `bumped`: updated dependencies, only minor or higher will be listed. + +### [1.1.0] - 2017-04-11 + +**Fixed** + +- adds support for unclosed quotes + +**Added** + +- adds support for `options.noglobstar` + +### [1.0.4] - 2017-04-06 + +Housekeeping updates. Adds documentation section about escaping, cleans up utils. + +### [1.0.3] - 2017-04-06 + +This release includes fixes for windows path edge cases and other improvements for stricter adherence to bash spec. + +**Fixed** + +- More windows path edge cases + +**Added** + +- Support for bash-like quoted strings for escaping sequences of characters, such as `foo/"**"/bar` where `**` should be matched literally and not evaluated as special characters. + +### [1.0.1] - 2016-12-12 + +**Added** + +- Support for windows path edge cases where backslashes are used in brackets or other unusual combinations. + +### [1.0.0] - 2016-12-12 + +Stable release. + +### [0.1.0] - 2016-10-08 + +First release. + +[Unreleased]: https://github.com/jonschlinkert/nanomatch/compare/0.1.0...HEAD +[0.2.0]: https://github.com/jonschlinkert/nanomatch/compare/0.1.0...0.2.0 + +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog diff --git a/front/frontend/node_modules/nanomatch/LICENSE b/front/frontend/node_modules/nanomatch/LICENSE new file mode 100644 index 0000000..7c9987b --- /dev/null +++ b/front/frontend/node_modules/nanomatch/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/nanomatch/README.md b/front/frontend/node_modules/nanomatch/README.md new file mode 100644 index 0000000..bdd35a9 --- /dev/null +++ b/front/frontend/node_modules/nanomatch/README.md @@ -0,0 +1,1148 @@ +# nanomatch [![NPM version](https://img.shields.io/npm/v/nanomatch.svg?style=flat)](https://www.npmjs.com/package/nanomatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/nanomatch.svg?style=flat)](https://npmjs.org/package/nanomatch) [![NPM total downloads](https://img.shields.io/npm/dt/nanomatch.svg?style=flat)](https://npmjs.org/package/nanomatch) [![Linux Build Status](https://img.shields.io/travis/micromatch/nanomatch.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/nanomatch) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/nanomatch.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/nanomatch) + +> Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces) + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Table of Contents + +
    +Details + +- [Install](#install) +- [What is nanomatch?](#what-is-nanomatch) +- [Getting started](#getting-started) + * [Installing nanomatch](#installing-nanomatch) + * [Usage](#usage) +- [Documentation](#documentation) + * [Escaping](#escaping) +- [API](#api) +- [Options](#options) + * [options.basename](#optionsbasename) + * [options.bash](#optionsbash) + * [options.cache](#optionscache) + * [options.dot](#optionsdot) + * [options.failglob](#optionsfailglob) + * [options.ignore](#optionsignore) + * [options.matchBase](#optionsmatchbase) + * [options.nocase](#optionsnocase) + * [options.nodupes](#optionsnodupes) + * [options.noglobstar](#optionsnoglobstar) + * [options.nonegate](#optionsnonegate) + * [options.nonull](#optionsnonull) + * [options.nullglob](#optionsnullglob) + * [options.slash](#optionsslash) + * [options.star](#optionsstar) + * [options.snapdragon](#optionssnapdragon) + * [options.sourcemap](#optionssourcemap) + * [options.unescape](#optionsunescape) + * [options.unixify](#optionsunixify) +- [Features](#features) +- [Bash expansion libs](#bash-expansion-libs) +- [Benchmarks](#benchmarks) + * [Running benchmarks](#running-benchmarks) + * [Nanomatch vs. Minimatch vs. Multimatch](#nanomatch-vs-minimatch-vs-multimatch) +- [About](#about) + +
    + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save nanomatch +``` + +
    +Release history + +## History + +### key + +Changelog entries are classified using the following labels _(from [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog)_): + +* `added`: for new features +* `changed`: for changes in existing functionality +* `deprecated`: for once-stable features removed in upcoming releases +* `removed`: for deprecated features removed in this release +* `fixed`: for any bug fixes +* `bumped`: updated dependencies, only minor or higher will be listed. + +### [1.1.0](https://github.com/micromatch/nanomatch/compare/1.0.4...1.1.0) - 2017-04-11 + +**Fixed** + +* adds support for unclosed quotes + +**Added** + +* adds support for `options.noglobstar` + +### [1.0.4](https://github.com/micromatch/nanomatch/compare/1.0.3...1.0.4) - 2017-04-06 + +Housekeeping updates. Adds documentation section about escaping, cleans up utils. + +### [1.0.3](https://github.com/micromatch/nanomatch/compare/1.0.1...1.0.3) - 2017-04-06 + +This release includes fixes for windows path edge cases and other improvements for stricter adherence to bash spec. + +**Fixed** + +* More windows path edge cases + +**Added** + +* Support for bash-like quoted strings for escaping sequences of characters, such as `foo/"**"/bar` where `**` should be matched literally and not evaluated as special characters. + +### [1.0.1](https://github.com/micromatch/nanomatch/compare/1.0.0...1.0.1) - 2016-12-12 + +**Added** + +* Support for windows path edge cases where backslashes are used in brackets or other unusual combinations. + +### [1.0.0](https://github.com/micromatch/nanomatch/compare/0.1.0...1.0.0) - 2016-12-12 + +Stable release. + +### [0.1.0] - 2016-10-08 + +First release. + +
    + +## What is nanomatch? + +Nanomatch is a fast and accurate glob matcher with full support for standard Bash glob features, including the following "metacharacters": `*`, `**`, `?` and `[...]`. + +**Learn more** + +* [Getting started](#getting-started): learn how to install and begin using nanomatch +* [Features](#features): jump to info about supported patterns, and a glob matching reference +* [API documentation](#api): jump to available options and methods +* [Unit tests](test): visit unit tests. there is no better way to learn a code library than spending time the unit tests. Nanomatch has 36,000 unit tests - go become a glob matching ninja! + +
    +How is this different? + +**Speed and accuracy** + +Nanomatch uses [snapdragon](https://github.com/jonschlinkert/snapdragon) for parsing and compiling globs, which results in: + +* Granular control over the entire conversion process in a way that is easy to understand, reason about, and customize. +* Faster matching, from a combination of optimized glob patterns and (optional) caching. +* Much greater accuracy than minimatch. In fact, nanomatch passes _all of the spec tests_ from bash, including some that bash still fails. However, since there is no real specification for globs, if you encounter a pattern that yields unexpected match results [after researching previous issues](../../issues), [please let us know](../../issues/new). + +**Basic globbing only** + +Nanomatch supports [basic globbing only](#features), which is limited to `*`, `**`, `?` and regex-like brackets. + +If you need support for the other [bash "expansion" types](#bash-expansion-libs) (in addition to the wildcard matching provided by nanomatch), consider using [micromatch](https://github.com/micromatch/micromatch) instead. _(micromatch >=3.0.0 uses the nanomatch parser and compiler for basic glob matching)_ + +
    + +## Getting started + +### Installing nanomatch + +**Install with [yarn](https://yarnpkg.com/)** + +```sh +$ yarn add nanomatch +``` + +**Install with [npm](https://npmjs.com)** + +```sh +$ npm install nanomatch +``` + +### Usage + +Add nanomatch to your project using node's `require()` system: + +```js +var nanomatch = require('nanomatch'); + +// the main export is a function that takes an array of strings to match +// and a string or array of patterns to use for matching +nanomatch(list, patterns[, options]); +``` + +**Params** + +* `list` **{String|Array}**: List of strings to perform matches against. This is often a list of file paths. +* `patterns` **{String|Array}**: One or more [glob paterns](#features) to use for matching. +* `options` **{Object}**: Any [supported options](#options) may be passed + +**Examples** + +```js +var nm = require('nanomatch'); +console.log(nm(['a', 'b/b', 'c/c/c'], '*')); +//=> ['a'] + +console.log(nm(['a', 'b/b', 'c/c/c'], '*/*')); +//=> ['b/b'] + +console.log(nm(['a', 'b/b', 'c/c/c'], '**')); +//=> ['a', 'b/b', 'c/c/c'] +``` + +See the [API documentation](#api) for available methods and [options](https://github.com/einaros/options.js). + +## Documentation + +### Escaping + +_Backslashes and quotes_ can be used to escape characters, forcing nanomatch to regard those characters as a literal characters. + +**Backslashes** + +Use backslashes to escape single characters. For example, the following pattern would match `foo/*/bar` exactly: + +```js +'foo/\*/bar' +``` + +The following pattern would match `foo/` followed by a literal `*`, followed by zero or more of any characters besides `/`, followed by `/bar`. + +```js +'foo/\**/bar' +``` + +**Quoted strings** + +Use single or double quotes to escape sequences of characters. For example, the following patterns would match `foo/**/bar` exactly: + +```js +'foo/"**"/bar' +'foo/\'**\'/bar' +"foo/'**'/bar" +``` + +**Matching literal quotes** + +If you need to match quotes literally, you can escape them as well. For example, the following will match `foo/"*"/bar`, `foo/"a"/bar`, `foo/"b"/bar`, or `foo/"c"/bar`: + +```js +'foo/\\"*\\"/bar' +``` + +And the following will match `foo/'*'/bar`, `foo/'a'/bar`, `foo/'b'/bar`, or `foo/'c'/bar`: + +```js +'foo/\\\'*\\\'/bar' +``` + +## API + +### [nanomatch](index.js#L40) + +The main function takes a list of strings and one or more glob patterns to use for matching. + +**Params** + +* `list` **{Array}**: A list of strings to match +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var nm = require('nanomatch'); +nm(list, patterns[, options]); + +console.log(nm(['a.js', 'a.txt'], ['*.js'])); +//=> [ 'a.js' ] +``` + +### [.match](index.js#L106) + +Similar to the main function, but `pattern` must be a string. + +**Params** + +* `list` **{Array}**: Array of strings to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var nm = require('nanomatch'); +nm.match(list, pattern[, options]); + +console.log(nm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); +//=> ['a.a', 'a.aa'] +``` + +### [.isMatch](index.js#L167) + +Returns true if the specified `string` matches the given glob `pattern`. + +**Params** + +* `string` **{String}**: String to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the string matches the glob pattern. + +**Example** + +```js +var nm = require('nanomatch'); +nm.isMatch(string, pattern[, options]); + +console.log(nm.isMatch('a.a', '*.a')); +//=> true +console.log(nm.isMatch('a.b', '*.a')); +//=> false +``` + +### [.some](index.js#L205) + +Returns true if some of the elements in the given `list` match any of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. Returns as soon as the first match is found. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.some(list, patterns[, options]); + +console.log(nm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// true +console.log(nm.some(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.every](index.js#L243) + +Returns true if every element in the given `list` matches at least one of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.every(list, patterns[, options]); + +console.log(nm.every('foo.js', ['foo.js'])); +// true +console.log(nm.every(['foo.js', 'bar.js'], ['*.js'])); +// true +console.log(nm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// false +console.log(nm.every(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.any](index.js#L277) + +Returns true if **any** of the given glob `patterns` match the specified `string`. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.any(string, patterns[, options]); + +console.log(nm.any('a.a', ['b.*', '*.a'])); +//=> true +console.log(nm.any('a.a', 'b.*')); +//=> false +``` + +### [.all](index.js#L325) + +Returns true if **all** of the given `patterns` match the specified string. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.all(string, patterns[, options]); + +console.log(nm.all('foo.js', ['foo.js'])); +// true + +console.log(nm.all('foo.js', ['*.js', '!foo.js'])); +// false + +console.log(nm.all('foo.js', ['*.js', 'foo.js'])); +// true + +console.log(nm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); +// true +``` + +### [.not](index.js#L359) + +Returns a list of strings that _**do not match any**_ of the given `patterns`. + +**Params** + +* `list` **{Array}**: Array of strings to match. +* `patterns` **{String|Array}**: One or more glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of strings that **do not match** the given patterns. + +**Example** + +```js +var nm = require('nanomatch'); +nm.not(list, patterns[, options]); + +console.log(nm.not(['a.a', 'b.b', 'c.c'], '*.a')); +//=> ['b.b', 'c.c'] +``` + +### [.contains](index.js#L394) + +Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string. + +**Params** + +* `str` **{String}**: The string to match. +* `patterns` **{String|Array}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the patter matches any part of `str`. + +**Example** + +```js +var nm = require('nanomatch'); +nm.contains(string, pattern[, options]); + +console.log(nm.contains('aa/bb/cc', '*b')); +//=> true +console.log(nm.contains('aa/bb/cc', '*d')); +//=> false +``` + +### [.matchKeys](index.js#L450) + +Filter the keys of the given object with the given `glob` pattern and `options`. Does not attempt to match nested keys. If you need this feature, use [glob-object](https://github.com/jonschlinkert/glob-object) instead. + +**Params** + +* `object` **{Object}**: The object with keys to filter. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Object}**: Returns an object with only keys that match the given patterns. + +**Example** + +```js +var nm = require('nanomatch'); +nm.matchKeys(object, patterns[, options]); + +var obj = { aa: 'a', ab: 'b', ac: 'c' }; +console.log(nm.matchKeys(obj, '*b')); +//=> { ab: 'b' } +``` + +### [.matcher](index.js#L479) + +Returns a memoized matcher function from the given glob `pattern` and `options`. The returned function takes a string to match as its only argument and returns true if the string is a match. + +**Params** + +* `pattern` **{String}**: Glob pattern +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{Function}**: Returns a matcher function. + +**Example** + +```js +var nm = require('nanomatch'); +nm.matcher(pattern[, options]); + +var isMatch = nm.matcher('*.!(*a)'); +console.log(isMatch('a.a')); +//=> false +console.log(isMatch('a.b')); +//=> true +``` + +### [.capture](index.js#L560) + +Returns an array of matches captured by `pattern` in `string, or`null` if the pattern did not match. + +**Params** + +* `pattern` **{String}**: Glob pattern to use for matching. +* `string` **{String}**: String to match +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns an array of captures if the string matches the glob pattern, otherwise `null`. + +**Example** + +```js +var nm = require('nanomatch'); +nm.capture(pattern, string[, options]); + +console.log(nm.capture('test/*.js', 'test/foo.js')); +//=> ['foo'] +console.log(nm.capture('test/*.js', 'foo/bar.css')); +//=> null +``` + +### [.makeRe](index.js#L595) + +Create a regular expression from the given glob `pattern`. + +**Params** + +* `pattern` **{String}**: A glob pattern to convert to regex. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{RegExp}**: Returns a regex created from the given pattern. + +**Example** + +```js +var nm = require('nanomatch'); +nm.makeRe(pattern[, options]); + +console.log(nm.makeRe('*.js')); +//=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ +``` + +### [.create](index.js#L658) + +Parses the given glob `pattern` and returns an object with the compiled `output` and optional source `map`. + +**Params** + +* `pattern` **{String}**: Glob pattern to parse and compile. +* `options` **{Object}**: Any [options](#options) to change how parsing and compiling is performed. +* `returns` **{Object}**: Returns an object with the parsed AST, compiled string and optional source map. + +**Example** + +```js +var nm = require('nanomatch'); +nm.create(pattern[, options]); + +console.log(nm.create('abc/*.js')); +// { options: { source: 'string', sourcemap: true }, +// state: {}, +// compilers: +// { ... }, +// output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', +// ast: +// { type: 'root', +// errors: [], +// nodes: +// [ ... ], +// dot: false, +// input: 'abc/*.js' }, +// parsingErrors: [], +// map: +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] }, +// position: { line: 1, column: 28 }, +// content: {}, +// files: {}, +// idx: 6 } +``` + +### [.parse](index.js#L697) + +Parse the given `str` with the given `options`. + +**Params** + +* `str` **{String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an AST + +**Example** + +```js +var nm = require('nanomatch'); +nm.parse(pattern[, options]); + +var ast = nm.parse('a/{b,c}/d'); +console.log(ast); +// { type: 'root', +// errors: [], +// input: 'a/{b,c}/d', +// nodes: +// [ { type: 'bos', val: '' }, +// { type: 'text', val: 'a/' }, +// { type: 'brace', +// nodes: +// [ { type: 'brace.open', val: '{' }, +// { type: 'text', val: 'b,c' }, +// { type: 'brace.close', val: '}' } ] }, +// { type: 'text', val: '/d' }, +// { type: 'eos', val: '' } ] } +``` + +### [.compile](index.js#L745) + +Compile the given `ast` or string with the given `options`. + +**Params** + +* `ast` **{Object|String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an object that has an `output` property with the compiled string. + +**Example** + +```js +var nm = require('nanomatch'); +nm.compile(ast[, options]); + +var ast = nm.parse('a/{b,c}/d'); +console.log(nm.compile(ast)); +// { options: { source: 'string' }, +// state: {}, +// compilers: +// { eos: [Function], +// noop: [Function], +// bos: [Function], +// brace: [Function], +// 'brace.open': [Function], +// text: [Function], +// 'brace.close': [Function] }, +// output: [ 'a/(b|c)/d' ], +// ast: +// { ... }, +// parsingErrors: [] } +``` + +### [.clearCache](index.js#L768) + +Clear the regex cache. + +**Example** + +```js +nm.clearCache(); +``` + +## Options + +
    +basename + +### options.basename + +Allow glob patterns without slashes to match a file path based on its basename. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `matchBase`. + +Type: `boolean` + +Default: `false` + +**Example** + +```js +nm(['a/b.js', 'a/c.md'], '*.js'); +//=> [] + +nm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true}); +//=> ['a/b.js'] +``` + +
    + +
    +bash + +### options.bash + +Enabled by default, this option enforces bash-like behavior with stars immediately following a bracket expression. Bash bracket expressions are similar to regex character classes, but unlike regex, a star following a bracket expression **does not repeat the bracketed characters**. Instead, the star is treated the same as an other star. + +Type: `boolean` + +Default: `true` + +**Example** + +```js +var files = ['abc', 'ajz']; +console.log(nm(files, '[a-c]*')); +//=> ['abc', 'ajz'] + +console.log(nm(files, '[a-c]*', {bash: false})); +``` + +
    + +
    +cache + +### options.cache + +Disable regex and function memoization. + +Type: `boolean` + +Default: `undefined` + +
    + +
    +dot + +### options.dot + +Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `dot`. + +Type: `boolean` + +Default: `false` + +
    + +
    +failglob + +### options.failglob + +Similar to the `--failglob` behavior in Bash, throws an error when no matches are found. + +Type: `boolean` + +Default: `undefined` + +
    + +
    +ignore + +### options.ignore + +String or array of glob patterns to match files to ignore. + +Type: `String|Array` + +Default: `undefined` + +
    + +
    +matchBase + +### options.matchBase + +Alias for [options.basename](#options-basename). + +
    + +
    +nocase + +### options.nocase + +Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `boolean` + +Default: `undefined` + +
    + +
    +nodupes + +### options.nodupes + +Remove duplicate elements from the result array. + +Type: `boolean` + +Default: `true` (enabled by default) + +**Example** + +Example of using the `unescape` and `nodupes` options together: + +```js +nm.match(['a/b/c', 'a/b/c'], '**'); +//=> ['abc'] + +nm.match(['a/b/c', 'a/b/c'], '**', {nodupes: false}); +//=> ['a/b/c', 'a/b/c'] +``` + +
    + +
    +nonegate + +### options.noglobstar + +Disable matching with globstars (`**`). + +Type: `boolean` + +Default: `undefined` + +```js +nm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**'); +//=> ['a/b', 'a/b/c', 'a/b/c/d'] + +nm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**', {noglobstar: true}); +//=> ['a/b'] +``` + +
    + +
    +nonegate + +### options.nonegate + +Disallow negation (`!`) patterns, and treat leading `!` as a literal character to match. + +Type: `boolean` + +Default: `undefined` + +
    + +
    +nonull + +### options.nonull + +Alias for [options.nullglob](#options-nullglob). + +
    + +
    +nullglob + +### options.nullglob + +If `true`, when no matches are found the actual (arrayified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nonull`. + +Type: `boolean` + +Default: `undefined` + +
    + +
    +slash + +### options.slash + +Customize the slash character(s) to use for matching. + +Type: `string|function` + +Default: `[/\\]` (forward slash and backslash) + +
    + +
    +star + +### options.star + +Customize the star character(s) to use for matching. It's not recommended that you modify this unless you have advanced knowledge of the compiler and matching rules. + +Type: `string|function` + +Default: `[^/\\]*?` + +
    + +
    +snapdragon + +### options.snapdragon + +Pass your own instance of [snapdragon](https://github.com/jonschlinkert/snapdragon) to customize parsers or compilers. + +Type: `object` + +Default: `undefined` + +
    + +
    +snapdragon + +### options.sourcemap + +Generate a source map by enabling the `sourcemap` option with the `.parse`, `.compile`, or `.create` methods. + +**Examples** + +```js +var nm = require('nanomatch'); + +var res = nm.create('abc/*.js', {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] } + +var ast = nm.parse('abc/**/*.js'); +var res = nm.compile(ast, {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,2BAAE,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/**/*.js' ] } +``` + +
    + +
    +unescape + +### options.unescape + +Remove backslashes from returned matches. + +Type: `boolean` + +Default: `undefined` + +**Example** + +In this example we want to match a literal `*`: + +```js +nm.match(['abc', 'a\\*c'], 'a\\*c'); +//=> ['a\\*c'] + +nm.match(['abc', 'a\\*c'], 'a\\*c', {unescape: true}); +//=> ['a*c'] +``` + +
    + +
    +unixify + +### options.unixify + +Convert path separators on returned files to posix/unix-style forward slashes. + +Type: `boolean` + +Default: `true` + +**Example** + +```js +nm.match(['a\\b\\c'], 'a/**'); +//=> ['a/b/c'] + +nm.match(['a\\b\\c'], {unixify: false}); +//=> ['a\\b\\c'] +``` + +
    + +## Features + +Nanomatch has full support for standard Bash glob features, including the following "metacharacters": `*`, `**`, `?` and `[...]`. + +Here are some examples of how they work: + +| **Pattern** | **Description** | +| --- | --- | +| `*` | Matches any string except for `/`, leading `.`, or `/.` inside a path | +| `**` | Matches any string including `/`, but not a leading `.` or `/.` inside a path. More than two stars (e.g. `***` is treated the same as one star, and `**` loses its special meaning | when it's not the only thing in a path segment, per Bash specifications) | +| `foo*` | Matches any string beginning with `foo` | +| `*bar*` | Matches any string containing `bar` (beginning, middle or end) | +| `*.min.js` | Matches any string ending with `.min.js` | +| `[abc]*.js` | Matches any string beginning with `a`, `b`, or `c` and ending with `.js` | +| `abc?` | Matches `abcd` or `abcz` but not `abcde` | + +The exceptions noted for `*` apply to all patterns that contain a `*`. + +**Not supported** + +The following extended-globbing features are not supported: + +* [brace expansion](https://github.com/jonschlinkert/braces) (e.g. `{a,b,c}`) +* [extglobs](https://github.com/jonschlinkert/extglob) (e.g. `@(a|!(c|d))`) +* [POSIX brackets](https://github.com/jonschlinkert/expand-brackets) (e.g. `[[:alpha:][:digit:]]`) + +If you need any of these features consider using [micromatch](https://github.com/micromatch/micromatch) instead. + +## Bash expansion libs + +Nanomatch is part of a suite of libraries aimed at bringing the power and expressiveness of [Bash's](https://www.gnu.org/software/bash/) matching and expansion capabilities to JavaScript, _and - as you can see by the [benchmarks](#benchmarks) - without sacrificing speed_. + +| **Related library** | **Matching Type** | **Example** | **Description** | +| --- | --- | --- | --- | +| `nanomatch` (you are here) | Wildcards | `*` | [Filename expansion](https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html#Filename-Expansion), also referred to as globbing and pathname expansion, allows the use of [wildcards](#features) for matching. | +| [expand-tilde](https://github.com/jonschlinkert/expand-tilde) | Tildes | `~` | [Tilde expansion](https://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html#Tilde-Expansion) converts the leading tilde in a file path to the user home directory. | +| [braces](https://github.com/jonschlinkert/braces) | Braces | `{a,b,c}` | [Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) | +| [expand-brackets](https://github.com/jonschlinkert/expand-brackets) | Brackets | `[[:alpha:]]` | [POSIX character classes](https://www.gnu.org/software/grep/manual/html_node/Character-Classes-and-Bracket-Expressions.html) (also referred to as POSIX brackets, or POSIX character classes) | +| [extglob](https://github.com/jonschlinkert/extglob) | Parens | `!(a\ | b)` | [Extglobs](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html#Pattern-Matching) | +| [micromatch](https://github.com/micromatch/micromatch) | All | all | Micromatch is built on top of the other libraries. | + +There are many resources available on the web if you want to dive deeper into how these features work in Bash. + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && node benchmark +``` + +### Nanomatch vs. Minimatch vs. Multimatch + +```bash +# globstar-basic (182 bytes) + minimatch x 69,512 ops/sec ±1.92% (88 runs sampled) + multimatch x 63,376 ops/sec ±1.41% (89 runs sampled) + nanomatch x 432,451 ops/sec ±0.92% (88 runs sampled) + + fastest is nanomatch (by 651% avg) + +# large-list-globstar (485686 bytes) + minimatch x 34.02 ops/sec ±1.42% (59 runs sampled) + multimatch x 33.58 ops/sec ±1.97% (58 runs sampled) + nanomatch x 483 ops/sec ±1.06% (86 runs sampled) + + fastest is nanomatch (by 1429% avg) + +# long-list-globstar (194085 bytes) + minimatch x 383 ops/sec ±0.74% (90 runs sampled) + multimatch x 378 ops/sec ±0.59% (89 runs sampled) + nanomatch x 990 ops/sec ±1.14% (85 runs sampled) + + fastest is nanomatch (by 260% avg) + +# negation-basic (132 bytes) + minimatch x 242,145 ops/sec ±1.17% (89 runs sampled) + multimatch x 76,403 ops/sec ±0.78% (92 runs sampled) + nanomatch x 537,253 ops/sec ±1.44% (86 runs sampled) + + fastest is nanomatch (by 337% avg) + +# not-glob-basic (93 bytes) + minimatch x 252,402 ops/sec ±1.33% (89 runs sampled) + multimatch x 209,954 ops/sec ±1.30% (90 runs sampled) + nanomatch x 1,716,468 ops/sec ±1.13% (86 runs sampled) + + fastest is nanomatch (by 742% avg) + +# star-basic (93 bytes) + minimatch x 182,780 ops/sec ±1.41% (91 runs sampled) + multimatch x 153,210 ops/sec ±0.72% (89 runs sampled) + nanomatch x 599,621 ops/sec ±1.22% (90 runs sampled) + + fastest is nanomatch (by 357% avg) + +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") +* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob "Returns true if a string has an extglob.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 164 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [devongovett](https://github.com/devongovett) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 18, 2018._ \ No newline at end of file diff --git a/front/frontend/node_modules/nanomatch/index.js b/front/frontend/node_modules/nanomatch/index.js new file mode 100644 index 0000000..dddc612 --- /dev/null +++ b/front/frontend/node_modules/nanomatch/index.js @@ -0,0 +1,838 @@ +'use strict'; + +/** + * Module dependencies + */ + +var util = require('util'); +var toRegex = require('to-regex'); +var extend = require('extend-shallow'); + +/** + * Local dependencies + */ + +var compilers = require('./lib/compilers'); +var parsers = require('./lib/parsers'); +var cache = require('./lib/cache'); +var utils = require('./lib/utils'); +var MAX_LENGTH = 1024 * 64; + +/** + * The main function takes a list of strings and one or more + * glob patterns to use for matching. + * + * ```js + * var nm = require('nanomatch'); + * nm(list, patterns[, options]); + * + * console.log(nm(['a.js', 'a.txt'], ['*.js'])); + * //=> [ 'a.js' ] + * ``` + * @param {Array} `list` A list of strings to match + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @summary false + * @api public + */ + +function nanomatch(list, patterns, options) { + patterns = utils.arrayify(patterns); + list = utils.arrayify(list); + + var len = patterns.length; + if (list.length === 0 || len === 0) { + return []; + } + + if (len === 1) { + return nanomatch.match(list, patterns[0], options); + } + + var negated = false; + var omit = []; + var keep = []; + var idx = -1; + + while (++idx < len) { + var pattern = patterns[idx]; + + if (typeof pattern === 'string' && pattern.charCodeAt(0) === 33 /* ! */) { + omit.push.apply(omit, nanomatch.match(list, pattern.slice(1), options)); + negated = true; + } else { + keep.push.apply(keep, nanomatch.match(list, pattern, options)); + } + } + + // minimatch.match parity + if (negated && keep.length === 0) { + if (options && options.unixify === false) { + keep = list.slice(); + } else { + var unixify = utils.unixify(options); + for (var i = 0; i < list.length; i++) { + keep.push(unixify(list[i])); + } + } + } + + var matches = utils.diff(keep, omit); + if (!options || options.nodupes !== false) { + return utils.unique(matches); + } + + return matches; +} + +/** + * Similar to the main function, but `pattern` must be a string. + * + * ```js + * var nm = require('nanomatch'); + * nm.match(list, pattern[, options]); + * + * console.log(nm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); + * //=> ['a.a', 'a.aa'] + * ``` + * @param {Array} `list` Array of strings to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @api public + */ + +nanomatch.match = function(list, pattern, options) { + if (Array.isArray(pattern)) { + throw new TypeError('expected pattern to be a string'); + } + + var unixify = utils.unixify(options); + var isMatch = memoize('match', pattern, options, nanomatch.matcher); + var matches = []; + + list = utils.arrayify(list); + var len = list.length; + var idx = -1; + + while (++idx < len) { + var ele = list[idx]; + if (ele === pattern || isMatch(ele)) { + matches.push(utils.value(ele, unixify, options)); + } + } + + // if no options were passed, uniquify results and return + if (typeof options === 'undefined') { + return utils.unique(matches); + } + + if (matches.length === 0) { + if (options.failglob === true) { + throw new Error('no matches found for "' + pattern + '"'); + } + if (options.nonull === true || options.nullglob === true) { + return [options.unescape ? utils.unescape(pattern) : pattern]; + } + } + + // if `opts.ignore` was defined, diff ignored list + if (options.ignore) { + matches = nanomatch.not(matches, options.ignore, options); + } + + return options.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the specified `string` matches the given glob `pattern`. + * + * ```js + * var nm = require('nanomatch'); + * nm.isMatch(string, pattern[, options]); + * + * console.log(nm.isMatch('a.a', '*.a')); + * //=> true + * console.log(nm.isMatch('a.b', '*.a')); + * //=> false + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the string matches the glob pattern. + * @api public + */ + +nanomatch.isMatch = function(str, pattern, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (utils.isEmptyString(str) || utils.isEmptyString(pattern)) { + return false; + } + + var equals = utils.equalsPattern(options); + if (equals(str)) { + return true; + } + + var isMatch = memoize('isMatch', pattern, options, nanomatch.matcher); + return isMatch(str); +}; + +/** + * Returns true if some of the elements in the given `list` match any of the + * given glob `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.some(list, patterns[, options]); + * + * console.log(nm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // true + * console.log(nm.some(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.some = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + + for (var i = 0; i < list.length; i++) { + if (nanomatch(list[i], patterns, options).length === 1) { + return true; + } + } + + return false; +}; + +/** + * Returns true if every element in the given `list` matches + * at least one of the given glob `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.every(list, patterns[, options]); + * + * console.log(nm.every('foo.js', ['foo.js'])); + * // true + * console.log(nm.every(['foo.js', 'bar.js'], ['*.js'])); + * // true + * console.log(nm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // false + * console.log(nm.every(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.every = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + + for (var i = 0; i < list.length; i++) { + if (nanomatch(list[i], patterns, options).length !== 1) { + return false; + } + } + + return true; +}; + +/** + * Returns true if **any** of the given glob `patterns` + * match the specified `string`. + * + * ```js + * var nm = require('nanomatch'); + * nm.any(string, patterns[, options]); + * + * console.log(nm.any('a.a', ['b.*', '*.a'])); + * //=> true + * console.log(nm.any('a.a', 'b.*')); + * //=> false + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.any = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (utils.isEmptyString(str) || utils.isEmptyString(patterns)) { + return false; + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (nanomatch.isMatch(str, patterns[i], options)) { + return true; + } + } + return false; +}; + +/** + * Returns true if **all** of the given `patterns` + * match the specified string. + * + * ```js + * var nm = require('nanomatch'); + * nm.all(string, patterns[, options]); + * + * console.log(nm.all('foo.js', ['foo.js'])); + * // true + * + * console.log(nm.all('foo.js', ['*.js', '!foo.js'])); + * // false + * + * console.log(nm.all('foo.js', ['*.js', 'foo.js'])); + * // true + * + * console.log(nm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); + * // true + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.all = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (!nanomatch.isMatch(str, patterns[i], options)) { + return false; + } + } + return true; +}; + +/** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.not(list, patterns[, options]); + * + * console.log(nm.not(['a.a', 'b.b', 'c.c'], '*.a')); + * //=> ['b.b', 'c.c'] + * ``` + * @param {Array} `list` Array of strings to match. + * @param {String|Array} `patterns` One or more glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of strings that **do not match** the given patterns. + * @api public + */ + +nanomatch.not = function(list, patterns, options) { + var opts = extend({}, options); + var ignore = opts.ignore; + delete opts.ignore; + + list = utils.arrayify(list); + + var matches = utils.diff(list, nanomatch(list, patterns, opts)); + if (ignore) { + matches = utils.diff(matches, nanomatch(list, ignore)); + } + + return opts.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar + * to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * ```js + * var nm = require('nanomatch'); + * nm.contains(string, pattern[, options]); + * + * console.log(nm.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(nm.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String|Array} `patterns` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the patter matches any part of `str`. + * @api public + */ + +nanomatch.contains = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + if (utils.isEmptyString(str) || utils.isEmptyString(patterns)) { + return false; + } + + var equals = utils.equalsPattern(patterns, options); + if (equals(str)) { + return true; + } + var contains = utils.containsPattern(patterns, options); + if (contains(str)) { + return true; + } + } + + var opts = extend({}, options, {contains: true}); + return nanomatch.any(str, patterns, opts); +}; + +/** + * Returns true if the given pattern and options should enable + * the `matchBase` option. + * @return {Boolean} + * @api private + */ + +nanomatch.matchBase = function(pattern, options) { + if (pattern && pattern.indexOf('/') !== -1 || !options) return false; + return options.basename === true || options.matchBase === true; +}; + +/** + * Filter the keys of the given object with the given `glob` pattern + * and `options`. Does not attempt to match nested keys. If you need this feature, + * use [glob-object][] instead. + * + * ```js + * var nm = require('nanomatch'); + * nm.matchKeys(object, patterns[, options]); + * + * var obj = { aa: 'a', ab: 'b', ac: 'c' }; + * console.log(nm.matchKeys(obj, '*b')); + * //=> { ab: 'b' } + * ``` + * @param {Object} `object` The object with keys to filter. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Object} Returns an object with only keys that match the given patterns. + * @api public + */ + +nanomatch.matchKeys = function(obj, patterns, options) { + if (!utils.isObject(obj)) { + throw new TypeError('expected the first argument to be an object'); + } + var keys = nanomatch(Object.keys(obj), patterns, options); + return utils.pick(obj, keys); +}; + +/** + * Returns a memoized matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns + * true if the string is a match. + * + * ```js + * var nm = require('nanomatch'); + * nm.matcher(pattern[, options]); + * + * var isMatch = nm.matcher('*.!(*a)'); + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.b')); + * //=> true + * ``` + * @param {String} `pattern` Glob pattern + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {Function} Returns a matcher function. + * @api public + */ + +nanomatch.matcher = function matcher(pattern, options) { + if (utils.isEmptyString(pattern)) { + return function() { + return false; + }; + } + + if (Array.isArray(pattern)) { + return compose(pattern, options, matcher); + } + + // if pattern is a regex + if (pattern instanceof RegExp) { + return test(pattern); + } + + // if pattern is invalid + if (!utils.isString(pattern)) { + throw new TypeError('expected pattern to be an array, string or regex'); + } + + // if pattern is a non-glob string + if (!utils.hasSpecialChars(pattern)) { + if (options && options.nocase === true) { + pattern = pattern.toLowerCase(); + } + return utils.matchPath(pattern, options); + } + + // if pattern is a glob string + var re = nanomatch.makeRe(pattern, options); + + // if `options.matchBase` or `options.basename` is defined + if (nanomatch.matchBase(pattern, options)) { + return utils.matchBasename(re, options); + } + + function test(regex) { + var equals = utils.equalsPattern(options); + var unixify = utils.unixify(options); + + return function(str) { + if (equals(str)) { + return true; + } + + if (regex.test(unixify(str))) { + return true; + } + return false; + }; + } + + // create matcher function + var matcherFn = test(re); + // set result object from compiler on matcher function, + // as a non-enumerable property. useful for debugging + utils.define(matcherFn, 'result', re.result); + return matcherFn; +}; + +/** + * Returns an array of matches captured by `pattern` in `string, or + * `null` if the pattern did not match. + * + * ```js + * var nm = require('nanomatch'); + * nm.capture(pattern, string[, options]); + * + * console.log(nm.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(nm.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `pattern` Glob pattern to use for matching. + * @param {String} `string` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`. + * @api public + */ + +nanomatch.capture = function(pattern, str, options) { + var re = nanomatch.makeRe(pattern, extend({capture: true}, options)); + var unixify = utils.unixify(options); + + function match() { + return function(string) { + var match = re.exec(unixify(string)); + if (!match) { + return null; + } + + return match.slice(1); + }; + } + + var capture = memoize('capture', pattern, options, match); + return capture(str); +}; + +/** + * Create a regular expression from the given glob `pattern`. + * + * ```js + * var nm = require('nanomatch'); + * nm.makeRe(pattern[, options]); + * + * console.log(nm.makeRe('*.js')); + * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ + * ``` + * @param {String} `pattern` A glob pattern to convert to regex. + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +nanomatch.makeRe = function(pattern, options) { + if (pattern instanceof RegExp) { + return pattern; + } + + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + function makeRe() { + var opts = utils.extend({wrap: false}, options); + var result = nanomatch.create(pattern, opts); + var regex = toRegex(result.output, opts); + utils.define(regex, 'result', result); + return regex; + } + + return memoize('makeRe', pattern, options, makeRe); +}; + +/** + * Parses the given glob `pattern` and returns an object with the compiled `output` + * and optional source `map`. + * + * ```js + * var nm = require('nanomatch'); + * nm.create(pattern[, options]); + * + * console.log(nm.create('abc/*.js')); + * // { options: { source: 'string', sourcemap: true }, + * // state: {}, + * // compilers: + * // { ... }, + * // output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', + * // ast: + * // { type: 'root', + * // errors: [], + * // nodes: + * // [ ... ], + * // dot: false, + * // input: 'abc/*.js' }, + * // parsingErrors: [], + * // map: + * // { version: 3, + * // sources: [ 'string' ], + * // names: [], + * // mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', + * // sourcesContent: [ 'abc/*.js' ] }, + * // position: { line: 1, column: 28 }, + * // content: {}, + * // files: {}, + * // idx: 6 } + * ``` + * @param {String} `pattern` Glob pattern to parse and compile. + * @param {Object} `options` Any [options](#options) to change how parsing and compiling is performed. + * @return {Object} Returns an object with the parsed AST, compiled string and optional source map. + * @api public + */ + +nanomatch.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + function create() { + return nanomatch.compile(nanomatch.parse(pattern, options), options); + } + return memoize('create', pattern, options, create); +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * var nm = require('nanomatch'); + * nm.parse(pattern[, options]); + * + * var ast = nm.parse('a/{b,c}/d'); + * console.log(ast); + * // { type: 'root', + * // errors: [], + * // input: 'a/{b,c}/d', + * // nodes: + * // [ { type: 'bos', val: '' }, + * // { type: 'text', val: 'a/' }, + * // { type: 'brace', + * // nodes: + * // [ { type: 'brace.open', val: '{' }, + * // { type: 'text', val: 'b,c' }, + * // { type: 'brace.close', val: '}' } ] }, + * // { type: 'text', val: '/d' }, + * // { type: 'eos', val: '' } ] } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an AST + * @api public + */ + +nanomatch.parse = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + function parse() { + var snapdragon = utils.instantiate(null, options); + parsers(snapdragon, options); + + var ast = snapdragon.parse(pattern, options); + utils.define(ast, 'snapdragon', snapdragon); + ast.input = pattern; + return ast; + } + + return memoize('parse', pattern, options, parse); +}; + +/** + * Compile the given `ast` or string with the given `options`. + * + * ```js + * var nm = require('nanomatch'); + * nm.compile(ast[, options]); + * + * var ast = nm.parse('a/{b,c}/d'); + * console.log(nm.compile(ast)); + * // { options: { source: 'string' }, + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // brace: [Function], + * // 'brace.open': [Function], + * // text: [Function], + * // 'brace.close': [Function] }, + * // output: [ 'a/(b|c)/d' ], + * // ast: + * // { ... }, + * // parsingErrors: [] } + * ``` + * @param {Object|String} `ast` + * @param {Object} `options` + * @return {Object} Returns an object that has an `output` property with the compiled string. + * @api public + */ + +nanomatch.compile = function(ast, options) { + if (typeof ast === 'string') { + ast = nanomatch.parse(ast, options); + } + + function compile() { + var snapdragon = utils.instantiate(ast, options); + compilers(snapdragon, options); + return snapdragon.compile(ast, options); + } + + return memoize('compile', ast.input, options, compile); +}; + +/** + * Clear the regex cache. + * + * ```js + * nm.clearCache(); + * ``` + * @api public + */ + +nanomatch.clearCache = function() { + nanomatch.cache.__data__ = {}; +}; + +/** + * Compose a matcher function with the given patterns. + * This allows matcher functions to be compiled once and + * called multiple times. + */ + +function compose(patterns, options, matcher) { + var matchers; + + return memoize('compose', String(patterns), options, function() { + return function(file) { + // delay composition until it's invoked the first time, + // after that it won't be called again + if (!matchers) { + matchers = []; + for (var i = 0; i < patterns.length; i++) { + matchers.push(matcher(patterns[i], options)); + } + } + + var len = matchers.length; + while (len--) { + if (matchers[len](file) === true) { + return true; + } + } + return false; + }; + }); +} + +/** + * Memoize a generated regex or function. A unique key is generated + * from the `type` (usually method name), the `pattern`, and + * user-defined options. + */ + +function memoize(type, pattern, options, fn) { + var key = utils.createKey(type + '=' + pattern, options); + + if (options && options.cache === false) { + return fn(pattern, options); + } + + if (cache.has(type, key)) { + return cache.get(type, key); + } + + var val = fn(pattern, options); + cache.set(type, key, val); + return val; +} + +/** + * Expose compiler, parser and cache on `nanomatch` + */ + +nanomatch.compilers = compilers; +nanomatch.parsers = parsers; +nanomatch.cache = cache; + +/** + * Expose `nanomatch` + * @type {Function} + */ + +module.exports = nanomatch; diff --git a/front/frontend/node_modules/nanomatch/lib/cache.js b/front/frontend/node_modules/nanomatch/lib/cache.js new file mode 100644 index 0000000..fffc4c1 --- /dev/null +++ b/front/frontend/node_modules/nanomatch/lib/cache.js @@ -0,0 +1 @@ +module.exports = new (require('fragment-cache'))(); diff --git a/front/frontend/node_modules/nanomatch/lib/compilers.js b/front/frontend/node_modules/nanomatch/lib/compilers.js new file mode 100644 index 0000000..d7a786e --- /dev/null +++ b/front/frontend/node_modules/nanomatch/lib/compilers.js @@ -0,0 +1,339 @@ +'use strict'; + +/** +* Nanomatch compilers +*/ + +module.exports = function(nanomatch, options) { + function slash() { + if (options && typeof options.slash === 'string') { + return options.slash; + } + if (options && typeof options.slash === 'function') { + return options.slash.call(nanomatch); + } + return '\\\\/'; + } + + function star() { + if (options && typeof options.star === 'string') { + return options.star; + } + if (options && typeof options.star === 'function') { + return options.star.call(nanomatch); + } + return '[^' + slash() + ']*?'; + } + + var ast = nanomatch.ast = nanomatch.parser.ast; + ast.state = nanomatch.parser.state; + nanomatch.compiler.state = ast.state; + nanomatch.compiler + + /** + * Negation / escaping + */ + + .set('not', function(node) { + var prev = this.prev(); + if (this.options.nonegate === true || prev.type !== 'bos') { + return this.emit('\\' + node.val, node); + } + return this.emit(node.val, node); + }) + .set('escape', function(node) { + if (this.options.unescape && /^[-\w_.]/.test(node.val)) { + return this.emit(node.val, node); + } + return this.emit('\\' + node.val, node); + }) + .set('quoted', function(node) { + return this.emit(node.val, node); + }) + + /** + * Regex + */ + + .set('dollar', function(node) { + if (node.parent.type === 'bracket') { + return this.emit(node.val, node); + } + return this.emit('\\' + node.val, node); + }) + + /** + * Dot: "." + */ + + .set('dot', function(node) { + if (node.dotfiles === true) this.dotfiles = true; + return this.emit('\\' + node.val, node); + }) + + /** + * Slashes: "/" and "\" + */ + + .set('backslash', function(node) { + return this.emit(node.val, node); + }) + .set('slash', function(node, nodes, i) { + var val = '[' + slash() + ']'; + var parent = node.parent; + var prev = this.prev(); + + // set "node.hasSlash" to true on all ancestor parens nodes + while (parent.type === 'paren' && !parent.hasSlash) { + parent.hasSlash = true; + parent = parent.parent; + } + + if (prev.addQmark) { + val += '?'; + } + + // word boundary + if (node.rest.slice(0, 2) === '\\b') { + return this.emit(val, node); + } + + // globstars + if (node.parsed === '**' || node.parsed === './**') { + this.output = '(?:' + this.output; + return this.emit(val + ')?', node); + } + + // negation + if (node.parsed === '!**' && this.options.nonegate !== true) { + return this.emit(val + '?\\b', node); + } + return this.emit(val, node); + }) + + /** + * Square brackets + */ + + .set('bracket', function(node) { + var close = node.close; + var open = !node.escaped ? '[' : '\\['; + var negated = node.negated; + var inner = node.inner; + var val = node.val; + + if (node.escaped === true) { + inner = inner.replace(/\\?(\W)/g, '\\$1'); + negated = ''; + } + + if (inner === ']-') { + inner = '\\]\\-'; + } + + if (negated && inner.indexOf('.') === -1) { + inner += '.'; + } + if (negated && inner.indexOf('/') === -1) { + inner += '/'; + } + + val = open + negated + inner + close; + return this.emit(val, node); + }) + + /** + * Square: "[.]" (only matches a single character in brackets) + */ + + .set('square', function(node) { + var val = (/^\W/.test(node.val) ? '\\' : '') + node.val; + return this.emit(val, node); + }) + + /** + * Question mark: "?" + */ + + .set('qmark', function(node) { + var prev = this.prev(); + // don't use "slash" variable so that we always avoid + // matching backslashes and slashes with a qmark + var val = '[^.\\\\/]'; + if (this.options.dot || (prev.type !== 'bos' && prev.type !== 'slash')) { + val = '[^\\\\/]'; + } + + if (node.parsed.slice(-1) === '(') { + var ch = node.rest.charAt(0); + if (ch === '!' || ch === '=' || ch === ':') { + return this.emit(node.val, node); + } + } + + if (node.val.length > 1) { + val += '{' + node.val.length + '}'; + } + return this.emit(val, node); + }) + + /** + * Plus + */ + + .set('plus', function(node) { + var prev = node.parsed.slice(-1); + if (prev === ']' || prev === ')') { + return this.emit(node.val, node); + } + if (!this.output || (/[?*+]/.test(ch) && node.parent.type !== 'bracket')) { + return this.emit('\\+', node); + } + var ch = this.output.slice(-1); + if (/\w/.test(ch) && !node.inside) { + return this.emit('+\\+?', node); + } + return this.emit('+', node); + }) + + /** + * globstar: '**' + */ + + .set('globstar', function(node, nodes, i) { + if (!this.output) { + this.state.leadingGlobstar = true; + } + + var prev = this.prev(); + var before = this.prev(2); + var next = this.next(); + var after = this.next(2); + var type = prev.type; + var val = node.val; + + if (prev.type === 'slash' && next.type === 'slash') { + if (before.type === 'text') { + this.output += '?'; + + if (after.type !== 'text') { + this.output += '\\b'; + } + } + } + + var parsed = node.parsed; + if (parsed.charAt(0) === '!') { + parsed = parsed.slice(1); + } + + var isInside = node.isInside.paren || node.isInside.brace; + if (parsed && type !== 'slash' && type !== 'bos' && !isInside) { + val = star(); + } else { + val = this.options.dot !== true + ? '(?:(?!(?:[' + slash() + ']|^)\\.).)*?' + : '(?:(?!(?:[' + slash() + ']|^)(?:\\.{1,2})($|[' + slash() + ']))(?!\\.{2}).)*?'; + } + + if ((type === 'slash' || type === 'bos') && this.options.dot !== true) { + val = '(?!\\.)' + val; + } + + if (prev.type === 'slash' && next.type === 'slash' && before.type !== 'text') { + if (after.type === 'text' || after.type === 'star') { + node.addQmark = true; + } + } + + if (this.options.capture) { + val = '(' + val + ')'; + } + + return this.emit(val, node); + }) + + /** + * Star: "*" + */ + + .set('star', function(node, nodes, i) { + var prior = nodes[i - 2] || {}; + var prev = this.prev(); + var next = this.next(); + var type = prev.type; + + function isStart(n) { + return n.type === 'bos' || n.type === 'slash'; + } + + if (this.output === '' && this.options.contains !== true) { + this.output = '(?![' + slash() + '])'; + } + + if (type === 'bracket' && this.options.bash === false) { + var str = next && next.type === 'bracket' ? star() : '*?'; + if (!prev.nodes || prev.nodes[1].type !== 'posix') { + return this.emit(str, node); + } + } + + var prefix = !this.dotfiles && type !== 'text' && type !== 'escape' + ? (this.options.dot ? '(?!(?:^|[' + slash() + '])\\.{1,2}(?:$|[' + slash() + ']))' : '(?!\\.)') + : ''; + + if (isStart(prev) || (isStart(prior) && type === 'not')) { + if (prefix !== '(?!\\.)') { + prefix += '(?!(\\.{2}|\\.[' + slash() + ']))(?=.)'; + } else { + prefix += '(?=.)'; + } + } else if (prefix === '(?!\\.)') { + prefix = ''; + } + + if (prev.type === 'not' && prior.type === 'bos' && this.options.dot === true) { + this.output = '(?!\\.)' + this.output; + } + + var output = prefix + star(); + if (this.options.capture) { + output = '(' + output + ')'; + } + + return this.emit(output, node); + }) + + /** + * Text + */ + + .set('text', function(node) { + return this.emit(node.val, node); + }) + + /** + * End-of-string + */ + + .set('eos', function(node) { + var prev = this.prev(); + var val = node.val; + + this.output = '(?:\\.[' + slash() + '](?=.))?' + this.output; + if (this.state.metachar && prev.type !== 'qmark' && prev.type !== 'slash') { + val += (this.options.contains ? '[' + slash() + ']?' : '(?:[' + slash() + ']|$)'); + } + + return this.emit(val, node); + }); + + /** + * Allow custom compilers to be passed on options + */ + + if (options && typeof options.compilers === 'function') { + options.compilers(nanomatch.compiler); + } +}; + diff --git a/front/frontend/node_modules/nanomatch/lib/parsers.js b/front/frontend/node_modules/nanomatch/lib/parsers.js new file mode 100644 index 0000000..f87df8f --- /dev/null +++ b/front/frontend/node_modules/nanomatch/lib/parsers.js @@ -0,0 +1,386 @@ +'use strict'; + +var regexNot = require('regex-not'); +var toRegex = require('to-regex'); + +/** + * Characters to use in negation regex (we want to "not" match + * characters that are matched by other parsers) + */ + +var cached; +var NOT_REGEX = '[\\[!*+?$^"\'.\\\\/]+'; +var not = createTextRegex(NOT_REGEX); + +/** + * Nanomatch parsers + */ + +module.exports = function(nanomatch, options) { + var parser = nanomatch.parser; + var opts = parser.options; + + parser.state = { + slashes: 0, + paths: [] + }; + + parser.ast.state = parser.state; + parser + + /** + * Beginning-of-string + */ + + .capture('prefix', function() { + if (this.parsed) return; + var m = this.match(/^\.[\\/]/); + if (!m) return; + this.state.strictOpen = !!this.options.strictOpen; + this.state.addPrefix = true; + }) + + /** + * Escape: "\\." + */ + + .capture('escape', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(/^(?:\\(.)|([$^]))/); + if (!m) return; + + return pos({ + type: 'escape', + val: m[2] || m[1] + }); + }) + + /** + * Quoted strings + */ + + .capture('quoted', function() { + var pos = this.position(); + var m = this.match(/^["']/); + if (!m) return; + + var quote = m[0]; + if (this.input.indexOf(quote) === -1) { + return pos({ + type: 'escape', + val: quote + }); + } + + var tok = advanceTo(this.input, quote); + this.consume(tok.len); + + return pos({ + type: 'quoted', + val: tok.esc + }); + }) + + /** + * Negations: "!" + */ + + .capture('not', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(this.notRegex || /^!+/); + if (!m) return; + var val = m[0]; + + var isNegated = (val.length % 2) === 1; + if (parsed === '' && !isNegated) { + val = ''; + } + + // if nothing has been parsed, we know `!` is at the start, + // so we need to wrap the result in a negation regex + if (parsed === '' && isNegated && this.options.nonegate !== true) { + this.bos.val = '(?!^(?:'; + this.append = ')$).*'; + val = ''; + } + return pos({ + type: 'not', + val: val + }); + }) + + /** + * Dot: "." + */ + + .capture('dot', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\.+/); + if (!m) return; + + var val = m[0]; + this.state.dot = val === '.' && (parsed === '' || parsed.slice(-1) === '/'); + + return pos({ + type: 'dot', + dotfiles: this.state.dot, + val: val + }); + }) + + /** + * Plus: "+" + */ + + .capture('plus', /^\+(?!\()/) + + /** + * Question mark: "?" + */ + + .capture('qmark', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\?+(?!\()/); + if (!m) return; + + this.state.metachar = true; + this.state.qmark = true; + + return pos({ + type: 'qmark', + parsed: parsed, + val: m[0] + }); + }) + + /** + * Globstar: "**" + */ + + .capture('globstar', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\*{2}(?![*(])(?=[,)/]|$)/); + if (!m) return; + + var type = opts.noglobstar !== true ? 'globstar' : 'star'; + var node = pos({type: type, parsed: parsed}); + this.state.metachar = true; + + while (this.input.slice(0, 4) === '/**/') { + this.input = this.input.slice(3); + } + + node.isInside = { + brace: this.isInside('brace'), + paren: this.isInside('paren') + }; + + if (type === 'globstar') { + this.state.globstar = true; + node.val = '**'; + + } else { + this.state.star = true; + node.val = '*'; + } + + return node; + }) + + /** + * Star: "*" + */ + + .capture('star', function() { + var pos = this.position(); + var starRe = /^(?:\*(?![*(])|[*]{3,}(?!\()|[*]{2}(?![(/]|$)|\*(?=\*\())/; + var m = this.match(starRe); + if (!m) return; + + this.state.metachar = true; + this.state.star = true; + return pos({ + type: 'star', + val: m[0] + }); + }) + + /** + * Slash: "/" + */ + + .capture('slash', function() { + var pos = this.position(); + var m = this.match(/^\//); + if (!m) return; + + this.state.slashes++; + return pos({ + type: 'slash', + val: m[0] + }); + }) + + /** + * Backslash: "\\" + */ + + .capture('backslash', function() { + var pos = this.position(); + var m = this.match(/^\\(?![*+?(){}[\]'"])/); + if (!m) return; + + var val = m[0]; + + if (this.isInside('bracket')) { + val = '\\'; + } else if (val.length > 1) { + val = '\\\\'; + } + + return pos({ + type: 'backslash', + val: val + }); + }) + + /** + * Square: "[.]" + */ + + .capture('square', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(/^\[([^!^\\])\]/); + if (!m) return; + + return pos({ + type: 'square', + val: m[1] + }); + }) + + /** + * Brackets: "[...]" (basic, this can be overridden by other parsers) + */ + + .capture('bracket', function() { + var pos = this.position(); + var m = this.match(/^(?:\[([!^]?)([^\]]+|\]-)(\]|[^*+?]+)|\[)/); + if (!m) return; + + var val = m[0]; + var negated = m[1] ? '^' : ''; + var inner = (m[2] || '').replace(/\\\\+/, '\\\\'); + var close = m[3] || ''; + + if (m[2] && inner.length < m[2].length) { + val = val.replace(/\\\\+/, '\\\\'); + } + + var esc = this.input.slice(0, 2); + if (inner === '' && esc === '\\]') { + inner += esc; + this.consume(2); + + var str = this.input; + var idx = -1; + var ch; + + while ((ch = str[++idx])) { + this.consume(1); + if (ch === ']') { + close = ch; + break; + } + inner += ch; + } + } + + return pos({ + type: 'bracket', + val: val, + escaped: close !== ']', + negated: negated, + inner: inner, + close: close + }); + }) + + /** + * Text + */ + + .capture('text', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(not); + if (!m || !m[0]) return; + + return pos({ + type: 'text', + val: m[0] + }); + }); + + /** + * Allow custom parsers to be passed on options + */ + + if (options && typeof options.parsers === 'function') { + options.parsers(nanomatch.parser); + } +}; + +/** + * Advance to the next non-escaped character + */ + +function advanceTo(input, endChar) { + var ch = input.charAt(0); + var tok = { len: 1, val: '', esc: '' }; + var idx = 0; + + function advance() { + if (ch !== '\\') { + tok.esc += '\\' + ch; + tok.val += ch; + } + + ch = input.charAt(++idx); + tok.len++; + + if (ch === '\\') { + advance(); + advance(); + } + } + + while (ch && ch !== endChar) { + advance(); + } + return tok; +} + +/** + * Create text regex + */ + +function createTextRegex(pattern) { + if (cached) return cached; + var opts = {contains: true, strictClose: false}; + var not = regexNot.create(pattern, opts); + var re = toRegex('^(?:[*]\\((?=.)|' + not + ')', opts); + return (cached = re); +} + +/** + * Expose negation string + */ + +module.exports.not = NOT_REGEX; diff --git a/front/frontend/node_modules/nanomatch/lib/utils.js b/front/frontend/node_modules/nanomatch/lib/utils.js new file mode 100644 index 0000000..0cf1501 --- /dev/null +++ b/front/frontend/node_modules/nanomatch/lib/utils.js @@ -0,0 +1,379 @@ +'use strict'; + +var utils = module.exports; +var path = require('path'); + +/** + * Module dependencies + */ + +var isWindows = require('is-windows')(); +var Snapdragon = require('snapdragon'); +utils.define = require('define-property'); +utils.diff = require('arr-diff'); +utils.extend = require('extend-shallow'); +utils.pick = require('object.pick'); +utils.typeOf = require('kind-of'); +utils.unique = require('array-unique'); + +/** + * Returns true if the given value is effectively an empty string + */ + +utils.isEmptyString = function(val) { + return String(val) === '' || String(val) === './'; +}; + +/** + * Returns true if the platform is windows, or `path.sep` is `\\`. + * This is defined as a function to allow `path.sep` to be set in unit tests, + * or by the user, if there is a reason to do so. + * @return {Boolean} + */ + +utils.isWindows = function() { + return path.sep === '\\' || isWindows === true; +}; + +/** + * Return the last element from an array + */ + +utils.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; + +/** + * Get the `Snapdragon` instance to use + */ + +utils.instantiate = function(ast, options) { + var snapdragon; + // if an instance was created by `.parse`, use that instance + if (utils.typeOf(ast) === 'object' && ast.snapdragon) { + snapdragon = ast.snapdragon; + // if the user supplies an instance on options, use that instance + } else if (utils.typeOf(options) === 'object' && options.snapdragon) { + snapdragon = options.snapdragon; + // create a new instance + } else { + snapdragon = new Snapdragon(options); + } + + utils.define(snapdragon, 'parse', function(str, options) { + var parsed = Snapdragon.prototype.parse.call(this, str, options); + parsed.input = str; + + // escape unmatched brace/bracket/parens + var last = this.parser.stack.pop(); + if (last && this.options.strictErrors !== true) { + var open = last.nodes[0]; + var inner = last.nodes[1]; + if (last.type === 'bracket') { + if (inner.val.charAt(0) === '[') { + inner.val = '\\' + inner.val; + } + + } else { + open.val = '\\' + open.val; + var sibling = open.parent.nodes[1]; + if (sibling.type === 'star') { + sibling.loose = true; + } + } + } + + // add non-enumerable parser reference + utils.define(parsed, 'parser', this.parser); + return parsed; + }); + + return snapdragon; +}; + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +utils.createKey = function(pattern, options) { + if (typeof options === 'undefined') { + return pattern; + } + var key = pattern; + for (var prop in options) { + if (options.hasOwnProperty(prop)) { + key += ';' + prop + '=' + String(options[prop]); + } + } + return key; +}; + +/** + * Cast `val` to an array + * @return {Array} + */ + +utils.arrayify = function(val) { + if (typeof val === 'string') return [val]; + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isString = function(val) { + return typeof val === 'string'; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isRegex = function(val) { + return utils.typeOf(val) === 'regexp'; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isObject = function(val) { + return utils.typeOf(val) === 'object'; +}; + +/** + * Escape regex characters in the given string + */ + +utils.escapeRegex = function(str) { + return str.replace(/[-[\]{}()^$|*+?.\\/\s]/g, '\\$&'); +}; + +/** + * Combines duplicate characters in the provided `input` string. + * @param {String} `input` + * @returns {String} + */ + +utils.combineDupes = function(input, patterns) { + patterns = utils.arrayify(patterns).join('|').split('|'); + patterns = patterns.map(function(s) { + return s.replace(/\\?([+*\\/])/g, '\\$1'); + }); + var substr = patterns.join('|'); + var regex = new RegExp('(' + substr + ')(?=\\1)', 'g'); + return input.replace(regex, ''); +}; + +/** + * Returns true if the given `str` has special characters + */ + +utils.hasSpecialChars = function(str) { + return /(?:(?:(^|\/)[!.])|[*?+()|[\]{}]|[+@]\()/.test(str); +}; + +/** + * Normalize slashes in the given filepath. + * + * @param {String} `filepath` + * @return {String} + */ + +utils.toPosixPath = function(str) { + return str.replace(/\\+/g, '/'); +}; + +/** + * Strip backslashes before special characters in a string. + * + * @param {String} `str` + * @return {String} + */ + +utils.unescape = function(str) { + return utils.toPosixPath(str.replace(/\\(?=[*+?!.])/g, '')); +}; + +/** + * Strip the drive letter from a windows filepath + * @param {String} `fp` + * @return {String} + */ + +utils.stripDrive = function(fp) { + return utils.isWindows() ? fp.replace(/^[a-z]:[\\/]+?/i, '/') : fp; +}; + +/** + * Strip the prefix from a filepath + * @param {String} `fp` + * @return {String} + */ + +utils.stripPrefix = function(str) { + if (str.charAt(0) === '.' && (str.charAt(1) === '/' || str.charAt(1) === '\\')) { + return str.slice(2); + } + return str; +}; + +/** + * Returns true if `str` is a common character that doesn't need + * to be processed to be used for matching. + * @param {String} `str` + * @return {Boolean} + */ + +utils.isSimpleChar = function(str) { + return str.trim() === '' || str === '.'; +}; + +/** + * Returns true if the given str is an escaped or + * unescaped path character + */ + +utils.isSlash = function(str) { + return str === '/' || str === '\\/' || str === '\\' || str === '\\\\'; +}; + +/** + * Returns a function that returns true if the given + * pattern matches or contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.matchPath = function(pattern, options) { + return (options && options.contains) + ? utils.containsPattern(pattern, options) + : utils.equalsPattern(pattern, options); +}; + +/** + * Returns true if the given (original) filepath or unixified path are equal + * to the given pattern. + */ + +utils._equals = function(filepath, unixPath, pattern) { + return pattern === filepath || pattern === unixPath; +}; + +/** + * Returns true if the given (original) filepath or unixified path contain + * the given pattern. + */ + +utils._contains = function(filepath, unixPath, pattern) { + return filepath.indexOf(pattern) !== -1 || unixPath.indexOf(pattern) !== -1; +}; + +/** + * Returns a function that returns true if the given + * pattern is the same as a given `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.equalsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function fn(filepath) { + var equal = utils._equals(filepath, unixify(filepath), pattern); + if (equal === true || options.nocase !== true) { + return equal; + } + var lower = filepath.toLowerCase(); + return utils._equals(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * pattern contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.containsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function(filepath) { + var contains = utils._contains(filepath, unixify(filepath), pattern); + if (contains === true || options.nocase !== true) { + return contains; + } + var lower = filepath.toLowerCase(); + return utils._contains(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * regex matches the `filename` of a file path. + * + * @param {RegExp} `re` Matching regex + * @return {Function} + */ + +utils.matchBasename = function(re) { + return function(filepath) { + return re.test(filepath) || re.test(path.basename(filepath)); + }; +}; + +/** + * Returns the given value unchanced. + * @return {any} + */ + +utils.identity = function(val) { + return val; +}; + +/** + * Determines the filepath to return based on the provided options. + * @return {any} + */ + +utils.value = function(str, unixify, options) { + if (options && options.unixify === false) { + return str; + } + if (options && typeof options.unixify === 'function') { + return options.unixify(str); + } + return unixify(str); +}; + +/** + * Returns a function that normalizes slashes in a string to forward + * slashes, strips `./` from beginning of paths, and optionally unescapes + * special characters. + * @return {Function} + */ + +utils.unixify = function(options) { + var opts = options || {}; + return function(filepath) { + if (opts.stripPrefix !== false) { + filepath = utils.stripPrefix(filepath); + } + if (opts.unescape === true) { + filepath = utils.unescape(filepath); + } + if (opts.unixify === true || utils.isWindows()) { + filepath = utils.toPosixPath(filepath); + } + return filepath; + }; +}; diff --git a/front/frontend/node_modules/nanomatch/node_modules/extend-shallow/LICENSE b/front/frontend/node_modules/nanomatch/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/front/frontend/node_modules/nanomatch/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/nanomatch/node_modules/extend-shallow/README.md b/front/frontend/node_modules/nanomatch/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/front/frontend/node_modules/nanomatch/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/nanomatch/node_modules/extend-shallow/index.js b/front/frontend/node_modules/nanomatch/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/front/frontend/node_modules/nanomatch/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/front/frontend/node_modules/nanomatch/node_modules/extend-shallow/package.json b/front/frontend/node_modules/nanomatch/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e5e9105 --- /dev/null +++ b/front/frontend/node_modules/nanomatch/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/nanomatch/node_modules/is-extendable/LICENSE b/front/frontend/node_modules/nanomatch/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/front/frontend/node_modules/nanomatch/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/front/frontend/node_modules/nanomatch/node_modules/is-extendable/README.md b/front/frontend/node_modules/nanomatch/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/front/frontend/node_modules/nanomatch/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/nanomatch/node_modules/is-extendable/index.d.ts b/front/frontend/node_modules/nanomatch/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/front/frontend/node_modules/nanomatch/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/front/frontend/node_modules/nanomatch/node_modules/is-extendable/index.js b/front/frontend/node_modules/nanomatch/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/front/frontend/node_modules/nanomatch/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/front/frontend/node_modules/nanomatch/node_modules/is-extendable/package.json b/front/frontend/node_modules/nanomatch/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/front/frontend/node_modules/nanomatch/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/nanomatch/node_modules/kind-of/CHANGELOG.md b/front/frontend/node_modules/nanomatch/node_modules/kind-of/CHANGELOG.md new file mode 100644 index 0000000..01687d5 --- /dev/null +++ b/front/frontend/node_modules/nanomatch/node_modules/kind-of/CHANGELOG.md @@ -0,0 +1,160 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
    + Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
    + +
    + Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
    + +## [6.0.3] - 2020-01-16 + +- Merge pull request #31 for issue #30 + +## [6.0.0] - 2017-10-13 + +- refactor code to be more performant +- refactor benchmarks + +## [5.1.0] - 2017-10-13 + +**Added** + +- Merge pull request #15 from aretecode/patch-1 +- adds support and tests for string & array iterators + +**Changed** + +- updates benchmarks + +## [5.0.2] - 2017-08-02 + +- Merge pull request #14 from struct78/master +- Added `undefined` check + +## [5.0.0] - 2017-06-21 + +- Merge pull request #12 from aretecode/iterator +- Set Iterator + Map Iterator +- streamline `isbuffer`, minor edits + +## [4.0.0] - 2017-05-19 + +- Merge pull request #8 from tunnckoCore/master +- update deps + +## [3.2.2] - 2017-05-16 + +- fix version + +## [3.2.1] - 2017-05-16 + +- add browserify + +## [3.2.0] - 2017-04-25 + +- Merge pull request #10 from ksheedlo/unrequire-buffer +- add `promise` support and tests +- Remove unnecessary `Buffer` check + +## [3.1.0] - 2016-12-07 + +- Merge pull request #7 from laggingreflex/err +- add support for `error` and tests +- run update + +## [3.0.4] - 2016-07-29 + +- move tests +- run update + +## [3.0.3] - 2016-05-03 + +- fix prepublish script +- remove unused dep + +## [3.0.0] - 2015-11-17 + +- add typed array support +- Merge pull request #5 from miguelmota/typed-arrays +- adds new tests + +## [2.0.1] - 2015-08-21 + +- use `is-buffer` module + +## [2.0.0] - 2015-05-31 + +- Create fallback for `Array.isArray` if used as a browser package +- Merge pull request #2 from dtothefp/patch-1 +- Merge pull request #3 from pdehaan/patch-1 +- Merge branch 'master' of https://github.com/chorks/kind-of into chorks-master +- optimizations, mostly date and regex + +## [1.1.0] - 2015-02-09 + +- adds `buffer` support +- adds tests for `buffer` + +## [1.0.0] - 2015-01-19 + +- update benchmarks +- optimizations based on benchmarks + +## [0.1.2] - 2014-10-26 + +- return `typeof` value if it's not an object. very slight speed improvement +- use `.slice` +- adds benchmarks + +## [0.1.0] - 2014-9-26 + +- first commit + +[6.0.0]: https://github.com/jonschlinkert/kind-of/compare/5.1.0...6.0.0 +[5.1.0]: https://github.com/jonschlinkert/kind-of/compare/5.0.2...5.1.0 +[5.0.2]: https://github.com/jonschlinkert/kind-of/compare/5.0.1...5.0.2 +[5.0.1]: https://github.com/jonschlinkert/kind-of/compare/5.0.0...5.0.1 +[5.0.0]: https://github.com/jonschlinkert/kind-of/compare/4.0.0...5.0.0 +[4.0.0]: https://github.com/jonschlinkert/kind-of/compare/3.2.2...4.0.0 +[3.2.2]: https://github.com/jonschlinkert/kind-of/compare/3.2.1...3.2.2 +[3.2.1]: https://github.com/jonschlinkert/kind-of/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/jonschlinkert/kind-of/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/jonschlinkert/kind-of/compare/3.0.4...3.1.0 +[3.0.4]: https://github.com/jonschlinkert/kind-of/compare/3.0.3...3.0.4 +[3.0.3]: https://github.com/jonschlinkert/kind-of/compare/3.0.0...3.0.3 +[3.0.0]: https://github.com/jonschlinkert/kind-of/compare/2.0.1...3.0.0 +[2.0.1]: https://github.com/jonschlinkert/kind-of/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/jonschlinkert/kind-of/compare/1.1.0...2.0.0 +[1.1.0]: https://github.com/jonschlinkert/kind-of/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...1.0.0 +[0.1.2]: https://github.com/jonschlinkert/kind-of/compare/0.1.0...0.1.2 +[0.1.0]: https://github.com/jonschlinkert/kind-of/commit/2fae09b0b19b1aadb558e9be39f0c3ef6034eb87 + +[Unreleased]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/front/frontend/node_modules/nanomatch/node_modules/kind-of/LICENSE b/front/frontend/node_modules/nanomatch/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/front/frontend/node_modules/nanomatch/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/nanomatch/node_modules/kind-of/README.md b/front/frontend/node_modules/nanomatch/node_modules/kind-of/README.md new file mode 100644 index 0000000..0411dc5 --- /dev/null +++ b/front/frontend/node_modules/nanomatch/node_modules/kind-of/README.md @@ -0,0 +1,367 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, es6, and browser ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(new Error('error')); +//=> 'error' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'generatorfunction' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). + +```bash +# arguments (32 bytes) + kind-of x 17,024,098 ops/sec ±1.90% (86 runs sampled) + lib-type-of x 11,926,235 ops/sec ±1.34% (83 runs sampled) + lib-typeof x 9,245,257 ops/sec ±1.22% (87 runs sampled) + + fastest is kind-of (by 161% avg) + +# array (22 bytes) + kind-of x 17,196,492 ops/sec ±1.07% (88 runs sampled) + lib-type-of x 8,838,283 ops/sec ±1.02% (87 runs sampled) + lib-typeof x 8,677,848 ops/sec ±0.87% (87 runs sampled) + + fastest is kind-of (by 196% avg) + +# boolean (24 bytes) + kind-of x 16,841,600 ops/sec ±1.10% (86 runs sampled) + lib-type-of x 8,096,787 ops/sec ±0.95% (87 runs sampled) + lib-typeof x 8,423,345 ops/sec ±1.15% (86 runs sampled) + + fastest is kind-of (by 204% avg) + +# buffer (38 bytes) + kind-of x 14,848,060 ops/sec ±1.05% (86 runs sampled) + lib-type-of x 3,671,577 ops/sec ±1.49% (87 runs sampled) + lib-typeof x 8,360,236 ops/sec ±1.24% (86 runs sampled) + + fastest is kind-of (by 247% avg) + +# date (30 bytes) + kind-of x 16,067,761 ops/sec ±1.58% (86 runs sampled) + lib-type-of x 8,954,436 ops/sec ±1.40% (87 runs sampled) + lib-typeof x 8,488,307 ops/sec ±1.51% (84 runs sampled) + + fastest is kind-of (by 184% avg) + +# error (36 bytes) + kind-of x 9,634,090 ops/sec ±1.12% (89 runs sampled) + lib-type-of x 7,735,624 ops/sec ±1.32% (86 runs sampled) + lib-typeof x 7,442,160 ops/sec ±1.11% (90 runs sampled) + + fastest is kind-of (by 127% avg) + +# function (34 bytes) + kind-of x 10,031,494 ops/sec ±1.27% (86 runs sampled) + lib-type-of x 9,502,757 ops/sec ±1.17% (89 runs sampled) + lib-typeof x 8,278,985 ops/sec ±1.08% (88 runs sampled) + + fastest is kind-of (by 113% avg) + +# null (24 bytes) + kind-of x 18,159,808 ops/sec ±1.92% (86 runs sampled) + lib-type-of x 12,927,635 ops/sec ±1.01% (88 runs sampled) + lib-typeof x 7,958,234 ops/sec ±1.21% (89 runs sampled) + + fastest is kind-of (by 174% avg) + +# number (22 bytes) + kind-of x 17,846,779 ops/sec ±0.91% (85 runs sampled) + lib-type-of x 3,316,636 ops/sec ±1.19% (86 runs sampled) + lib-typeof x 2,329,477 ops/sec ±2.21% (85 runs sampled) + + fastest is kind-of (by 632% avg) + +# object-plain (47 bytes) + kind-of x 7,085,155 ops/sec ±1.05% (88 runs sampled) + lib-type-of x 8,870,930 ops/sec ±1.06% (83 runs sampled) + lib-typeof x 8,716,024 ops/sec ±1.05% (87 runs sampled) + + fastest is lib-type-of (by 112% avg) + +# regex (25 bytes) + kind-of x 14,196,052 ops/sec ±1.65% (84 runs sampled) + lib-type-of x 9,554,164 ops/sec ±1.25% (88 runs sampled) + lib-typeof x 8,359,691 ops/sec ±1.07% (87 runs sampled) + + fastest is kind-of (by 158% avg) + +# string (33 bytes) + kind-of x 16,131,428 ops/sec ±1.41% (85 runs sampled) + lib-type-of x 7,273,172 ops/sec ±1.05% (87 runs sampled) + lib-typeof x 7,382,635 ops/sec ±1.17% (85 runs sampled) + + fastest is kind-of (by 220% avg) + +# symbol (34 bytes) + kind-of x 17,011,537 ops/sec ±1.24% (86 runs sampled) + lib-type-of x 3,492,454 ops/sec ±1.23% (89 runs sampled) + lib-typeof x 7,471,235 ops/sec ±2.48% (87 runs sampled) + + fastest is kind-of (by 310% avg) + +# template-strings (36 bytes) + kind-of x 15,434,250 ops/sec ±1.46% (83 runs sampled) + lib-type-of x 7,157,907 ops/sec ±0.97% (87 runs sampled) + lib-typeof x 7,517,986 ops/sec ±0.92% (86 runs sampled) + + fastest is kind-of (by 210% avg) + +# undefined (29 bytes) + kind-of x 19,167,115 ops/sec ±1.71% (87 runs sampled) + lib-type-of x 15,477,740 ops/sec ±1.63% (85 runs sampled) + lib-typeof x 19,075,495 ops/sec ±1.17% (83 runs sampled) + + fastest is lib-typeof,kind-of + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of seems to be more consistently "correct" than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly identifies instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/micromatch/is-glob) | [homepage](https://github.com/micromatch/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 102 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [tunnckoCore](https://github.com/tunnckoCore) | +| 1 | [xiaofen9](https://github.com/xiaofen9) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2020, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on January 16, 2020._ \ No newline at end of file diff --git a/front/frontend/node_modules/nanomatch/node_modules/kind-of/index.js b/front/frontend/node_modules/nanomatch/node_modules/kind-of/index.js new file mode 100644 index 0000000..dfa799b --- /dev/null +++ b/front/frontend/node_modules/nanomatch/node_modules/kind-of/index.js @@ -0,0 +1,129 @@ +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} diff --git a/front/frontend/node_modules/nanomatch/node_modules/kind-of/package.json b/front/frontend/node_modules/nanomatch/node_modules/kind-of/package.json new file mode 100644 index 0000000..5820cad --- /dev/null +++ b/front/frontend/node_modules/nanomatch/node_modules/kind-of/package.json @@ -0,0 +1,88 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "6.0.3", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "browserify": "^14.4.0", + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1", + "write": "^1.0.3" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + } +} diff --git a/front/frontend/node_modules/nanomatch/package.json b/front/frontend/node_modules/nanomatch/package.json new file mode 100644 index 0000000..0a85f0a --- /dev/null +++ b/front/frontend/node_modules/nanomatch/package.json @@ -0,0 +1,134 @@ +{ + "name": "nanomatch", + "description": "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)", + "version": "1.2.13", + "homepage": "https://github.com/micromatch/nanomatch", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Devon Govett (http://badassjs.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/nanomatch", + "bugs": { + "url": "https://github.com/micromatch/nanomatch/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "devDependencies": { + "bash-match": "^1.0.2", + "for-own": "^1.0.0", + "gulp": "^3.9.1", + "gulp-format-md": "^1.0.0", + "gulp-istanbul": "^1.1.3", + "gulp-mocha": "^5.0.0", + "helper-changelog": "^0.3.0", + "minimatch": "^3.0.4", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "multimatch": "^2.1.0" + }, + "keywords": [ + "bash", + "expand", + "expansion", + "expression", + "file", + "files", + "filter", + "find", + "glob", + "globbing", + "globs", + "globstar", + "match", + "matcher", + "matches", + "matching", + "micromatch", + "minimatch", + "multimatch", + "nanomatch", + "path", + "pattern", + "patterns", + "regex", + "regexp", + "regular", + "shell", + "wildcard" + ], + "lintDeps": { + "dependencies": { + "options": { + "lock": { + "snapdragon": "^0.8.1" + } + } + }, + "devDependencies": { + "files": { + "options": { + "ignore": [ + "benchmark/**" + ] + } + } + } + }, + "verb": { + "toc": "collapsible", + "layout": "default", + "tasks": [ + "readme" + ], + "helpers": [ + "helper-changelog" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "extglob", + "is-extglob", + "is-glob", + "micromatch" + ] + }, + "reflinks": [ + "expand-brackets", + "expand-tilde", + "glob-object", + "micromatch", + "minimatch", + "options", + "snapdragon" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/negotiator/HISTORY.md b/front/frontend/node_modules/negotiator/HISTORY.md new file mode 100644 index 0000000..a9a5449 --- /dev/null +++ b/front/frontend/node_modules/negotiator/HISTORY.md @@ -0,0 +1,108 @@ +0.6.3 / 2022-01-22 +================== + + * Revert "Lazy-load modules from main entry point" + +0.6.2 / 2019-04-29 +================== + + * Fix sorting charset, encoding, and language with extra parameters + +0.6.1 / 2016-05-02 +================== + + * perf: improve `Accept` parsing speed + * perf: improve `Accept-Charset` parsing speed + * perf: improve `Accept-Encoding` parsing speed + * perf: improve `Accept-Language` parsing speed + +0.6.0 / 2015-09-29 +================== + + * Fix including type extensions in parameters in `Accept` parsing + * Fix parsing `Accept` parameters with quoted equals + * Fix parsing `Accept` parameters with quoted semicolons + * Lazy-load modules from main entry point + * perf: delay type concatenation until needed + * perf: enable strict mode + * perf: hoist regular expressions + * perf: remove closures getting spec properties + * perf: remove a closure from media type parsing + * perf: remove property delete from media type parsing + +0.5.3 / 2015-05-10 +================== + + * Fix media type parameter matching to be case-insensitive + +0.5.2 / 2015-05-06 +================== + + * Fix comparing media types with quoted values + * Fix splitting media types with quoted commas + +0.5.1 / 2015-02-14 +================== + + * Fix preference sorting to be stable for long acceptable lists + +0.5.0 / 2014-12-18 +================== + + * Fix list return order when large accepted list + * Fix missing identity encoding when q=0 exists + * Remove dynamic building of Negotiator class + +0.4.9 / 2014-10-14 +================== + + * Fix error when media type has invalid parameter + +0.4.8 / 2014-09-28 +================== + + * Fix all negotiations to be case-insensitive + * Stable sort preferences of same quality according to client order + * Support Node.js 0.6 + +0.4.7 / 2014-06-24 +================== + + * Handle invalid provided languages + * Handle invalid provided media types + +0.4.6 / 2014-06-11 +================== + + * Order by specificity when quality is the same + +0.4.5 / 2014-05-29 +================== + + * Fix regression in empty header handling + +0.4.4 / 2014-05-29 +================== + + * Fix behaviors when headers are not present + +0.4.3 / 2014-04-16 +================== + + * Handle slashes on media params correctly + +0.4.2 / 2014-02-28 +================== + + * Fix media type sorting + * Handle media types params strictly + +0.4.1 / 2014-01-16 +================== + + * Use most specific matches + +0.4.0 / 2014-01-09 +================== + + * Remove preferred prefix from methods diff --git a/front/frontend/node_modules/negotiator/LICENSE b/front/frontend/node_modules/negotiator/LICENSE new file mode 100644 index 0000000..ea6b9e2 --- /dev/null +++ b/front/frontend/node_modules/negotiator/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2012-2014 Federico Romero +Copyright (c) 2012-2014 Isaac Z. Schlueter +Copyright (c) 2014-2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/negotiator/README.md b/front/frontend/node_modules/negotiator/README.md new file mode 100644 index 0000000..82915e5 --- /dev/null +++ b/front/frontend/node_modules/negotiator/README.md @@ -0,0 +1,203 @@ +# negotiator + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][github-actions-ci-image]][github-actions-ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +An HTTP content negotiator for Node.js + +## Installation + +```sh +$ npm install negotiator +``` + +## API + +```js +var Negotiator = require('negotiator') +``` + +### Accept Negotiation + +```js +availableMediaTypes = ['text/html', 'text/plain', 'application/json'] + +// The negotiator constructor receives a request object +negotiator = new Negotiator(request) + +// Let's say Accept header is 'text/html, application/*;q=0.2, image/jpeg;q=0.8' + +negotiator.mediaTypes() +// -> ['text/html', 'image/jpeg', 'application/*'] + +negotiator.mediaTypes(availableMediaTypes) +// -> ['text/html', 'application/json'] + +negotiator.mediaType(availableMediaTypes) +// -> 'text/html' +``` + +You can check a working example at `examples/accept.js`. + +#### Methods + +##### mediaType() + +Returns the most preferred media type from the client. + +##### mediaType(availableMediaType) + +Returns the most preferred media type from a list of available media types. + +##### mediaTypes() + +Returns an array of preferred media types ordered by the client preference. + +##### mediaTypes(availableMediaTypes) + +Returns an array of preferred media types ordered by priority from a list of +available media types. + +### Accept-Language Negotiation + +```js +negotiator = new Negotiator(request) + +availableLanguages = ['en', 'es', 'fr'] + +// Let's say Accept-Language header is 'en;q=0.8, es, pt' + +negotiator.languages() +// -> ['es', 'pt', 'en'] + +negotiator.languages(availableLanguages) +// -> ['es', 'en'] + +language = negotiator.language(availableLanguages) +// -> 'es' +``` + +You can check a working example at `examples/language.js`. + +#### Methods + +##### language() + +Returns the most preferred language from the client. + +##### language(availableLanguages) + +Returns the most preferred language from a list of available languages. + +##### languages() + +Returns an array of preferred languages ordered by the client preference. + +##### languages(availableLanguages) + +Returns an array of preferred languages ordered by priority from a list of +available languages. + +### Accept-Charset Negotiation + +```js +availableCharsets = ['utf-8', 'iso-8859-1', 'iso-8859-5'] + +negotiator = new Negotiator(request) + +// Let's say Accept-Charset header is 'utf-8, iso-8859-1;q=0.8, utf-7;q=0.2' + +negotiator.charsets() +// -> ['utf-8', 'iso-8859-1', 'utf-7'] + +negotiator.charsets(availableCharsets) +// -> ['utf-8', 'iso-8859-1'] + +negotiator.charset(availableCharsets) +// -> 'utf-8' +``` + +You can check a working example at `examples/charset.js`. + +#### Methods + +##### charset() + +Returns the most preferred charset from the client. + +##### charset(availableCharsets) + +Returns the most preferred charset from a list of available charsets. + +##### charsets() + +Returns an array of preferred charsets ordered by the client preference. + +##### charsets(availableCharsets) + +Returns an array of preferred charsets ordered by priority from a list of +available charsets. + +### Accept-Encoding Negotiation + +```js +availableEncodings = ['identity', 'gzip'] + +negotiator = new Negotiator(request) + +// Let's say Accept-Encoding header is 'gzip, compress;q=0.2, identity;q=0.5' + +negotiator.encodings() +// -> ['gzip', 'identity', 'compress'] + +negotiator.encodings(availableEncodings) +// -> ['gzip', 'identity'] + +negotiator.encoding(availableEncodings) +// -> 'gzip' +``` + +You can check a working example at `examples/encoding.js`. + +#### Methods + +##### encoding() + +Returns the most preferred encoding from the client. + +##### encoding(availableEncodings) + +Returns the most preferred encoding from a list of available encodings. + +##### encodings() + +Returns an array of preferred encodings ordered by the client preference. + +##### encodings(availableEncodings) + +Returns an array of preferred encodings ordered by priority from a list of +available encodings. + +## See Also + +The [accepts](https://npmjs.org/package/accepts#readme) module builds on +this module and provides an alternative interface, mime type validation, +and more. + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/negotiator.svg +[npm-url]: https://npmjs.org/package/negotiator +[node-version-image]: https://img.shields.io/node/v/negotiator.svg +[node-version-url]: https://nodejs.org/en/download/ +[coveralls-image]: https://img.shields.io/coveralls/jshttp/negotiator/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/negotiator?branch=master +[downloads-image]: https://img.shields.io/npm/dm/negotiator.svg +[downloads-url]: https://npmjs.org/package/negotiator +[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/negotiator/ci/master?label=ci +[github-actions-ci-url]: https://github.com/jshttp/negotiator/actions/workflows/ci.yml diff --git a/front/frontend/node_modules/negotiator/index.js b/front/frontend/node_modules/negotiator/index.js new file mode 100644 index 0000000..4788264 --- /dev/null +++ b/front/frontend/node_modules/negotiator/index.js @@ -0,0 +1,82 @@ +/*! + * negotiator + * Copyright(c) 2012 Federico Romero + * Copyright(c) 2012-2014 Isaac Z. Schlueter + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +var preferredCharsets = require('./lib/charset') +var preferredEncodings = require('./lib/encoding') +var preferredLanguages = require('./lib/language') +var preferredMediaTypes = require('./lib/mediaType') + +/** + * Module exports. + * @public + */ + +module.exports = Negotiator; +module.exports.Negotiator = Negotiator; + +/** + * Create a Negotiator instance from a request. + * @param {object} request + * @public + */ + +function Negotiator(request) { + if (!(this instanceof Negotiator)) { + return new Negotiator(request); + } + + this.request = request; +} + +Negotiator.prototype.charset = function charset(available) { + var set = this.charsets(available); + return set && set[0]; +}; + +Negotiator.prototype.charsets = function charsets(available) { + return preferredCharsets(this.request.headers['accept-charset'], available); +}; + +Negotiator.prototype.encoding = function encoding(available) { + var set = this.encodings(available); + return set && set[0]; +}; + +Negotiator.prototype.encodings = function encodings(available) { + return preferredEncodings(this.request.headers['accept-encoding'], available); +}; + +Negotiator.prototype.language = function language(available) { + var set = this.languages(available); + return set && set[0]; +}; + +Negotiator.prototype.languages = function languages(available) { + return preferredLanguages(this.request.headers['accept-language'], available); +}; + +Negotiator.prototype.mediaType = function mediaType(available) { + var set = this.mediaTypes(available); + return set && set[0]; +}; + +Negotiator.prototype.mediaTypes = function mediaTypes(available) { + return preferredMediaTypes(this.request.headers.accept, available); +}; + +// Backwards compatibility +Negotiator.prototype.preferredCharset = Negotiator.prototype.charset; +Negotiator.prototype.preferredCharsets = Negotiator.prototype.charsets; +Negotiator.prototype.preferredEncoding = Negotiator.prototype.encoding; +Negotiator.prototype.preferredEncodings = Negotiator.prototype.encodings; +Negotiator.prototype.preferredLanguage = Negotiator.prototype.language; +Negotiator.prototype.preferredLanguages = Negotiator.prototype.languages; +Negotiator.prototype.preferredMediaType = Negotiator.prototype.mediaType; +Negotiator.prototype.preferredMediaTypes = Negotiator.prototype.mediaTypes; diff --git a/front/frontend/node_modules/negotiator/lib/charset.js b/front/frontend/node_modules/negotiator/lib/charset.js new file mode 100644 index 0000000..cdd0148 --- /dev/null +++ b/front/frontend/node_modules/negotiator/lib/charset.js @@ -0,0 +1,169 @@ +/** + * negotiator + * Copyright(c) 2012 Isaac Z. Schlueter + * Copyright(c) 2014 Federico Romero + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module exports. + * @public + */ + +module.exports = preferredCharsets; +module.exports.preferredCharsets = preferredCharsets; + +/** + * Module variables. + * @private + */ + +var simpleCharsetRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/; + +/** + * Parse the Accept-Charset header. + * @private + */ + +function parseAcceptCharset(accept) { + var accepts = accept.split(','); + + for (var i = 0, j = 0; i < accepts.length; i++) { + var charset = parseCharset(accepts[i].trim(), i); + + if (charset) { + accepts[j++] = charset; + } + } + + // trim accepts + accepts.length = j; + + return accepts; +} + +/** + * Parse a charset from the Accept-Charset header. + * @private + */ + +function parseCharset(str, i) { + var match = simpleCharsetRegExp.exec(str); + if (!match) return null; + + var charset = match[1]; + var q = 1; + if (match[2]) { + var params = match[2].split(';') + for (var j = 0; j < params.length; j++) { + var p = params[j].trim().split('='); + if (p[0] === 'q') { + q = parseFloat(p[1]); + break; + } + } + } + + return { + charset: charset, + q: q, + i: i + }; +} + +/** + * Get the priority of a charset. + * @private + */ + +function getCharsetPriority(charset, accepted, index) { + var priority = {o: -1, q: 0, s: 0}; + + for (var i = 0; i < accepted.length; i++) { + var spec = specify(charset, accepted[i], index); + + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + + return priority; +} + +/** + * Get the specificity of the charset. + * @private + */ + +function specify(charset, spec, index) { + var s = 0; + if(spec.charset.toLowerCase() === charset.toLowerCase()){ + s |= 1; + } else if (spec.charset !== '*' ) { + return null + } + + return { + i: index, + o: spec.i, + q: spec.q, + s: s + } +} + +/** + * Get the preferred charsets from an Accept-Charset header. + * @public + */ + +function preferredCharsets(accept, provided) { + // RFC 2616 sec 14.2: no header = * + var accepts = parseAcceptCharset(accept === undefined ? '*' : accept || ''); + + if (!provided) { + // sorted list of all charsets + return accepts + .filter(isQuality) + .sort(compareSpecs) + .map(getFullCharset); + } + + var priorities = provided.map(function getPriority(type, index) { + return getCharsetPriority(type, accepts, index); + }); + + // sorted list of accepted charsets + return priorities.filter(isQuality).sort(compareSpecs).map(function getCharset(priority) { + return provided[priorities.indexOf(priority)]; + }); +} + +/** + * Compare two specs. + * @private + */ + +function compareSpecs(a, b) { + return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; +} + +/** + * Get full charset string. + * @private + */ + +function getFullCharset(spec) { + return spec.charset; +} + +/** + * Check if a spec has any quality. + * @private + */ + +function isQuality(spec) { + return spec.q > 0; +} diff --git a/front/frontend/node_modules/negotiator/lib/encoding.js b/front/frontend/node_modules/negotiator/lib/encoding.js new file mode 100644 index 0000000..8432cd7 --- /dev/null +++ b/front/frontend/node_modules/negotiator/lib/encoding.js @@ -0,0 +1,184 @@ +/** + * negotiator + * Copyright(c) 2012 Isaac Z. Schlueter + * Copyright(c) 2014 Federico Romero + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module exports. + * @public + */ + +module.exports = preferredEncodings; +module.exports.preferredEncodings = preferredEncodings; + +/** + * Module variables. + * @private + */ + +var simpleEncodingRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/; + +/** + * Parse the Accept-Encoding header. + * @private + */ + +function parseAcceptEncoding(accept) { + var accepts = accept.split(','); + var hasIdentity = false; + var minQuality = 1; + + for (var i = 0, j = 0; i < accepts.length; i++) { + var encoding = parseEncoding(accepts[i].trim(), i); + + if (encoding) { + accepts[j++] = encoding; + hasIdentity = hasIdentity || specify('identity', encoding); + minQuality = Math.min(minQuality, encoding.q || 1); + } + } + + if (!hasIdentity) { + /* + * If identity doesn't explicitly appear in the accept-encoding header, + * it's added to the list of acceptable encoding with the lowest q + */ + accepts[j++] = { + encoding: 'identity', + q: minQuality, + i: i + }; + } + + // trim accepts + accepts.length = j; + + return accepts; +} + +/** + * Parse an encoding from the Accept-Encoding header. + * @private + */ + +function parseEncoding(str, i) { + var match = simpleEncodingRegExp.exec(str); + if (!match) return null; + + var encoding = match[1]; + var q = 1; + if (match[2]) { + var params = match[2].split(';'); + for (var j = 0; j < params.length; j++) { + var p = params[j].trim().split('='); + if (p[0] === 'q') { + q = parseFloat(p[1]); + break; + } + } + } + + return { + encoding: encoding, + q: q, + i: i + }; +} + +/** + * Get the priority of an encoding. + * @private + */ + +function getEncodingPriority(encoding, accepted, index) { + var priority = {o: -1, q: 0, s: 0}; + + for (var i = 0; i < accepted.length; i++) { + var spec = specify(encoding, accepted[i], index); + + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + + return priority; +} + +/** + * Get the specificity of the encoding. + * @private + */ + +function specify(encoding, spec, index) { + var s = 0; + if(spec.encoding.toLowerCase() === encoding.toLowerCase()){ + s |= 1; + } else if (spec.encoding !== '*' ) { + return null + } + + return { + i: index, + o: spec.i, + q: spec.q, + s: s + } +}; + +/** + * Get the preferred encodings from an Accept-Encoding header. + * @public + */ + +function preferredEncodings(accept, provided) { + var accepts = parseAcceptEncoding(accept || ''); + + if (!provided) { + // sorted list of all encodings + return accepts + .filter(isQuality) + .sort(compareSpecs) + .map(getFullEncoding); + } + + var priorities = provided.map(function getPriority(type, index) { + return getEncodingPriority(type, accepts, index); + }); + + // sorted list of accepted encodings + return priorities.filter(isQuality).sort(compareSpecs).map(function getEncoding(priority) { + return provided[priorities.indexOf(priority)]; + }); +} + +/** + * Compare two specs. + * @private + */ + +function compareSpecs(a, b) { + return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; +} + +/** + * Get full encoding string. + * @private + */ + +function getFullEncoding(spec) { + return spec.encoding; +} + +/** + * Check if a spec has any quality. + * @private + */ + +function isQuality(spec) { + return spec.q > 0; +} diff --git a/front/frontend/node_modules/negotiator/lib/language.js b/front/frontend/node_modules/negotiator/lib/language.js new file mode 100644 index 0000000..a231672 --- /dev/null +++ b/front/frontend/node_modules/negotiator/lib/language.js @@ -0,0 +1,179 @@ +/** + * negotiator + * Copyright(c) 2012 Isaac Z. Schlueter + * Copyright(c) 2014 Federico Romero + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module exports. + * @public + */ + +module.exports = preferredLanguages; +module.exports.preferredLanguages = preferredLanguages; + +/** + * Module variables. + * @private + */ + +var simpleLanguageRegExp = /^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/; + +/** + * Parse the Accept-Language header. + * @private + */ + +function parseAcceptLanguage(accept) { + var accepts = accept.split(','); + + for (var i = 0, j = 0; i < accepts.length; i++) { + var language = parseLanguage(accepts[i].trim(), i); + + if (language) { + accepts[j++] = language; + } + } + + // trim accepts + accepts.length = j; + + return accepts; +} + +/** + * Parse a language from the Accept-Language header. + * @private + */ + +function parseLanguage(str, i) { + var match = simpleLanguageRegExp.exec(str); + if (!match) return null; + + var prefix = match[1] + var suffix = match[2] + var full = prefix + + if (suffix) full += "-" + suffix; + + var q = 1; + if (match[3]) { + var params = match[3].split(';') + for (var j = 0; j < params.length; j++) { + var p = params[j].split('='); + if (p[0] === 'q') q = parseFloat(p[1]); + } + } + + return { + prefix: prefix, + suffix: suffix, + q: q, + i: i, + full: full + }; +} + +/** + * Get the priority of a language. + * @private + */ + +function getLanguagePriority(language, accepted, index) { + var priority = {o: -1, q: 0, s: 0}; + + for (var i = 0; i < accepted.length; i++) { + var spec = specify(language, accepted[i], index); + + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + + return priority; +} + +/** + * Get the specificity of the language. + * @private + */ + +function specify(language, spec, index) { + var p = parseLanguage(language) + if (!p) return null; + var s = 0; + if(spec.full.toLowerCase() === p.full.toLowerCase()){ + s |= 4; + } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) { + s |= 2; + } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) { + s |= 1; + } else if (spec.full !== '*' ) { + return null + } + + return { + i: index, + o: spec.i, + q: spec.q, + s: s + } +}; + +/** + * Get the preferred languages from an Accept-Language header. + * @public + */ + +function preferredLanguages(accept, provided) { + // RFC 2616 sec 14.4: no header = * + var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || ''); + + if (!provided) { + // sorted list of all languages + return accepts + .filter(isQuality) + .sort(compareSpecs) + .map(getFullLanguage); + } + + var priorities = provided.map(function getPriority(type, index) { + return getLanguagePriority(type, accepts, index); + }); + + // sorted list of accepted languages + return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) { + return provided[priorities.indexOf(priority)]; + }); +} + +/** + * Compare two specs. + * @private + */ + +function compareSpecs(a, b) { + return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; +} + +/** + * Get full language string. + * @private + */ + +function getFullLanguage(spec) { + return spec.full; +} + +/** + * Check if a spec has any quality. + * @private + */ + +function isQuality(spec) { + return spec.q > 0; +} diff --git a/front/frontend/node_modules/negotiator/lib/mediaType.js b/front/frontend/node_modules/negotiator/lib/mediaType.js new file mode 100644 index 0000000..67309dd --- /dev/null +++ b/front/frontend/node_modules/negotiator/lib/mediaType.js @@ -0,0 +1,294 @@ +/** + * negotiator + * Copyright(c) 2012 Isaac Z. Schlueter + * Copyright(c) 2014 Federico Romero + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module exports. + * @public + */ + +module.exports = preferredMediaTypes; +module.exports.preferredMediaTypes = preferredMediaTypes; + +/** + * Module variables. + * @private + */ + +var simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/; + +/** + * Parse the Accept header. + * @private + */ + +function parseAccept(accept) { + var accepts = splitMediaTypes(accept); + + for (var i = 0, j = 0; i < accepts.length; i++) { + var mediaType = parseMediaType(accepts[i].trim(), i); + + if (mediaType) { + accepts[j++] = mediaType; + } + } + + // trim accepts + accepts.length = j; + + return accepts; +} + +/** + * Parse a media type from the Accept header. + * @private + */ + +function parseMediaType(str, i) { + var match = simpleMediaTypeRegExp.exec(str); + if (!match) return null; + + var params = Object.create(null); + var q = 1; + var subtype = match[2]; + var type = match[1]; + + if (match[3]) { + var kvps = splitParameters(match[3]).map(splitKeyValuePair); + + for (var j = 0; j < kvps.length; j++) { + var pair = kvps[j]; + var key = pair[0].toLowerCase(); + var val = pair[1]; + + // get the value, unwrapping quotes + var value = val && val[0] === '"' && val[val.length - 1] === '"' + ? val.substr(1, val.length - 2) + : val; + + if (key === 'q') { + q = parseFloat(value); + break; + } + + // store parameter + params[key] = value; + } + } + + return { + type: type, + subtype: subtype, + params: params, + q: q, + i: i + }; +} + +/** + * Get the priority of a media type. + * @private + */ + +function getMediaTypePriority(type, accepted, index) { + var priority = {o: -1, q: 0, s: 0}; + + for (var i = 0; i < accepted.length; i++) { + var spec = specify(type, accepted[i], index); + + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + + return priority; +} + +/** + * Get the specificity of the media type. + * @private + */ + +function specify(type, spec, index) { + var p = parseMediaType(type); + var s = 0; + + if (!p) { + return null; + } + + if(spec.type.toLowerCase() == p.type.toLowerCase()) { + s |= 4 + } else if(spec.type != '*') { + return null; + } + + if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) { + s |= 2 + } else if(spec.subtype != '*') { + return null; + } + + var keys = Object.keys(spec.params); + if (keys.length > 0) { + if (keys.every(function (k) { + return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase(); + })) { + s |= 1 + } else { + return null + } + } + + return { + i: index, + o: spec.i, + q: spec.q, + s: s, + } +} + +/** + * Get the preferred media types from an Accept header. + * @public + */ + +function preferredMediaTypes(accept, provided) { + // RFC 2616 sec 14.2: no header = */* + var accepts = parseAccept(accept === undefined ? '*/*' : accept || ''); + + if (!provided) { + // sorted list of all types + return accepts + .filter(isQuality) + .sort(compareSpecs) + .map(getFullType); + } + + var priorities = provided.map(function getPriority(type, index) { + return getMediaTypePriority(type, accepts, index); + }); + + // sorted list of accepted types + return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) { + return provided[priorities.indexOf(priority)]; + }); +} + +/** + * Compare two specs. + * @private + */ + +function compareSpecs(a, b) { + return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; +} + +/** + * Get full type string. + * @private + */ + +function getFullType(spec) { + return spec.type + '/' + spec.subtype; +} + +/** + * Check if a spec has any quality. + * @private + */ + +function isQuality(spec) { + return spec.q > 0; +} + +/** + * Count the number of quotes in a string. + * @private + */ + +function quoteCount(string) { + var count = 0; + var index = 0; + + while ((index = string.indexOf('"', index)) !== -1) { + count++; + index++; + } + + return count; +} + +/** + * Split a key value pair. + * @private + */ + +function splitKeyValuePair(str) { + var index = str.indexOf('='); + var key; + var val; + + if (index === -1) { + key = str; + } else { + key = str.substr(0, index); + val = str.substr(index + 1); + } + + return [key, val]; +} + +/** + * Split an Accept header into media types. + * @private + */ + +function splitMediaTypes(accept) { + var accepts = accept.split(','); + + for (var i = 1, j = 0; i < accepts.length; i++) { + if (quoteCount(accepts[j]) % 2 == 0) { + accepts[++j] = accepts[i]; + } else { + accepts[j] += ',' + accepts[i]; + } + } + + // trim accepts + accepts.length = j + 1; + + return accepts; +} + +/** + * Split a string of parameters. + * @private + */ + +function splitParameters(str) { + var parameters = str.split(';'); + + for (var i = 1, j = 0; i < parameters.length; i++) { + if (quoteCount(parameters[j]) % 2 == 0) { + parameters[++j] = parameters[i]; + } else { + parameters[j] += ';' + parameters[i]; + } + } + + // trim parameters + parameters.length = j + 1; + + for (var i = 0; i < parameters.length; i++) { + parameters[i] = parameters[i].trim(); + } + + return parameters; +} diff --git a/front/frontend/node_modules/negotiator/package.json b/front/frontend/node_modules/negotiator/package.json new file mode 100644 index 0000000..297635f --- /dev/null +++ b/front/frontend/node_modules/negotiator/package.json @@ -0,0 +1,42 @@ +{ + "name": "negotiator", + "description": "HTTP content negotiation", + "version": "0.6.3", + "contributors": [ + "Douglas Christopher Wilson ", + "Federico Romero ", + "Isaac Z. Schlueter (http://blog.izs.me/)" + ], + "license": "MIT", + "keywords": [ + "http", + "content negotiation", + "accept", + "accept-language", + "accept-encoding", + "accept-charset" + ], + "repository": "jshttp/negotiator", + "devDependencies": { + "eslint": "7.32.0", + "eslint-plugin-markdown": "2.2.1", + "mocha": "9.1.3", + "nyc": "15.1.0" + }, + "files": [ + "lib/", + "HISTORY.md", + "LICENSE", + "index.js", + "README.md" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/front/frontend/node_modules/normalize-path/LICENSE b/front/frontend/node_modules/normalize-path/LICENSE new file mode 100644 index 0000000..d32ab44 --- /dev/null +++ b/front/frontend/node_modules/normalize-path/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/normalize-path/README.md b/front/frontend/node_modules/normalize-path/README.md new file mode 100644 index 0000000..726d4d6 --- /dev/null +++ b/front/frontend/node_modules/normalize-path/README.md @@ -0,0 +1,127 @@ +# normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path) + +> Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save normalize-path +``` + +## Usage + +```js +const normalize = require('normalize-path'); + +console.log(normalize('\\foo\\bar\\baz\\')); +//=> '/foo/bar/baz' +``` + +**win32 namespaces** + +```js +console.log(normalize('\\\\?\\UNC\\Server01\\user\\docs\\Letter.txt')); +//=> '//?/UNC/Server01/user/docs/Letter.txt' + +console.log(normalize('\\\\.\\CdRomX')); +//=> '//./CdRomX' +``` + +**Consecutive slashes** + +Condenses multiple consecutive forward slashes (except for leading slashes in win32 namespaces) to a single slash. + +```js +console.log(normalize('.//foo//bar///////baz/')); +//=> './foo/bar/baz' +``` + +### Trailing slashes + +By default trailing slashes are removed. Pass `false` as the last argument to disable this behavior and _**keep** trailing slashes_: + +```js +console.log(normalize('foo\\bar\\baz\\', false)); //=> 'foo/bar/baz/' +console.log(normalize('./foo/bar/baz/', false)); //=> './foo/bar/baz/' +``` + +## Release history + +### v3.0 + +No breaking changes in this release. + +* a check was added to ensure that [win32 namespaces](https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces) are handled properly by win32 `path.parse()` after a path has been normalized by this library. +* a minor optimization was made to simplify how the trailing separator was handled + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +Other useful path-related libraries: + +* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.") +* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. Does not rely on the path module… [more](https://github.com/jonschlinkert/is-absolute) | [homepage](https://github.com/jonschlinkert/is-absolute "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.") +* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") +* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.") +* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.") +* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 35 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [phated](https://github.com/phated) | + +### Author + +**Jon Schlinkert** + +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 19, 2018._ \ No newline at end of file diff --git a/front/frontend/node_modules/normalize-path/index.js b/front/frontend/node_modules/normalize-path/index.js new file mode 100644 index 0000000..6fac553 --- /dev/null +++ b/front/frontend/node_modules/normalize-path/index.js @@ -0,0 +1,35 @@ +/*! + * normalize-path + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +module.exports = function(path, stripTrailing) { + if (typeof path !== 'string') { + throw new TypeError('expected path to be a string'); + } + + if (path === '\\' || path === '/') return '/'; + + var len = path.length; + if (len <= 1) return path; + + // ensure that win32 namespaces has two leading slashes, so that the path is + // handled properly by the win32 version of path.parse() after being normalized + // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces + var prefix = ''; + if (len > 4 && path[3] === '\\') { + var ch = path[2]; + if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') { + path = path.slice(2); + prefix = '//'; + } + } + + var segs = path.split(/[/\\]+/); + if (stripTrailing !== false && segs[segs.length - 1] === '') { + segs.pop(); + } + return prefix + segs.join('/'); +}; diff --git a/front/frontend/node_modules/normalize-path/package.json b/front/frontend/node_modules/normalize-path/package.json new file mode 100644 index 0000000..ad61098 --- /dev/null +++ b/front/frontend/node_modules/normalize-path/package.json @@ -0,0 +1,77 @@ +{ + "name": "normalize-path", + "description": "Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.", + "version": "3.0.0", + "homepage": "https://github.com/jonschlinkert/normalize-path", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Blaine Bublitz (https://twitter.com/BlaineBublitz)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/normalize-path", + "bugs": { + "url": "https://github.com/jonschlinkert/normalize-path/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "minimist": "^1.2.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "absolute", + "backslash", + "delimiter", + "file", + "file-path", + "filepath", + "fix", + "forward", + "fp", + "fs", + "normalize", + "path", + "relative", + "separator", + "slash", + "slashes", + "trailing", + "unix", + "urix" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "description": "Other useful path-related libraries:", + "list": [ + "contains-path", + "is-absolute", + "is-relative", + "parse-filepath", + "path-ends-with", + "path-ends-with", + "unixify" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/object-assign/index.js b/front/frontend/node_modules/object-assign/index.js new file mode 100644 index 0000000..0930cf8 --- /dev/null +++ b/front/frontend/node_modules/object-assign/index.js @@ -0,0 +1,90 @@ +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + +'use strict'; +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; diff --git a/front/frontend/node_modules/object-assign/license b/front/frontend/node_modules/object-assign/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/front/frontend/node_modules/object-assign/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/object-assign/package.json b/front/frontend/node_modules/object-assign/package.json new file mode 100644 index 0000000..503eb1e --- /dev/null +++ b/front/frontend/node_modules/object-assign/package.json @@ -0,0 +1,42 @@ +{ + "name": "object-assign", + "version": "4.1.1", + "description": "ES2015 `Object.assign()` ponyfill", + "license": "MIT", + "repository": "sindresorhus/object-assign", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava", + "bench": "matcha bench.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "object", + "assign", + "extend", + "properties", + "es2015", + "ecmascript", + "harmony", + "ponyfill", + "prollyfill", + "polyfill", + "shim", + "browser" + ], + "devDependencies": { + "ava": "^0.16.0", + "lodash": "^4.16.4", + "matcha": "^0.7.0", + "xo": "^0.16.0" + } +} diff --git a/front/frontend/node_modules/object-assign/readme.md b/front/frontend/node_modules/object-assign/readme.md new file mode 100644 index 0000000..1be09d3 --- /dev/null +++ b/front/frontend/node_modules/object-assign/readme.md @@ -0,0 +1,61 @@ +# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign) + +> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com) + + +## Use the built-in + +Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari), +support `Object.assign()` :tada:. If you target only those environments, then by all +means, use `Object.assign()` instead of this package. + + +## Install + +``` +$ npm install --save object-assign +``` + + +## Usage + +```js +const objectAssign = require('object-assign'); + +objectAssign({foo: 0}, {bar: 1}); +//=> {foo: 0, bar: 1} + +// multiple sources +objectAssign({foo: 0}, {bar: 1}, {baz: 2}); +//=> {foo: 0, bar: 1, baz: 2} + +// overwrites equal keys +objectAssign({foo: 0}, {foo: 1}, {foo: 2}); +//=> {foo: 2} + +// ignores null and undefined sources +objectAssign({foo: 0}, null, {bar: 1}, undefined); +//=> {foo: 0, bar: 1} +``` + + +## API + +### objectAssign(target, [source, ...]) + +Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones. + + +## Resources + +- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign) + + +## Related + +- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/front/frontend/node_modules/object-copy/LICENSE b/front/frontend/node_modules/object-copy/LICENSE new file mode 100644 index 0000000..e28e603 --- /dev/null +++ b/front/frontend/node_modules/object-copy/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/object-copy/index.js b/front/frontend/node_modules/object-copy/index.js new file mode 100644 index 0000000..f9faa22 --- /dev/null +++ b/front/frontend/node_modules/object-copy/index.js @@ -0,0 +1,174 @@ +'use strict'; + +var typeOf = require('kind-of'); +var copyDescriptor = require('copy-descriptor'); +var define = require('define-property'); + +/** + * Copy static properties, prototype properties, and descriptors from one object to another. + * + * ```js + * function App() {} + * var proto = App.prototype; + * App.prototype.set = function() {}; + * App.prototype.get = function() {}; + * + * var obj = {}; + * copy(obj, proto); + * ``` + * @param {Object} `receiver` + * @param {Object} `provider` + * @param {String|Array} `omit` One or more properties to omit + * @return {Object} + * @api public + */ + +function copy(receiver, provider, omit) { + if (!isObject(receiver)) { + throw new TypeError('expected receiving object to be an object.'); + } + if (!isObject(provider)) { + throw new TypeError('expected providing object to be an object.'); + } + + var props = nativeKeys(provider); + var keys = Object.keys(provider); + var len = props.length; + omit = arrayify(omit); + + while (len--) { + var key = props[len]; + + if (has(keys, key)) { + define(receiver, key, provider[key]); + } else if (!(key in receiver) && !has(omit, key)) { + copyDescriptor(receiver, provider, key); + } + } +}; + +/** + * Return true if the given value is an object or function + */ + +function isObject(val) { + return typeOf(val) === 'object' || typeof val === 'function'; +} + +/** + * Returns true if an array has any of the given elements, or an + * object has any of the give keys. + * + * ```js + * has(['a', 'b', 'c'], 'c'); + * //=> true + * + * has(['a', 'b', 'c'], ['c', 'z']); + * //=> true + * + * has({a: 'b', c: 'd'}, ['c', 'z']); + * //=> true + * ``` + * @param {Object} `obj` + * @param {String|Array} `val` + * @return {Boolean} + */ + +function has(obj, val) { + val = arrayify(val); + var len = val.length; + + if (isObject(obj)) { + for (var key in obj) { + if (val.indexOf(key) > -1) { + return true; + } + } + + var keys = nativeKeys(obj); + return has(keys, val); + } + + if (Array.isArray(obj)) { + var arr = obj; + while (len--) { + if (arr.indexOf(val[len]) > -1) { + return true; + } + } + return false; + } + + throw new TypeError('expected an array or object.'); +} + +/** + * Cast the given value to an array. + * + * ```js + * arrayify('foo'); + * //=> ['foo'] + * + * arrayify(['foo']); + * //=> ['foo'] + * ``` + * + * @param {String|Array} `val` + * @return {Array} + */ + +function arrayify(val) { + return val ? (Array.isArray(val) ? val : [val]) : []; +} + +/** + * Returns true if a value has a `contructor` + * + * ```js + * hasConstructor({}); + * //=> true + * + * hasConstructor(Object.create(null)); + * //=> false + * ``` + * @param {Object} `value` + * @return {Boolean} + */ + +function hasConstructor(val) { + return isObject(val) && typeof val.constructor !== 'undefined'; +} + +/** + * Get the native `ownPropertyNames` from the constructor of the + * given `object`. An empty array is returned if the object does + * not have a constructor. + * + * ```js + * nativeKeys({a: 'b', b: 'c', c: 'd'}) + * //=> ['a', 'b', 'c'] + * + * nativeKeys(function(){}) + * //=> ['length', 'caller'] + * ``` + * + * @param {Object} `obj` Object that has a `constructor`. + * @return {Array} Array of keys. + */ + +function nativeKeys(val) { + if (!hasConstructor(val)) return []; + return Object.getOwnPropertyNames(val); +} + +/** + * Expose `copy` + */ + +module.exports = copy; + +/** + * Expose `copy.has` for tests + */ + +module.exports.has = has; diff --git a/front/frontend/node_modules/object-copy/node_modules/define-property/LICENSE b/front/frontend/node_modules/object-copy/node_modules/define-property/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/object-copy/node_modules/define-property/README.md b/front/frontend/node_modules/object-copy/node_modules/define-property/README.md new file mode 100644 index 0000000..8cac698 --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/define-property/README.md @@ -0,0 +1,77 @@ +# define-property [![NPM version](https://badge.fury.io/js/define-property.svg)](http://badge.fury.io/js/define-property) + +> Define a non-enumerable property on an object. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i define-property --save +``` + +## Usage + +**Params** + +* `obj`: The object on which to define the property. +* `prop`: The name of the property to be defined or modified. +* `descriptor`: The descriptor for the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**get/set** + +```js +define(obj, 'foo', { + get: function() {}, + set: function() {} +}); +``` + +## Related projects + +* [delegate-object](https://www.npmjs.com/package/delegate-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/delegate-object) | [homepage](https://github.com/doowb/delegate-object) +* [forward-object](https://www.npmjs.com/package/forward-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/forward-object) | [homepage](https://github.com/doowb/forward-object) +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep) +* [mixin-object](https://www.npmjs.com/package/mixin-object): Mixin the own and inherited properties of other objects onto the first object. Pass an… [more](https://www.npmjs.com/package/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/define-property/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 31, 2015._ diff --git a/front/frontend/node_modules/object-copy/node_modules/define-property/index.js b/front/frontend/node_modules/object-copy/node_modules/define-property/index.js new file mode 100644 index 0000000..3e0e5e1 --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/define-property/index.js @@ -0,0 +1,31 @@ +/*! + * define-property + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isDescriptor = require('is-descriptor'); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; diff --git a/front/frontend/node_modules/object-copy/node_modules/define-property/package.json b/front/frontend/node_modules/object-copy/node_modules/define-property/package.json new file mode 100644 index 0000000..43561bf --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/define-property/package.json @@ -0,0 +1,51 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "0.2.5", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "^7.0.4" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "mixin-deep", + "mixin-object", + "delegate-object", + "forward-object" + ] + } + }, + "dependencies": { + "is-descriptor": "^0.1.0" + } +} diff --git a/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.editorconfig b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.editorconfig new file mode 100644 index 0000000..449f0da --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.eslintrc b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.eslintrc new file mode 100644 index 0000000..24e5090 --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.eslintrc @@ -0,0 +1,16 @@ +{ + "extends": "@ljharb", + + "rules": { + "func-style": "warn", + }, + + "overrides": [ + { + "files": "test/**/*.js", + "rules": { + "max-lines-per-function": "off", + }, + }, + ], +} diff --git a/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.gitattributes b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.gitattributes new file mode 100644 index 0000000..660957e --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.gitattributes @@ -0,0 +1,10 @@ +# Enforce Unix newlines +* text eol=lf + +# binaries +*.ai binary +*.psd binary +*.jpg binary +*.gif binary +*.png binary +*.jpeg binary diff --git a/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.github/FUNDING.yml b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000..37535da --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.nycrc b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/front/frontend/node_modules/object-copy/node_modules/is-descriptor/CHANGELOG.md b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/CHANGELOG.md new file mode 100644 index 0000000..4963353 --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/CHANGELOG.md @@ -0,0 +1,144 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.0](https://github.com/inspect-js/is-descriptor/compare/v3.0.0...v3.1.0) - 2023-05-01 + +### Commits + +- [eslint] cleanup [`1f4e8cd`](https://github.com/inspect-js/is-descriptor/commit/1f4e8cdb49b4b15666a782f3f05e6f4f0146b9ab) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`5993285`](https://github.com/inspect-js/is-descriptor/commit/5993285a122ef7bf5b91cba3b486f96a1f94f552) +- [readme] clean up docs, URLs, package.json, etc [`8807164`](https://github.com/inspect-js/is-descriptor/commit/88071644c15d543c7830e6ac00a5ed8531c82750) +- [Docs] remove verb [`0bc26a3`](https://github.com/inspect-js/is-descriptor/commit/0bc26a306f02241e6c5c506e95c53ca828031c05) +- [Tests] convert from mocha to tape [`1604d7f`](https://github.com/inspect-js/is-descriptor/commit/1604d7feebd776b0fb67163e3013cc6d5ab9fd6b) +- [New] increase support from node 6 down to node 0.4 [`7893404`](https://github.com/inspect-js/is-descriptor/commit/789340412f4028d46a3121466a25497716b94402) +- [Tests] add coverage [`1dcc45e`](https://github.com/inspect-js/is-descriptor/commit/1dcc45ed57aebc83ba0588c232663f4164a7d0a8) +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`d1edefe`](https://github.com/inspect-js/is-descriptor/commit/d1edefef56c7eeaab385b1704417b314f197034d) +- [meta] switch from `files` field to npmignore; add `exports` [`c64d3d3`](https://github.com/inspect-js/is-descriptor/commit/c64d3d356d459f2e73198841f93fb902895875b4) + +## [v3.0.0](https://github.com/inspect-js/is-descriptor/compare/v2.0.0...v3.0.0) - 2018-12-13 + +### Commits + +- refactor [`7f7e2c8`](https://github.com/inspect-js/is-descriptor/commit/7f7e2c865674526424f5cd1fb98f0ed7811a67f9) + +## [v2.0.0](https://github.com/inspect-js/is-descriptor/compare/v1.0.3...v2.0.0) - 2017-12-28 + +### Commits + +- run verb to generate readme [`7d97594`](https://github.com/inspect-js/is-descriptor/commit/7d97594666afaa825e0421883507cfec04ceef1d) +- upgrade is-accessor-descriptor [`2e2cb1e`](https://github.com/inspect-js/is-descriptor/commit/2e2cb1e723d2ca1d6b8580d384702700e26dda81) +- run update [`c04832a`](https://github.com/inspect-js/is-descriptor/commit/c04832a3a2bf48bef2ea0f5844652da7d6209242) + +## [v1.0.3](https://github.com/inspect-js/is-descriptor/compare/v1.0.2...v1.0.3) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v1.0.2](https://github.com/inspect-js/is-descriptor/compare/v1.0.1...v1.0.2) - 2017-12-28 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +## [v1.0.1](https://github.com/inspect-js/is-descriptor/compare/v1.0.0...v1.0.1) - 2017-07-22 + +### Commits + +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) + +## [v1.0.0](https://github.com/inspect-js/is-descriptor/compare/v0.1.7...v1.0.0) - 2017-02-25 + +## [v0.1.7](https://github.com/inspect-js/is-descriptor/compare/v0.1.6...v0.1.7) - 2023-10-26 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- v0.x line: v1 and v0 are the same, so, branch v0 from 1.x [`91be723`](https://github.com/inspect-js/is-descriptor/commit/91be72399c3066950d2414a6d2f091e1074625cd) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v0.1.6](https://github.com/inspect-js/is-descriptor/compare/v0.1.5...v0.1.6) - 2017-07-22 + +## [v0.1.5](https://github.com/inspect-js/is-descriptor/compare/v0.1.4...v0.1.5) - 2017-02-25 + +### Merged + +- Bump `lazy-cache`. [`#4`](https://github.com/inspect-js/is-descriptor/pull/4) + +### Commits + +- update docs, fix typos [`bc3cf69`](https://github.com/inspect-js/is-descriptor/commit/bc3cf6915686d4a964997ae7585bf65005bbf955) +- run update [`1956814`](https://github.com/inspect-js/is-descriptor/commit/1956814c67c2033caeaed469ad09e6392dd0799e) + +## [v0.1.4](https://github.com/inspect-js/is-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 + +### Commits + +- allow a key to be passed [`202062b`](https://github.com/inspect-js/is-descriptor/commit/202062b56735525e7def35c8453505778ce9de03) +- update docs [`890fe80`](https://github.com/inspect-js/is-descriptor/commit/890fe80100aa21cac1bee55d6fb4045ffb661ff7) + +## [v0.1.3](https://github.com/inspect-js/is-descriptor/compare/v0.1.2...v0.1.3) - 2015-12-20 + +### Commits + +- lint [`fa81701`](https://github.com/inspect-js/is-descriptor/commit/fa817018aabb6f18e7f09e452b80386775773d42) +- add gulp-format-md to verb config, build readme [`8e6c159`](https://github.com/inspect-js/is-descriptor/commit/8e6c159cfa23b357dbac8f977c3a9421172aafeb) +- update deps [`b7b8321`](https://github.com/inspect-js/is-descriptor/commit/b7b8321e194f4f25c5aa4ff382a0a8ffb6482cc1) + +## [v0.1.2](https://github.com/inspect-js/is-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- files prop [`3aaf1ce`](https://github.com/inspect-js/is-descriptor/commit/3aaf1ce8483bdee217e2f18b293937a09634a33b) + +## [v0.1.1](https://github.com/inspect-js/is-descriptor/compare/v0.1.0...v0.1.1) - 2015-10-04 + +### Merged + +- Update .verb.md [`#1`](https://github.com/inspect-js/is-descriptor/pull/1) + +### Commits + +- adds lazy-caching [`0219f1a`](https://github.com/inspect-js/is-descriptor/commit/0219f1aa95b9ce7c08e0a1e00fe506a572c6ac46) +- 0.1.1 readme [`924a5a7`](https://github.com/inspect-js/is-descriptor/commit/924a5a7a5d648d901b24b7287d9a5d232865f603) +- fix readme [`dd9c431`](https://github.com/inspect-js/is-descriptor/commit/dd9c4315dd61be73f42d07bc71ddb97414dfdbcf) + +## v0.1.0 - 2015-08-31 + +### Commits + +- first commit [`b5d8c39`](https://github.com/inspect-js/is-descriptor/commit/b5d8c39843c98588b67069325a4e6455beb8aef3) +- 0.1.0 readme [`aaffb92`](https://github.com/inspect-js/is-descriptor/commit/aaffb924062d7c588417d9a2184ff1129f8d294a) +- 0.1.0 docs [`eb0da6c`](https://github.com/inspect-js/is-descriptor/commit/eb0da6c548e59ff76f6a80a95ea0a750dab40591) +- use libs [`86ad32f`](https://github.com/inspect-js/is-descriptor/commit/86ad32fe5a07d2705b14bb3e237584c05d60d519) +- lint [`94fbcc9`](https://github.com/inspect-js/is-descriptor/commit/94fbcc9c2a3da1e9b888bad86b9576259d1d7940) diff --git a/front/frontend/node_modules/object-copy/node_modules/is-descriptor/LICENSE b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/front/frontend/node_modules/object-copy/node_modules/is-descriptor/README.md b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/README.md new file mode 100644 index 0000000..fd9ddcf --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/README.md @@ -0,0 +1,134 @@ +# is-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Usage + +```js +const isDescriptor = require('is-descriptor'); +const assert = require('assert'); + +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +``` + +You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument. + +```js +const obj = { foo: 'abc' }; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +assert.equal(isDescriptor(obj, 'foo'), true); +assert.equal(isDescriptor(obj, 'bar'), true); +``` + +## Examples + +### value type + +`false` when not an object + +```js +assert.equal(isDescriptor('a'), false); +assert.equal(isDescriptor(null), false); +assert.equal(isDescriptor([]), false); +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ value() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', get() {} }), false); +assert.equal(isDescriptor({ get() {}, value() {} }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', writable: 'foo' }), false); +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get() {} }), true); +assert.equal(isDescriptor({ set() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'baz' }), false); +assert.equal(isDescriptor({ get() {}, writable: true }), false); +assert.equal(isDescriptor({ get() {}, value: true }), false); +``` + +`false` when an accessor is not a function + +```js +assert.equal(isDescriptor({ get() {}, set: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +assert.equal(isDescriptor({ get: 'foo', bar: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set: 'baz' }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'foo' }), false); +assert.equal(isDescriptor({ set() {}, configurable: 'foo' }), false); +assert.equal(isDescriptor({ get() {}, configurable: 'foo' }), false); +``` + +### Related projects + +You might also be interested in these projects: + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. +* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-descriptor +[actions-url]: https://github.com/inspect-js/is-descriptor/actions diff --git a/front/frontend/node_modules/object-copy/node_modules/is-descriptor/index.js b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/index.js new file mode 100644 index 0000000..c9dd24d --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + return false; + } + + if ('get' in obj || 'set' in obj) { + return isAccessor(obj, key); + } + + return isData(obj, key); +}; diff --git a/front/frontend/node_modules/object-copy/node_modules/is-descriptor/package.json b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/package.json new file mode 100644 index 0000000..6d6ca8b --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/package.json @@ -0,0 +1,88 @@ +{ + "name": "is-descriptor", + "version": "0.1.7", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-descriptor.git" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-descriptor", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/front/frontend/node_modules/object-copy/node_modules/is-descriptor/test/index.js b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/test/index.js new file mode 100644 index 0000000..0b74a35 --- /dev/null +++ b/front/frontend/node_modules/object-copy/node_modules/is-descriptor/test/index.js @@ -0,0 +1,116 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('is false when not an object:', function (st) { + st.notOk(isDescriptor('a')); + st.notOk(isDescriptor(null)); + st.notOk(isDescriptor([])); + + st.end(); + }); + + t.test('returns true if the property exists', function (st) { + var obj = { foo: null }; + + Object.defineProperty(obj, 'bar', { + value: 'xyz' + }); + + Object.defineProperty(obj, 'baz', { + get: function () { + return 'aaa'; + } + }); + + st.ok(isDescriptor(obj, 'foo')); + st.ok(isDescriptor(obj, 'bar')); + st.ok(isDescriptor(obj, 'baz')); + + st.end(); + }); + + t.test('data descriptor:', function (st) { + st.test('is false when the object has invalid properties:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', get: noop })); + s2t.notOk(isDescriptor({ get: noop, value: noop })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo' })); + s2t.ok(isDescriptor({ value: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', enumerable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', configurable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', writable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); + + t.test('accessor descriptor:', function (st) { + st.test('should be false when the object has invalid properties:', function (s2t) { + s2t.ok(!isDescriptor({ get: noop, writable: true })); + s2t.ok(!isDescriptor({ get: noop, value: true })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop, bar: 'baz' })); + + s2t.end(); + }); + + st.test('is false when an accessor is not a function:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: noop })); + s2t.notOk(isDescriptor({ get: 'foo', bar: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: 'baz' })); + + s2t.end(); + }); + + st.test('is false when "get" or "set" is not a function', function (s2t) { + s2t.notOk(isDescriptor({ set: 'foo' })); + s2t.notOk(isDescriptor({ get: 'foo' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop })); + s2t.ok(isDescriptor({ get: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: noop, enumerable: 'foo' })); + s2t.notOk(isDescriptor({ set: noop, configurable: 'foo' })); + s2t.notOk(isDescriptor({ get: noop, configurable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); +}); diff --git a/front/frontend/node_modules/object-copy/package.json b/front/frontend/node_modules/object-copy/package.json new file mode 100644 index 0000000..f02a96c --- /dev/null +++ b/front/frontend/node_modules/object-copy/package.json @@ -0,0 +1,47 @@ +{ + "name": "object-copy", + "description": "Copy static properties, prototype properties, and descriptors from one object to another.", + "version": "0.1.0", + "homepage": "https://github.com/jonschlinkert/object-copy", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/object-copy", + "bugs": { + "url": "https://github.com/jonschlinkert/object-copy/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "devDependencies": { + "gulp-format-md": "*", + "mocha": "*" + }, + "keywords": [ + "copy", + "object" + ], + "verb": { + "layout": "default", + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [] + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/front/frontend/node_modules/object-visit/LICENSE b/front/frontend/node_modules/object-visit/LICENSE new file mode 100644 index 0000000..ec85897 --- /dev/null +++ b/front/frontend/node_modules/object-visit/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/object-visit/README.md b/front/frontend/node_modules/object-visit/README.md new file mode 100644 index 0000000..64015cb --- /dev/null +++ b/front/frontend/node_modules/object-visit/README.md @@ -0,0 +1,83 @@ +# object-visit [![NPM version](https://img.shields.io/npm/v/object-visit.svg?style=flat)](https://www.npmjs.com/package/object-visit) [![NPM monthly downloads](https://img.shields.io/npm/dm/object-visit.svg?style=flat)](https://npmjs.org/package/object-visit) [![NPM total downloads](https://img.shields.io/npm/dt/object-visit.svg?style=flat)](https://npmjs.org/package/object-visit) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/object-visit.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/object-visit) + +> Call a specified method on each value in the given object. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save object-visit +``` + +## Usage + +```js +var visit = require('object-visit'); + +var ctx = { + data: {}, + set: function (key, value) { + if (typeof key === 'object') { + visit(ctx, 'set', key); + } else { + ctx.data[key] = value; + } + } +}; + +ctx.set('a', 'a'); +ctx.set('b', 'b'); +ctx.set('c', 'c'); +ctx.set({d: {e: 'f'}}); + +console.log(ctx.data); +//=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }}; +``` + +## About + +### Related projects + +* [base-methods](https://www.npmjs.com/package/base-methods): base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/jonschlinkert/base-methods) | [homepage](https://github.com/jonschlinkert/base-methods "base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") +* [collection-visit](https://www.npmjs.com/package/collection-visit): Visit a method over the items in an object, or map visit over the objects… [more](https://github.com/jonschlinkert/collection-visit) | [homepage](https://github.com/jonschlinkert/collection-visit "Visit a method over the items in an object, or map visit over the objects in an array.") +* [define-property](https://www.npmjs.com/package/define-property): Define a non-enumerable property on an object. | [homepage](https://github.com/jonschlinkert/define-property "Define a non-enumerable property on an object.") +* [map-visit](https://www.npmjs.com/package/map-visit): Map `visit` over an array of objects. | [homepage](https://github.com/jonschlinkert/map-visit "Map `visit` over an array of objects.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 30, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/object-visit/index.js b/front/frontend/node_modules/object-visit/index.js new file mode 100644 index 0000000..fcaeda9 --- /dev/null +++ b/front/frontend/node_modules/object-visit/index.js @@ -0,0 +1,33 @@ +/*! + * object-visit + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); + +module.exports = function visit(thisArg, method, target, val) { + if (!isObject(thisArg) && typeof thisArg !== 'function') { + throw new Error('object-visit expects `thisArg` to be an object.'); + } + + if (typeof method !== 'string') { + throw new Error('object-visit expects `method` name to be a string'); + } + + if (typeof thisArg[method] !== 'function') { + return thisArg; + } + + var args = [].slice.call(arguments, 3); + target = target || {}; + + for (var key in target) { + var arr = [key, target[key]].concat(args); + thisArg[method].apply(thisArg, arr); + } + return thisArg; +}; diff --git a/front/frontend/node_modules/object-visit/package.json b/front/frontend/node_modules/object-visit/package.json new file mode 100644 index 0000000..15fd0ff --- /dev/null +++ b/front/frontend/node_modules/object-visit/package.json @@ -0,0 +1,65 @@ +{ + "name": "object-visit", + "description": "Call a specified method on each value in the given object.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/object-visit", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/object-visit", + "bugs": { + "url": "https://github.com/jonschlinkert/object-visit/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "isobject": "^3.0.0" + }, + "devDependencies": { + "gulp": "^3.9.1", + "gulp-eslint": "^3.0.1", + "gulp-format-md": "^0.1.12", + "gulp-istanbul": "^1.1.1", + "gulp-mocha": "^3.0.0", + "mocha": "^3.2.0" + }, + "keywords": [ + "context", + "function", + "helper", + "key", + "method", + "object", + "value", + "visit", + "visitor" + ], + "verb": { + "related": { + "list": [ + "base-methods", + "collection-visit", + "define-property", + "map-visit" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/object.pick/LICENSE b/front/frontend/node_modules/object.pick/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/front/frontend/node_modules/object.pick/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/object.pick/README.md b/front/frontend/node_modules/object.pick/README.md new file mode 100644 index 0000000..48f7453 --- /dev/null +++ b/front/frontend/node_modules/object.pick/README.md @@ -0,0 +1,76 @@ +# object.pick [![NPM version](https://img.shields.io/npm/v/object.pick.svg?style=flat)](https://www.npmjs.com/package/object.pick) [![NPM monthly downloads](https://img.shields.io/npm/dm/object.pick.svg?style=flat)](https://npmjs.org/package/object.pick) [![NPM total downloads](https://img.shields.io/npm/dt/object.pick.svg?style=flat)](https://npmjs.org/package/object.pick) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/object.pick.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/object.pick) + +> Returns a filtered copy of an object with only the specified keys, similar to `_.pick` from lodash / underscore. + +You might also be interested in [object.omit](https://github.com/jonschlinkert/object.omit). + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save object.pick +``` + +## benchmarks + +This is the [fastest implementation](http://jsperf.com/pick-props) I tested. Pull requests welcome! + +## Usage + +```js +var pick = require('object.pick'); + +pick({a: 'a', b: 'b'}, 'a') +//=> {a: 'a'} + +pick({a: 'a', b: 'b', c: 'c'}, ['a', 'b']) +//=> {a: 'a', b: 'b'} +``` + +## About + +### Related projects + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.") +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.") +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/object.pick/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 27, 2016._ \ No newline at end of file diff --git a/front/frontend/node_modules/object.pick/index.js b/front/frontend/node_modules/object.pick/index.js new file mode 100644 index 0000000..0ce0178 --- /dev/null +++ b/front/frontend/node_modules/object.pick/index.js @@ -0,0 +1,35 @@ +/*! + * object.pick + * + * Copyright (c) 2014-2015 Jon Schlinkert, contributors. + * Licensed under the MIT License + */ + +'use strict'; + +var isObject = require('isobject'); + +module.exports = function pick(obj, keys) { + if (!isObject(obj) && typeof obj !== 'function') { + return {}; + } + + var res = {}; + if (typeof keys === 'string') { + if (keys in obj) { + res[keys] = obj[keys]; + } + return res; + } + + var len = keys.length; + var idx = -1; + + while (++idx < len) { + var key = keys[idx]; + if (key in obj) { + res[key] = obj[key]; + } + } + return res; +}; diff --git a/front/frontend/node_modules/object.pick/package.json b/front/frontend/node_modules/object.pick/package.json new file mode 100644 index 0000000..b655dbe --- /dev/null +++ b/front/frontend/node_modules/object.pick/package.json @@ -0,0 +1,60 @@ +{ + "name": "object.pick", + "description": "Returns a filtered copy of an object with only the specified keys, similar to `_.pick` from lodash / underscore.", + "version": "1.3.0", + "homepage": "https://github.com/jonschlinkert/object.pick", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/object.pick", + "bugs": { + "url": "https://github.com/jonschlinkert/object.pick/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "isobject": "^3.0.1" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.1.2", + "vinyl": "^2.0.0" + }, + "keywords": [ + "object", + "pick" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "extend-shallow", + "get-value", + "mixin-deep", + "set-value" + ], + "highlight": "object.omit" + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/on-finished/HISTORY.md b/front/frontend/node_modules/on-finished/HISTORY.md new file mode 100644 index 0000000..98ff0e9 --- /dev/null +++ b/front/frontend/node_modules/on-finished/HISTORY.md @@ -0,0 +1,88 @@ +2.3.0 / 2015-05-26 +================== + + * Add defined behavior for HTTP `CONNECT` requests + * Add defined behavior for HTTP `Upgrade` requests + * deps: ee-first@1.1.1 + +2.2.1 / 2015-04-22 +================== + + * Fix `isFinished(req)` when data buffered + +2.2.0 / 2014-12-22 +================== + + * Add message object to callback arguments + +2.1.1 / 2014-10-22 +================== + + * Fix handling of pipelined requests + +2.1.0 / 2014-08-16 +================== + + * Check if `socket` is detached + * Return `undefined` for `isFinished` if state unknown + +2.0.0 / 2014-08-16 +================== + + * Add `isFinished` function + * Move to `jshttp` organization + * Remove support for plain socket argument + * Rename to `on-finished` + * Support both `req` and `res` as arguments + * deps: ee-first@1.0.5 + +1.2.2 / 2014-06-10 +================== + + * Reduce listeners added to emitters + - avoids "event emitter leak" warnings when used multiple times on same request + +1.2.1 / 2014-06-08 +================== + + * Fix returned value when already finished + +1.2.0 / 2014-06-05 +================== + + * Call callback when called on already-finished socket + +1.1.4 / 2014-05-27 +================== + + * Support node.js 0.8 + +1.1.3 / 2014-04-30 +================== + + * Make sure errors passed as instanceof `Error` + +1.1.2 / 2014-04-18 +================== + + * Default the `socket` to passed-in object + +1.1.1 / 2014-01-16 +================== + + * Rename module to `finished` + +1.1.0 / 2013-12-25 +================== + + * Call callback when called on already-errored socket + +1.0.1 / 2013-12-20 +================== + + * Actually pass the error to the callback + +1.0.0 / 2013-12-20 +================== + + * Initial release diff --git a/front/frontend/node_modules/on-finished/LICENSE b/front/frontend/node_modules/on-finished/LICENSE new file mode 100644 index 0000000..5931fd2 --- /dev/null +++ b/front/frontend/node_modules/on-finished/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2013 Jonathan Ong +Copyright (c) 2014 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/on-finished/README.md b/front/frontend/node_modules/on-finished/README.md new file mode 100644 index 0000000..a0e1157 --- /dev/null +++ b/front/frontend/node_modules/on-finished/README.md @@ -0,0 +1,154 @@ +# on-finished + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Execute a callback when a HTTP request closes, finishes, or errors. + +## Install + +```sh +$ npm install on-finished +``` + +## API + +```js +var onFinished = require('on-finished') +``` + +### onFinished(res, listener) + +Attach a listener to listen for the response to finish. The listener will +be invoked only once when the response finished. If the response finished +to an error, the first argument will contain the error. If the response +has already finished, the listener will be invoked. + +Listening to the end of a response would be used to close things associated +with the response, like open files. + +Listener is invoked as `listener(err, res)`. + +```js +onFinished(res, function (err, res) { + // clean up open fds, etc. + // err contains the error is request error'd +}) +``` + +### onFinished(req, listener) + +Attach a listener to listen for the request to finish. The listener will +be invoked only once when the request finished. If the request finished +to an error, the first argument will contain the error. If the request +has already finished, the listener will be invoked. + +Listening to the end of a request would be used to know when to continue +after reading the data. + +Listener is invoked as `listener(err, req)`. + +```js +var data = '' + +req.setEncoding('utf8') +res.on('data', function (str) { + data += str +}) + +onFinished(req, function (err, req) { + // data is read unless there is err +}) +``` + +### onFinished.isFinished(res) + +Determine if `res` is already finished. This would be useful to check and +not even start certain operations if the response has already finished. + +### onFinished.isFinished(req) + +Determine if `req` is already finished. This would be useful to check and +not even start certain operations if the request has already finished. + +## Special Node.js requests + +### HTTP CONNECT method + +The meaning of the `CONNECT` method from RFC 7231, section 4.3.6: + +> The CONNECT method requests that the recipient establish a tunnel to +> the destination origin server identified by the request-target and, +> if successful, thereafter restrict its behavior to blind forwarding +> of packets, in both directions, until the tunnel is closed. Tunnels +> are commonly used to create an end-to-end virtual connection, through +> one or more proxies, which can then be secured using TLS (Transport +> Layer Security, [RFC5246]). + +In Node.js, these request objects come from the `'connect'` event on +the HTTP server. + +When this module is used on a HTTP `CONNECT` request, the request is +considered "finished" immediately, **due to limitations in the Node.js +interface**. This means if the `CONNECT` request contains a request entity, +the request will be considered "finished" even before it has been read. + +There is no such thing as a response object to a `CONNECT` request in +Node.js, so there is no support for for one. + +### HTTP Upgrade request + +The meaning of the `Upgrade` header from RFC 7230, section 6.1: + +> The "Upgrade" header field is intended to provide a simple mechanism +> for transitioning from HTTP/1.1 to some other protocol on the same +> connection. + +In Node.js, these request objects come from the `'upgrade'` event on +the HTTP server. + +When this module is used on a HTTP request with an `Upgrade` header, the +request is considered "finished" immediately, **due to limitations in the +Node.js interface**. This means if the `Upgrade` request contains a request +entity, the request will be considered "finished" even before it has been +read. + +There is no such thing as a response object to a `Upgrade` request in +Node.js, so there is no support for for one. + +## Example + +The following code ensures that file descriptors are always closed +once the response finishes. + +```js +var destroy = require('destroy') +var http = require('http') +var onFinished = require('on-finished') + +http.createServer(function onRequest(req, res) { + var stream = fs.createReadStream('package.json') + stream.pipe(res) + onFinished(res, function (err) { + destroy(stream) + }) +}) +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/on-finished.svg +[npm-url]: https://npmjs.org/package/on-finished +[node-version-image]: https://img.shields.io/node/v/on-finished.svg +[node-version-url]: http://nodejs.org/download/ +[travis-image]: https://img.shields.io/travis/jshttp/on-finished/master.svg +[travis-url]: https://travis-ci.org/jshttp/on-finished +[coveralls-image]: https://img.shields.io/coveralls/jshttp/on-finished/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/on-finished?branch=master +[downloads-image]: https://img.shields.io/npm/dm/on-finished.svg +[downloads-url]: https://npmjs.org/package/on-finished diff --git a/front/frontend/node_modules/on-finished/index.js b/front/frontend/node_modules/on-finished/index.js new file mode 100644 index 0000000..9abd98f --- /dev/null +++ b/front/frontend/node_modules/on-finished/index.js @@ -0,0 +1,196 @@ +/*! + * on-finished + * Copyright(c) 2013 Jonathan Ong + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = onFinished +module.exports.isFinished = isFinished + +/** + * Module dependencies. + * @private + */ + +var first = require('ee-first') + +/** + * Variables. + * @private + */ + +/* istanbul ignore next */ +var defer = typeof setImmediate === 'function' + ? setImmediate + : function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) } + +/** + * Invoke callback when the response has finished, useful for + * cleaning up resources afterwards. + * + * @param {object} msg + * @param {function} listener + * @return {object} + * @public + */ + +function onFinished(msg, listener) { + if (isFinished(msg) !== false) { + defer(listener, null, msg) + return msg + } + + // attach the listener to the message + attachListener(msg, listener) + + return msg +} + +/** + * Determine if message is already finished. + * + * @param {object} msg + * @return {boolean} + * @public + */ + +function isFinished(msg) { + var socket = msg.socket + + if (typeof msg.finished === 'boolean') { + // OutgoingMessage + return Boolean(msg.finished || (socket && !socket.writable)) + } + + if (typeof msg.complete === 'boolean') { + // IncomingMessage + return Boolean(msg.upgrade || !socket || !socket.readable || (msg.complete && !msg.readable)) + } + + // don't know + return undefined +} + +/** + * Attach a finished listener to the message. + * + * @param {object} msg + * @param {function} callback + * @private + */ + +function attachFinishedListener(msg, callback) { + var eeMsg + var eeSocket + var finished = false + + function onFinish(error) { + eeMsg.cancel() + eeSocket.cancel() + + finished = true + callback(error) + } + + // finished on first message event + eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish) + + function onSocket(socket) { + // remove listener + msg.removeListener('socket', onSocket) + + if (finished) return + if (eeMsg !== eeSocket) return + + // finished on first socket event + eeSocket = first([[socket, 'error', 'close']], onFinish) + } + + if (msg.socket) { + // socket already assigned + onSocket(msg.socket) + return + } + + // wait for socket to be assigned + msg.on('socket', onSocket) + + if (msg.socket === undefined) { + // node.js 0.8 patch + patchAssignSocket(msg, onSocket) + } +} + +/** + * Attach the listener to the message. + * + * @param {object} msg + * @return {function} + * @private + */ + +function attachListener(msg, listener) { + var attached = msg.__onFinished + + // create a private single listener with queue + if (!attached || !attached.queue) { + attached = msg.__onFinished = createListener(msg) + attachFinishedListener(msg, attached) + } + + attached.queue.push(listener) +} + +/** + * Create listener on message. + * + * @param {object} msg + * @return {function} + * @private + */ + +function createListener(msg) { + function listener(err) { + if (msg.__onFinished === listener) msg.__onFinished = null + if (!listener.queue) return + + var queue = listener.queue + listener.queue = null + + for (var i = 0; i < queue.length; i++) { + queue[i](err, msg) + } + } + + listener.queue = [] + + return listener +} + +/** + * Patch ServerResponse.prototype.assignSocket for node.js 0.8. + * + * @param {ServerResponse} res + * @param {function} callback + * @private + */ + +function patchAssignSocket(res, callback) { + var assignSocket = res.assignSocket + + if (typeof assignSocket !== 'function') return + + // res.on('socket', callback) is broken in 0.8 + res.assignSocket = function _assignSocket(socket) { + assignSocket.call(this, socket) + callback(socket) + } +} diff --git a/front/frontend/node_modules/on-finished/package.json b/front/frontend/node_modules/on-finished/package.json new file mode 100644 index 0000000..b9df1bd --- /dev/null +++ b/front/frontend/node_modules/on-finished/package.json @@ -0,0 +1,31 @@ +{ + "name": "on-finished", + "description": "Execute a callback when a request closes, finishes, or errors", + "version": "2.3.0", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "repository": "jshttp/on-finished", + "dependencies": { + "ee-first": "1.1.1" + }, + "devDependencies": { + "istanbul": "0.3.9", + "mocha": "2.2.5" + }, + "engines": { + "node": ">= 0.8" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "scripts": { + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + } +} diff --git a/front/frontend/node_modules/on-headers/HISTORY.md b/front/frontend/node_modules/on-headers/HISTORY.md new file mode 100644 index 0000000..a77a6aa --- /dev/null +++ b/front/frontend/node_modules/on-headers/HISTORY.md @@ -0,0 +1,26 @@ +1.1.0 / 2025-07-17 +================== + * - Fix [CVE-2025-7339](https://www.cve.org/CVERecord?id=CVE-2025-7339) ([GHSA-76c9-3jph-rj3q](https://github.com/expressjs/multer/security/advisories/GHSA-76c9-3jph-rj3q)) + + +1.0.2 / 2019-02-21 +================== + + * Fix `res.writeHead` patch missing return value + +1.0.1 / 2015-09-29 +================== + + * perf: enable strict mode + +1.0.0 / 2014-08-10 +================== + + * Honor `res.statusCode` change in `listener` + * Move to `jshttp` organization + * Prevent `arguments`-related de-opt + +0.0.0 / 2014-05-13 +================== + + * Initial implementation diff --git a/front/frontend/node_modules/on-headers/LICENSE b/front/frontend/node_modules/on-headers/LICENSE new file mode 100644 index 0000000..b7dce6c --- /dev/null +++ b/front/frontend/node_modules/on-headers/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/on-headers/README.md b/front/frontend/node_modules/on-headers/README.md new file mode 100644 index 0000000..865fe4b --- /dev/null +++ b/front/frontend/node_modules/on-headers/README.md @@ -0,0 +1,81 @@ +# on-headers + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][ci-image]][ci-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +Execute a listener when a response is about to write headers. + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install on-headers +``` + +## API + + + +```js +var onHeaders = require('on-headers') +``` + +### onHeaders(res, listener) + +This will add the listener `listener` to fire when headers are emitted for `res`. +The listener is passed the `response` object as it's context (`this`). Headers are +considered to be emitted only once, right before they are sent to the client. + +When this is called multiple times on the same `res`, the `listener`s are fired +in the reverse order they were added. + +## Examples + +```js +var http = require('http') +var onHeaders = require('on-headers') + +http + .createServer(onRequest) + .listen(3000) + +function addPoweredBy () { + // set if not set by end of request + if (!this.getHeader('X-Powered-By')) { + this.setHeader('X-Powered-By', 'Node.js') + } +} + +function onRequest (req, res) { + onHeaders(res, addPoweredBy) + + res.setHeader('Content-Type', 'text/plain') + res.end('hello!') +} +``` + +## Testing + +```sh +$ npm test +``` + +## License + +[MIT](LICENSE) + +[ci-image]: https://badgen.net/github/checks/jshttp/on-headers/master?label=ci +[ci-url]: https://github.com/jshttp/on-headers/actions/workflows/ci.yml +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/on-headers/master +[coveralls-url]: https://coveralls.io/r/jshttp/on-headers?branch=master +[node-image]: https://badgen.net/npm/node/on-headers +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/on-headers +[npm-url]: https://npmjs.org/package/on-headers +[npm-version-image]: https://badgen.net/npm/v/on-headers diff --git a/front/frontend/node_modules/on-headers/index.js b/front/frontend/node_modules/on-headers/index.js new file mode 100644 index 0000000..d691cc7 --- /dev/null +++ b/front/frontend/node_modules/on-headers/index.js @@ -0,0 +1,180 @@ +/*! + * on-headers + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = onHeaders + +var http = require('http') + +// older node versions don't have appendHeader +var isAppendHeaderSupported = typeof http.ServerResponse.prototype.appendHeader === 'function' +var set1dArray = isAppendHeaderSupported ? set1dArrayWithAppend : set1dArrayWithSet + +/** + * Create a replacement writeHead method. + * + * @param {function} prevWriteHead + * @param {function} listener + * @private + */ + +function createWriteHead (prevWriteHead, listener) { + var fired = false + + // return function with core name and argument list + return function writeHead (statusCode) { + // set headers from arguments + var args = setWriteHeadHeaders.apply(this, arguments) + + // fire listener + if (!fired) { + fired = true + listener.call(this) + + // pass-along an updated status code + if (typeof args[0] === 'number' && this.statusCode !== args[0]) { + args[0] = this.statusCode + args.length = 1 + } + } + + return prevWriteHead.apply(this, args) + } +} + +/** + * Execute a listener when a response is about to write headers. + * + * @param {object} res + * @return {function} listener + * @public + */ + +function onHeaders (res, listener) { + if (!res) { + throw new TypeError('argument res is required') + } + + if (typeof listener !== 'function') { + throw new TypeError('argument listener must be a function') + } + + res.writeHead = createWriteHead(res.writeHead, listener) +} + +/** + * Set headers contained in array on the response object. + * + * @param {object} res + * @param {array} headers + * @private + */ + +function setHeadersFromArray (res, headers) { + if (headers.length && Array.isArray(headers[0])) { + // 2D + set2dArray(res, headers) + } else { + // 1D + if (headers.length % 2 !== 0) { + throw new TypeError('headers array is malformed') + } + + set1dArray(res, headers) + } +} + +/** + * Set headers contained in object on the response object. + * + * @param {object} res + * @param {object} headers + * @private + */ + +function setHeadersFromObject (res, headers) { + var keys = Object.keys(headers) + for (var i = 0; i < keys.length; i++) { + var k = keys[i] + if (k) res.setHeader(k, headers[k]) + } +} + +/** + * Set headers and other properties on the response object. + * + * @param {number} statusCode + * @private + */ + +function setWriteHeadHeaders (statusCode) { + var length = arguments.length + var headerIndex = length > 1 && typeof arguments[1] === 'string' + ? 2 + : 1 + + var headers = length >= headerIndex + 1 + ? arguments[headerIndex] + : undefined + + this.statusCode = statusCode + + if (Array.isArray(headers)) { + // handle array case + setHeadersFromArray(this, headers) + } else if (headers) { + // handle object case + setHeadersFromObject(this, headers) + } + + // copy leading arguments + var args = new Array(Math.min(length, headerIndex)) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + + return args +} + +function set2dArray (res, headers) { + var key + for (var i = 0; i < headers.length; i++) { + key = headers[i][0] + if (key) { + res.setHeader(key, headers[i][1]) + } + } +} + +function set1dArrayWithAppend (res, headers) { + for (var i = 0; i < headers.length; i += 2) { + res.removeHeader(headers[i]) + } + + var key + for (var j = 0; j < headers.length; j += 2) { + key = headers[j] + if (key) { + res.appendHeader(key, headers[j + 1]) + } + } +} + +function set1dArrayWithSet (res, headers) { + var key + for (var i = 0; i < headers.length; i += 2) { + key = headers[i] + if (key) { + res.setHeader(key, headers[i + 1]) + } + } +} diff --git a/front/frontend/node_modules/on-headers/package.json b/front/frontend/node_modules/on-headers/package.json new file mode 100644 index 0000000..341ce2f --- /dev/null +++ b/front/frontend/node_modules/on-headers/package.json @@ -0,0 +1,44 @@ +{ + "name": "on-headers", + "description": "Execute a listener when a response is about to write headers", + "version": "1.1.0", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "keywords": [ + "event", + "headers", + "http", + "onheaders" + ], + "repository": "jshttp/on-headers", + "devDependencies": { + "eslint": "6.8.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.21.2", + "eslint-plugin-markdown": "1.0.2", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "4.2.1", + "eslint-plugin-standard": "4.0.1", + "mocha": "10.2.0", + "nyc": "15.1.0", + "supertest": "4.0.2" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --check-leaks test/test.js", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "update-upstream-hashes": "node scripts/update-upstream-hashes.js", + "upstream": "mocha --reporter spec --check-leaks test/upstream.js", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/front/frontend/node_modules/opn/index.js b/front/frontend/node_modules/opn/index.js new file mode 100644 index 0000000..3daa162 --- /dev/null +++ b/front/frontend/node_modules/opn/index.js @@ -0,0 +1,113 @@ +'use strict'; +const {promisify} = require('util'); +const path = require('path'); +const childProcess = require('child_process'); +const isWsl = require('is-wsl'); + +const pExecFile = promisify(childProcess.execFile); + +// Convert a path from WSL format to Windows format: +// `/mnt/c/Program Files/Example/MyApp.exe` → `C:\Program Files\Example\MyApp.exe`` +const wslToWindowsPath = async path => { + const {stdout} = await pExecFile('wslpath', ['-w', path]); + return stdout.trim(); +}; + +module.exports = async (target, options) => { + if (typeof target !== 'string') { + throw new TypeError('Expected a `target`'); + } + + options = { + wait: false, + ...options + }; + + let command; + let appArguments = []; + const cliArguments = []; + const childProcessOptions = {}; + + if (Array.isArray(options.app)) { + appArguments = options.app.slice(1); + options.app = options.app[0]; + } + + if (process.platform === 'darwin') { + command = 'open'; + + if (options.wait) { + cliArguments.push('-W'); + } + + if (options.app) { + cliArguments.push('-a', options.app); + } + } else if (process.platform === 'win32' || isWsl) { + command = 'cmd' + (isWsl ? '.exe' : ''); + cliArguments.push('/c', 'start', '""', '/b'); + target = target.replace(/&/g, '^&'); + + if (options.wait) { + cliArguments.push('/wait'); + } + + if (options.app) { + if (isWsl && options.app.startsWith('/mnt/')) { + const windowsPath = await wslToWindowsPath(options.app); + options.app = windowsPath; + } + + cliArguments.push(options.app); + } + + if (appArguments.length > 0) { + cliArguments.push(...appArguments); + } + } else { + if (options.app) { + command = options.app; + } else { + const useSystemXdgOpen = process.versions.electron || process.platform === 'android'; + command = useSystemXdgOpen ? 'xdg-open' : path.join(__dirname, 'xdg-open'); + } + + if (appArguments.length > 0) { + cliArguments.push(...appArguments); + } + + if (!options.wait) { + // `xdg-open` will block the process unless stdio is ignored + // and it's detached from the parent even if it's unref'd. + childProcessOptions.stdio = 'ignore'; + childProcessOptions.detached = true; + } + } + + cliArguments.push(target); + + if (process.platform === 'darwin' && appArguments.length > 0) { + cliArguments.push('--args', ...appArguments); + } + + const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions); + + if (options.wait) { + return new Promise((resolve, reject) => { + subprocess.once('error', reject); + + subprocess.once('close', exitCode => { + if (exitCode > 0) { + reject(new Error(`Exited with code ${exitCode}`)); + return; + } + + resolve(subprocess); + }); + }); + } + + subprocess.unref(); + + return subprocess; +}; diff --git a/front/frontend/node_modules/opn/license b/front/frontend/node_modules/opn/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/front/frontend/node_modules/opn/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/opn/package.json b/front/frontend/node_modules/opn/package.json new file mode 100644 index 0000000..2a2616a --- /dev/null +++ b/front/frontend/node_modules/opn/package.json @@ -0,0 +1,55 @@ +{ + "name": "opn", + "version": "6.0.0", + "description": "Open stuff like URLs, files, executables. Cross-platform.", + "license": "MIT", + "repository": "sindresorhus/open", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo" + }, + "files": [ + "index.js", + "xdg-open" + ], + "keywords": [ + "app", + "open", + "opener", + "opens", + "launch", + "start", + "xdg-open", + "xdg", + "default", + "cmd", + "browser", + "editor", + "executable", + "exe", + "url", + "urls", + "arguments", + "args", + "spawn", + "exec", + "child", + "process", + "website", + "file" + ], + "dependencies": { + "is-wsl": "^1.1.0" + }, + "devDependencies": { + "ava": "^1.4.0", + "xo": "^0.24.0" + } +} diff --git a/front/frontend/node_modules/opn/readme.md b/front/frontend/node_modules/opn/readme.md new file mode 100644 index 0000000..160b743 --- /dev/null +++ b/front/frontend/node_modules/opn/readme.md @@ -0,0 +1,98 @@ +# open + +> Open stuff like URLs, files, executables. Cross-platform. + +If need this for Electron, use [`shell.openItem()`](https://electronjs.org/docs/api/shell#shellopenitemfullpath) instead. + +Note: The original [`open` package](https://github.com/pwnall/node-open) was recently deprecated in favor of this package, and we got the name, so this package is now named `open` instead of `opn`. If you're upgrading from the original `open` package (`open@0.0.5` or lower), keep in mind that the API is different. + +#### Why? + +- Actively maintained. +- Supports app arguments. +- Safer as it uses `spawn` instead of `exec`. +- Fixes most of the open original `node-open` issues. +- Includes the latest [`xdg-open` script](http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=c55122295c2a480fa721a9614f0e2d42b2949c18) for Linux. +- Supports WSL paths to Windows apps under `/mnt/*`. + + +## Install + +``` +$ npm install open +``` + + +## Usage + +```js +const open = require('open'); + +// Opens the image in the default image viewer +(async () => { + await open('unicorn.png', {wait: true}); + console.log('The image viewer app closed'); + + // Opens the url in the default browser + await open('https://sindresorhus.com'); + + // Specify the app to open in + await open('https://sindresorhus.com', {app: 'firefox'}); + + // Specify app arguments + await open('https://sindresorhus.com', {app: ['google chrome', '--incognito']}); +})(); +``` + + +## API + +It uses the command `open` on macOS, `start` on Windows and `xdg-open` on other platforms. + +### open(target, [options]) + +Returns a promise for the [spawned child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess). You would normally not need to use this for anything, but it can be useful if you'd like to attach custom event listeners or perform other operations directly on the spawned process. + +#### target + +Type: `string` + +The thing you want to open. Can be a URL, file, or executable. + +Opens in the default app for the file type. For example, URLs opens in your default browser. + +#### options + +Type: `Object` + +##### wait + +Type: `boolean`
    +Default: `false` + +Wait for the opened app to exit before fulfilling the promise. If `false` it's fulfilled immediately when opening the app. + +Note that it waits for the app to exit, not just for the window to close. + +On Windows, you have to explicitly specify an app for it to be able to wait. + +##### app + +Type: `string | string[]` + +Specify the app to open the `target` with, or an array with the app and app arguments. + +The app name is platform dependent. Don't hard code it in reusable modules. For example, Chrome is `google chrome` on macOS, `google-chrome` on Linux and `chrome` on Windows. + +You may also pass in the app's full path. For example on WSL, this can be `/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe` for the Windows installation of Chrome. + + +## Related + +- [opn-cli](https://github.com/sindresorhus/opn-cli) - CLI for this module +- [open-editor](https://github.com/sindresorhus/open-editor) - Open files in your editor at a specific line and column + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/front/frontend/node_modules/opn/xdg-open b/front/frontend/node_modules/opn/xdg-open new file mode 100644 index 0000000..faaea7f --- /dev/null +++ b/front/frontend/node_modules/opn/xdg-open @@ -0,0 +1,1066 @@ +#!/bin/sh +#--------------------------------------------- +# xdg-open +# +# Utility script to open a URL in the registered default application. +# +# Refer to the usage() function below for usage. +# +# Copyright 2009-2010, Fathi Boudra +# Copyright 2009-2010, Rex Dieter +# Copyright 2006, Kevin Krammer +# Copyright 2006, Jeremy White +# +# LICENSE: +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +#--------------------------------------------- + +manualpage() +{ +cat << _MANUALPAGE +Name + + xdg-open -- opens a file or URL in the user's preferred + application + +Synopsis + + xdg-open { file | URL } + + xdg-open { --help | --manual | --version } + +Description + + xdg-open opens a file or URL in the user's preferred + application. If a URL is provided the URL will be opened in the + user's preferred web browser. If a file is provided the file + will be opened in the preferred application for files of that + type. xdg-open supports file, ftp, http and https URLs. + + xdg-open is for use inside a desktop session only. It is not + recommended to use xdg-open as root. + +Options + + --help + Show command synopsis. + + --manual + Show this manual page. + + --version + Show the xdg-utils version information. + +Exit Codes + + An exit code of 0 indicates success while a non-zero exit code + indicates failure. The following failure codes can be returned: + + 1 + Error in command line syntax. + + 2 + One of the files passed on the command line did not + exist. + + 3 + A required tool could not be found. + + 4 + The action failed. + +See Also + + xdg-mime(1), xdg-settings(1), MIME applications associations + specification + +Examples + +xdg-open 'http://www.freedesktop.org/' + + Opens the freedesktop.org website in the user's default + browser. + +xdg-open /tmp/foobar.png + + Opens the PNG image file /tmp/foobar.png in the user's default + image viewing application. +_MANUALPAGE +} + +usage() +{ +cat << _USAGE + xdg-open -- opens a file or URL in the user's preferred + application + +Synopsis + + xdg-open { file | URL } + + xdg-open { --help | --manual | --version } + +_USAGE +} + +#@xdg-utils-common@ + +#---------------------------------------------------------------------------- +# Common utility functions included in all XDG wrapper scripts +#---------------------------------------------------------------------------- + +DEBUG() +{ + [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0; + [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0; + shift + echo "$@" >&2 +} + +# This handles backslashes but not quote marks. +first_word() +{ + read first rest + echo "$first" +} + +#------------------------------------------------------------- +# map a binary to a .desktop file +binary_to_desktop_file() +{ + search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" + binary="`which "$1"`" + binary="`readlink -f "$binary"`" + base="`basename "$binary"`" + IFS=: + for dir in $search; do + unset IFS + [ "$dir" ] || continue + [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue + for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do + [ -r "$file" ] || continue + # Check to make sure it's worth the processing. + grep -q "^Exec.*$base" "$file" || continue + # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop"). + grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue + command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`" + command="`which "$command"`" + if [ x"`readlink -f "$command"`" = x"$binary" ]; then + # Fix any double slashes that got added path composition + echo "$file" | sed -e 's,//*,/,g' + return + fi + done + done +} + +#------------------------------------------------------------- +# map a .desktop file to a binary +desktop_file_to_binary() +{ + search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" + desktop="`basename "$1"`" + IFS=: + for dir in $search; do + unset IFS + [ "$dir" ] && [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue + # Check if desktop file contains - + if [ "${desktop#*-}" != "$desktop" ]; then + vendor=${desktop%-*} + app=${desktop#*-} + if [ -r $dir/applications/$vendor/$app ]; then + file_path=$dir/applications/$vendor/$app + elif [ -r $dir/applnk/$vendor/$app ]; then + file_path=$dir/applnk/$vendor/$app + fi + fi + if test -z "$file_path" ; then + for indir in "$dir"/applications/ "$dir"/applications/*/ "$dir"/applnk/ "$dir"/applnk/*/; do + file="$indir/$desktop" + if [ -r "$file" ]; then + file_path=$file + break + fi + done + fi + if [ -r "$file_path" ]; then + # Remove any arguments (%F, %f, %U, %u, etc.). + command="`grep -E "^Exec(\[[^]=]*])?=" "$file_path" | cut -d= -f 2- | first_word`" + command="`which "$command"`" + readlink -f "$command" + return + fi + done +} + +#------------------------------------------------------------- +# Exit script on successfully completing the desired operation + +exit_success() +{ + if [ $# -gt 0 ]; then + echo "$@" + echo + fi + + exit 0 +} + + +#----------------------------------------- +# Exit script on malformed arguments, not enough arguments +# or missing required option. +# prints usage information + +exit_failure_syntax() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + echo "Try 'xdg-open --help' for more information." >&2 + else + usage + echo "Use 'man xdg-open' or 'xdg-open --manual' for additional info." + fi + + exit 1 +} + +#------------------------------------------------------------- +# Exit script on missing file specified on command line + +exit_failure_file_missing() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 2 +} + +#------------------------------------------------------------- +# Exit script on failure to locate necessary tool applications + +exit_failure_operation_impossible() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 3 +} + +#------------------------------------------------------------- +# Exit script on failure returned by a tool application + +exit_failure_operation_failed() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 4 +} + +#------------------------------------------------------------ +# Exit script on insufficient permission to read a specified file + +exit_failure_file_permission_read() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 5 +} + +#------------------------------------------------------------ +# Exit script on insufficient permission to write a specified file + +exit_failure_file_permission_write() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 6 +} + +check_input_file() +{ + if [ ! -e "$1" ]; then + exit_failure_file_missing "file '$1' does not exist" + fi + if [ ! -r "$1" ]; then + exit_failure_file_permission_read "no permission to read file '$1'" + fi +} + +check_vendor_prefix() +{ + file_label="$2" + [ -n "$file_label" ] || file_label="filename" + file=`basename "$1"` + case "$file" in + [[:alpha:]]*-*) + return + ;; + esac + + echo "xdg-open: $file_label '$file' does not have a proper vendor prefix" >&2 + echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2 + echo 'with a dash ("-"). An example '"$file_label"' is '"'example-$file'" >&2 + echo "Use --novendor to override or 'xdg-open --manual' for additional info." >&2 + exit 1 +} + +check_output_file() +{ + # if the file exists, check if it is writeable + # if it does not exists, check if we are allowed to write on the directory + if [ -e "$1" ]; then + if [ ! -w "$1" ]; then + exit_failure_file_permission_write "no permission to write to file '$1'" + fi + else + DIR=`dirname "$1"` + if [ ! -w "$DIR" ] || [ ! -x "$DIR" ]; then + exit_failure_file_permission_write "no permission to create file '$1'" + fi + fi +} + +#---------------------------------------- +# Checks for shared commands, e.g. --help + +check_common_commands() +{ + while [ $# -gt 0 ] ; do + parm="$1" + shift + + case "$parm" in + --help) + usage + echo "Use 'man xdg-open' or 'xdg-open --manual' for additional info." + exit_success + ;; + + --manual) + manualpage + exit_success + ;; + + --version) + echo "xdg-open 1.1.3" + exit_success + ;; + esac + done +} + +check_common_commands "$@" + +[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL; +if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then + # Be silent + xdg_redirect_output=" > /dev/null 2> /dev/null" +else + # All output to stderr + xdg_redirect_output=" >&2" +fi + +#-------------------------------------- +# Checks for known desktop environments +# set variable DE to the desktop environments name, lowercase + +detectDE() +{ + # see https://bugs.freedesktop.org/show_bug.cgi?id=34164 + unset GREP_OPTIONS + + if [ -n "${XDG_CURRENT_DESKTOP}" ]; then + case "${XDG_CURRENT_DESKTOP}" in + # only recently added to menu-spec, pre-spec X- still in use + Cinnamon|X-Cinnamon) + DE=cinnamon; + ;; + ENLIGHTENMENT) + DE=enlightenment; + ;; + # GNOME, GNOME-Classic:GNOME, or GNOME-Flashback:GNOME + GNOME*) + DE=gnome; + ;; + KDE) + DE=kde; + ;; + # Deepin Desktop Environments + DEEPIN|Deepin|deepin) + DE=dde; + ;; + LXDE) + DE=lxde; + ;; + LXQt) + DE=lxqt; + ;; + MATE) + DE=mate; + ;; + XFCE) + DE=xfce + ;; + X-Generic) + DE=generic + ;; + esac + fi + + if [ x"$DE" = x"" ]; then + # classic fallbacks + if [ x"$KDE_FULL_SESSION" != x"" ]; then DE=kde; + elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; + elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=mate; + elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome; + elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; + elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce + elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment; + elif [ x"$LXQT_SESSION_CONFIG" != x"" ]; then DE=lxqt; + fi + fi + + if [ x"$DE" = x"" ]; then + # fallback to checking $DESKTOP_SESSION + case "$DESKTOP_SESSION" in + gnome) + DE=gnome; + ;; + LXDE|Lubuntu) + DE=lxde; + ;; + MATE) + DE=mate; + ;; + xfce|xfce4|'Xfce Session') + DE=xfce; + ;; + esac + fi + + if [ x"$DE" = x"" ]; then + # fallback to uname output for other platforms + case "$(uname 2>/dev/null)" in + CYGWIN*) + DE=cygwin; + ;; + Darwin) + DE=darwin; + ;; + esac + fi + + if [ x"$DE" = x"gnome" ]; then + # gnome-default-applications-properties is only available in GNOME 2.x + # but not in GNOME 3.x + which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3" + fi + + if [ -f "$XDG_RUNTIME_DIR/flatpak-info" ]; then + DE="flatpak" + fi +} + +#---------------------------------------------------------------------------- +# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 +# It also always returns 1 in KDE 3.4 and earlier +# Simply return 0 in such case + +kfmclient_fix_exit_code() +{ + version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'` + major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'` + minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'` + release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'` + test "$major" -gt 3 && return $1 + test "$minor" -gt 5 && return $1 + test "$release" -gt 4 && return $1 + return 0 +} + +#---------------------------------------------------------------------------- +# Returns true if there is a graphical display attached. + +has_display() +{ + if [ -n "$DISPLAY" ] || [ -n "$WAYLAND_DISPLAY" ]; then + return 0 + else + return 1 + fi +} + +# This handles backslashes but not quote marks. +last_word() +{ + read first rest + echo "$rest" +} + +# Get the value of a key in a desktop file's Desktop Entry group. +# Example: Use get_key foo.desktop Exec +# to get the values of the Exec= key for the Desktop Entry group. +get_key() +{ + local file="${1}" + local key="${2}" + local desktop_entry="" + + IFS_="${IFS}" + IFS="" + while read line + do + case "$line" in + "[Desktop Entry]") + desktop_entry="y" + ;; + # Reset match flag for other groups + "["*) + desktop_entry="" + ;; + "${key}="*) + # Only match Desktop Entry group + if [ -n "${desktop_entry}" ] + then + echo "${line}" | cut -d= -f 2- + fi + esac + done < "${file}" + IFS="${IFS_}" +} + +# Returns true if argument is a file:// URL or path +is_file_url_or_path() +{ + if echo "$1" | grep -q '^file://' \ + || ! echo "$1" | egrep -q '^[[:alpha:]+\.\-]+:'; then + return 0 + else + return 1 + fi +} + +# If argument is a file URL, convert it to a (percent-decoded) path. +# If not, leave it as it is. +file_url_to_path() +{ + local file="$1" + if echo "$file" | grep -q '^file:///'; then + file=${file#file://} + file=${file%%#*} + file=$(echo "$file" | sed -r 's/\?.*$//') + local printf=printf + if [ -x /usr/bin/printf ]; then + printf=/usr/bin/printf + fi + file=$($printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')") + fi + echo "$file" +} + +open_cygwin() +{ + cygstart "$1" + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_darwin() +{ + open "$1" + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_kde() +{ + if [ -n "${KDE_SESSION_VERSION}" ]; then + case "${KDE_SESSION_VERSION}" in + 4) + kde-open "$1" + ;; + 5) + kde-open${KDE_SESSION_VERSION} "$1" + ;; + esac + else + kfmclient exec "$1" + kfmclient_fix_exit_code $? + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_dde() +{ + if dde-open -version >/dev/null 2>&1; then + dde-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_gnome3() +{ + if gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_gnome() +{ + if gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + elif gnome-open --help 2>/dev/null 1>&2; then + gnome-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_mate() +{ + if gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + elif mate-open --help 2>/dev/null 1>&2; then + mate-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_xfce() +{ + if exo-open --help 2>/dev/null 1>&2; then + exo-open "$1" + elif gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_enlightenment() +{ + if enlightenment_open --help 2>/dev/null 1>&2; then + enlightenment_open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_flatpak() +{ + gdbus call --session \ + --dest org.freedesktop.portal.Desktop \ + --object-path /org/freedesktop/portal/desktop \ + --method org.freedesktop.portal.OpenURI.OpenURI \ + "" "$1" {} + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +#----------------------------------------- +# Recursively search .desktop file + +search_desktop_file() +{ + local default="$1" + local dir="$2" + local target="$3" + + local file="" + # look for both vendor-app.desktop, vendor/app.desktop + if [ -r "$dir/$default" ]; then + file="$dir/$default" + elif [ -r "$dir/`echo $default | sed -e 's|-|/|'`" ]; then + file="$dir/`echo $default | sed -e 's|-|/|'`" + fi + + if [ -r "$file" ] ; then + command="$(get_key "${file}" "Exec" | first_word)" + command_exec=`which $command 2>/dev/null` + icon="$(get_key "${file}" "Icon")" + # FIXME: Actually LC_MESSAGES should be used as described in + # http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s04.html + localised_name="$(get_key "${file}" "Name")" + set -- $(get_key "${file}" "Exec" | last_word) + # We need to replace any occurrence of "%f", "%F" and + # the like by the target file. We examine each + # argument and append the modified argument to the + # end then shift. + local args=$# + local replaced=0 + while [ $args -gt 0 ]; do + case $1 in + %[c]) + replaced=1 + arg="${localised_name}" + shift + set -- "$@" "$arg" + ;; + %[fFuU]) + replaced=1 + arg="$target" + shift + set -- "$@" "$arg" + ;; + %[i]) + replaced=1 + shift + set -- "$@" "--icon" "$icon" + ;; + *) + arg="$1" + shift + set -- "$@" "$arg" + ;; + esac + args=$(( $args - 1 )) + done + [ $replaced -eq 1 ] || set -- "$@" "$target" + "$command_exec" "$@" + + if [ $? -eq 0 ]; then + exit_success + fi + fi + + for d in $dir/*/; do + [ -d "$d" ] && search_desktop_file "$default" "$d" "$target" + done +} + + +open_generic_xdg_mime() +{ + filetype="$2" + default=`xdg-mime query default "$filetype"` + if [ -n "$default" ] ; then + xdg_user_dir="$XDG_DATA_HOME" + [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share" + + xdg_system_dirs="$XDG_DATA_DIRS" + [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/ + +DEBUG 3 "$xdg_user_dir:$xdg_system_dirs" + for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do + search_desktop_file "$default" "$x/applications/" "$1" + done + fi +} + +open_generic_xdg_file_mime() +{ + filetype=`xdg-mime query filetype "$1" | sed "s/;.*//"` + open_generic_xdg_mime "$1" "$filetype" +} + +open_generic_xdg_x_scheme_handler() +{ + scheme="`echo $1 | sed -n 's/\(^[[:alnum:]+\.-]*\):.*$/\1/p'`" + if [ -n $scheme ]; then + filetype="x-scheme-handler/$scheme" + open_generic_xdg_mime "$1" "$filetype" + fi +} + +has_single_argument() +{ + test $# = 1 +} + +open_envvar() +{ + local oldifs="$IFS" + local browser browser_with_arg + + IFS=":" + for browser in $BROWSER; do + IFS="$oldifs" + + if [ -z "$browser" ]; then + continue + fi + + if echo "$browser" | grep -q %s; then + # Avoid argument injection. + # See https://bugs.freedesktop.org/show_bug.cgi?id=103807 + # URIs don't have IFS characters spaces anyway. + has_single_argument $1 && $(printf "$browser" "$1") + else + $browser "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + fi + done +} + +open_generic() +{ + if is_file_url_or_path "$1"; then + local file="$(file_url_to_path "$1")" + + check_input_file "$file" + + if has_display; then + filetype=`xdg-mime query filetype "$file" | sed "s/;.*//"` + open_generic_xdg_mime "$file" "$filetype" + fi + + if which run-mailcap 2>/dev/null 1>&2; then + run-mailcap --action=view "$file" + if [ $? -eq 0 ]; then + exit_success + fi + fi + + if has_display && mimeopen -v 2>/dev/null 1>&2; then + mimeopen -L -n "$file" + if [ $? -eq 0 ]; then + exit_success + fi + fi + fi + + if has_display; then + open_generic_xdg_x_scheme_handler "$1" + fi + + if [ -n "$BROWSER" ]; then + open_envvar "$1" + fi + + # if BROWSER variable is not set, check some well known browsers instead + if [ x"$BROWSER" = x"" ]; then + BROWSER=www-browser:links2:elinks:links:lynx:w3m + if has_display; then + BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium:chromium-browser:google-chrome:$BROWSER + fi + fi + + open_envvar "$1" + + exit_failure_operation_impossible "no method available for opening '$1'" +} + +open_lxde() +{ + + # pcmanfm only knows how to handle file:// urls and filepaths, it seems. + if pcmanfm --help >/dev/null 2>&1 && is_file_url_or_path "$1"; then + local file="$(file_url_to_path "$1")" + + # handle relative paths + if ! echo "$file" | grep -q ^/; then + file="$(pwd)/$file" + fi + + pcmanfm "$file" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_lxqt() +{ + open_generic "$1" +} + +[ x"$1" != x"" ] || exit_failure_syntax + +url= +while [ $# -gt 0 ] ; do + parm="$1" + shift + + case "$parm" in + -*) + exit_failure_syntax "unexpected option '$parm'" + ;; + + *) + if [ -n "$url" ] ; then + exit_failure_syntax "unexpected argument '$parm'" + fi + url="$parm" + ;; + esac +done + +if [ -z "${url}" ] ; then + exit_failure_syntax "file or URL argument missing" +fi + +detectDE + +if [ x"$DE" = x"" ]; then + DE=generic +fi + +DEBUG 2 "Selected DE $DE" + +# sanitize BROWSER (avoid caling ourselves in particular) +case "${BROWSER}" in + *:"xdg-open"|"xdg-open":*) + BROWSER=$(echo $BROWSER | sed -e 's|:xdg-open||g' -e 's|xdg-open:||g') + ;; + "xdg-open") + BROWSER= + ;; +esac + +case "$DE" in + kde) + open_kde "$url" + ;; + + dde) + open_dde "$url" + ;; + + gnome3|cinnamon) + open_gnome3 "$url" + ;; + + gnome) + open_gnome "$url" + ;; + + mate) + open_mate "$url" + ;; + + xfce) + open_xfce "$url" + ;; + + lxde) + open_lxde "$url" + ;; + + lxqt) + open_lxqt "$url" + ;; + + enlightenment) + open_enlightenment "$url" + ;; + + cygwin) + open_cygwin "$url" + ;; + + darwin) + open_darwin "$url" + ;; + + flatpak) + open_flatpak "$url" + ;; + + generic) + open_generic "$url" + ;; + + *) + exit_failure_operation_impossible "no method available for opening '$url'" + ;; +esac diff --git a/front/frontend/node_modules/parseurl/HISTORY.md b/front/frontend/node_modules/parseurl/HISTORY.md new file mode 100644 index 0000000..8e40954 --- /dev/null +++ b/front/frontend/node_modules/parseurl/HISTORY.md @@ -0,0 +1,58 @@ +1.3.3 / 2019-04-15 +================== + + * Fix Node.js 0.8 return value inconsistencies + +1.3.2 / 2017-09-09 +================== + + * perf: reduce overhead for full URLs + * perf: unroll the "fast-path" `RegExp` + +1.3.1 / 2016-01-17 +================== + + * perf: enable strict mode + +1.3.0 / 2014-08-09 +================== + + * Add `parseurl.original` for parsing `req.originalUrl` with fallback + * Return `undefined` if `req.url` is `undefined` + +1.2.0 / 2014-07-21 +================== + + * Cache URLs based on original value + * Remove no-longer-needed URL mis-parse work-around + * Simplify the "fast-path" `RegExp` + +1.1.3 / 2014-07-08 +================== + + * Fix typo + +1.1.2 / 2014-07-08 +================== + + * Seriously fix Node.js 0.8 compatibility + +1.1.1 / 2014-07-08 +================== + + * Fix Node.js 0.8 compatibility + +1.1.0 / 2014-07-08 +================== + + * Incorporate URL href-only parse fast-path + +1.0.1 / 2014-03-08 +================== + + * Add missing `require` + +1.0.0 / 2014-03-08 +================== + + * Genesis from `connect` diff --git a/front/frontend/node_modules/parseurl/LICENSE b/front/frontend/node_modules/parseurl/LICENSE new file mode 100644 index 0000000..27653d3 --- /dev/null +++ b/front/frontend/node_modules/parseurl/LICENSE @@ -0,0 +1,24 @@ + +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2014-2017 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/parseurl/README.md b/front/frontend/node_modules/parseurl/README.md new file mode 100644 index 0000000..443e716 --- /dev/null +++ b/front/frontend/node_modules/parseurl/README.md @@ -0,0 +1,133 @@ +# parseurl + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Parse a URL with memoization. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install parseurl +``` + +## API + +```js +var parseurl = require('parseurl') +``` + +### parseurl(req) + +Parse the URL of the given request object (looks at the `req.url` property) +and return the result. The result is the same as `url.parse` in Node.js core. +Calling this function multiple times on the same `req` where `req.url` does +not change will return a cached parsed object, rather than parsing again. + +### parseurl.original(req) + +Parse the original URL of the given request object and return the result. +This works by trying to parse `req.originalUrl` if it is a string, otherwise +parses `req.url`. The result is the same as `url.parse` in Node.js core. +Calling this function multiple times on the same `req` where `req.originalUrl` +does not change will return a cached parsed object, rather than parsing again. + +## Benchmark + +```bash +$ npm run-script bench + +> parseurl@1.3.3 bench nodejs-parseurl +> node benchmark/index.js + + http_parser@2.8.0 + node@10.6.0 + v8@6.7.288.46-node.13 + uv@1.21.0 + zlib@1.2.11 + ares@1.14.0 + modules@64 + nghttp2@1.32.0 + napi@3 + openssl@1.1.0h + icu@61.1 + unicode@10.0 + cldr@33.0 + tz@2018c + +> node benchmark/fullurl.js + + Parsing URL "http://localhost:8888/foo/bar?user=tj&pet=fluffy" + + 4 tests completed. + + fasturl x 2,207,842 ops/sec ±3.76% (184 runs sampled) + nativeurl - legacy x 507,180 ops/sec ±0.82% (191 runs sampled) + nativeurl - whatwg x 290,044 ops/sec ±1.96% (189 runs sampled) + parseurl x 488,907 ops/sec ±2.13% (192 runs sampled) + +> node benchmark/pathquery.js + + Parsing URL "/foo/bar?user=tj&pet=fluffy" + + 4 tests completed. + + fasturl x 3,812,564 ops/sec ±3.15% (188 runs sampled) + nativeurl - legacy x 2,651,631 ops/sec ±1.68% (189 runs sampled) + nativeurl - whatwg x 161,837 ops/sec ±2.26% (189 runs sampled) + parseurl x 4,166,338 ops/sec ±2.23% (184 runs sampled) + +> node benchmark/samerequest.js + + Parsing URL "/foo/bar?user=tj&pet=fluffy" on same request object + + 4 tests completed. + + fasturl x 3,821,651 ops/sec ±2.42% (185 runs sampled) + nativeurl - legacy x 2,651,162 ops/sec ±1.90% (187 runs sampled) + nativeurl - whatwg x 175,166 ops/sec ±1.44% (188 runs sampled) + parseurl x 14,912,606 ops/sec ±3.59% (183 runs sampled) + +> node benchmark/simplepath.js + + Parsing URL "/foo/bar" + + 4 tests completed. + + fasturl x 12,421,765 ops/sec ±2.04% (191 runs sampled) + nativeurl - legacy x 7,546,036 ops/sec ±1.41% (188 runs sampled) + nativeurl - whatwg x 198,843 ops/sec ±1.83% (189 runs sampled) + parseurl x 24,244,006 ops/sec ±0.51% (194 runs sampled) + +> node benchmark/slash.js + + Parsing URL "/" + + 4 tests completed. + + fasturl x 17,159,456 ops/sec ±3.25% (188 runs sampled) + nativeurl - legacy x 11,635,097 ops/sec ±3.79% (184 runs sampled) + nativeurl - whatwg x 240,693 ops/sec ±0.83% (189 runs sampled) + parseurl x 42,279,067 ops/sec ±0.55% (190 runs sampled) +``` + +## License + + [MIT](LICENSE) + +[coveralls-image]: https://badgen.net/coveralls/c/github/pillarjs/parseurl/master +[coveralls-url]: https://coveralls.io/r/pillarjs/parseurl?branch=master +[node-image]: https://badgen.net/npm/node/parseurl +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/parseurl +[npm-url]: https://npmjs.org/package/parseurl +[npm-version-image]: https://badgen.net/npm/v/parseurl +[travis-image]: https://badgen.net/travis/pillarjs/parseurl/master +[travis-url]: https://travis-ci.org/pillarjs/parseurl diff --git a/front/frontend/node_modules/parseurl/index.js b/front/frontend/node_modules/parseurl/index.js new file mode 100644 index 0000000..ece7223 --- /dev/null +++ b/front/frontend/node_modules/parseurl/index.js @@ -0,0 +1,158 @@ +/*! + * parseurl + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var url = require('url') +var parse = url.parse +var Url = url.Url + +/** + * Module exports. + * @public + */ + +module.exports = parseurl +module.exports.original = originalurl + +/** + * Parse the `req` url with memoization. + * + * @param {ServerRequest} req + * @return {Object} + * @public + */ + +function parseurl (req) { + var url = req.url + + if (url === undefined) { + // URL is undefined + return undefined + } + + var parsed = req._parsedUrl + + if (fresh(url, parsed)) { + // Return cached URL parse + return parsed + } + + // Parse the URL + parsed = fastparse(url) + parsed._raw = url + + return (req._parsedUrl = parsed) +}; + +/** + * Parse the `req` original url with fallback and memoization. + * + * @param {ServerRequest} req + * @return {Object} + * @public + */ + +function originalurl (req) { + var url = req.originalUrl + + if (typeof url !== 'string') { + // Fallback + return parseurl(req) + } + + var parsed = req._parsedOriginalUrl + + if (fresh(url, parsed)) { + // Return cached URL parse + return parsed + } + + // Parse the URL + parsed = fastparse(url) + parsed._raw = url + + return (req._parsedOriginalUrl = parsed) +}; + +/** + * Parse the `str` url with fast-path short-cut. + * + * @param {string} str + * @return {Object} + * @private + */ + +function fastparse (str) { + if (typeof str !== 'string' || str.charCodeAt(0) !== 0x2f /* / */) { + return parse(str) + } + + var pathname = str + var query = null + var search = null + + // This takes the regexp from https://github.com/joyent/node/pull/7878 + // Which is /^(\/[^?#\s]*)(\?[^#\s]*)?$/ + // And unrolls it into a for loop + for (var i = 1; i < str.length; i++) { + switch (str.charCodeAt(i)) { + case 0x3f: /* ? */ + if (search === null) { + pathname = str.substring(0, i) + query = str.substring(i + 1) + search = str.substring(i) + } + break + case 0x09: /* \t */ + case 0x0a: /* \n */ + case 0x0c: /* \f */ + case 0x0d: /* \r */ + case 0x20: /* */ + case 0x23: /* # */ + case 0xa0: + case 0xfeff: + return parse(str) + } + } + + var url = Url !== undefined + ? new Url() + : {} + + url.path = str + url.href = str + url.pathname = pathname + + if (search !== null) { + url.query = query + url.search = search + } + + return url +} + +/** + * Determine if parsed is still fresh for url. + * + * @param {string} url + * @param {object} parsedUrl + * @return {boolean} + * @private + */ + +function fresh (url, parsedUrl) { + return typeof parsedUrl === 'object' && + parsedUrl !== null && + (Url === undefined || parsedUrl instanceof Url) && + parsedUrl._raw === url +} diff --git a/front/frontend/node_modules/parseurl/package.json b/front/frontend/node_modules/parseurl/package.json new file mode 100644 index 0000000..6b443ca --- /dev/null +++ b/front/frontend/node_modules/parseurl/package.json @@ -0,0 +1,40 @@ +{ + "name": "parseurl", + "description": "parse a url with memoization", + "version": "1.3.3", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)" + ], + "repository": "pillarjs/parseurl", + "license": "MIT", + "devDependencies": { + "beautify-benchmark": "0.2.4", + "benchmark": "2.1.4", + "eslint": "5.16.0", + "eslint-config-standard": "12.0.0", + "eslint-plugin-import": "2.17.1", + "eslint-plugin-node": "7.0.1", + "eslint-plugin-promise": "4.1.1", + "eslint-plugin-standard": "4.0.0", + "fast-url-parser": "1.1.3", + "istanbul": "0.4.5", + "mocha": "6.1.3" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "eslint .", + "test": "mocha --check-leaks --bail --reporter spec test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec test/" + } +} diff --git a/front/frontend/node_modules/pascalcase/LICENSE b/front/frontend/node_modules/pascalcase/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/front/frontend/node_modules/pascalcase/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/pascalcase/README.md b/front/frontend/node_modules/pascalcase/README.md new file mode 100644 index 0000000..fa3fd00 --- /dev/null +++ b/front/frontend/node_modules/pascalcase/README.md @@ -0,0 +1,80 @@ +# pascalcase [![NPM version](https://badge.fury.io/js/pascalcase.svg)](http://badge.fury.io/js/pascalcase) + +> Convert a string to pascal-case. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i pascalcase --save +``` + +## Usage + +```js +var pascalcase = require('pascalcase'); + +pascalcase('a'); +//=> 'A' + +pascalcase('foo bar baz'); +//=> 'FooBarBaz' + +pascalcase('foo_bar-baz'); +//=> 'FooBarBaz' + +pascalcase('foo.bar.baz'); +//=> 'FooBarBaz' + +pascalcase('foo/bar/baz'); +//=> 'FooBarBaz' + +pascalcase('foo[bar)baz'); +//=> 'FooBarBaz' + +pascalcase('#foo+bar*baz'); +//=> 'FooBarBaz' + +pascalcase('$foo~bar`baz'); +//=> 'FooBarBaz' + +pascalcase('_foo_bar-baz-'); +//=> 'FooBarBaz' +``` + +## Related projects + +* [justified](https://github.com/jonschlinkert/justified): Wrap words to a specified length and justified the text. +* [pad-left](https://github.com/jonschlinkert/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. +* [pad-right](https://github.com/jonschlinkert/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. +* [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. +* [word-wrap](https://github.com/jonschlinkert/word-wrap): Wrap words to a specified length. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/pascalcase/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 19, 2015._ \ No newline at end of file diff --git a/front/frontend/node_modules/pascalcase/index.js b/front/frontend/node_modules/pascalcase/index.js new file mode 100644 index 0000000..7e8159c --- /dev/null +++ b/front/frontend/node_modules/pascalcase/index.js @@ -0,0 +1,21 @@ +/*! + * pascalcase + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +function pascalcase(str) { + if (typeof str !== 'string') { + throw new TypeError('expected a string.'); + } + str = str.replace(/([A-Z])/g, ' $1'); + if (str.length === 1) { return str.toUpperCase(); } + str = str.replace(/^[\W_]+|[\W_]+$/g, '').toLowerCase(); + str = str.charAt(0).toUpperCase() + str.slice(1); + return str.replace(/[\W_]+(\w|$)/g, function (_, ch) { + return ch.toUpperCase(); + }); +} + +module.exports = pascalcase; diff --git a/front/frontend/node_modules/pascalcase/package.json b/front/frontend/node_modules/pascalcase/package.json new file mode 100644 index 0000000..0576d13 --- /dev/null +++ b/front/frontend/node_modules/pascalcase/package.json @@ -0,0 +1,46 @@ +{ + "name": "pascalcase", + "description": "Convert a string to pascal-case.", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/pascalcase", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/pascalcase", + "bugs": { + "url": "https://github.com/jonschlinkert/pascalcase/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "keywords": [ + "camelcase", + "case", + "casing", + "pascal", + "pascal-case", + "pascalcase", + "string" + ], + "verb": { + "related": { + "list": [ + "pad-left", + "pad-right", + "word-wrap", + "repeat-string", + "justified" + ] + } + } +} \ No newline at end of file diff --git a/front/frontend/node_modules/path-dirname/index.js b/front/frontend/node_modules/path-dirname/index.js new file mode 100644 index 0000000..ed67817 --- /dev/null +++ b/front/frontend/node_modules/path-dirname/index.js @@ -0,0 +1,143 @@ +'use strict'; + +var path = require('path'); +var inspect = require('util').inspect; + +function assertPath(path) { + if (typeof path !== 'string') { + throw new TypeError('Path must be a string. Received ' + inspect(path)); + } +} + +function posix(path) { + assertPath(path); + if (path.length === 0) + return '.'; + var code = path.charCodeAt(0); + var hasRoot = (code === 47/*/*/); + var end = -1; + var matchedSlash = true; + for (var i = path.length - 1; i >= 1; --i) { + code = path.charCodeAt(i); + if (code === 47/*/*/) { + if (!matchedSlash) { + end = i; + break; + } + } else { + // We saw the first non-path separator + matchedSlash = false; + } + } + + if (end === -1) + return hasRoot ? '/' : '.'; + if (hasRoot && end === 1) + return '//'; + return path.slice(0, end); +} + +function win32(path) { + assertPath(path); + var len = path.length; + if (len === 0) + return '.'; + var rootEnd = -1; + var end = -1; + var matchedSlash = true; + var offset = 0; + var code = path.charCodeAt(0); + + // Try to match a root + if (len > 1) { + if (code === 47/*/*/ || code === 92/*\*/) { + // Possible UNC root + + rootEnd = offset = 1; + + code = path.charCodeAt(1); + if (code === 47/*/*/ || code === 92/*\*/) { + // Matched double path separator at beginning + var j = 2; + var last = j; + // Match 1 or more non-path separators + for (; j < len; ++j) { + code = path.charCodeAt(j); + if (code === 47/*/*/ || code === 92/*\*/) + break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more path separators + for (; j < len; ++j) { + code = path.charCodeAt(j); + if (code !== 47/*/*/ && code !== 92/*\*/) + break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more non-path separators + for (; j < len; ++j) { + code = path.charCodeAt(j); + if (code === 47/*/*/ || code === 92/*\*/) + break; + } + if (j === len) { + // We matched a UNC root only + return path; + } + if (j !== last) { + // We matched a UNC root with leftovers + + // Offset by 1 to include the separator after the UNC root to + // treat it as a "normal root" on top of a (UNC) root + rootEnd = offset = j + 1; + } + } + } + } + } else if ((code >= 65/*A*/ && code <= 90/*Z*/) || + (code >= 97/*a*/ && code <= 122/*z*/)) { + // Possible device root + + code = path.charCodeAt(1); + if (path.charCodeAt(1) === 58/*:*/) { + rootEnd = offset = 2; + if (len > 2) { + code = path.charCodeAt(2); + if (code === 47/*/*/ || code === 92/*\*/) + rootEnd = offset = 3; + } + } + } + } else if (code === 47/*/*/ || code === 92/*\*/) { + return path[0]; + } + + for (var i = len - 1; i >= offset; --i) { + code = path.charCodeAt(i); + if (code === 47/*/*/ || code === 92/*\*/) { + if (!matchedSlash) { + end = i; + break; + } + } else { + // We saw the first non-path separator + matchedSlash = false; + } + } + + if (end === -1) { + if (rootEnd === -1) + return '.'; + else + end = rootEnd; + } + return path.slice(0, end); +} + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; diff --git a/front/frontend/node_modules/path-dirname/license b/front/frontend/node_modules/path-dirname/license new file mode 100644 index 0000000..1981663 --- /dev/null +++ b/front/frontend/node_modules/path-dirname/license @@ -0,0 +1,22 @@ + +The MIT License (MIT) + +Copyright (c) Elan Shanker and Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/front/frontend/node_modules/path-dirname/package.json b/front/frontend/node_modules/path-dirname/package.json new file mode 100644 index 0000000..eb78533 --- /dev/null +++ b/front/frontend/node_modules/path-dirname/package.json @@ -0,0 +1,29 @@ +{ + "name": "path-dirname", + "version": "1.0.2", + "description": "Node.js path.dirname() ponyfill", + "license": "MIT", + "repository": "es128/path-dirname", + "author": "Elan Shanker", + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "dirname", + "dir", + "path", + "paths", + "file", + "built-in", + "util", + "utils", + "core", + "stdlib", + "ponyfill", + "polyfill", + "shim" + ] +} diff --git a/front/frontend/node_modules/path-dirname/readme.md b/front/frontend/node_modules/path-dirname/readme.md new file mode 100644 index 0000000..652a562 --- /dev/null +++ b/front/frontend/node_modules/path-dirname/readme.md @@ -0,0 +1,53 @@ +# path-dirname [![Build Status](https://travis-ci.org/es128/path-dirname.svg?branch=master)](https://travis-ci.org/es128/path-dirname) + +> Node.js [`path.dirname()`](https://nodejs.org/api/path.html#path_path_dirname_path) [ponyfill](https://ponyfill.com) + +This was needed in order to expose `path.posix.dirname()` on Node.js v0.10 + +## Install + +``` +$ npm install --save path-dirname +``` + + +## Usage + +```js +const pathDirname = require('path-dirname'); + +pathDirname('/home/foo'); +//=> '/home' +pathDirname('C:\\Users\\foo'); +//=> 'C:\\Users' +pathDirname('foo'); +//=> '.' +pathDirname('foo/bar'); +//=> 'foo' + +//Using posix version for consistent output when dealing with glob escape chars +pathDirname.win32('C:\\Users\\foo/\\*bar'); +//=> 'C:\\Users\\foo/' +pathDirname.posix('C:\\Users\\foo/\\*bar'); +//=> 'C:\\Users\\foo' +``` + + +## API + +See the [`path.dirname()` docs](https://nodejs.org/api/path.html#path_path_dirname_path). + +### pathDirname(path) + +### pathDirname.posix(path) + +POSIX specific version. + +### pathDirname.win32(path) + +Windows specific version. + + +## License + +MIT diff --git a/front/frontend/node_modules/path-is-absolute/index.js b/front/frontend/node_modules/path-is-absolute/index.js new file mode 100644 index 0000000..22aa6c3 --- /dev/null +++ b/front/frontend/node_modules/path-is-absolute/index.js @@ -0,0 +1,20 @@ +'use strict'; + +function posix(path) { + return path.charAt(0) === '/'; +} + +function win32(path) { + // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = Boolean(device && device.charAt(1) !== ':'); + + // UNC paths are always absolute + return Boolean(result[2] || isUnc); +} + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; diff --git a/front/frontend/node_modules/path-is-absolute/license b/front/frontend/node_modules/path-is-absolute/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/front/frontend/node_modules/path-is-absolute/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/path-is-absolute/package.json b/front/frontend/node_modules/path-is-absolute/package.json new file mode 100644 index 0000000..91196d5 --- /dev/null +++ b/front/frontend/node_modules/path-is-absolute/package.json @@ -0,0 +1,43 @@ +{ + "name": "path-is-absolute", + "version": "1.0.1", + "description": "Node.js 0.12 path.isAbsolute() ponyfill", + "license": "MIT", + "repository": "sindresorhus/path-is-absolute", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "path", + "paths", + "file", + "dir", + "absolute", + "isabsolute", + "is-absolute", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim", + "is", + "detect", + "check" + ], + "devDependencies": { + "xo": "^0.16.0" + } +} diff --git a/front/frontend/node_modules/path-is-absolute/readme.md b/front/frontend/node_modules/path-is-absolute/readme.md new file mode 100644 index 0000000..8dbdf5f --- /dev/null +++ b/front/frontend/node_modules/path-is-absolute/readme.md @@ -0,0 +1,59 @@ +# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) + +> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save path-is-absolute +``` + + +## Usage + +```js +const pathIsAbsolute = require('path-is-absolute'); + +// Running on Linux +pathIsAbsolute('/home/foo'); +//=> true +pathIsAbsolute('C:/Users/foo'); +//=> false + +// Running on Windows +pathIsAbsolute('C:/Users/foo'); +//=> true +pathIsAbsolute('/home/foo'); +//=> false + +// Running on any OS +pathIsAbsolute.posix('/home/foo'); +//=> true +pathIsAbsolute.posix('C:/Users/foo'); +//=> false +pathIsAbsolute.win32('C:/Users/foo'); +//=> true +pathIsAbsolute.win32('/home/foo'); +//=> false +``` + + +## API + +See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). + +### pathIsAbsolute(path) + +### pathIsAbsolute.posix(path) + +POSIX specific version. + +### pathIsAbsolute.win32(path) + +Windows specific version. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/front/frontend/node_modules/pause-stream/.npmignore b/front/frontend/node_modules/pause-stream/.npmignore new file mode 100644 index 0000000..13abef4 --- /dev/null +++ b/front/frontend/node_modules/pause-stream/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/front/frontend/node_modules/pause-stream/LICENSE b/front/frontend/node_modules/pause-stream/LICENSE new file mode 100644 index 0000000..6a477d4 --- /dev/null +++ b/front/frontend/node_modules/pause-stream/LICENSE @@ -0,0 +1,231 @@ +Dual Licensed MIT and Apache 2 + +The MIT License + +Copyright (c) 2013 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + ----------------------------------------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) 2013 Dominic Tarr + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/front/frontend/node_modules/pause-stream/index.js b/front/frontend/node_modules/pause-stream/index.js new file mode 100644 index 0000000..0e0bf96 --- /dev/null +++ b/front/frontend/node_modules/pause-stream/index.js @@ -0,0 +1,3 @@ +//through@2 handles this by default! +module.exports = require('through') + diff --git a/front/frontend/node_modules/pause-stream/package.json b/front/frontend/node_modules/pause-stream/package.json new file mode 100644 index 0000000..2a22646 --- /dev/null +++ b/front/frontend/node_modules/pause-stream/package.json @@ -0,0 +1,35 @@ +{ + "name": "pause-stream", + "version": "0.0.11", + "description": "a ThroughStream that strictly buffers all readable events when paused.", + "main": "index.js", + "directories": { + "test": "test" + }, + "devDependencies": { + "stream-tester": "0.0.2", + "stream-spec": "~0.2.0" + }, + "scripts": { + "test": "node test/index.js && node test/pause-end.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/pause-stream.git" + }, + "keywords": [ + "stream", + "pipe", + "pause", + "drain", + "buffer" + ], + "author": "Dominic Tarr (dominictarr.com)", + "license": [ + "MIT", + "Apache2" + ], + "dependencies": { + "through": "~2.3" + } +} diff --git a/front/frontend/node_modules/pause-stream/readme.markdown b/front/frontend/node_modules/pause-stream/readme.markdown new file mode 100644 index 0000000..2366939 --- /dev/null +++ b/front/frontend/node_modules/pause-stream/readme.markdown @@ -0,0 +1,29 @@ +# PauseStream + +This is a `Stream` that will strictly buffer when paused. +Connect it to anything you need buffered. + +``` js + var ps = require('pause-stream')(); + + badlyBehavedStream.pipe(ps.pause()) + + aLittleLater(function (err, data) { + ps.pipe(createAnotherStream(data)) + ps.resume() + }) +``` + +`PauseStream` will buffer whenever paused. +it will buffer when yau have called `pause` manually. +but also when it's downstream `dest.write()===false`. +it will attempt to drain the buffer when you call resume +or the downstream emits `'drain'` + +`PauseStream` is tested using [stream-spec](https://github.com/dominictarr/stream-spec) +and [stream-tester](https://github.com/dominictarr/stream-tester) + +This is now the default case of +[through](https://github.com/dominictarr/through) + +https://github.com/dominictarr/pause-stream/commit/4a6fe3dc2c11091b1efbfde912e0473719ed9cc0 diff --git a/front/frontend/node_modules/pause-stream/test/index.js b/front/frontend/node_modules/pause-stream/test/index.js new file mode 100644 index 0000000..db8778d --- /dev/null +++ b/front/frontend/node_modules/pause-stream/test/index.js @@ -0,0 +1,17 @@ +var spec = require('stream-spec') +var tester = require('stream-tester') +var ps = require('..')() + +spec(ps) + .through({strict: false}) + .validateOnExit() + +var master = tester.createConsistent + +tester.createRandomStream(1000) //1k random numbers + .pipe(master = tester.createConsistentStream()) + .pipe(tester.createUnpauseStream()) + .pipe(ps) + .pipe(tester.createPauseStream()) + .pipe(master.createSlave()) + diff --git a/front/frontend/node_modules/pause-stream/test/pause-end.js b/front/frontend/node_modules/pause-stream/test/pause-end.js new file mode 100644 index 0000000..a6c27ef --- /dev/null +++ b/front/frontend/node_modules/pause-stream/test/pause-end.js @@ -0,0 +1,33 @@ + +var pause = require('..') +var assert = require('assert') + +var ps = pause() +var read = [], ended = false + +ps.on('data', function (i) { + read.push(i) +}) + +ps.on('end', function () { + ended = true +}) + +assert.deepEqual(read, []) + +ps.write(0) +ps.write(1) +ps.write(2) + +assert.deepEqual(read, [0, 1, 2]) + +ps.pause() + +assert.deepEqual(read, [0, 1, 2]) + +ps.end() +assert.equal(ended, false) +ps.resume() +assert.equal(ended, true) + + diff --git a/front/frontend/node_modules/posix-character-classes/LICENSE b/front/frontend/node_modules/posix-character-classes/LICENSE new file mode 100644 index 0000000..b11cb79 --- /dev/null +++ b/front/frontend/node_modules/posix-character-classes/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/posix-character-classes/README.md b/front/frontend/node_modules/posix-character-classes/README.md new file mode 100644 index 0000000..894ae23 --- /dev/null +++ b/front/frontend/node_modules/posix-character-classes/README.md @@ -0,0 +1,103 @@ +# posix-character-classes [![NPM version](https://img.shields.io/npm/v/posix-character-classes.svg?style=flat)](https://www.npmjs.com/package/posix-character-classes) [![NPM monthly downloads](https://img.shields.io/npm/dm/posix-character-classes.svg?style=flat)](https://npmjs.org/package/posix-character-classes) [![NPM total downloads](https://img.shields.io/npm/dt/posix-character-classes.svg?style=flat)](https://npmjs.org/package/posix-character-classes) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/posix-character-classes.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/posix-character-classes) + +> POSIX character classes for creating regular expressions. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save posix-character-classes +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add posix-character-classes +``` + +## Usage + +```js +var posix = require('posix-character-classes'); +console.log(posix.alpha); +//=> 'A-Za-z' +``` + +## POSIX Character classes + +The POSIX standard supports the following classes or categories of charactersh (note that classes must be defined within brackets)[1]: + +| **POSIX class** | **Equivalent to** | **Matches** | +| --- | --- | --- | +| `[:alnum:]` | `[A-Za-z0-9]` | digits, uppercase and lowercase letters | +| `[:alpha:]` | `[A-Za-z]` | upper- and lowercase letters | +| `[:ascii:]` | `[\x00-\x7F]` | ASCII characters | +| `[:blank:]` | `[ \t]` | space and TAB characters only | +| `[:cntrl:]` | `[\x00-\x1F\x7F]` | Control characters | +| `[:digit:]` | `[0-9]` | digits | +| `[:graph:]` | `[^[:cntrl:]]` | graphic characters (all characters which have graphic representation) | +| `[:lower:]` | `[a-z]` | lowercase letters | +| `[:print:]` | `[[:graph] ]` | graphic characters and space | +| `[:punct:]` | ``[-!"#$%&'()*+,./:;<=>?@[]^_`{ | }~]`` | all punctuation characters (all graphic characters except letters and digits) | +| `[:space:]` | `[ \t\n\r\f\v]` | all blank (whitespace) characters, including spaces, tabs, new lines, carriage returns, form feeds, and vertical tabs | +| `[:upper:]` | `[A-Z]` | uppercase letters | +| `[:word:]` | `[A-Za-z0-9_]` | word characters | +| `[:xdigit:]` | `[0-9A-Fa-f]` | hexadecimal digits | + +## Examples + +* `a[[:digit:]]b` matches `a0b`, `a1b`, ..., `a9b`. +* `a[:digit:]b` is invalid, character classes must be enclosed in brackets +* `[[:digit:]abc]` matches any digit, as well as `a`, `b`, and `c`. +* `[abc[:digit:]]` is the same as the previous, matching any digit, as well as `a`, `b`, and `c` +* `[^ABZ[:lower:]]` matches any character except lowercase letters, `A`, `B`, and `Z`. + +## About + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 20, 2017._ + +
    +
    +
      +
    1. table and examples are based on the WikiBooks page for [Regular Expressions/POSIX Basic Regular Expressions](https://en.wikibooks.org/wiki/Regular_Expressions/POSIX_Basic_Regular_Expressions), which is available under the [Creative Commons Attribution-ShareAlike License](https://creativecommons.org/licenses/by-sa/3.0/). + +
    2. +
    +
    \ No newline at end of file diff --git a/front/frontend/node_modules/posix-character-classes/index.js b/front/frontend/node_modules/posix-character-classes/index.js new file mode 100644 index 0000000..19f1c98 --- /dev/null +++ b/front/frontend/node_modules/posix-character-classes/index.js @@ -0,0 +1,22 @@ +'use strict'; + +/** + * POSIX character classes + */ + +module.exports = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + ascii: '\\x00-\\x7F', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E ', + punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9' +}; diff --git a/front/frontend/node_modules/posix-character-classes/package.json b/front/frontend/node_modules/posix-character-classes/package.json new file mode 100644 index 0000000..acce4ba --- /dev/null +++ b/front/frontend/node_modules/posix-character-classes/package.json @@ -0,0 +1,54 @@ +{ + "name": "posix-character-classes", + "description": "POSIX character classes for creating regular expressions.", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/posix-character-classes", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/posix-character-classes", + "bugs": { + "url": "https://github.com/jonschlinkert/posix-character-classes/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.2.0" + }, + "keywords": [ + "character", + "classes", + "posix" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + }, + "related-list": [ + "micromatch", + "nanomatch", + "extglob", + "expand-brackets" + ] + } +} diff --git a/front/frontend/node_modules/process-nextick-args/index.js b/front/frontend/node_modules/process-nextick-args/index.js new file mode 100644 index 0000000..3eecf11 --- /dev/null +++ b/front/frontend/node_modules/process-nextick-args/index.js @@ -0,0 +1,45 @@ +'use strict'; + +if (typeof process === 'undefined' || + !process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = { nextTick: nextTick }; +} else { + module.exports = process +} + +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } +} + diff --git a/front/frontend/node_modules/process-nextick-args/license.md b/front/frontend/node_modules/process-nextick-args/license.md new file mode 100644 index 0000000..c67e353 --- /dev/null +++ b/front/frontend/node_modules/process-nextick-args/license.md @@ -0,0 +1,19 @@ +# Copyright (c) 2015 Calvin Metcalf + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.** diff --git a/front/frontend/node_modules/process-nextick-args/package.json b/front/frontend/node_modules/process-nextick-args/package.json new file mode 100644 index 0000000..6070b72 --- /dev/null +++ b/front/frontend/node_modules/process-nextick-args/package.json @@ -0,0 +1,25 @@ +{ + "name": "process-nextick-args", + "version": "2.0.1", + "description": "process.nextTick but always with args", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/calvinmetcalf/process-nextick-args.git" + }, + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" + }, + "homepage": "https://github.com/calvinmetcalf/process-nextick-args", + "devDependencies": { + "tap": "~0.2.6" + } +} diff --git a/front/frontend/node_modules/process-nextick-args/readme.md b/front/frontend/node_modules/process-nextick-args/readme.md new file mode 100644 index 0000000..ecb432c --- /dev/null +++ b/front/frontend/node_modules/process-nextick-args/readme.md @@ -0,0 +1,18 @@ +process-nextick-args +===== + +[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) + +```bash +npm install --save process-nextick-args +``` + +Always be able to pass arguments to process.nextTick, no matter the platform + +```js +var pna = require('process-nextick-args'); + +pna.nextTick(function (a, b, c) { + console.log(a, b, c); +}, 'step', 3, 'profit'); +``` diff --git a/front/frontend/node_modules/proxy-middleware/.npmignore b/front/frontend/node_modules/proxy-middleware/.npmignore new file mode 100644 index 0000000..e216ae5 --- /dev/null +++ b/front/frontend/node_modules/proxy-middleware/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/test diff --git a/front/frontend/node_modules/proxy-middleware/.travis.yml b/front/frontend/node_modules/proxy-middleware/.travis.yml new file mode 100644 index 0000000..df63076 --- /dev/null +++ b/front/frontend/node_modules/proxy-middleware/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.10" + - "0.8" diff --git a/front/frontend/node_modules/proxy-middleware/LICENSE b/front/frontend/node_modules/proxy-middleware/LICENSE new file mode 100644 index 0000000..0bbb53e --- /dev/null +++ b/front/frontend/node_modules/proxy-middleware/LICENSE @@ -0,0 +1,23 @@ +The MIT License (Expat) + +Copyright (c) 2014 Andrew Kelley + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation files +(the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/front/frontend/node_modules/proxy-middleware/README.md b/front/frontend/node_modules/proxy-middleware/README.md new file mode 100644 index 0000000..6bcb842 --- /dev/null +++ b/front/frontend/node_modules/proxy-middleware/README.md @@ -0,0 +1,40 @@ +[![Build Status](https://secure.travis-ci.org/andrewrk/node-proxy-middleware.png)](http://travis-ci.org/andrewrk/node-proxy-middleware) + +### Usage: + +```js +var connect = require('connect'); +var url = require('url'); +var proxy = require('proxy-middleware'); + +var app = connect(); +app.use('/api', proxy(url.parse('https://example.com/endpoint'))); +// now requests to '/api/x/y/z' are proxied to 'https://example.com/endpoint/x/y/z' + +//same as example above but also uses a short hand string only parameter +app.use('/api-string-only', proxy('https://example.com/endpoint')); +``` + +### Documentation: + +`proxyMiddleware(options)` + +`options` allows any options that are permitted on the [`http`](http://nodejs.org/api/http.html#http_http_request_options_callback) or [`https`](http://nodejs.org/api/https.html#https_https_request_options_callback) request options. + +Other options: +- `route`: you can pass the route for connect middleware within the options, as well. +- `via`: by default no [via header](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.45) is added. If you pass `true` for this option the local hostname will be used for the via header. You can also pass a string for this option in which case that will be used for the via header. +- `cookieRewrite`: this option can be used to support cookies via the proxy by rewriting the cookie domain to that of the proxy server. By default cookie domains are not rewritten. The `cookieRewrite` option works as the `via` option - if you pass `true` the local hostname will be used, and if you pass a string that will be used as the rewritten cookie domain. +- `preserveHost`: When enabled, this option will pass the Host: line from the incoming request to the proxied host. Default: `false`. + +### Usage with route: + +```js +var proxyOptions = url.parse('https://example.com/endpoint'); +proxyOptions.route = '/api'; + +var middleWares = [proxy(proxyOptions) /*, ...*/]; + +// Grunt connect uses this method +connect(middleWares); +``` diff --git a/front/frontend/node_modules/proxy-middleware/index.js b/front/frontend/node_modules/proxy-middleware/index.js new file mode 100644 index 0000000..b8c573e --- /dev/null +++ b/front/frontend/node_modules/proxy-middleware/index.js @@ -0,0 +1,141 @@ +var os = require('os'); +var http = require('http'); +var https = require('https'); +var owns = {}.hasOwnProperty; + +module.exports = function proxyMiddleware(options) { + //enable ability to quickly pass a url for shorthand setup + if(typeof options === 'string'){ + options = require('url').parse(options); + } + + var httpLib = options.protocol === 'https:' ? https : http; + var request = httpLib.request; + + options = options || {}; + options.hostname = options.hostname; + options.port = options.port; + options.pathname = options.pathname || '/'; + + return function (req, resp, next) { + var url = req.url; + // You can pass the route within the options, as well + if (typeof options.route === 'string') { + if (url === options.route) { + url = ''; + } else if (url.slice(0, options.route.length) === options.route) { + url = url.slice(options.route.length); + } else { + return next(); + } + } + + //options for this request + var opts = extend({}, options); + if (url && url.charAt(0) === '?') { // prevent /api/resource/?offset=0 + if (options.pathname.length > 1 && options.pathname.charAt(options.pathname.length - 1) === '/') { + opts.path = options.pathname.substring(0, options.pathname.length - 1) + url; + } else { + opts.path = options.pathname + url; + } + } else if (url) { + opts.path = slashJoin(options.pathname, url); + } else { + opts.path = options.pathname; + } + opts.method = req.method; + opts.headers = options.headers ? merge(req.headers, options.headers) : req.headers; + + applyViaHeader(req.headers, opts, opts.headers); + + if (!options.preserveHost) { + // Forwarding the host breaks dotcloud + delete opts.headers.host; + } + + var myReq = request(opts, function (myRes) { + var statusCode = myRes.statusCode + , headers = myRes.headers + , location = headers.location; + // Fix the location + if (((statusCode > 300 && statusCode < 304) || statusCode === 201) && location && location.indexOf(options.href) > -1) { + // absoulte path + headers.location = location.replace(options.href, slashJoin('/', slashJoin((options.route || ''), ''))); + } + applyViaHeader(myRes.headers, opts, myRes.headers); + rewriteCookieHosts(myRes.headers, opts, myRes.headers, req); + resp.writeHead(myRes.statusCode, myRes.headers); + myRes.on('error', function (err) { + next(err); + }); + myRes.pipe(resp); + }); + myReq.on('error', function (err) { + next(err); + }); + if (!req.readable) { + myReq.end(); + } else { + req.pipe(myReq); + } + }; +}; + +function applyViaHeader(existingHeaders, opts, applyTo) { + if (!opts.via) return; + + var viaName = (true === opts.via) ? os.hostname() : opts.via; + var viaHeader = '1.1 ' + viaName; + if(existingHeaders.via) { + viaHeader = existingHeaders.via + ', ' + viaHeader; + } + + applyTo.via = viaHeader; +} + +function rewriteCookieHosts(existingHeaders, opts, applyTo, req) { + if (!opts.cookieRewrite || !owns.call(existingHeaders, 'set-cookie')) { + return; + } + + var existingCookies = existingHeaders['set-cookie'], + rewrittenCookies = [], + rewriteHostname = (true === opts.cookieRewrite) ? os.hostname() : opts.cookieRewrite; + + if (!Array.isArray(existingCookies)) { + existingCookies = [ existingCookies ]; + } + + for (var i = 0; i < existingCookies.length; i++) { + var rewrittenCookie = existingCookies[i].replace(/(Domain)=[a-z\.-_]*?(;|$)/gi, '$1=' + rewriteHostname + '$2'); + + if (!req.connection.encrypted) { + rewrittenCookie = rewrittenCookie.replace(/;\s*?(Secure)/i, ''); + } + rewrittenCookies.push(rewrittenCookie); + } + + applyTo['set-cookie'] = rewrittenCookies; +} + +function slashJoin(p1, p2) { + var trailing_slash = false; + + if (p1.length && p1[p1.length - 1] === '/') { trailing_slash = true; } + if (trailing_slash && p2.length && p2[0] === '/') {p2 = p2.substring(1); } + + return p1 + p2; +} + +function extend(obj, src) { + for (var key in src) if (owns.call(src, key)) obj[key] = src[key]; + return obj; +} + +//merges data without changing state in either argument +function merge(src1, src2) { + var merged = {}; + extend(merged, src1); + extend(merged, src2); + return merged; +} diff --git a/front/frontend/node_modules/proxy-middleware/package.json b/front/frontend/node_modules/proxy-middleware/package.json new file mode 100644 index 0000000..af7170e --- /dev/null +++ b/front/frontend/node_modules/proxy-middleware/package.json @@ -0,0 +1,31 @@ +{ + "name": "proxy-middleware", + "version": "0.15.0", + "description": "http(s) proxy as connect middleware", + "main": "index.js", + "scripts": { + "test": "mocha" + }, + "repository": { + "type": "git", + "url": "https://github.com/andrewrk/connect-proxy" + }, + "keywords": [ + "connect", + "proxy", + "middleware", + "https", + "http", + "ssl" + ], + "author": "Andrew Kelley", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + }, + "devDependencies": { + "connect": "~3.3.5", + "mocha": "~2.2.5", + "serve-static": "~1.9.3" + } +} diff --git a/front/frontend/node_modules/range-parser/HISTORY.md b/front/frontend/node_modules/range-parser/HISTORY.md new file mode 100644 index 0000000..70a973d --- /dev/null +++ b/front/frontend/node_modules/range-parser/HISTORY.md @@ -0,0 +1,56 @@ +1.2.1 / 2019-05-10 +================== + + * Improve error when `str` is not a string + +1.2.0 / 2016-06-01 +================== + + * Add `combine` option to combine overlapping ranges + +1.1.0 / 2016-05-13 +================== + + * Fix incorrectly returning -1 when there is at least one valid range + * perf: remove internal function + +1.0.3 / 2015-10-29 +================== + + * perf: enable strict mode + +1.0.2 / 2014-09-08 +================== + + * Support Node.js 0.6 + +1.0.1 / 2014-09-07 +================== + + * Move repository to jshttp + +1.0.0 / 2013-12-11 +================== + + * Add repository to package.json + * Add MIT license + +0.0.4 / 2012-06-17 +================== + + * Change ret -1 for unsatisfiable and -2 when invalid + +0.0.3 / 2012-06-17 +================== + + * Fix last-byte-pos default to len - 1 + +0.0.2 / 2012-06-14 +================== + + * Add `.type` + +0.0.1 / 2012-06-11 +================== + + * Initial release diff --git a/front/frontend/node_modules/range-parser/LICENSE b/front/frontend/node_modules/range-parser/LICENSE new file mode 100644 index 0000000..3599954 --- /dev/null +++ b/front/frontend/node_modules/range-parser/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2012-2014 TJ Holowaychuk +Copyright (c) 2015-2016 Douglas Christopher Wilson + +```js +var parseRange = require('range-parser') +``` + +### parseRange(size, header, options) + +Parse the given `header` string where `size` is the maximum size of the resource. +An array of ranges will be returned or negative numbers indicating an error parsing. + + * `-2` signals a malformed header string + * `-1` signals an unsatisfiable range + + + +```js +// parse header from request +var range = parseRange(size, req.headers.range) + +// the type of the range +if (range.type === 'bytes') { + // the ranges + range.forEach(function (r) { + // do something with r.start and r.end + }) +} +``` + +#### Options + +These properties are accepted in the options object. + +##### combine + +Specifies if overlapping & adjacent ranges should be combined, defaults to `false`. +When `true`, ranges will be combined and returned as if they were specified that +way in the header. + + + +```js +parseRange(100, 'bytes=50-55,0-10,5-10,56-60', { combine: true }) +// => [ +// { start: 0, end: 10 }, +// { start: 50, end: 60 } +// ] +``` + +## License + +[MIT](LICENSE) + +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/range-parser/master +[coveralls-url]: https://coveralls.io/r/jshttp/range-parser?branch=master +[node-image]: https://badgen.net/npm/node/range-parser +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/range-parser +[npm-url]: https://npmjs.org/package/range-parser +[npm-version-image]: https://badgen.net/npm/v/range-parser +[travis-image]: https://badgen.net/travis/jshttp/range-parser/master +[travis-url]: https://travis-ci.org/jshttp/range-parser diff --git a/front/frontend/node_modules/range-parser/index.js b/front/frontend/node_modules/range-parser/index.js new file mode 100644 index 0000000..b7dc5c0 --- /dev/null +++ b/front/frontend/node_modules/range-parser/index.js @@ -0,0 +1,162 @@ +/*! + * range-parser + * Copyright(c) 2012-2014 TJ Holowaychuk + * Copyright(c) 2015-2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = rangeParser + +/** + * Parse "Range" header `str` relative to the given file `size`. + * + * @param {Number} size + * @param {String} str + * @param {Object} [options] + * @return {Array} + * @public + */ + +function rangeParser (size, str, options) { + if (typeof str !== 'string') { + throw new TypeError('argument str must be a string') + } + + var index = str.indexOf('=') + + if (index === -1) { + return -2 + } + + // split the range string + var arr = str.slice(index + 1).split(',') + var ranges = [] + + // add ranges type + ranges.type = str.slice(0, index) + + // parse all ranges + for (var i = 0; i < arr.length; i++) { + var range = arr[i].split('-') + var start = parseInt(range[0], 10) + var end = parseInt(range[1], 10) + + // -nnn + if (isNaN(start)) { + start = size - end + end = size - 1 + // nnn- + } else if (isNaN(end)) { + end = size - 1 + } + + // limit last-byte-pos to current length + if (end > size - 1) { + end = size - 1 + } + + // invalid or unsatisifiable + if (isNaN(start) || isNaN(end) || start > end || start < 0) { + continue + } + + // add range + ranges.push({ + start: start, + end: end + }) + } + + if (ranges.length < 1) { + // unsatisifiable + return -1 + } + + return options && options.combine + ? combineRanges(ranges) + : ranges +} + +/** + * Combine overlapping & adjacent ranges. + * @private + */ + +function combineRanges (ranges) { + var ordered = ranges.map(mapWithIndex).sort(sortByRangeStart) + + for (var j = 0, i = 1; i < ordered.length; i++) { + var range = ordered[i] + var current = ordered[j] + + if (range.start > current.end + 1) { + // next range + ordered[++j] = range + } else if (range.end > current.end) { + // extend range + current.end = range.end + current.index = Math.min(current.index, range.index) + } + } + + // trim ordered array + ordered.length = j + 1 + + // generate combined range + var combined = ordered.sort(sortByRangeIndex).map(mapWithoutIndex) + + // copy ranges type + combined.type = ranges.type + + return combined +} + +/** + * Map function to add index value to ranges. + * @private + */ + +function mapWithIndex (range, index) { + return { + start: range.start, + end: range.end, + index: index + } +} + +/** + * Map function to remove index value from ranges. + * @private + */ + +function mapWithoutIndex (range) { + return { + start: range.start, + end: range.end + } +} + +/** + * Sort function to sort ranges by index. + * @private + */ + +function sortByRangeIndex (a, b) { + return a.index - b.index +} + +/** + * Sort function to sort ranges by start position. + * @private + */ + +function sortByRangeStart (a, b) { + return a.start - b.start +} diff --git a/front/frontend/node_modules/range-parser/package.json b/front/frontend/node_modules/range-parser/package.json new file mode 100644 index 0000000..abea6d8 --- /dev/null +++ b/front/frontend/node_modules/range-parser/package.json @@ -0,0 +1,44 @@ +{ + "name": "range-parser", + "author": "TJ Holowaychuk (http://tjholowaychuk.com)", + "description": "Range header field string parser", + "version": "1.2.1", + "contributors": [ + "Douglas Christopher Wilson ", + "James Wyatt Cready ", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "keywords": [ + "range", + "parser", + "http" + ], + "repository": "jshttp/range-parser", + "devDependencies": { + "deep-equal": "1.0.1", + "eslint": "5.16.0", + "eslint-config-standard": "12.0.0", + "eslint-plugin-markdown": "1.0.0", + "eslint-plugin-import": "2.17.2", + "eslint-plugin-node": "8.0.1", + "eslint-plugin-promise": "4.1.1", + "eslint-plugin-standard": "4.0.0", + "mocha": "6.1.4", + "nyc": "14.1.1" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "test-travis": "nyc --reporter=text npm test" + } +} diff --git a/front/frontend/node_modules/readable-stream/.travis.yml b/front/frontend/node_modules/readable-stream/.travis.yml new file mode 100644 index 0000000..f62cdac --- /dev/null +++ b/front/frontend/node_modules/readable-stream/.travis.yml @@ -0,0 +1,34 @@ +sudo: false +language: node_js +before_install: + - (test $NPM_LEGACY && npm install -g npm@2 && npm install -g npm@3) || true +notifications: + email: false +matrix: + fast_finish: true + include: + - node_js: '0.8' + env: NPM_LEGACY=true + - node_js: '0.10' + env: NPM_LEGACY=true + - node_js: '0.11' + env: NPM_LEGACY=true + - node_js: '0.12' + env: NPM_LEGACY=true + - node_js: 1 + env: NPM_LEGACY=true + - node_js: 2 + env: NPM_LEGACY=true + - node_js: 3 + env: NPM_LEGACY=true + - node_js: 4 + - node_js: 5 + - node_js: 6 + - node_js: 7 + - node_js: 8 + - node_js: 9 +script: "npm run test" +env: + global: + - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= + - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/front/frontend/node_modules/readable-stream/CONTRIBUTING.md b/front/frontend/node_modules/readable-stream/CONTRIBUTING.md new file mode 100644 index 0000000..f478d58 --- /dev/null +++ b/front/frontend/node_modules/readable-stream/CONTRIBUTING.md @@ -0,0 +1,38 @@ +# Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +* (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +* (b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +* (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +* (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +## Moderation Policy + +The [Node.js Moderation Policy] applies to this WG. + +## Code of Conduct + +The [Node.js Code of Conduct][] applies to this WG. + +[Node.js Code of Conduct]: +https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md +[Node.js Moderation Policy]: +https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/front/frontend/node_modules/readable-stream/GOVERNANCE.md b/front/frontend/node_modules/readable-stream/GOVERNANCE.md new file mode 100644 index 0000000..16ffb93 --- /dev/null +++ b/front/frontend/node_modules/readable-stream/GOVERNANCE.md @@ -0,0 +1,136 @@ +### Streams Working Group + +The Node.js Streams is jointly governed by a Working Group +(WG) +that is responsible for high-level guidance of the project. + +The WG has final authority over this project including: + +* Technical direction +* Project governance and process (including this policy) +* Contribution policy +* GitHub repository hosting +* Conduct guidelines +* Maintaining the list of additional Collaborators + +For the current list of WG members, see the project +[README.md](./README.md#current-project-team-members). + +### Collaborators + +The readable-stream GitHub repository is +maintained by the WG and additional Collaborators who are added by the +WG on an ongoing basis. + +Individuals making significant and valuable contributions are made +Collaborators and given commit-access to the project. These +individuals are identified by the WG and their addition as +Collaborators is discussed during the WG meeting. + +_Note:_ If you make a significant contribution and are not considered +for commit-access log an issue or contact a WG member directly and it +will be brought up in the next WG meeting. + +Modifications of the contents of the readable-stream repository are +made on +a collaborative basis. Anybody with a GitHub account may propose a +modification via pull request and it will be considered by the project +Collaborators. All pull requests must be reviewed and accepted by a +Collaborator with sufficient expertise who is able to take full +responsibility for the change. In the case of pull requests proposed +by an existing Collaborator, an additional Collaborator is required +for sign-off. Consensus should be sought if additional Collaborators +participate and there is disagreement around a particular +modification. See _Consensus Seeking Process_ below for further detail +on the consensus model used for governance. + +Collaborators may opt to elevate significant or controversial +modifications, or modifications that have not found consensus to the +WG for discussion by assigning the ***WG-agenda*** tag to a pull +request or issue. The WG should serve as the final arbiter where +required. + +For the current list of Collaborators, see the project +[README.md](./README.md#members). + +### WG Membership + +WG seats are not time-limited. There is no fixed size of the WG. +However, the expected target is between 6 and 12, to ensure adequate +coverage of important areas of expertise, balanced with the ability to +make decisions efficiently. + +There is no specific set of requirements or qualifications for WG +membership beyond these rules. + +The WG may add additional members to the WG by unanimous consensus. + +A WG member may be removed from the WG by voluntary resignation, or by +unanimous consensus of all other WG members. + +Changes to WG membership should be posted in the agenda, and may be +suggested as any other agenda item (see "WG Meetings" below). + +If an addition or removal is proposed during a meeting, and the full +WG is not in attendance to participate, then the addition or removal +is added to the agenda for the subsequent meeting. This is to ensure +that all members are given the opportunity to participate in all +membership decisions. If a WG member is unable to attend a meeting +where a planned membership decision is being made, then their consent +is assumed. + +No more than 1/3 of the WG members may be affiliated with the same +employer. If removal or resignation of a WG member, or a change of +employment by a WG member, creates a situation where more than 1/3 of +the WG membership shares an employer, then the situation must be +immediately remedied by the resignation or removal of one or more WG +members affiliated with the over-represented employer(s). + +### WG Meetings + +The WG meets occasionally on a Google Hangout On Air. A designated moderator +approved by the WG runs the meeting. Each meeting should be +published to YouTube. + +Items are added to the WG agenda that are considered contentious or +are modifications of governance, contribution policy, WG membership, +or release process. + +The intention of the agenda is not to approve or review all patches; +that should happen continuously on GitHub and be handled by the larger +group of Collaborators. + +Any community member or contributor can ask that something be added to +the next meeting's agenda by logging a GitHub Issue. Any Collaborator, +WG member or the moderator can add the item to the agenda by adding +the ***WG-agenda*** tag to the issue. + +Prior to each WG meeting the moderator will share the Agenda with +members of the WG. WG members can add any items they like to the +agenda at the beginning of each meeting. The moderator and the WG +cannot veto or remove items. + +The WG may invite persons or representatives from certain projects to +participate in a non-voting capacity. + +The moderator is responsible for summarizing the discussion of each +agenda item and sends it as a pull request after the meeting. + +### Consensus Seeking Process + +The WG follows a +[Consensus +Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) +decision-making model. + +When an agenda item has appeared to reach a consensus the moderator +will ask "Does anyone object?" as a final call for dissent from the +consensus. + +If an agenda item cannot reach a consensus a WG member can call for +either a closing vote or a vote to table the issue to the next +meeting. The call for a vote must be seconded by a majority of the WG +or else the discussion will continue. Simple majority wins. + +Note that changes to WG membership require a majority consensus. See +"WG Membership" above. diff --git a/front/frontend/node_modules/readable-stream/LICENSE b/front/frontend/node_modules/readable-stream/LICENSE new file mode 100644 index 0000000..2873b3b --- /dev/null +++ b/front/frontend/node_modules/readable-stream/LICENSE @@ -0,0 +1,47 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" diff --git a/front/frontend/node_modules/readable-stream/README.md b/front/frontend/node_modules/readable-stream/README.md new file mode 100644 index 0000000..f1c5a93 --- /dev/null +++ b/front/frontend/node_modules/readable-stream/README.md @@ -0,0 +1,58 @@ +# readable-stream + +***Node-core v8.17.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) + + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) + + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) + +```bash +npm install --save readable-stream +``` + +***Node-core streams for userland*** + +This package is a mirror of the Streams2 and Streams3 implementations in +Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.17.0/docs/api/stream.html). + +If you want to guarantee a stable streams base, regardless of what version of +Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). + +As of version 2.0.0 **readable-stream** uses semantic versioning. + +# Streams Working Group + +`readable-stream` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + + +## Team Members + +* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> + - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B +* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> + - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 +* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> + - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D +* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> +* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> +* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> +* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> + - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E +* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/front/frontend/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/front/frontend/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md new file mode 100644 index 0000000..83275f1 --- /dev/null +++ b/front/frontend/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md @@ -0,0 +1,60 @@ +# streams WG Meeting 2015-01-30 + +## Links + +* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg +* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 +* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ + +## Agenda + +Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. + +* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) +* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) +* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) +* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) + +## Minutes + +### adopt a charter + +* group: +1's all around + +### What versioning scheme should be adopted? +* group: +1’s 3.0.0 +* domenic+group: pulling in patches from other sources where appropriate +* mikeal: version independently, suggesting versions for io.js +* mikeal+domenic: work with TC to notify in advance of changes +simpler stream creation + +### streamline creation of streams +* sam: streamline creation of streams +* domenic: nice simple solution posted + but, we lose the opportunity to change the model + may not be backwards incompatible (double check keys) + + **action item:** domenic will check + +### remove implicit flowing of streams on(‘data’) +* add isFlowing / isPaused +* mikeal: worrying that we’re documenting polyfill methods – confuses users +* domenic: more reflective API is probably good, with warning labels for users +* new section for mad scientists (reflective stream access) +* calvin: name the “third state” +* mikeal: maybe borrow the name from whatwg? +* domenic: we’re missing the “third state” +* consensus: kind of difficult to name the third state +* mikeal: figure out differences in states / compat +* mathias: always flow on data – eliminates third state + * explore what it breaks + +**action items:** +* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) +* ask rod/build for infrastructure +* **chris**: explore the “flow on data” approach +* add isPaused/isFlowing +* add new docs section +* move isPaused to that section + + diff --git a/front/frontend/node_modules/readable-stream/duplex-browser.js b/front/frontend/node_modules/readable-stream/duplex-browser.js new file mode 100644 index 0000000..f8b2db8 --- /dev/null +++ b/front/frontend/node_modules/readable-stream/duplex-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_duplex.js'); diff --git a/front/frontend/node_modules/readable-stream/duplex.js b/front/frontend/node_modules/readable-stream/duplex.js new file mode 100644 index 0000000..46924cb --- /dev/null +++ b/front/frontend/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require('./readable').Duplex diff --git a/front/frontend/node_modules/readable-stream/lib/_stream_duplex.js b/front/frontend/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 0000000..57003c3 --- /dev/null +++ b/front/frontend/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,131 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +{ + // avoid scope creep, the keys array can then be collected + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + pna.nextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +Object.defineProperty(Duplex.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); + +Duplex.prototype._destroy = function (err, cb) { + this.push(null); + this.end(); + + pna.nextTick(cb, err); +}; \ No newline at end of file diff --git a/front/frontend/node_modules/readable-stream/lib/_stream_passthrough.js b/front/frontend/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 0000000..612edb4 --- /dev/null +++ b/front/frontend/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,47 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +'use strict'; + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; \ No newline at end of file diff --git a/front/frontend/node_modules/readable-stream/lib/_stream_readable.js b/front/frontend/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 0000000..3af95cb --- /dev/null +++ b/front/frontend/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,1019 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +module.exports = Readable; + +/**/ +var isArray = require('isarray'); +/**/ + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = require('events').EventEmitter; + +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +/**/ + +var Buffer = require('safe-buffer').Buffer; +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +/**/ +var debugUtil = require('util'); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + +var BufferList = require('./internal/streams/BufferList'); +var destroyImpl = require('./internal/streams/destroy'); +var StringDecoder; + +util.inherits(Readable, Stream); + +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; + +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} + +function ReadableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + + // has it been destroyed + this.destroyed = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + if (!(this instanceof Readable)) return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + if (options) { + if (typeof options.read === 'function') this._read = options.read; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + + Stream.call(this); +} + +Object.defineProperty(Readable.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined) { + return false; + } + return this._readableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); + +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + this.push(null); + cb(err); +}; + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; + +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (addToFront) { + if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit('error', new Error('stream.push() after EOF')); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } + + return needMoreData(state); +} + +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} + +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + + if (ret !== null) this.emit('data', ret); + + return ret; +}; + +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + pna.nextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('_read() is not implemented')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); + + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + // If the user pushes more data while we're writing to dest then we'll end up + // in ondata again. However, we only want to increase awaitDrain once because + // dest will only emit one 'drain' event for the multiple writes. + // => Introduce a guard on increasing awaitDrain. + var increasedAwaitDrain = false; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', state.awaitDrain); + state.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this, { hasUnpiped: false }); + }return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + + dest.emit('unpipe', this, unpipeInfo); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data') { + // Start flowing on next tick if stream isn't explicitly paused + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === 'readable') { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + pna.nextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + pna.nextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var _this = this; + + var state = this._readableState; + var paused = false; + + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + + _this.push(null); + }); + + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + this._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return this; +}; + +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._readableState.highWaterMark; + } +}); + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = fromListPartial(n, state.buffer, state.decoder); + } + + return ret; +} + +// Extracts only enough buffered data to satisfy the amount requested. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + // slice is the same for buffers and strings + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + // first chunk is a perfect match + ret = list.shift(); + } else { + // result spans more than one buffer + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; +} + +// Copies a specified amount of characters from the list of buffered data +// chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +// Copies a specified amount of bytes from the list of buffered data chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBuffer(n, list) { + var ret = Buffer.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + pna.nextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} \ No newline at end of file diff --git a/front/frontend/node_modules/readable-stream/lib/_stream_transform.js b/front/frontend/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 0000000..fcfc105 --- /dev/null +++ b/front/frontend/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,214 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +'use strict'; + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) { + return this.emit('error', new Error('write callback called multiple times')); + } + + ts.writechunk = null; + ts.writecb = null; + + if (data != null) // single equals check for both `null` and `undefined` + this.push(data); + + cb(er); + + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + + Duplex.call(this, options); + + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.on('prefinish', prefinish); +} + +function prefinish() { + var _this = this; + + if (typeof this._flush === 'function') { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('_transform() is not implemented'); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +Transform.prototype._destroy = function (err, cb) { + var _this2 = this; + + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + _this2.emit('close'); + }); +}; + +function done(stream, er, data) { + if (er) return stream.emit('error', er); + + if (data != null) // single equals check for both `null` and `undefined` + stream.push(data); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); + + if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); + + return stream.push(null); +} \ No newline at end of file diff --git a/front/frontend/node_modules/readable-stream/lib/_stream_writable.js b/front/frontend/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 0000000..e1e897f --- /dev/null +++ b/front/frontend/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,685 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +module.exports = Writable; + +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ + +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; +/**/ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +/**/ + +var Buffer = require('safe-buffer').Buffer; +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +var destroyImpl = require('./internal/streams/destroy'); + +util.inherits(Writable, Stream); + +function nop() {} + +function WritableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // if _final has been called + this.finalCalled = false; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // has it been destroyed + this.destroyed = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function (object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; +} + +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + + if (typeof options.writev === 'function') this._writev = options.writev; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + + if (typeof options.final === 'function') this._final = options.final; + } + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; + +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + pna.nextTick(cb, er); +} + +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + pna.nextTick(cb, er); + valid = false; + } + return valid; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + + if (typeof cb !== 'function') cb = nop; + + if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function () { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + return chunk; +} + +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + pna.nextTick(cb, er); + // this can emit finish, and it will always happen + // after error + pna.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('_write() is not implemented')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending) endWritable(this, state, cb); +}; + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + stream.emit('error', err); + } + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function') { + state.pendingcb++; + state.finalCalled = true; + pna.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + } + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} + +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + + // reuse the free corkReq. + state.corkedRequestsFree.next = corkReq; +} + +Object.defineProperty(Writable.prototype, 'destroyed', { + get: function () { + if (this._writableState === undefined) { + return false; + } + return this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); + +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + this.end(); + cb(err); +}; \ No newline at end of file diff --git a/front/frontend/node_modules/readable-stream/lib/internal/streams/BufferList.js b/front/frontend/node_modules/readable-stream/lib/internal/streams/BufferList.js new file mode 100644 index 0000000..5e08097 --- /dev/null +++ b/front/frontend/node_modules/readable-stream/lib/internal/streams/BufferList.js @@ -0,0 +1,78 @@ +'use strict'; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Buffer = require('safe-buffer').Buffer; +var util = require('util'); + +function copyBuffer(src, target, offset) { + src.copy(target, offset); +} + +module.exports = function () { + function BufferList() { + _classCallCheck(this, BufferList); + + this.head = null; + this.tail = null; + this.length = 0; + } + + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; + }; + + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + }; + + BufferList.prototype.shift = function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; + }; + + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + + BufferList.prototype.join = function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) { + ret += s + p.data; + }return ret; + }; + + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + }; + + return BufferList; +}(); + +if (util && util.inspect && util.inspect.custom) { + module.exports.prototype[util.inspect.custom] = function () { + var obj = util.inspect({ length: this.length }); + return this.constructor.name + ' ' + obj; + }; +} \ No newline at end of file diff --git a/front/frontend/node_modules/readable-stream/lib/internal/streams/destroy.js b/front/frontend/node_modules/readable-stream/lib/internal/streams/destroy.js new file mode 100644 index 0000000..85a8214 --- /dev/null +++ b/front/frontend/node_modules/readable-stream/lib/internal/streams/destroy.js @@ -0,0 +1,84 @@ +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err) { + if (!this._writableState) { + pna.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + pna.nextTick(emitErrorNT, this, err); + } + } + + return this; + } + + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + if (this._readableState) { + this._readableState.destroyed = true; + } + + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; + } + + this._destroy(err || null, function (err) { + if (!cb && err) { + if (!_this._writableState) { + pna.nextTick(emitErrorNT, _this, err); + } else if (!_this._writableState.errorEmitted) { + _this._writableState.errorEmitted = true; + pna.nextTick(emitErrorNT, _this, err); + } + } else if (cb) { + cb(err); + } + }); + + return this; +} + +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} + +function emitErrorNT(self, err) { + self.emit('error', err); +} + +module.exports = { + destroy: destroy, + undestroy: undestroy +}; \ No newline at end of file diff --git a/front/frontend/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/front/frontend/node_modules/readable-stream/lib/internal/streams/stream-browser.js new file mode 100644 index 0000000..9332a3f --- /dev/null +++ b/front/frontend/node_modules/readable-stream/lib/internal/streams/stream-browser.js @@ -0,0 +1 @@ +module.exports = require('events').EventEmitter; diff --git a/front/frontend/node_modules/readable-stream/lib/internal/streams/stream.js b/front/frontend/node_modules/readable-stream/lib/internal/streams/stream.js new file mode 100644 index 0000000..ce2ad5b --- /dev/null +++ b/front/frontend/node_modules/readable-stream/lib/internal/streams/stream.js @@ -0,0 +1 @@ +module.exports = require('stream'); diff --git a/front/frontend/node_modules/readable-stream/package.json b/front/frontend/node_modules/readable-stream/package.json new file mode 100644 index 0000000..514c178 --- /dev/null +++ b/front/frontend/node_modules/readable-stream/package.json @@ -0,0 +1,52 @@ +{ + "name": "readable-stream", + "version": "2.3.8", + "description": "Streams3, a user-land copy of the stream library from Node.js", + "main": "readable.js", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "devDependencies": { + "assert": "^1.4.0", + "babel-polyfill": "^6.9.1", + "buffer": "^4.9.0", + "lolex": "^2.3.2", + "nyc": "^6.4.0", + "tap": "^0.7.0", + "tape": "^4.8.0" + }, + "scripts": { + "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js", + "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", + "cover": "nyc npm test", + "report": "nyc report --reporter=lcov" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream" + }, + "keywords": [ + "readable", + "stream", + "pipe" + ], + "browser": { + "util": false, + "./readable.js": "./readable-browser.js", + "./writable.js": "./writable-browser.js", + "./duplex.js": "./duplex-browser.js", + "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" + }, + "nyc": { + "include": [ + "lib/**.js" + ] + }, + "license": "MIT" +} diff --git a/front/frontend/node_modules/readable-stream/passthrough.js b/front/frontend/node_modules/readable-stream/passthrough.js new file mode 100644 index 0000000..ffd791d --- /dev/null +++ b/front/frontend/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require('./readable').PassThrough diff --git a/front/frontend/node_modules/readable-stream/readable-browser.js b/front/frontend/node_modules/readable-stream/readable-browser.js new file mode 100644 index 0000000..e503725 --- /dev/null +++ b/front/frontend/node_modules/readable-stream/readable-browser.js @@ -0,0 +1,7 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/front/frontend/node_modules/readable-stream/readable.js b/front/frontend/node_modules/readable-stream/readable.js new file mode 100644 index 0000000..ec89ec5 --- /dev/null +++ b/front/frontend/node_modules/readable-stream/readable.js @@ -0,0 +1,19 @@ +var Stream = require('stream'); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; + exports = module.exports = Stream.Readable; + exports.Readable = Stream.Readable; + exports.Writable = Stream.Writable; + exports.Duplex = Stream.Duplex; + exports.Transform = Stream.Transform; + exports.PassThrough = Stream.PassThrough; + exports.Stream = Stream; +} else { + exports = module.exports = require('./lib/_stream_readable.js'); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = require('./lib/_stream_writable.js'); + exports.Duplex = require('./lib/_stream_duplex.js'); + exports.Transform = require('./lib/_stream_transform.js'); + exports.PassThrough = require('./lib/_stream_passthrough.js'); +} diff --git a/front/frontend/node_modules/readable-stream/transform.js b/front/frontend/node_modules/readable-stream/transform.js new file mode 100644 index 0000000..b1baba2 --- /dev/null +++ b/front/frontend/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require('./readable').Transform diff --git a/front/frontend/node_modules/readable-stream/writable-browser.js b/front/frontend/node_modules/readable-stream/writable-browser.js new file mode 100644 index 0000000..ebdde6a --- /dev/null +++ b/front/frontend/node_modules/readable-stream/writable-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_writable.js'); diff --git a/front/frontend/node_modules/readable-stream/writable.js b/front/frontend/node_modules/readable-stream/writable.js new file mode 100644 index 0000000..3211a6f --- /dev/null +++ b/front/frontend/node_modules/readable-stream/writable.js @@ -0,0 +1,8 @@ +var Stream = require("stream") +var Writable = require("./lib/_stream_writable.js") + +if (process.env.READABLE_STREAM === 'disable') { + module.exports = Stream && Stream.Writable || Writable +} else { + module.exports = Writable +} diff --git a/front/frontend/node_modules/readdirp/LICENSE b/front/frontend/node_modules/readdirp/LICENSE new file mode 100644 index 0000000..8a63b80 --- /dev/null +++ b/front/frontend/node_modules/readdirp/LICENSE @@ -0,0 +1,20 @@ +This software is released under the MIT license: + +Copyright (c) 2012-2015 Thorsten Lorenz + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/readdirp/README.md b/front/frontend/node_modules/readdirp/README.md new file mode 100644 index 0000000..431f402 --- /dev/null +++ b/front/frontend/node_modules/readdirp/README.md @@ -0,0 +1,204 @@ +# readdirp [![Build Status](https://secure.travis-ci.org/thlorenz/readdirp.svg)](http://travis-ci.org/thlorenz/readdirp) + +[![NPM](https://nodei.co/npm/readdirp.png?downloads=true&stars=true)](https://nodei.co/npm/readdirp/) + +Recursive version of [fs.readdir](http://nodejs.org/docs/latest/api/fs.html#fs_fs_readdir_path_callback). Exposes a **stream api**. + +```javascript +var readdirp = require('readdirp') + , path = require('path') + , es = require('event-stream'); + +// print out all JavaScript files along with their size + +var stream = readdirp({ root: path.join(__dirname), fileFilter: '*.js' }); +stream + .on('warn', function (err) { + console.error('non-fatal error', err); + // optionally call stream.destroy() here in order to abort and cause 'close' to be emitted + }) + .on('error', function (err) { console.error('fatal error', err); }) + .pipe(es.mapSync(function (entry) { + return { path: entry.path, size: entry.stat.size }; + })) + .pipe(es.stringify()) + .pipe(process.stdout); +``` + +Meant to be one of the recursive versions of [fs](http://nodejs.org/docs/latest/api/fs.html) functions, e.g., like [mkdirp](https://github.com/substack/node-mkdirp). + +**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* + +- [Installation](#installation) +- [API](#api) + - [entry stream](#entry-stream) + - [options](#options) + - [entry info](#entry-info) + - [Filters](#filters) + - [Callback API](#callback-api) + - [allProcessed ](#allprocessed) + - [fileProcessed](#fileprocessed) +- [More Examples](#more-examples) + - [stream api](#stream-api) + - [stream api pipe](#stream-api-pipe) + - [grep](#grep) + - [using callback api](#using-callback-api) + - [tests](#tests) + + +# Installation + + npm install readdirp + +# API + +***var entryStream = readdirp (options)*** + +Reads given root recursively and returns a `stream` of [entry info](#entry-info)s. + +## entry stream + +Behaves as follows: + +- `emit('data')` passes an [entry info](#entry-info) whenever one is found +- `emit('warn')` passes a non-fatal `Error` that prevents a file/directory from being processed (i.e., if it is + inaccessible to the user) +- `emit('error')` passes a fatal `Error` which also ends the stream (i.e., when illegal options where passed) +- `emit('end')` called when all entries were found and no more will be emitted (i.e., we are done) +- `emit('close')` called when the stream is destroyed via `stream.destroy()` (which could be useful if you want to + manually abort even on a non fatal error) - at that point the stream is no longer `readable` and no more entries, + warning or errors are emitted +- to learn more about streams, consult the very detailed + [nodejs streams documentation](http://nodejs.org/api/stream.html) or the + [stream-handbook](https://github.com/substack/stream-handbook) + + +## options + +- **root**: path in which to start reading and recursing into subdirectories + +- **fileFilter**: filter to include/exclude files found (see [Filters](#filters) for more) + +- **directoryFilter**: filter to include/exclude directories found and to recurse into (see [Filters](#filters) for more) + +- **depth**: depth at which to stop recursing even if more subdirectories are found + +- **entryType**: determines if data events on the stream should be emitted for `'files'`, `'directories'`, `'both'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes. Defaults to `'files'`. + +- **lstat**: if `true`, readdirp uses `fs.lstat` instead of `fs.stat` in order to stat files and includes symlink entries in the stream along with files. + +## entry info + +Has the following properties: + +- **parentDir** : directory in which entry was found (relative to given root) +- **fullParentDir** : full path to parent directory +- **name** : name of the file/directory +- **path** : path to the file/directory (relative to given root) +- **fullPath** : full path to the file/directory found +- **stat** : built in [stat object](http://nodejs.org/docs/v0.4.9/api/fs.html#fs.Stats) +- **Example**: (assuming root was `/User/dev/readdirp`) + + parentDir : 'test/bed/root_dir1', + fullParentDir : '/User/dev/readdirp/test/bed/root_dir1', + name : 'root_dir1_subdir1', + path : 'test/bed/root_dir1/root_dir1_subdir1', + fullPath : '/User/dev/readdirp/test/bed/root_dir1/root_dir1_subdir1', + stat : [ ... ] + +## Filters + +There are three different ways to specify filters for files and directories respectively. + +- **function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry + +- **glob string**: a string (e.g., `*.js`) which is matched using [minimatch](https://github.com/isaacs/minimatch), so go there for more + information. + + Globstars (`**`) are not supported since specifying a recursive pattern for an already recursive function doesn't make sense. + + Negated globs (as explained in the minimatch documentation) are allowed, e.g., `!*.txt` matches everything but text files. + +- **array of glob strings**: either need to be all inclusive or all exclusive (negated) patterns otherwise an error is thrown. + + `[ '*.json', '*.js' ]` includes all JavaScript and Json files. + + + `[ '!.git', '!node_modules' ]` includes all directories except the '.git' and 'node_modules'. + +Directories that do not pass a filter will not be recursed into. + +## Callback API + +Although the stream api is recommended, readdirp also exposes a callback based api. + +***readdirp (options, callback1 [, callback2])*** + +If callback2 is given, callback1 functions as the **fileProcessed** callback, and callback2 as the **allProcessed** callback. + +If only callback1 is given, it functions as the **allProcessed** callback. + +### allProcessed + +- function with err and res parameters, e.g., `function (err, res) { ... }` +- **err**: array of errors that occurred during the operation, **res may still be present, even if errors occurred** +- **res**: collection of file/directory [entry infos](#entry-info) + +### fileProcessed + +- function with [entry info](#entry-info) parameter e.g., `function (entryInfo) { ... }` + + +# More Examples + +`on('error', ..)`, `on('warn', ..)` and `on('end', ..)` handling omitted for brevity + +```javascript +var readdirp = require('readdirp'); + +// Glob file filter +readdirp({ root: './test/bed', fileFilter: '*.js' }) + .on('data', function (entry) { + // do something with each JavaScript file entry + }); + +// Combined glob file filters +readdirp({ root: './test/bed', fileFilter: [ '*.js', '*.json' ] }) + .on('data', function (entry) { + // do something with each JavaScript and Json file entry + }); + +// Combined negated directory filters +readdirp({ root: './test/bed', directoryFilter: [ '!.git', '!*modules' ] }) + .on('data', function (entry) { + // do something with each file entry found outside '.git' or any modules directory + }); + +// Function directory filter +readdirp({ root: './test/bed', directoryFilter: function (di) { return di.name.length === 9; } }) + .on('data', function (entry) { + // do something with each file entry found inside directories whose name has length 9 + }); + +// Limiting depth +readdirp({ root: './test/bed', depth: 1 }) + .on('data', function (entry) { + // do something with each file entry found up to 1 subdirectory deep + }); + +// callback api +readdirp({ root: '.' }, function(fileInfo) { + // do something with file entry here + }, function (err, res) { + // all done, move on or do final step for all file entries here +}); +``` + +Try more examples by following [instructions](https://github.com/paulmillr/readdirp/blob/master/examples/Readme.md) +on how to get going. + +## tests + +The [readdirp tests](https://github.com/paulmillr/readdirp/blob/master/test/readdirp.js) also will give you a good idea on +how things work. + diff --git a/front/frontend/node_modules/readdirp/package.json b/front/frontend/node_modules/readdirp/package.json new file mode 100644 index 0000000..39314a2 --- /dev/null +++ b/front/frontend/node_modules/readdirp/package.json @@ -0,0 +1,50 @@ +{ + "author": "Thorsten Lorenz (thlorenz.com)", + "name": "readdirp", + "description": "Recursive version of fs.readdir with streaming api.", + "version": "2.2.1", + "homepage": "https://github.com/paulmillr/readdirp", + "repository": { + "type": "git", + "url": "git://github.com/paulmillr/readdirp.git" + }, + "engines": { + "node": ">=0.10" + }, + "files": [ + "readdirp.js", + "stream-api.js" + ], + "keywords": [ + "recursive", + "fs", + "stream", + "streams", + "readdir", + "filesystem", + "find", + "filter" + ], + "main": "readdirp.js", + "scripts": { + "test-main": "(cd test && set -e; for t in ./*.js; do node $t; done)", + "test-0.10": "nave use 0.10 npm run test-main", + "test-0.12": "nave use 0.12 npm run test-main", + "test-4": "nave use 4.4 npm run test-main", + "test-6": "nave use 6.2 npm run test-main", + "test-all": "npm run test-main && npm run test-0.10 && npm run test-0.12 && npm run test-4 && npm run test-6", + "test": "npm run test-main" + }, + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "devDependencies": { + "nave": "^0.5.1", + "proxyquire": "^1.7.9", + "tap": "1.3.2", + "through2": "^2.0.0" + }, + "license": "MIT" +} diff --git a/front/frontend/node_modules/readdirp/readdirp.js b/front/frontend/node_modules/readdirp/readdirp.js new file mode 100644 index 0000000..863bd17 --- /dev/null +++ b/front/frontend/node_modules/readdirp/readdirp.js @@ -0,0 +1,294 @@ +'use strict'; + +var fs = require('graceful-fs') + , path = require('path') + , micromatch = require('micromatch').isMatch + , toString = Object.prototype.toString + ; + + +// Standard helpers +function isFunction (obj) { + return toString.call(obj) === '[object Function]'; +} + +function isString (obj) { + return toString.call(obj) === '[object String]'; +} + +function isUndefined (obj) { + return obj === void 0; +} + +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param { Object } opts Options to specify root (start directory), filters and recursion depth + * @param { function } callback1 When callback2 is given calls back for each processed file - function (fileInfo) { ... }, + * when callback2 is not given, it behaves like explained in callback2 + * @param { function } callback2 Calls back once all files have been processed with an array of errors and file infos + * function (err, fileInfos) { ... } + */ +function readdir(opts, callback1, callback2) { + var stream + , handleError + , handleFatalError + , errors = [] + , readdirResult = { + directories: [] + , files: [] + } + , fileProcessed + , allProcessed + , realRoot + , aborted = false + , paused = false + ; + + // If no callbacks were given we will use a streaming interface + if (isUndefined(callback1)) { + var api = require('./stream-api')(); + stream = api.stream; + callback1 = api.processEntry; + callback2 = api.done; + handleError = api.handleError; + handleFatalError = api.handleFatalError; + + stream.on('close', function () { aborted = true; }); + stream.on('pause', function () { paused = true; }); + stream.on('resume', function () { paused = false; }); + } else { + handleError = function (err) { errors.push(err); }; + handleFatalError = function (err) { + handleError(err); + allProcessed(errors, null); + }; + } + + if (isUndefined(opts)){ + handleFatalError(new Error ( + 'Need to pass at least one argument: opts! \n' + + 'https://github.com/paulmillr/readdirp#options' + ) + ); + return stream; + } + + opts.root = opts.root || '.'; + opts.fileFilter = opts.fileFilter || function() { return true; }; + opts.directoryFilter = opts.directoryFilter || function() { return true; }; + opts.depth = typeof opts.depth === 'undefined' ? 999999999 : opts.depth; + opts.entryType = opts.entryType || 'files'; + + var statfn = opts.lstat === true ? fs.lstat.bind(fs) : fs.stat.bind(fs); + + if (isUndefined(callback2)) { + fileProcessed = function() { }; + allProcessed = callback1; + } else { + fileProcessed = callback1; + allProcessed = callback2; + } + + function normalizeFilter (filter) { + + if (isUndefined(filter)) return undefined; + + function isNegated (filters) { + + function negated(f) { + return f.indexOf('!') === 0; + } + + var some = filters.some(negated); + if (!some) { + return false; + } else { + if (filters.every(negated)) { + return true; + } else { + // if we detect illegal filters, bail out immediately + throw new Error( + 'Cannot mix negated with non negated glob filters: ' + filters + '\n' + + 'https://github.com/paulmillr/readdirp#filters' + ); + } + } + } + + // Turn all filters into a function + if (isFunction(filter)) { + + return filter; + + } else if (isString(filter)) { + + return function (entryInfo) { + return micromatch(entryInfo.name, filter.trim()); + }; + + } else if (filter && Array.isArray(filter)) { + + if (filter) filter = filter.map(function (f) { + return f.trim(); + }); + + return isNegated(filter) ? + // use AND to concat multiple negated filters + function (entryInfo) { + return filter.every(function (f) { + return micromatch(entryInfo.name, f); + }); + } + : + // use OR to concat multiple inclusive filters + function (entryInfo) { + return filter.some(function (f) { + return micromatch(entryInfo.name, f); + }); + }; + } + } + + function processDir(currentDir, entries, callProcessed) { + if (aborted) return; + var total = entries.length + , processed = 0 + , entryInfos = [] + ; + + fs.realpath(currentDir, function(err, realCurrentDir) { + if (aborted) return; + if (err) { + handleError(err); + callProcessed(entryInfos); + return; + } + + var relDir = path.relative(realRoot, realCurrentDir); + + if (entries.length === 0) { + callProcessed([]); + } else { + entries.forEach(function (entry) { + + var fullPath = path.join(realCurrentDir, entry) + , relPath = path.join(relDir, entry); + + statfn(fullPath, function (err, stat) { + if (err) { + handleError(err); + } else { + entryInfos.push({ + name : entry + , path : relPath // relative to root + , fullPath : fullPath + + , parentDir : relDir // relative to root + , fullParentDir : realCurrentDir + + , stat : stat + }); + } + processed++; + if (processed === total) callProcessed(entryInfos); + }); + }); + } + }); + } + + function readdirRec(currentDir, depth, callCurrentDirProcessed) { + var args = arguments; + if (aborted) return; + if (paused) { + setImmediate(function () { + readdirRec.apply(null, args); + }) + return; + } + + fs.readdir(currentDir, function (err, entries) { + if (err) { + handleError(err); + callCurrentDirProcessed(); + return; + } + + processDir(currentDir, entries, function(entryInfos) { + + var subdirs = entryInfos + .filter(function (ei) { return ei.stat.isDirectory() && opts.directoryFilter(ei); }); + + subdirs.forEach(function (di) { + if(opts.entryType === 'directories' || opts.entryType === 'both' || opts.entryType === 'all') { + fileProcessed(di); + } + readdirResult.directories.push(di); + }); + + entryInfos + .filter(function(ei) { + var isCorrectType = opts.entryType === 'all' ? + !ei.stat.isDirectory() : ei.stat.isFile() || ei.stat.isSymbolicLink(); + return isCorrectType && opts.fileFilter(ei); + }) + .forEach(function (fi) { + if(opts.entryType === 'files' || opts.entryType === 'both' || opts.entryType === 'all') { + fileProcessed(fi); + } + readdirResult.files.push(fi); + }); + + var pendingSubdirs = subdirs.length; + + // Be done if no more subfolders exist or we reached the maximum desired depth + if(pendingSubdirs === 0 || depth === opts.depth) { + callCurrentDirProcessed(); + } else { + // recurse into subdirs, keeping track of which ones are done + // and call back once all are processed + subdirs.forEach(function (subdir) { + readdirRec(subdir.fullPath, depth + 1, function () { + pendingSubdirs = pendingSubdirs - 1; + if(pendingSubdirs === 0) { + callCurrentDirProcessed(); + } + }); + }); + } + }); + }); + } + + // Validate and normalize filters + try { + opts.fileFilter = normalizeFilter(opts.fileFilter); + opts.directoryFilter = normalizeFilter(opts.directoryFilter); + } catch (err) { + // if we detect illegal filters, bail out immediately + handleFatalError(err); + return stream; + } + + // If filters were valid get on with the show + fs.realpath(opts.root, function(err, res) { + if (err) { + handleFatalError(err); + return stream; + } + + realRoot = res; + readdirRec(opts.root, 0, function () { + // All errors are collected into the errors array + if (errors.length > 0) { + allProcessed(errors, readdirResult); + } else { + allProcessed(null, readdirResult); + } + }); + }); + + return stream; +} + +module.exports = readdir; diff --git a/front/frontend/node_modules/readdirp/stream-api.js b/front/frontend/node_modules/readdirp/stream-api.js new file mode 100644 index 0000000..bffd1a9 --- /dev/null +++ b/front/frontend/node_modules/readdirp/stream-api.js @@ -0,0 +1,98 @@ +'use strict'; + +var stream = require('readable-stream'); +var util = require('util'); + +var Readable = stream.Readable; + +module.exports = ReaddirpReadable; + +util.inherits(ReaddirpReadable, Readable); + +function ReaddirpReadable (opts) { + if (!(this instanceof ReaddirpReadable)) return new ReaddirpReadable(opts); + + opts = opts || {}; + + opts.objectMode = true; + Readable.call(this, opts); + + // backpressure not implemented at this point + this.highWaterMark = Infinity; + + this._destroyed = false; + this._paused = false; + this._warnings = []; + this._errors = []; + + this._pauseResumeErrors(); +} + +var proto = ReaddirpReadable.prototype; + +proto._pauseResumeErrors = function () { + var self = this; + self.on('pause', function () { self._paused = true }); + self.on('resume', function () { + if (self._destroyed) return; + self._paused = false; + + self._warnings.forEach(function (err) { self.emit('warn', err) }); + self._warnings.length = 0; + + self._errors.forEach(function (err) { self.emit('error', err) }); + self._errors.length = 0; + }) +} + +// called for each entry +proto._processEntry = function (entry) { + if (this._destroyed) return; + this.push(entry); +} + +proto._read = function () { } + +proto.destroy = function () { + // when stream is destroyed it will emit nothing further, not even errors or warnings + this.push(null); + this.readable = false; + this._destroyed = true; + this.emit('close'); +} + +proto._done = function () { + this.push(null); +} + +// we emit errors and warnings async since we may handle errors like invalid args +// within the initial event loop before any event listeners subscribed +proto._handleError = function (err) { + var self = this; + setImmediate(function () { + if (self._paused) return self._warnings.push(err); + if (!self._destroyed) self.emit('warn', err); + }); +} + +proto._handleFatalError = function (err) { + var self = this; + setImmediate(function () { + if (self._paused) return self._errors.push(err); + if (!self._destroyed) self.emit('error', err); + }); +} + +function createStreamAPI () { + var stream = new ReaddirpReadable(); + + return { + stream : stream + , processEntry : stream._processEntry.bind(stream) + , done : stream._done.bind(stream) + , handleError : stream._handleError.bind(stream) + , handleFatalError : stream._handleFatalError.bind(stream) + }; +} + +module.exports = createStreamAPI; diff --git a/front/frontend/node_modules/regex-not/LICENSE b/front/frontend/node_modules/regex-not/LICENSE new file mode 100644 index 0000000..8ee09d9 --- /dev/null +++ b/front/frontend/node_modules/regex-not/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016, 2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/front/frontend/node_modules/regex-not/README.md b/front/frontend/node_modules/regex-not/README.md new file mode 100644 index 0000000..24d00e7 --- /dev/null +++ b/front/frontend/node_modules/regex-not/README.md @@ -0,0 +1,133 @@ +# regex-not [![NPM version](https://img.shields.io/npm/v/regex-not.svg?style=flat)](https://www.npmjs.com/package/regex-not) [![NPM monthly downloads](https://img.shields.io/npm/dm/regex-not.svg?style=flat)](https://npmjs.org/package/regex-not) [![NPM total downloads](https://img.shields.io/npm/dt/regex-not.svg?style=flat)](https://npmjs.org/package/regex-not) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/regex-not.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/regex-not) + +> Create a javascript regular expression for matching everything except for the given string. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save regex-not +``` + +## Usage + +```js +var not = require('regex-not'); +``` + +The main export is a function that takes a string an options object. + +```js +not(string[, options]); +``` + +**Example** + +```js +var not = require('regex-not'); +console.log(not('foo')); +//=> /^(?:(?!^(?:foo)$).)+$/ +``` + +**Strict matching** + +By default, the returned regex is for strictly (not) matching the exact given pattern (in other words, "match this string if it does NOT _exactly equal_ `foo`"): + +```js +var re = not('foo'); +console.log(re.test('foo')); //=> false +console.log(re.test('bar')); //=> true +console.log(re.test('foobar')); //=> true +console.log(re.test('barfoo')); //=> true +``` + +### .create + +Returns a string to allow you to create your own regex: + +```js +console.log(not.create('foo')); +//=> '(?:(?!^(?:foo)$).)+' +``` + +### Options + +**options.contains** + +You can relax strict matching by setting `options.contains` to true (in other words, "match this string if it does NOT _contain_ `foo`"): + +```js +var re = not('foo'); +console.log(re.test('foo', {contains: true})); //=> false +console.log(re.test('bar', {contains: true})); //=> true +console.log(re.test('foobar', {contains: true})); //=> false +console.log(re.test('barfoo', {contains: true})); //=> false +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [regex-cache](https://www.npmjs.com/package/regex-cache): Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of… [more](https://github.com/jonschlinkert/regex-cache) | [homepage](https://github.com/jonschlinkert/regex-cache "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in surprising performance improvements.") +* [to-regex](https://www.npmjs.com/package/to-regex): Generate a regex from a string or array of strings. | [homepage](https://github.com/jonschlinkert/to-regex "Generate a regex from a string or array of strings.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 9 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [EdwardBetts](https://github.com/EdwardBetts) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 19, 2018._ \ No newline at end of file diff --git a/front/frontend/node_modules/regex-not/index.js b/front/frontend/node_modules/regex-not/index.js new file mode 100644 index 0000000..02bfed4 --- /dev/null +++ b/front/frontend/node_modules/regex-not/index.js @@ -0,0 +1,72 @@ +'use strict'; + +var extend = require('extend-shallow'); +var safe = require('safe-regex'); + +/** + * The main export is a function that takes a `pattern` string and an `options` object. + * + * ```js + & var not = require('regex-not'); + & console.log(not('foo')); + & //=> /^(?:(?!^(?:foo)$).)*$/ + * ``` + * + * @param {String} `pattern` + * @param {Object} `options` + * @return {RegExp} Converts the given `pattern` to a regex using the specified `options`. + * @api public + */ + +function toRegex(pattern, options) { + return new RegExp(toRegex.create(pattern, options)); +} + +/** + * Create a regex-compatible string from the given `pattern` and `options`. + * + * ```js + & var not = require('regex-not'); + & console.log(not.create('foo')); + & //=> '^(?:(?!^(?:foo)$).)*$' + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {String} + * @api public + */ + +toRegex.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + var opts = extend({}, options); + if (opts.contains === true) { + opts.strictNegate = false; + } + + var open = opts.strictOpen !== false ? '^' : ''; + var close = opts.strictClose !== false ? '$' : ''; + var endChar = opts.endChar ? opts.endChar : '+'; + var str = pattern; + + if (opts.strictNegate === false) { + str = '(?:(?!(?:' + pattern + ')).)' + endChar; + } else { + str = '(?:(?!^(?:' + pattern + ')$).)' + endChar; + } + + var res = open + str + close; + if (opts.safe === true && safe(res) === false) { + throw new Error('potentially unsafe regular expression: ' + res); + } + + return res; +}; + +/** + * Expose `toRegex` + */ + +module.exports = toRegex; diff --git a/front/frontend/node_modules/regex-not/node_modules/extend-shallow/LICENSE b/front/frontend/node_modules/regex-not/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/front/frontend/node_modules/regex-not/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/regex-not/node_modules/extend-shallow/README.md b/front/frontend/node_modules/regex-not/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/front/frontend/node_modules/regex-not/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/regex-not/node_modules/extend-shallow/index.js b/front/frontend/node_modules/regex-not/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/front/frontend/node_modules/regex-not/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/front/frontend/node_modules/regex-not/node_modules/extend-shallow/package.json b/front/frontend/node_modules/regex-not/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e5e9105 --- /dev/null +++ b/front/frontend/node_modules/regex-not/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/regex-not/node_modules/is-extendable/LICENSE b/front/frontend/node_modules/regex-not/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/front/frontend/node_modules/regex-not/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/front/frontend/node_modules/regex-not/node_modules/is-extendable/README.md b/front/frontend/node_modules/regex-not/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/front/frontend/node_modules/regex-not/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/regex-not/node_modules/is-extendable/index.d.ts b/front/frontend/node_modules/regex-not/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/front/frontend/node_modules/regex-not/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/front/frontend/node_modules/regex-not/node_modules/is-extendable/index.js b/front/frontend/node_modules/regex-not/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/front/frontend/node_modules/regex-not/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/front/frontend/node_modules/regex-not/node_modules/is-extendable/package.json b/front/frontend/node_modules/regex-not/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/front/frontend/node_modules/regex-not/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/regex-not/package.json b/front/frontend/node_modules/regex-not/package.json new file mode 100644 index 0000000..0320d53 --- /dev/null +++ b/front/frontend/node_modules/regex-not/package.json @@ -0,0 +1,63 @@ +{ + "name": "regex-not", + "description": "Create a javascript regular expression for matching everything except for the given string.", + "version": "1.0.2", + "homepage": "https://github.com/jonschlinkert/regex-not", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/regex-not", + "bugs": { + "url": "https://github.com/jonschlinkert/regex-not/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "exec", + "match", + "negate", + "negation", + "not", + "regex", + "regular expression", + "test" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "regex-cache", + "to-regex" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/remove-trailing-separator/history.md b/front/frontend/node_modules/remove-trailing-separator/history.md new file mode 100644 index 0000000..e15e8a4 --- /dev/null +++ b/front/frontend/node_modules/remove-trailing-separator/history.md @@ -0,0 +1,17 @@ +## History + +### 1.1.0 - 16th Aug 2017 + +- [f4576e3](https://github.com/darsain/remove-trailing-separator/commit/f4576e3638c39b794998b533fffb27854dcbee01) Implement faster slash slicing + +### 1.0.2 - 07th Jun 2017 + +- [8e13ecb](https://github.com/darsain/remove-trailing-separator/commit/8e13ecbfd7b9f5fdf97c5d5ff923e4718b874e31) ES5 compatibility + +### 1.0.1 - 25th Sep 2016 + +- [b78606d](https://github.com/darsain/remove-trailing-separator/commit/af90b4e153a4527894741af6c7005acaeb78606d) Remove backslash only on win32 systems + +### 1.0.0 - 24th Sep 2016 + +Initial release. diff --git a/front/frontend/node_modules/remove-trailing-separator/index.js b/front/frontend/node_modules/remove-trailing-separator/index.js new file mode 100644 index 0000000..512306b --- /dev/null +++ b/front/frontend/node_modules/remove-trailing-separator/index.js @@ -0,0 +1,17 @@ +var isWin = process.platform === 'win32'; + +module.exports = function (str) { + var i = str.length - 1; + if (i < 2) { + return str; + } + while (isSeparator(str, i)) { + i--; + } + return str.substr(0, i + 1); +}; + +function isSeparator(str, i) { + var char = str[i]; + return i > 0 && (char === '/' || (isWin && char === '\\')); +} diff --git a/front/frontend/node_modules/remove-trailing-separator/license b/front/frontend/node_modules/remove-trailing-separator/license new file mode 100644 index 0000000..a169aff --- /dev/null +++ b/front/frontend/node_modules/remove-trailing-separator/license @@ -0,0 +1,3 @@ +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/front/frontend/node_modules/remove-trailing-separator/package.json b/front/frontend/node_modules/remove-trailing-separator/package.json new file mode 100644 index 0000000..47ef27a --- /dev/null +++ b/front/frontend/node_modules/remove-trailing-separator/package.json @@ -0,0 +1,37 @@ +{ + "name": "remove-trailing-separator", + "version": "1.1.0", + "description": "Removes separators from the end of the string.", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "lint": "xo", + "pretest": "npm run lint", + "test": "nyc ava", + "report": "nyc report --reporter=html" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/darsain/remove-trailing-separator.git" + }, + "keywords": [ + "remove", + "strip", + "trailing", + "separator" + ], + "author": "darsain", + "license": "ISC", + "bugs": { + "url": "https://github.com/darsain/remove-trailing-separator/issues" + }, + "homepage": "https://github.com/darsain/remove-trailing-separator#readme", + "devDependencies": { + "ava": "^0.16.0", + "coveralls": "^2.11.14", + "nyc": "^8.3.0", + "xo": "^0.16.0" + } +} diff --git a/front/frontend/node_modules/remove-trailing-separator/readme.md b/front/frontend/node_modules/remove-trailing-separator/readme.md new file mode 100644 index 0000000..747086a --- /dev/null +++ b/front/frontend/node_modules/remove-trailing-separator/readme.md @@ -0,0 +1,51 @@ +# remove-trailing-separator + +[![NPM version][npm-img]][npm-url] [![Build Status: Linux][travis-img]][travis-url] [![Build Status: Windows][appveyor-img]][appveyor-url] [![Coverage Status][coveralls-img]][coveralls-url] + +Removes all separators from the end of a string. + +## Install + +``` +npm install remove-trailing-separator +``` + +## Examples + +```js +const removeTrailingSeparator = require('remove-trailing-separator'); + +removeTrailingSeparator('/foo/bar/') // '/foo/bar' +removeTrailingSeparator('/foo/bar///') // '/foo/bar' + +// leaves only/last separator +removeTrailingSeparator('/') // '/' +removeTrailingSeparator('///') // '/' + +// returns empty string +removeTrailingSeparator('') // '' +``` + +## Notable backslash, or win32 separator behavior + +`\` is considered a separator only on WIN32 systems. All POSIX compliant systems +see backslash as a valid file name character, so it would break POSIX compliance +to remove it there. + +In practice, this means that this code will return different things depending on +what system it runs on: + +```js +removeTrailingSeparator('\\foo\\') +// UNIX => '\\foo\\' +// WIN32 => '\\foo' +``` + +[npm-url]: https://npmjs.org/package/remove-trailing-separator +[npm-img]: https://badge.fury.io/js/remove-trailing-separator.svg +[travis-url]: https://travis-ci.org/darsain/remove-trailing-separator +[travis-img]: https://travis-ci.org/darsain/remove-trailing-separator.svg?branch=master +[appveyor-url]: https://ci.appveyor.com/project/darsain/remove-trailing-separator/branch/master +[appveyor-img]: https://ci.appveyor.com/api/projects/status/wvg9a93rrq95n2xl/branch/master?svg=true +[coveralls-url]: https://coveralls.io/github/darsain/remove-trailing-separator?branch=master +[coveralls-img]: https://coveralls.io/repos/github/darsain/remove-trailing-separator/badge.svg?branch=master diff --git a/front/frontend/node_modules/repeat-element/LICENSE b/front/frontend/node_modules/repeat-element/LICENSE new file mode 100644 index 0000000..7cccaf9 --- /dev/null +++ b/front/frontend/node_modules/repeat-element/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/repeat-element/README.md b/front/frontend/node_modules/repeat-element/README.md new file mode 100644 index 0000000..6006418 --- /dev/null +++ b/front/frontend/node_modules/repeat-element/README.md @@ -0,0 +1,99 @@ +# repeat-element [![NPM version](https://img.shields.io/npm/v/repeat-element.svg?style=flat)](https://www.npmjs.com/package/repeat-element) [![NPM monthly downloads](https://img.shields.io/npm/dm/repeat-element.svg?style=flat)](https://npmjs.org/package/repeat-element) [![NPM total downloads](https://img.shields.io/npm/dt/repeat-element.svg?style=flat)](https://npmjs.org/package/repeat-element) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/repeat-element.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/repeat-element) + +> Create an array by repeating the given value n times. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save repeat-element +``` + +## Usage + +```js +const repeat = require('repeat-element'); + +repeat('a', 5); +//=> ['a', 'a', 'a', 'a', 'a'] + +repeat('a', 1); +//=> ['a'] + +repeat('a', 0); +//=> [] + +repeat(null, 5) +//» [ null, null, null, null, null ] + +repeat({some: 'object'}, 5) +//» [ { some: 'object' }, +// { some: 'object' }, +// { some: 'object' }, +// { some: 'object' }, +// { some: 'object' } ] + +repeat(5, 5) +//» [ 5, 5, 5, 5, 5 ] +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [LinusU](https://github.com/LinusU) | +| 1 | [architectcodes](https://github.com/architectcodes) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 19, 2018._ \ No newline at end of file diff --git a/front/frontend/node_modules/repeat-element/index.js b/front/frontend/node_modules/repeat-element/index.js new file mode 100644 index 0000000..dde8a27 --- /dev/null +++ b/front/frontend/node_modules/repeat-element/index.js @@ -0,0 +1,22 @@ +/*! + * repeat-element + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +module.exports = function repeat(ele, num) { + if (Array.prototype.fill) { + return new Array(num).fill(ele); + } + + var arr = new Array(num); + + for (var i = 0; i < num; i++) { + arr[i] = ele; + } + + return arr; +}; diff --git a/front/frontend/node_modules/repeat-element/package.json b/front/frontend/node_modules/repeat-element/package.json new file mode 100644 index 0000000..537055f --- /dev/null +++ b/front/frontend/node_modules/repeat-element/package.json @@ -0,0 +1,49 @@ +{ + "name": "repeat-element", + "description": "Create an array by repeating the given value n times.", + "version": "1.1.4", + "homepage": "https://github.com/jonschlinkert/repeat-element", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/repeat-element", + "bugs": { + "url": "https://github.com/jonschlinkert/repeat-element/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "chalk": "^2.4.1", + "glob": "^7.1.2", + "gulp-format-md": "^1.0.0", + "minimist": "^1.2.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "array", + "element", + "repeat", + "string" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/repeat-string/LICENSE b/front/frontend/node_modules/repeat-string/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/front/frontend/node_modules/repeat-string/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/repeat-string/README.md b/front/frontend/node_modules/repeat-string/README.md new file mode 100644 index 0000000..aaa5e91 --- /dev/null +++ b/front/frontend/node_modules/repeat-string/README.md @@ -0,0 +1,136 @@ +# repeat-string [![NPM version](https://img.shields.io/npm/v/repeat-string.svg?style=flat)](https://www.npmjs.com/package/repeat-string) [![NPM monthly downloads](https://img.shields.io/npm/dm/repeat-string.svg?style=flat)](https://npmjs.org/package/repeat-string) [![NPM total downloads](https://img.shields.io/npm/dt/repeat-string.svg?style=flat)](https://npmjs.org/package/repeat-string) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/repeat-string.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/repeat-string) + +> Repeat the given string n times. Fastest implementation for repeating a string. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save repeat-string +``` + +## Usage + +### [repeat](index.js#L41) + +Repeat the given `string` the specified `number` of times. + +**Example:** + +**Example** + +```js +var repeat = require('repeat-string'); +repeat('A', 5); +//=> AAAAA +``` + +**Params** + +* `string` **{String}**: The string to repeat +* `number` **{Number}**: The number of times to repeat the string +* `returns` **{String}**: Repeated string + +## Benchmarks + +Repeat string is significantly faster than the native method (which is itself faster than [repeating](https://github.com/sindresorhus/repeating)): + +```sh +# 2x +repeat-string █████████████████████████ (26,953,977 ops/sec) +repeating █████████ (9,855,695 ops/sec) +native ██████████████████ (19,453,895 ops/sec) + +# 3x +repeat-string █████████████████████████ (19,445,252 ops/sec) +repeating ███████████ (8,661,565 ops/sec) +native ████████████████████ (16,020,598 ops/sec) + +# 10x +repeat-string █████████████████████████ (23,792,521 ops/sec) +repeating █████████ (8,571,332 ops/sec) +native ███████████████ (14,582,955 ops/sec) + +# 50x +repeat-string █████████████████████████ (23,640,179 ops/sec) +repeating █████ (5,505,509 ops/sec) +native ██████████ (10,085,557 ops/sec) + +# 250x +repeat-string █████████████████████████ (23,489,618 ops/sec) +repeating ████ (3,962,937 ops/sec) +native ████████ (7,724,892 ops/sec) + +# 2000x +repeat-string █████████████████████████ (20,315,172 ops/sec) +repeating ████ (3,297,079 ops/sec) +native ███████ (6,203,331 ops/sec) + +# 20000x +repeat-string █████████████████████████ (23,382,915 ops/sec) +repeating ███ (2,980,058 ops/sec) +native █████ (5,578,808 ops/sec) +``` + +**Run the benchmarks** + +Install dev dependencies: + +```sh +npm i -d && node benchmark +``` + +## About + +### Related projects + +[repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
    | +| --- | --- | +| 51 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [LinusU](https://github.com/LinusU) | +| 2 | [tbusser](https://github.com/tbusser) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [wooorm](https://github.com/wooorm) | + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](http://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/repeat-string/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 23, 2016._ \ No newline at end of file diff --git a/front/frontend/node_modules/repeat-string/index.js b/front/frontend/node_modules/repeat-string/index.js new file mode 100644 index 0000000..4459afd --- /dev/null +++ b/front/frontend/node_modules/repeat-string/index.js @@ -0,0 +1,70 @@ +/*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +/** + * Results cache + */ + +var res = ''; +var cache; + +/** + * Expose `repeat` + */ + +module.exports = repeat; + +/** + * Repeat the given `string` the specified `number` + * of times. + * + * **Example:** + * + * ```js + * var repeat = require('repeat-string'); + * repeat('A', 5); + * //=> AAAAA + * ``` + * + * @param {String} `string` The string to repeat + * @param {Number} `number` The number of times to repeat the string + * @return {String} Repeated string + * @api public + */ + +function repeat(str, num) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + // cover common, quick use cases + if (num === 1) return str; + if (num === 2) return str + str; + + var max = str.length * num; + if (cache !== str || typeof cache === 'undefined') { + cache = str; + res = ''; + } else if (res.length >= max) { + return res.substr(0, max); + } + + while (max > res.length && num > 1) { + if (num & 1) { + res += str; + } + + num >>= 1; + str += str; + } + + res += str; + res = res.substr(0, max); + return res; +} diff --git a/front/frontend/node_modules/repeat-string/package.json b/front/frontend/node_modules/repeat-string/package.json new file mode 100644 index 0000000..09f8892 --- /dev/null +++ b/front/frontend/node_modules/repeat-string/package.json @@ -0,0 +1,77 @@ +{ + "name": "repeat-string", + "description": "Repeat the given string n times. Fastest implementation for repeating a string.", + "version": "1.6.1", + "homepage": "https://github.com/jonschlinkert/repeat-string", + "author": "Jon Schlinkert (http://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://github.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Linus Unnebäck (http://linus.unnebäck.se)", + "Thijs Busser (http://tbusser.net)", + "Titus (wooorm.com)" + ], + "repository": "jonschlinkert/repeat-string", + "bugs": { + "url": "https://github.com/jonschlinkert/repeat-string/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "ansi-cyan": "^0.1.1", + "benchmarked": "^0.2.5", + "gulp-format-md": "^0.1.11", + "isobject": "^2.1.0", + "mocha": "^3.1.2", + "repeating": "^3.0.0", + "text-table": "^0.2.0", + "yargs-parser": "^4.0.2" + }, + "keywords": [ + "fast", + "fastest", + "fill", + "left", + "left-pad", + "multiple", + "pad", + "padding", + "repeat", + "repeating", + "repetition", + "right", + "right-pad", + "string", + "times" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "repeat-element" + ] + }, + "helpers": [ + "./benchmark/helper.js" + ], + "reflinks": [ + "verb" + ] + } +} diff --git a/front/frontend/node_modules/resolve-url/.jshintrc b/front/frontend/node_modules/resolve-url/.jshintrc new file mode 100644 index 0000000..8703acd --- /dev/null +++ b/front/frontend/node_modules/resolve-url/.jshintrc @@ -0,0 +1,44 @@ +{ + "bitwise": true, + "camelcase": true, + "curly": false, + "eqeqeq": true, + "es3": true, + "forin": true, + "immed": false, + "indent": false, + "latedef": "nofunc", + "newcap": false, + "noarg": true, + "noempty": true, + "nonew": false, + "plusplus": false, + "quotmark": false, + "undef": true, + "unused": "vars", + "strict": false, + "trailing": true, + "maxparams": 5, + "maxdepth": false, + "maxstatements": false, + "maxcomplexity": false, + "maxlen": 100, + + "asi": true, + "expr": true, + "globalstrict": true, + "smarttabs": true, + "sub": true, + + "node": true, + "browser": true, + "globals": { + "describe": false, + "it": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false, + "define": false + } +} diff --git a/front/frontend/node_modules/resolve-url/LICENSE b/front/frontend/node_modules/resolve-url/LICENSE new file mode 100644 index 0000000..0595be3 --- /dev/null +++ b/front/frontend/node_modules/resolve-url/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Simon Lydell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/resolve-url/bower.json b/front/frontend/node_modules/resolve-url/bower.json new file mode 100644 index 0000000..31aa6f4 --- /dev/null +++ b/front/frontend/node_modules/resolve-url/bower.json @@ -0,0 +1,15 @@ +{ + "name": "resolve-url", + "version": "0.2.1", + "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.", + "authors": ["Simon Lydell"], + "license": "MIT", + "main": "resolve-url.js", + "keywords": [ + "resolve", + "url" + ], + "ignore": [ + ".*" + ] +} diff --git a/front/frontend/node_modules/resolve-url/changelog.md b/front/frontend/node_modules/resolve-url/changelog.md new file mode 100644 index 0000000..2a4a630 --- /dev/null +++ b/front/frontend/node_modules/resolve-url/changelog.md @@ -0,0 +1,15 @@ +### Version 0.2.1 (2014-02-25) ### + +- Fix edge case when (accidentally) supplying only one argument, and that + argument happens to be a falsy value such as `undefined` or `null`. + + +### Version 0.2.0 (2014-02-24) ### + +- Disallow passing 0 arguments. It’s weird and inconsistent between browsers. + (Backwards incompatible change.) + + +### Version 0.1.0 (2014-02-23) ### + +- Initial release. diff --git a/front/frontend/node_modules/resolve-url/component.json b/front/frontend/node_modules/resolve-url/component.json new file mode 100644 index 0000000..f37cf00 --- /dev/null +++ b/front/frontend/node_modules/resolve-url/component.json @@ -0,0 +1,15 @@ +{ + "name": "resolve-url", + "version": "0.2.1", + "license": "MIT", + "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.", + "main": "resolve-url.js", + "repo": "lydell/resolve-url", + "keywords": [ + "resolve", + "url" + ], + "scripts": [ + "resolve-url.js" + ] +} diff --git a/front/frontend/node_modules/resolve-url/package.json b/front/frontend/node_modules/resolve-url/package.json new file mode 100644 index 0000000..9442366 --- /dev/null +++ b/front/frontend/node_modules/resolve-url/package.json @@ -0,0 +1,34 @@ +{ + "name": "resolve-url", + "version": "0.2.1", + "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.", + "author": "Simon Lydell", + "license": "MIT", + "main": "resolve-url.js", + "repository": "lydell/resolve-url", + "keywords": [ + "resolve", + "url" + ], + "scripts": { + "test": "jshint resolve-url.js test/ && testling -u" + }, + "devDependencies": { + "testling": "~1.6.0", + "jshint": "~2.4.3", + "tape": "~2.5.0" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "chrome/latest", + "firefox/latest", + "opera/12", + "opera/latest", + "safari/5", + "iphone/6", + "android-browser/4" + ] + } +} diff --git a/front/frontend/node_modules/resolve-url/readme.md b/front/frontend/node_modules/resolve-url/readme.md new file mode 100644 index 0000000..1f864e8 --- /dev/null +++ b/front/frontend/node_modules/resolve-url/readme.md @@ -0,0 +1,83 @@ +Overview +======== + +[![browser support](https://ci.testling.com/lydell/resolve-url.png)](https://ci.testling.com/lydell/resolve-url) + +Like Node.js’ [`path.resolve`]/[`url.resolve`] for the browser. + +```js +var resolveUrl = require("resolve-url") + +window.location +// https://example.com/articles/resolving-urls/edit + +resolveUrl("remove") +// https://example.com/articles/resolving-urls/remove + +resolveUrl("/static/scripts/app.js") +// https://example.com/static/scripts/app.js + +// Imagine /static/scripts/app.js contains `//# sourceMappingURL=../source-maps/app.js.map` +resolveUrl("/static/scripts/app.js", "../source-maps/app.js.map") +// https://example.com/static/source-maps/app.js.map + +resolveUrl("/static/scripts/app.js", "../source-maps/app.js.map", "../coffee/app.coffee") +// https://example.com/static/coffee/app.coffee + +resolveUrl("//cdn.example.com/jquery.js") +// https://cdn.example.com/jquery.js + +resolveUrl("http://foo.org/") +// http://foo.org/ +``` + + +Installation +============ + +- `npm install resolve-url` +- `bower install resolve-url` +- `component install lydell/resolve-url` + +Works with CommonJS, AMD and browser globals, through UMD. + + +Usage +===== + +### `resolveUrl(...urls)` ### + +Pass one or more urls. Resolves the last one to an absolute url, using the +previous ones and `window.location`. + +It’s like starting out on `window.location`, and then clicking links with the +urls as `href` attributes in order, from left to right. + +Unlike Node.js’ [`path.resolve`], this function always goes through all of the +arguments, from left to right. `path.resolve` goes from right to left and only +in the worst case goes through them all. Should that matter. + +Actually, the function is _really_ like clicking a lot of links in series: An +actual `` gets its `href` attribute set for each url! This means that the +url resolution of the browser is used, which makes this module really +light-weight. + +Also note that this functions deals with urls, not paths, so in that respect it +has more in common with Node.js’ [`url.resolve`]. But the arguments are more +like [`path.resolve`]. + +[`path.resolve`]: http://nodejs.org/api/path.html#path_path_resolve_from_to +[`url.resolve`]: http://nodejs.org/api/url.html#url_url_resolve_from_to + + +Tests +===== + +Run `npm test`, which lints the code and then gives you a link to open in a +browser of choice (using `testling`). + + +License +======= + +[The X11 (“MIT”) License](LICENSE). diff --git a/front/frontend/node_modules/resolve-url/resolve-url.js b/front/frontend/node_modules/resolve-url/resolve-url.js new file mode 100644 index 0000000..dc5c5b7 --- /dev/null +++ b/front/frontend/node_modules/resolve-url/resolve-url.js @@ -0,0 +1,47 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +void (function(root, factory) { + if (typeof define === "function" && define.amd) { + define(factory) + } else if (typeof exports === "object") { + module.exports = factory() + } else { + root.resolveUrl = factory() + } +}(this, function() { + + function resolveUrl(/* ...urls */) { + var numUrls = arguments.length + + if (numUrls === 0) { + throw new Error("resolveUrl requires at least one argument; got none.") + } + + var base = document.createElement("base") + base.href = arguments[0] + + if (numUrls === 1) { + return base.href + } + + var head = document.getElementsByTagName("head")[0] + head.insertBefore(base, head.firstChild) + + var a = document.createElement("a") + var resolved + + for (var index = 1; index < numUrls; index++) { + a.href = arguments[index] + resolved = a.href + base.href = resolved + } + + head.removeChild(base) + + return resolved + } + + return resolveUrl + +})); diff --git a/front/frontend/node_modules/resolve-url/test/resolve-url.js b/front/frontend/node_modules/resolve-url/test/resolve-url.js new file mode 100644 index 0000000..7f135a7 --- /dev/null +++ b/front/frontend/node_modules/resolve-url/test/resolve-url.js @@ -0,0 +1,70 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +var test = require("tape") + +var resolveUrl = require("../") + +"use strict" + +test("resolveUrl", function(t) { + + t.plan(7) + + t.equal(typeof resolveUrl, "function", "is a function") + + t.equal( + resolveUrl("https://example.com/"), + "https://example.com/" + ) + + var loc = "https://example.com/articles/resolving-urls/edit" + + t.equal( + resolveUrl(loc, "remove"), + "https://example.com/articles/resolving-urls/remove" + ) + + t.equal( + resolveUrl(loc, "/static/scripts/app.js"), + "https://example.com/static/scripts/app.js" + ) + + t.equal( + resolveUrl(loc, "/static/scripts/app.js", "../source-maps/app.js.map"), + "https://example.com/static/source-maps/app.js.map" + ) + + t.equal( + resolveUrl(loc, "/static/scripts/app.js", "../source-maps/app.js.map", "../coffee/app.coffee"), + "https://example.com/static/coffee/app.coffee" + ) + + t.equal( + resolveUrl(loc, "//cdn.example.com/jquery.js"), + "https://cdn.example.com/jquery.js" + ) + +}) + +test("edge cases", function(t) { + + t.plan(4) + + t["throws"](resolveUrl, /at least one argument/, "throws with no arguments") + + var accidentallyUndefined + var result + t.doesNotThrow( + function() { result = resolveUrl(accidentallyUndefined) }, + "undefined is still an argument" + ) + t.ok(result.match(/\/undefined$/), "undefined is stringified") + + t.equal( + resolveUrl("http://foo.org/test", undefined, {}, ["a/b"], null), + "http://foo.org/a/null", + "arguments are stringified" + ) + +}) diff --git a/front/frontend/node_modules/ret/LICENSE b/front/frontend/node_modules/ret/LICENSE new file mode 100644 index 0000000..b351ee8 --- /dev/null +++ b/front/frontend/node_modules/ret/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2011 by Roly Fentanes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/ret/README.md b/front/frontend/node_modules/ret/README.md new file mode 100644 index 0000000..28563e1 --- /dev/null +++ b/front/frontend/node_modules/ret/README.md @@ -0,0 +1,183 @@ +# Regular Expression Tokenizer + +Tokenizes strings that represent a regular expressions. + +[![Build Status](https://secure.travis-ci.org/fent/ret.js.svg)](http://travis-ci.org/fent/ret.js) +[![Dependency Status](https://david-dm.org/fent/ret.js.svg)](https://david-dm.org/fent/ret.js) +[![codecov](https://codecov.io/gh/fent/ret.js/branch/master/graph/badge.svg)](https://codecov.io/gh/fent/ret.js) + +# Usage + +```js +var ret = require('ret'); + +var tokens = ret(/foo|bar/.source); +``` + +`tokens` will contain the following object + +```js +{ + "type": ret.types.ROOT + "options": [ + [ { "type": ret.types.CHAR, "value", 102 }, + { "type": ret.types.CHAR, "value", 111 }, + { "type": ret.types.CHAR, "value", 111 } ], + [ { "type": ret.types.CHAR, "value", 98 }, + { "type": ret.types.CHAR, "value", 97 }, + { "type": ret.types.CHAR, "value", 114 } ] + ] +} +``` + +# Token Types + +`ret.types` is a collection of the various token types exported by ret. + +### ROOT + +Only used in the root of the regexp. This is needed due to the posibility of the root containing a pipe `|` character. In that case, the token will have an `options` key that will be an array of arrays of tokens. If not, it will contain a `stack` key that is an array of tokens. + +```js +{ + "type": ret.types.ROOT, + "stack": [token1, token2...], +} +``` + +```js +{ + "type": ret.types.ROOT, + "options" [ + [token1, token2...], + [othertoken1, othertoken2...] + ... + ], +} +``` + +### GROUP + +Groups contain tokens that are inside of a parenthesis. If the group begins with `?` followed by another character, it's a special type of group. A ':' tells the group not to be remembered when `exec` is used. '=' means the previous token matches only if followed by this group, and '!' means the previous token matches only if NOT followed. + +Like root, it can contain an `options` key instead of `stack` if there is a pipe. + +```js +{ + "type": ret.types.GROUP, + "remember" true, + "followedBy": false, + "notFollowedBy": false, + "stack": [token1, token2...], +} +``` + +```js +{ + "type": ret.types.GROUP, + "remember" true, + "followedBy": false, + "notFollowedBy": false, + "options" [ + [token1, token2...], + [othertoken1, othertoken2...] + ... + ], +} +``` + +### POSITION + +`\b`, `\B`, `^`, and `$` specify positions in the regexp. + +```js +{ + "type": ret.types.POSITION, + "value": "^", +} +``` + +### SET + +Contains a key `set` specifying what tokens are allowed and a key `not` specifying if the set should be negated. A set can contain other sets, ranges, and characters. + +```js +{ + "type": ret.types.SET, + "set": [token1, token2...], + "not": false, +} +``` + +### RANGE + +Used in set tokens to specify a character range. `from` and `to` are character codes. + +```js +{ + "type": ret.types.RANGE, + "from": 97, + "to": 122, +} +``` + +### REPETITION + +```js +{ + "type": ret.types.REPETITION, + "min": 0, + "max": Infinity, + "value": token, +} +``` + +### REFERENCE + +References a group token. `value` is 1-9. + +```js +{ + "type": ret.types.REFERENCE, + "value": 1, +} +``` + +### CHAR + +Represents a single character token. `value` is the character code. This might seem a bit cluttering instead of concatenating characters together. But since repetition tokens only repeat the last token and not the last clause like the pipe, it's simpler to do it this way. + +```js +{ + "type": ret.types.CHAR, + "value": 123, +} +``` + +## Errors + +ret.js will throw errors if given a string with an invalid regular expression. All possible errors are + +* Invalid group. When a group with an immediate `?` character is followed by an invalid character. It can only be followed by `!`, `=`, or `:`. Example: `/(?_abc)/` +* Nothing to repeat. Thrown when a repetitional token is used as the first token in the current clause, as in right in the beginning of the regexp or group, or right after a pipe. Example: `/foo|?bar/`, `/{1,3}foo|bar/`, `/foo(+bar)/` +* Unmatched ). A group was not opened, but was closed. Example: `/hello)2u/` +* Unterminated group. A group was not closed. Example: `/(1(23)4/` +* Unterminated character class. A custom character set was not closed. Example: `/[abc/` + + +# Install + + npm install ret + + +# Tests + +Tests are written with [vows](http://vowsjs.org/) + +```bash +npm test +``` + +# License + +MIT diff --git a/front/frontend/node_modules/ret/lib/index.js b/front/frontend/node_modules/ret/lib/index.js new file mode 100644 index 0000000..0e151c3 --- /dev/null +++ b/front/frontend/node_modules/ret/lib/index.js @@ -0,0 +1,282 @@ +var util = require('./util'); +var types = require('./types'); +var sets = require('./sets'); +var positions = require('./positions'); + + +module.exports = function(regexpStr) { + var i = 0, l, c, + start = { type: types.ROOT, stack: []}, + + // Keep track of last clause/group and stack. + lastGroup = start, + last = start.stack, + groupStack = []; + + + var repeatErr = function(i) { + util.error(regexpStr, 'Nothing to repeat at column ' + (i - 1)); + }; + + // Decode a few escaped characters. + var str = util.strToChars(regexpStr); + l = str.length; + + // Iterate through each character in string. + while (i < l) { + c = str[i++]; + + switch (c) { + // Handle escaped characters, inclues a few sets. + case '\\': + c = str[i++]; + + switch (c) { + case 'b': + last.push(positions.wordBoundary()); + break; + + case 'B': + last.push(positions.nonWordBoundary()); + break; + + case 'w': + last.push(sets.words()); + break; + + case 'W': + last.push(sets.notWords()); + break; + + case 'd': + last.push(sets.ints()); + break; + + case 'D': + last.push(sets.notInts()); + break; + + case 's': + last.push(sets.whitespace()); + break; + + case 'S': + last.push(sets.notWhitespace()); + break; + + default: + // Check if c is integer. + // In which case it's a reference. + if (/\d/.test(c)) { + last.push({ type: types.REFERENCE, value: parseInt(c, 10) }); + + // Escaped character. + } else { + last.push({ type: types.CHAR, value: c.charCodeAt(0) }); + } + } + + break; + + + // Positionals. + case '^': + last.push(positions.begin()); + break; + + case '$': + last.push(positions.end()); + break; + + + // Handle custom sets. + case '[': + // Check if this class is 'anti' i.e. [^abc]. + var not; + if (str[i] === '^') { + not = true; + i++; + } else { + not = false; + } + + // Get all the characters in class. + var classTokens = util.tokenizeClass(str.slice(i), regexpStr); + + // Increase index by length of class. + i += classTokens[1]; + last.push({ + type: types.SET, + set: classTokens[0], + not: not, + }); + + break; + + + // Class of any character except \n. + case '.': + last.push(sets.anyChar()); + break; + + + // Push group onto stack. + case '(': + // Create group. + var group = { + type: types.GROUP, + stack: [], + remember: true, + }; + + c = str[i]; + + // If if this is a special kind of group. + if (c === '?') { + c = str[i + 1]; + i += 2; + + // Match if followed by. + if (c === '=') { + group.followedBy = true; + + // Match if not followed by. + } else if (c === '!') { + group.notFollowedBy = true; + + } else if (c !== ':') { + util.error(regexpStr, + 'Invalid group, character \'' + c + + '\' after \'?\' at column ' + (i - 1)); + } + + group.remember = false; + } + + // Insert subgroup into current group stack. + last.push(group); + + // Remember the current group for when the group closes. + groupStack.push(lastGroup); + + // Make this new group the current group. + lastGroup = group; + last = group.stack; + break; + + + // Pop group out of stack. + case ')': + if (groupStack.length === 0) { + util.error(regexpStr, 'Unmatched ) at column ' + (i - 1)); + } + lastGroup = groupStack.pop(); + + // Check if this group has a PIPE. + // To get back the correct last stack. + last = lastGroup.options ? + lastGroup.options[lastGroup.options.length - 1] : lastGroup.stack; + break; + + + // Use pipe character to give more choices. + case '|': + // Create array where options are if this is the first PIPE + // in this clause. + if (!lastGroup.options) { + lastGroup.options = [lastGroup.stack]; + delete lastGroup.stack; + } + + // Create a new stack and add to options for rest of clause. + var stack = []; + lastGroup.options.push(stack); + last = stack; + break; + + + // Repetition. + // For every repetition, remove last element from last stack + // then insert back a RANGE object. + // This design is chosen because there could be more than + // one repetition symbols in a regex i.e. `a?+{2,3}`. + case '{': + var rs = /^(\d+)(,(\d+)?)?\}/.exec(str.slice(i)), min, max; + if (rs !== null) { + if (last.length === 0) { + repeatErr(i); + } + min = parseInt(rs[1], 10); + max = rs[2] ? rs[3] ? parseInt(rs[3], 10) : Infinity : min; + i += rs[0].length; + + last.push({ + type: types.REPETITION, + min: min, + max: max, + value: last.pop(), + }); + } else { + last.push({ + type: types.CHAR, + value: 123, + }); + } + break; + + case '?': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 0, + max: 1, + value: last.pop(), + }); + break; + + case '+': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 1, + max: Infinity, + value: last.pop(), + }); + break; + + case '*': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 0, + max: Infinity, + value: last.pop(), + }); + break; + + + // Default is a character that is not `\[](){}?+*^$`. + default: + last.push({ + type: types.CHAR, + value: c.charCodeAt(0), + }); + } + + } + + // Check if any groups have not been closed. + if (groupStack.length !== 0) { + util.error(regexpStr, 'Unterminated group'); + } + + return start; +}; + +module.exports.types = types; diff --git a/front/frontend/node_modules/ret/lib/positions.js b/front/frontend/node_modules/ret/lib/positions.js new file mode 100644 index 0000000..80677ee --- /dev/null +++ b/front/frontend/node_modules/ret/lib/positions.js @@ -0,0 +1,17 @@ +var types = require('./types'); + +exports.wordBoundary = function() { + return { type: types.POSITION, value: 'b' }; +}; + +exports.nonWordBoundary = function() { + return { type: types.POSITION, value: 'B' }; +}; + +exports.begin = function() { + return { type: types.POSITION, value: '^' }; +}; + +exports.end = function() { + return { type: types.POSITION, value: '$' }; +}; diff --git a/front/frontend/node_modules/ret/lib/sets.js b/front/frontend/node_modules/ret/lib/sets.js new file mode 100644 index 0000000..5fb6be5 --- /dev/null +++ b/front/frontend/node_modules/ret/lib/sets.js @@ -0,0 +1,82 @@ +var types = require('./types'); + +var INTS = function() { + return [{ type: types.RANGE , from: 48, to: 57 }]; +}; + +var WORDS = function() { + return [ + { type: types.CHAR, value: 95 }, + { type: types.RANGE, from: 97, to: 122 }, + { type: types.RANGE, from: 65, to: 90 } + ].concat(INTS()); +}; + +var WHITESPACE = function() { + return [ + { type: types.CHAR, value: 9 }, + { type: types.CHAR, value: 10 }, + { type: types.CHAR, value: 11 }, + { type: types.CHAR, value: 12 }, + { type: types.CHAR, value: 13 }, + { type: types.CHAR, value: 32 }, + { type: types.CHAR, value: 160 }, + { type: types.CHAR, value: 5760 }, + { type: types.CHAR, value: 6158 }, + { type: types.CHAR, value: 8192 }, + { type: types.CHAR, value: 8193 }, + { type: types.CHAR, value: 8194 }, + { type: types.CHAR, value: 8195 }, + { type: types.CHAR, value: 8196 }, + { type: types.CHAR, value: 8197 }, + { type: types.CHAR, value: 8198 }, + { type: types.CHAR, value: 8199 }, + { type: types.CHAR, value: 8200 }, + { type: types.CHAR, value: 8201 }, + { type: types.CHAR, value: 8202 }, + { type: types.CHAR, value: 8232 }, + { type: types.CHAR, value: 8233 }, + { type: types.CHAR, value: 8239 }, + { type: types.CHAR, value: 8287 }, + { type: types.CHAR, value: 12288 }, + { type: types.CHAR, value: 65279 } + ]; +}; + +var NOTANYCHAR = function() { + return [ + { type: types.CHAR, value: 10 }, + { type: types.CHAR, value: 13 }, + { type: types.CHAR, value: 8232 }, + { type: types.CHAR, value: 8233 }, + ]; +}; + +// Predefined class objects. +exports.words = function() { + return { type: types.SET, set: WORDS(), not: false }; +}; + +exports.notWords = function() { + return { type: types.SET, set: WORDS(), not: true }; +}; + +exports.ints = function() { + return { type: types.SET, set: INTS(), not: false }; +}; + +exports.notInts = function() { + return { type: types.SET, set: INTS(), not: true }; +}; + +exports.whitespace = function() { + return { type: types.SET, set: WHITESPACE(), not: false }; +}; + +exports.notWhitespace = function() { + return { type: types.SET, set: WHITESPACE(), not: true }; +}; + +exports.anyChar = function() { + return { type: types.SET, set: NOTANYCHAR(), not: true }; +}; diff --git a/front/frontend/node_modules/ret/lib/types.js b/front/frontend/node_modules/ret/lib/types.js new file mode 100644 index 0000000..9484145 --- /dev/null +++ b/front/frontend/node_modules/ret/lib/types.js @@ -0,0 +1,10 @@ +module.exports = { + ROOT : 0, + GROUP : 1, + POSITION : 2, + SET : 3, + RANGE : 4, + REPETITION : 5, + REFERENCE : 6, + CHAR : 7, +}; diff --git a/front/frontend/node_modules/ret/lib/util.js b/front/frontend/node_modules/ret/lib/util.js new file mode 100644 index 0000000..97d8cf5 --- /dev/null +++ b/front/frontend/node_modules/ret/lib/util.js @@ -0,0 +1,111 @@ +var types = require('./types'); +var sets = require('./sets'); + + +// All of these are private and only used by randexp. +// It's assumed that they will always be called with the correct input. + +var CTRL = '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?'; +var SLSH = { '0': 0, 't': 9, 'n': 10, 'v': 11, 'f': 12, 'r': 13 }; + +/** + * Finds character representations in str and convert all to + * their respective characters + * + * @param {String} str + * @return {String} + */ +exports.strToChars = function(str) { + /* jshint maxlen: false */ + var chars_regex = /(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g; + str = str.replace(chars_regex, function(s, b, lbs, a16, b16, c8, dctrl, eslsh) { + if (lbs) { + return s; + } + + var code = b ? 8 : + a16 ? parseInt(a16, 16) : + b16 ? parseInt(b16, 16) : + c8 ? parseInt(c8, 8) : + dctrl ? CTRL.indexOf(dctrl) : + SLSH[eslsh]; + + var c = String.fromCharCode(code); + + // Escape special regex characters. + if (/[\[\]{}\^$.|?*+()]/.test(c)) { + c = '\\' + c; + } + + return c; + }); + + return str; +}; + + +/** + * turns class into tokens + * reads str until it encounters a ] not preceeded by a \ + * + * @param {String} str + * @param {String} regexpStr + * @return {Array., Number>} + */ +exports.tokenizeClass = function(str, regexpStr) { + /* jshint maxlen: false */ + var tokens = []; + var regexp = /\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?(.)/g; + var rs, c; + + + while ((rs = regexp.exec(str)) != null) { + if (rs[1]) { + tokens.push(sets.words()); + + } else if (rs[2]) { + tokens.push(sets.ints()); + + } else if (rs[3]) { + tokens.push(sets.whitespace()); + + } else if (rs[4]) { + tokens.push(sets.notWords()); + + } else if (rs[5]) { + tokens.push(sets.notInts()); + + } else if (rs[6]) { + tokens.push(sets.notWhitespace()); + + } else if (rs[7]) { + tokens.push({ + type: types.RANGE, + from: (rs[8] || rs[9]).charCodeAt(0), + to: rs[10].charCodeAt(0), + }); + + } else if (c = rs[12]) { + tokens.push({ + type: types.CHAR, + value: c.charCodeAt(0), + }); + + } else { + return [tokens, regexp.lastIndex]; + } + } + + exports.error(regexpStr, 'Unterminated character class'); +}; + + +/** + * Shortcut to throw errors. + * + * @param {String} regexp + * @param {String} msg + */ +exports.error = function(regexp, msg) { + throw new SyntaxError('Invalid regular expression: /' + regexp + '/: ' + msg); +}; diff --git a/front/frontend/node_modules/ret/package.json b/front/frontend/node_modules/ret/package.json new file mode 100644 index 0000000..2fde9a4 --- /dev/null +++ b/front/frontend/node_modules/ret/package.json @@ -0,0 +1,35 @@ +{ + "name": "ret", + "description": "Tokenizes a string that represents a regular expression.", + "keywords": [ + "regex", + "regexp", + "regular expression", + "parser", + "tokenizer" + ], + "version": "0.1.15", + "repository": { + "type": "git", + "url": "git://github.com/fent/ret.js.git" + }, + "author": "Roly Fentanes (https://github.com/fent)", + "main": "./lib/index.js", + "files": [ + "lib" + ], + "scripts": { + "test": "istanbul cover vows -- --spec test/*-test.js" + }, + "directories": { + "lib": "./lib" + }, + "devDependencies": { + "istanbul": "*", + "vows": "*" + }, + "engines": { + "node": ">=0.12" + }, + "license": "MIT" +} diff --git a/front/frontend/node_modules/safe-buffer/LICENSE b/front/frontend/node_modules/safe-buffer/LICENSE new file mode 100644 index 0000000..0c068ce --- /dev/null +++ b/front/frontend/node_modules/safe-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/safe-buffer/README.md b/front/frontend/node_modules/safe-buffer/README.md new file mode 100644 index 0000000..e9a81af --- /dev/null +++ b/front/frontend/node_modules/safe-buffer/README.md @@ -0,0 +1,584 @@ +# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg +[travis-url]: https://travis-ci.org/feross/safe-buffer +[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg +[npm-url]: https://npmjs.org/package/safe-buffer +[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg +[downloads-url]: https://npmjs.org/package/safe-buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### Safer Node.js Buffer API + +**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, +`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** + +**Uses the built-in implementation when available.** + +## install + +``` +npm install safe-buffer +``` + +## usage + +The goal of this package is to provide a safe replacement for the node.js `Buffer`. + +It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to +the top of your node.js modules: + +```js +var Buffer = require('safe-buffer').Buffer + +// Existing buffer code will continue to work without issues: + +new Buffer('hey', 'utf8') +new Buffer([1, 2, 3], 'utf8') +new Buffer(obj) +new Buffer(16) // create an uninitialized buffer (potentially unsafe) + +// But you can use these new explicit APIs to make clear what you want: + +Buffer.from('hey', 'utf8') // convert from many types to a Buffer +Buffer.alloc(16) // create a zero-filled buffer (safe) +Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) +``` + +## api + +### Class Method: Buffer.from(array) + + +* `array` {Array} + +Allocates a new `Buffer` using an `array` of octets. + +```js +const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); + // creates a new Buffer containing ASCII bytes + // ['b','u','f','f','e','r'] +``` + +A `TypeError` will be thrown if `array` is not an `Array`. + +### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) + + +* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or + a `new ArrayBuffer()` +* `byteOffset` {Number} Default: `0` +* `length` {Number} Default: `arrayBuffer.length - byteOffset` + +When passed a reference to the `.buffer` property of a `TypedArray` instance, +the newly created `Buffer` will share the same allocated memory as the +TypedArray. + +```js +const arr = new Uint16Array(2); +arr[0] = 5000; +arr[1] = 4000; + +const buf = Buffer.from(arr.buffer); // shares the memory with arr; + +console.log(buf); + // Prints: + +// changing the TypedArray changes the Buffer also +arr[1] = 6000; + +console.log(buf); + // Prints: +``` + +The optional `byteOffset` and `length` arguments specify a memory range within +the `arrayBuffer` that will be shared by the `Buffer`. + +```js +const ab = new ArrayBuffer(10); +const buf = Buffer.from(ab, 0, 2); +console.log(buf.length); + // Prints: 2 +``` + +A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. + +### Class Method: Buffer.from(buffer) + + +* `buffer` {Buffer} + +Copies the passed `buffer` data onto a new `Buffer` instance. + +```js +const buf1 = Buffer.from('buffer'); +const buf2 = Buffer.from(buf1); + +buf1[0] = 0x61; +console.log(buf1.toString()); + // 'auffer' +console.log(buf2.toString()); + // 'buffer' (copy is not changed) +``` + +A `TypeError` will be thrown if `buffer` is not a `Buffer`. + +### Class Method: Buffer.from(str[, encoding]) + + +* `str` {String} String to encode. +* `encoding` {String} Encoding to use, Default: `'utf8'` + +Creates a new `Buffer` containing the given JavaScript string `str`. If +provided, the `encoding` parameter identifies the character encoding. +If not provided, `encoding` defaults to `'utf8'`. + +```js +const buf1 = Buffer.from('this is a tést'); +console.log(buf1.toString()); + // prints: this is a tést +console.log(buf1.toString('ascii')); + // prints: this is a tC)st + +const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); +console.log(buf2.toString()); + // prints: this is a tést +``` + +A `TypeError` will be thrown if `str` is not a string. + +### Class Method: Buffer.alloc(size[, fill[, encoding]]) + + +* `size` {Number} +* `fill` {Value} Default: `undefined` +* `encoding` {String} Default: `utf8` + +Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the +`Buffer` will be *zero-filled*. + +```js +const buf = Buffer.alloc(5); +console.log(buf); + // +``` + +The `size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +If `fill` is specified, the allocated `Buffer` will be initialized by calling +`buf.fill(fill)`. See [`buf.fill()`][] for more information. + +```js +const buf = Buffer.alloc(5, 'a'); +console.log(buf); + // +``` + +If both `fill` and `encoding` are specified, the allocated `Buffer` will be +initialized by calling `buf.fill(fill, encoding)`. For example: + +```js +const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); +console.log(buf); + // +``` + +Calling `Buffer.alloc(size)` can be significantly slower than the alternative +`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance +contents will *never contain sensitive data*. + +A `TypeError` will be thrown if `size` is not a number. + +### Class Method: Buffer.allocUnsafe(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must +be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit +architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is +thrown. A zero-length Buffer will be created if a `size` less than or equal to +0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +```js +const buf = Buffer.allocUnsafe(5); +console.log(buf); + // + // (octets will be different, every time) +buf.fill(0); +console.log(buf); + // +``` + +A `TypeError` will be thrown if `size` is not a number. + +Note that the `Buffer` module pre-allocates an internal `Buffer` instance of +size `Buffer.poolSize` that is used as a pool for the fast allocation of new +`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated +`new Buffer(size)` constructor) only when `size` is less than or equal to +`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default +value of `Buffer.poolSize` is `8192` but can be modified. + +Use of this pre-allocated internal memory pool is a key difference between +calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. +Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer +pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal +Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The +difference is subtle but can be important when an application requires the +additional performance that `Buffer.allocUnsafe(size)` provides. + +### Class Method: Buffer.allocUnsafeSlow(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The +`size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, +allocations under 4KB are, by default, sliced from a single pre-allocated +`Buffer`. This allows applications to avoid the garbage collection overhead of +creating many individually allocated Buffers. This approach improves both +performance and memory usage by eliminating the need to track and cleanup as +many `Persistent` objects. + +However, in the case where a developer may need to retain a small chunk of +memory from a pool for an indeterminate amount of time, it may be appropriate +to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then +copy out the relevant bits. + +```js +// need to keep around a few small chunks of memory +const store = []; + +socket.on('readable', () => { + const data = socket.read(); + // allocate for retained data + const sb = Buffer.allocUnsafeSlow(10); + // copy the data into the new allocation + data.copy(sb, 0, 0, 10); + store.push(sb); +}); +``` + +Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* +a developer has observed undue memory retention in their applications. + +A `TypeError` will be thrown if `size` is not a number. + +### All the Rest + +The rest of the `Buffer` API is exactly the same as in node.js. +[See the docs](https://nodejs.org/api/buffer.html). + + +## Related links + +- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) +- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) + +## Why is `Buffer` unsafe? + +Today, the node.js `Buffer` constructor is overloaded to handle many different argument +types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), +`ArrayBuffer`, and also `Number`. + +The API is optimized for convenience: you can throw any type at it, and it will try to do +what you want. + +Because the Buffer constructor is so powerful, you often see code like this: + +```js +// Convert UTF-8 strings to hex +function toHex (str) { + return new Buffer(str).toString('hex') +} +``` + +***But what happens if `toHex` is called with a `Number` argument?*** + +### Remote Memory Disclosure + +If an attacker can make your program call the `Buffer` constructor with a `Number` +argument, then they can make it allocate uninitialized memory from the node.js process. +This could potentially disclose TLS private keys, user data, or database passwords. + +When the `Buffer` constructor is passed a `Number` argument, it returns an +**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like +this, you **MUST** overwrite the contents before returning it to the user. + +From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): + +> `new Buffer(size)` +> +> - `size` Number +> +> The underlying memory for `Buffer` instances created in this way is not initialized. +> **The contents of a newly created `Buffer` are unknown and could contain sensitive +> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. + +(Emphasis our own.) + +Whenever the programmer intended to create an uninitialized `Buffer` you often see code +like this: + +```js +var buf = new Buffer(16) + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### Would this ever be a problem in real code? + +Yes. It's surprisingly common to forget to check the type of your variables in a +dynamically-typed language like JavaScript. + +Usually the consequences of assuming the wrong type is that your program crashes with an +uncaught exception. But the failure mode for forgetting to check the type of arguments to +the `Buffer` constructor is more catastrophic. + +Here's an example of a vulnerable service that takes a JSON payload and converts it to +hex: + +```js +// Take a JSON payload {str: "some string"} and convert it to hex +var server = http.createServer(function (req, res) { + var data = '' + req.setEncoding('utf8') + req.on('data', function (chunk) { + data += chunk + }) + req.on('end', function () { + var body = JSON.parse(data) + res.end(new Buffer(body.str).toString('hex')) + }) +}) + +server.listen(8080) +``` + +In this example, an http client just has to send: + +```json +{ + "str": 1000 +} +``` + +and it will get back 1,000 bytes of uninitialized memory from the server. + +This is a very serious bug. It's similar in severity to the +[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process +memory by remote attackers. + + +### Which real-world packages were vulnerable? + +#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) + +[Mathias Buus](https://github.com/mafintosh) and I +([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, +[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow +anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get +them to reveal 20 bytes at a time of uninitialized memory from the node.js process. + +Here's +[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) +that fixed it. We released a new fixed version, created a +[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all +vulnerable versions on npm so users will get a warning to upgrade to a newer version. + +#### [`ws`](https://www.npmjs.com/package/ws) + +That got us wondering if there were other vulnerable packages. Sure enough, within a short +period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the +most popular WebSocket implementation in node.js. + +If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as +expected, then uninitialized server memory would be disclosed to the remote peer. + +These were the vulnerable methods: + +```js +socket.send(number) +socket.ping(number) +socket.pong(number) +``` + +Here's a vulnerable socket server with some echo functionality: + +```js +server.on('connection', function (socket) { + socket.on('message', function (message) { + message = JSON.parse(message) + if (message.type === 'echo') { + socket.send(message.data) // send back the user's message + } + }) +}) +``` + +`socket.send(number)` called on the server, will disclose server memory. + +Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue +was fixed, with a more detailed explanation. Props to +[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the +[Node Security Project disclosure](https://nodesecurity.io/advisories/67). + + +### What's the solution? + +It's important that node.js offers a fast way to get memory otherwise performance-critical +applications would needlessly get a lot slower. + +But we need a better way to *signal our intent* as programmers. **When we want +uninitialized memory, we should request it explicitly.** + +Sensitive functionality should not be packed into a developer-friendly API that loosely +accepts many different types. This type of API encourages the lazy practice of passing +variables in without checking the type very carefully. + +#### A new API: `Buffer.allocUnsafe(number)` + +The functionality of creating buffers with uninitialized memory should be part of another +API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that +frequently gets user input of all sorts of different types passed into it. + +```js +var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### How do we fix node.js core? + +We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as +`semver-major`) which defends against one case: + +```js +var str = 16 +new Buffer(str, 'utf8') +``` + +In this situation, it's implied that the programmer intended the first argument to be a +string, since they passed an encoding as a second argument. Today, node.js will allocate +uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not +what the programmer intended. + +But this is only a partial solution, since if the programmer does `new Buffer(variable)` +(without an `encoding` parameter) there's no way to know what they intended. If `variable` +is sometimes a number, then uninitialized memory will sometimes be returned. + +### What's the real long-term fix? + +We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when +we need uninitialized memory. But that would break 1000s of packages. + +~~We believe the best solution is to:~~ + +~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ + +~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ + +#### Update + +We now support adding three new APIs: + +- `Buffer.from(value)` - convert from any type to a buffer +- `Buffer.alloc(size)` - create a zero-filled buffer +- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size + +This solves the core problem that affected `ws` and `bittorrent-dht` which is +`Buffer(variable)` getting tricked into taking a number argument. + +This way, existing code continues working and the impact on the npm ecosystem will be +minimal. Over time, npm maintainers can migrate performance-critical code to use +`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. + + +### Conclusion + +We think there's a serious design issue with the `Buffer` API as it exists today. It +promotes insecure software by putting high-risk functionality into a convenient API +with friendly "developer ergonomics". + +This wasn't merely a theoretical exercise because we found the issue in some of the +most popular npm packages. + +Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of +`buffer`. + +```js +var Buffer = require('safe-buffer').Buffer +``` + +Eventually, we hope that node.js core can switch to this new, safer behavior. We believe +the impact on the ecosystem would be minimal since it's not a breaking change. +Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while +older, insecure packages would magically become safe from this attack vector. + + +## links + +- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) +- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) +- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) + + +## credit + +The original issues in `bittorrent-dht` +([disclosure](https://nodesecurity.io/advisories/68)) and +`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by +[Mathias Buus](https://github.com/mafintosh) and +[Feross Aboukhadijeh](http://feross.org/). + +Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues +and for his work running the [Node Security Project](https://nodesecurity.io/). + +Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and +auditing the code. + + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/front/frontend/node_modules/safe-buffer/index.d.ts b/front/frontend/node_modules/safe-buffer/index.d.ts new file mode 100644 index 0000000..e9fed80 --- /dev/null +++ b/front/frontend/node_modules/safe-buffer/index.d.ts @@ -0,0 +1,187 @@ +declare module "safe-buffer" { + export class Buffer { + length: number + write(string: string, offset?: number, length?: number, encoding?: string): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer', data: any[] }; + equals(otherBuffer: Buffer): boolean; + compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + slice(start?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readUInt8(offset: number, noAssert?: boolean): number; + readUInt16LE(offset: number, noAssert?: boolean): number; + readUInt16BE(offset: number, noAssert?: boolean): number; + readUInt32LE(offset: number, noAssert?: boolean): number; + readUInt32BE(offset: number, noAssert?: boolean): number; + readInt8(offset: number, noAssert?: boolean): number; + readInt16LE(offset: number, noAssert?: boolean): number; + readInt16BE(offset: number, noAssert?: boolean): number; + readInt32LE(offset: number, noAssert?: boolean): number; + readInt32BE(offset: number, noAssert?: boolean): number; + readFloatLE(offset: number, noAssert?: boolean): number; + readFloatBE(offset: number, noAssert?: boolean): number; + readDoubleLE(offset: number, noAssert?: boolean): number; + readDoubleBE(offset: number, noAssert?: boolean): number; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number, noAssert?: boolean): number; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeInt8(value: number, offset: number, noAssert?: boolean): number; + writeInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeFloatLE(value: number, offset: number, noAssert?: boolean): number; + writeFloatBE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; + fill(value: any, offset?: number, end?: number): this; + indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + */ + constructor (str: string, encoding?: string); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + constructor (size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + constructor (arrayBuffer: ArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + constructor (buffer: Buffer); + prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + * + * @param array + */ + static from(array: any[]): Buffer; + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() + * @param byteOffset + * @param length + */ + static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + * + * @param buffer + */ + static from(buffer: Buffer): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + * + * @param str + */ + static from(str: string, encoding?: string): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): boolean; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength(string: string, encoding?: string): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Buffer[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Buffer, buf2: Buffer): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initalizing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; + } +} \ No newline at end of file diff --git a/front/frontend/node_modules/safe-buffer/index.js b/front/frontend/node_modules/safe-buffer/index.js new file mode 100644 index 0000000..22438da --- /dev/null +++ b/front/frontend/node_modules/safe-buffer/index.js @@ -0,0 +1,62 @@ +/* eslint-disable node/no-deprecated-api */ +var buffer = require('buffer') +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} diff --git a/front/frontend/node_modules/safe-buffer/package.json b/front/frontend/node_modules/safe-buffer/package.json new file mode 100644 index 0000000..623fbc3 --- /dev/null +++ b/front/frontend/node_modules/safe-buffer/package.json @@ -0,0 +1,37 @@ +{ + "name": "safe-buffer", + "description": "Safer Node.js Buffer API", + "version": "5.1.2", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/safe-buffer/issues" + }, + "devDependencies": { + "standard": "*", + "tape": "^4.0.0" + }, + "homepage": "https://github.com/feross/safe-buffer", + "keywords": [ + "buffer", + "buffer allocate", + "node security", + "safe", + "safe-buffer", + "security", + "uninitialized" + ], + "license": "MIT", + "main": "index.js", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "git://github.com/feross/safe-buffer.git" + }, + "scripts": { + "test": "standard && tape test/*.js" + } +} diff --git a/front/frontend/node_modules/safe-regex/.travis.yml b/front/frontend/node_modules/safe-regex/.travis.yml new file mode 100644 index 0000000..cc4dba2 --- /dev/null +++ b/front/frontend/node_modules/safe-regex/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/front/frontend/node_modules/safe-regex/LICENSE b/front/frontend/node_modules/safe-regex/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/front/frontend/node_modules/safe-regex/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/safe-regex/example/safe.js b/front/frontend/node_modules/safe-regex/example/safe.js new file mode 100644 index 0000000..f486f59 --- /dev/null +++ b/front/frontend/node_modules/safe-regex/example/safe.js @@ -0,0 +1,3 @@ +var safe = require('../'); +var regex = process.argv.slice(2).join(' '); +console.log(safe(regex)); diff --git a/front/frontend/node_modules/safe-regex/index.js b/front/frontend/node_modules/safe-regex/index.js new file mode 100644 index 0000000..488f501 --- /dev/null +++ b/front/frontend/node_modules/safe-regex/index.js @@ -0,0 +1,43 @@ +var parse = require('ret'); +var types = parse.types; + +module.exports = function (re, opts) { + if (!opts) opts = {}; + var replimit = opts.limit === undefined ? 25 : opts.limit; + + if (isRegExp(re)) re = re.source; + else if (typeof re !== 'string') re = String(re); + + try { re = parse(re) } + catch (err) { return false } + + var reps = 0; + return (function walk (node, starHeight) { + if (node.type === types.REPETITION) { + starHeight ++; + reps ++; + if (starHeight > 1) return false; + if (reps > replimit) return false; + } + + if (node.options) { + for (var i = 0, len = node.options.length; i < len; i++) { + var ok = walk({ stack: node.options[i] }, starHeight); + if (!ok) return false; + } + } + var stack = node.stack || (node.value && node.value.stack); + if (!stack) return true; + + for (var i = 0; i < stack.length; i++) { + var ok = walk(stack[i], starHeight); + if (!ok) return false; + } + + return true; + })(re, 0); +}; + +function isRegExp (x) { + return {}.toString.call(x) === '[object RegExp]'; +} diff --git a/front/frontend/node_modules/safe-regex/package.json b/front/frontend/node_modules/safe-regex/package.json new file mode 100644 index 0000000..0dd631b --- /dev/null +++ b/front/frontend/node_modules/safe-regex/package.json @@ -0,0 +1,43 @@ +{ + "name": "safe-regex", + "version": "1.1.0", + "description": "detect possibly catastrophic, exponential-time regular expressions", + "main": "index.js", + "dependencies": { + "ret": "~0.1.10" + }, + "devDependencies": { + "tape": "^3.5.0" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8", "ie/9", "ie/10", + "firefox/latest", + "chrome/latest", + "opera/latest", + "safari/latest" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/safe-regex.git" + }, + "homepage": "https://github.com/substack/safe-regex", + "keywords": [ + "catastrophic", + "exponential", + "regex", + "safe", + "sandbox" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT" +} diff --git a/front/frontend/node_modules/safe-regex/readme.markdown b/front/frontend/node_modules/safe-regex/readme.markdown new file mode 100644 index 0000000..83673ac --- /dev/null +++ b/front/frontend/node_modules/safe-regex/readme.markdown @@ -0,0 +1,65 @@ +# safe-regex + +detect potentially +[catastrophic](http://regular-expressions.mobi/catastrophic.html) +[exponential-time](http://perlgeek.de/blog-en/perl-tips/in-search-of-an-exponetial-regexp.html) +regular expressions by limiting the +[star height](https://en.wikipedia.org/wiki/Star_height) to 1 + +WARNING: This module merely *seems* to work given all the catastrophic regular +expressions I could find scouring the internet, but I don't have enough of a +background in automata to be absolutely sure that this module will catch all +exponential-time cases. + +[![browser support](https://ci.testling.com/substack/safe-regex.png)](https://ci.testling.com/substack/safe-regex) + +[![build status](https://secure.travis-ci.org/substack/safe-regex.png)](http://travis-ci.org/substack/safe-regex) + +# example + +``` js +var safe = require('safe-regex'); +var regex = process.argv.slice(2).join(' '); +console.log(safe(regex)); +``` + +``` +$ node safe.js '(x+x+)+y' +false +$ node safe.js '(beep|boop)*' +true +$ node safe.js '(a+){10}' +false +$ node safe.js '\blocation\s*:[^:\n]+\b(Oakland|San Francisco)\b' +true +``` + +# methods + +``` js +var safe = require('safe-regex') +``` + +## var ok = safe(re, opts={}) + +Return a boolean `ok` whether or not the regex `re` is safe and not possibly +catastrophic. + +`re` can be a `RegExp` object or just a string. + +If the `re` is a string and is an invalid regex, returns `false`. + +* `opts.limit` - maximum number of allowed repetitions in the entire regex. +Default: `25`. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install safe-regex +``` + +# license + +MIT diff --git a/front/frontend/node_modules/safe-regex/test/regex.js b/front/frontend/node_modules/safe-regex/test/regex.js new file mode 100644 index 0000000..0bda850 --- /dev/null +++ b/front/frontend/node_modules/safe-regex/test/regex.js @@ -0,0 +1,50 @@ +var safe = require('../'); +var test = require('tape'); + +var good = [ + /\bOakland\b/, + /\b(Oakland|San Francisco)\b/i, + /^\d+1337\d+$/i, + /^\d+(1337|404)\d+$/i, + /^\d+(1337|404)*\d+$/i, + RegExp(Array(26).join('a?') + Array(26).join('a')), +]; + +test('safe regex', function (t) { + t.plan(good.length); + good.forEach(function (re) { + t.equal(safe(re), true); + }); +}); + + +var bad = [ + /^(a?){25}(a){25}$/, + RegExp(Array(27).join('a?') + Array(27).join('a')), + /(x+x+)+y/, + /foo|(x+x+)+y/, + /(a+){10}y/, + /(a+){2}y/, + /(.*){1,32000}[bc]/ +]; + +test('unsafe regex', function (t) { + t.plan(bad.length); + bad.forEach(function (re) { + t.equal(safe(re), false); + }); +}); + +var invalid = [ + '*Oakland*', + 'hey(yoo))', + 'abcde(?>hellow)', + '[abc' +]; + +test('invalid regex', function (t) { + t.plan(invalid.length); + invalid.forEach(function (re) { + t.equal(safe(re), false); + }); +}); diff --git a/front/frontend/node_modules/send/HISTORY.md b/front/frontend/node_modules/send/HISTORY.md new file mode 100644 index 0000000..958b934 --- /dev/null +++ b/front/frontend/node_modules/send/HISTORY.md @@ -0,0 +1,580 @@ +1.2.0 / 2025-03-27 +================== + + * deps: + * `mime-types@^3.0.1` + * `fresh@^2.0.0` + * removed `destroy` + * remove `getHeaderNames()` polyfill and refactor `clearHeaders()` + +1.1.0 / 2024-09-10 +================== + +* Changes from 0.19.0 + +1.0.0 / 2024-07-25 +================== + + * Drop support for Node.js <18.0 + * `statuses@^2.0.1` + * `range-parser@^1.2.1` + * `on-finished@^2.4.1` + * `ms@^2.1.3` + * `mime-types@^2.1.35` + * `http-errors@^2.0.0` + * `fresh@^0.5.2` + * `etag@^1.8.1` + * `escape-html@^1.0.3` + * `encodeurl@^2.0.0` + * `destroy@^1.2.0` + * `debug@^4.3.5` + +1.0.0-beta.2 / 2024-03-04 +========================= + + * Changes from 0.18.0 + +1.0.0-beta.1 / 2022-02-04 +========================= + + * Drop support for Node.js 0.8 + * Remove `hidden` option -- use `dotfiles` option + * Remove `from` alias to `root` -- use `root` directly + * Remove `send.etag()` -- use `etag` in `options` + * Remove `send.index()` -- use `index` in `options` + * Remove `send.maxage()` -- use `maxAge` in `options` + * Remove `send.root()` -- use `root` in `options` + * Use `mime-types` for file to content type mapping -- removed `send.mime` + * deps: debug@3.1.0 + - Add `DEBUG_HIDE_DATE` environment variable + - Change timer to per-namespace instead of global + - Change non-TTY date format + - Remove `DEBUG_FD` environment variable support + - Support 256 namespace colors + +0.19.0 / 2024-09-10 +=================== + +* Remove link renderization in html while redirecting + +0.18.0 / 2022-03-23 +=================== + + * Fix emitted 416 error missing headers property + * Limit the headers removed for 304 response + * deps: depd@2.0.0 + - Replace internal `eval` usage with `Function` constructor + - Use instance methods on `process` to check for listeners + * deps: destroy@1.2.0 + * deps: http-errors@2.0.0 + - deps: depd@2.0.0 + - deps: statuses@2.0.1 + * deps: on-finished@2.4.1 + * deps: statuses@2.0.1 + +0.17.2 / 2021-12-11 +=================== + + * pref: ignore empty http tokens + * deps: http-errors@1.8.1 + - deps: inherits@2.0.4 + - deps: toidentifier@1.0.1 + - deps: setprototypeof@1.2.0 + * deps: ms@2.1.3 + +0.17.1 / 2019-05-10 +=================== + + * Set stricter CSP header in redirect & error responses + * deps: range-parser@~1.2.1 + +0.17.0 / 2019-05-03 +=================== + + * deps: http-errors@~1.7.2 + - Set constructor name when possible + - Use `toidentifier` module to make class names + - deps: depd@~1.1.2 + - deps: setprototypeof@1.1.1 + - deps: statuses@'>= 1.5.0 < 2' + * deps: mime@1.6.0 + - Add extensions for JPEG-2000 images + - Add new `font/*` types from IANA + - Add WASM mapping + - Update `.bdoc` to `application/bdoc` + - Update `.bmp` to `image/bmp` + - Update `.m4a` to `audio/mp4` + - Update `.rtf` to `application/rtf` + - Update `.wav` to `audio/wav` + - Update `.xml` to `application/xml` + - Update generic extensions to `application/octet-stream`: + `.deb`, `.dll`, `.dmg`, `.exe`, `.iso`, `.msi` + - Use mime-score module to resolve extension conflicts + * deps: ms@2.1.1 + - Add `week`/`w` support + - Fix negative number handling + * deps: statuses@~1.5.0 + * perf: remove redundant `path.normalize` call + +0.16.2 / 2018-02-07 +=================== + + * Fix incorrect end tag in default error & redirects + * deps: depd@~1.1.2 + - perf: remove argument reassignment + * deps: encodeurl@~1.0.2 + - Fix encoding `%` as last character + * deps: statuses@~1.4.0 + +0.16.1 / 2017-09-29 +=================== + + * Fix regression in edge-case behavior for empty `path` + +0.16.0 / 2017-09-27 +=================== + + * Add `immutable` option + * Fix missing `` in default error & redirects + * Use instance methods on steam to check for listeners + * deps: mime@1.4.1 + - Add 70 new types for file extensions + - Set charset as "UTF-8" for .js and .json + * perf: improve path validation speed + +0.15.6 / 2017-09-22 +=================== + + * deps: debug@2.6.9 + * perf: improve `If-Match` token parsing + +0.15.5 / 2017-09-20 +=================== + + * deps: etag@~1.8.1 + - perf: replace regular expression with substring + * deps: fresh@0.5.2 + - Fix handling of modified headers with invalid dates + - perf: improve ETag match loop + - perf: improve `If-None-Match` token parsing + +0.15.4 / 2017-08-05 +=================== + + * deps: debug@2.6.8 + * deps: depd@~1.1.1 + - Remove unnecessary `Buffer` loading + * deps: http-errors@~1.6.2 + - deps: depd@1.1.1 + +0.15.3 / 2017-05-16 +=================== + + * deps: debug@2.6.7 + - deps: ms@2.0.0 + * deps: ms@2.0.0 + +0.15.2 / 2017-04-26 +=================== + + * deps: debug@2.6.4 + - Fix `DEBUG_MAX_ARRAY_LENGTH` + - deps: ms@0.7.3 + * deps: ms@1.0.0 + +0.15.1 / 2017-03-04 +=================== + + * Fix issue when `Date.parse` does not return `NaN` on invalid date + * Fix strict violation in broken environments + +0.15.0 / 2017-02-25 +=================== + + * Support `If-Match` and `If-Unmodified-Since` headers + * Add `res` and `path` arguments to `directory` event + * Remove usage of `res._headers` private field + - Improves compatibility with Node.js 8 nightly + * Send complete HTML document in redirect & error responses + * Set default CSP header in redirect & error responses + * Use `res.getHeaderNames()` when available + * Use `res.headersSent` when available + * deps: debug@2.6.1 + - Allow colors in workers + - Deprecated `DEBUG_FD` environment variable set to `3` or higher + - Fix error when running under React Native + - Use same color for same namespace + - deps: ms@0.7.2 + * deps: etag@~1.8.0 + * deps: fresh@0.5.0 + - Fix false detection of `no-cache` request directive + - Fix incorrect result when `If-None-Match` has both `*` and ETags + - Fix weak `ETag` matching to match spec + - perf: delay reading header values until needed + - perf: enable strict mode + - perf: hoist regular expressions + - perf: remove duplicate conditional + - perf: remove unnecessary boolean coercions + - perf: skip checking modified time if ETag check failed + - perf: skip parsing `If-None-Match` when no `ETag` header + - perf: use `Date.parse` instead of `new Date` + * deps: http-errors@~1.6.1 + - Make `message` property enumerable for `HttpError`s + - deps: setprototypeof@1.0.3 + +0.14.2 / 2017-01-23 +=================== + + * deps: http-errors@~1.5.1 + - deps: inherits@2.0.3 + - deps: setprototypeof@1.0.2 + - deps: statuses@'>= 1.3.1 < 2' + * deps: ms@0.7.2 + * deps: statuses@~1.3.1 + +0.14.1 / 2016-06-09 +=================== + + * Fix redirect error when `path` contains raw non-URL characters + * Fix redirect when `path` starts with multiple forward slashes + +0.14.0 / 2016-06-06 +=================== + + * Add `acceptRanges` option + * Add `cacheControl` option + * Attempt to combine multiple ranges into single range + * Correctly inherit from `Stream` class + * Fix `Content-Range` header in 416 responses when using `start`/`end` options + * Fix `Content-Range` header missing from default 416 responses + * Ignore non-byte `Range` headers + * deps: http-errors@~1.5.0 + - Add `HttpError` export, for `err instanceof createError.HttpError` + - Support new code `421 Misdirected Request` + - Use `setprototypeof` module to replace `__proto__` setting + - deps: inherits@2.0.1 + - deps: statuses@'>= 1.3.0 < 2' + - perf: enable strict mode + * deps: range-parser@~1.2.0 + - Fix incorrectly returning -1 when there is at least one valid range + - perf: remove internal function + * deps: statuses@~1.3.0 + - Add `421 Misdirected Request` + - perf: enable strict mode + * perf: remove argument reassignment + +0.13.2 / 2016-03-05 +=================== + + * Fix invalid `Content-Type` header when `send.mime.default_type` unset + +0.13.1 / 2016-01-16 +=================== + + * deps: depd@~1.1.0 + - Support web browser loading + - perf: enable strict mode + * deps: destroy@~1.0.4 + - perf: enable strict mode + * deps: escape-html@~1.0.3 + - perf: enable strict mode + - perf: optimize string replacement + - perf: use faster string coercion + * deps: range-parser@~1.0.3 + - perf: enable strict mode + +0.13.0 / 2015-06-16 +=================== + + * Allow Node.js HTTP server to set `Date` response header + * Fix incorrectly removing `Content-Location` on 304 response + * Improve the default redirect response headers + * Send appropriate headers on default error response + * Use `http-errors` for standard emitted errors + * Use `statuses` instead of `http` module for status messages + * deps: escape-html@1.0.2 + * deps: etag@~1.7.0 + - Improve stat performance by removing hashing + * deps: fresh@0.3.0 + - Add weak `ETag` matching support + * deps: on-finished@~2.3.0 + - Add defined behavior for HTTP `CONNECT` requests + - Add defined behavior for HTTP `Upgrade` requests + - deps: ee-first@1.1.1 + * perf: enable strict mode + * perf: remove unnecessary array allocations + +0.12.3 / 2015-05-13 +=================== + + * deps: debug@~2.2.0 + - deps: ms@0.7.1 + * deps: depd@~1.0.1 + * deps: etag@~1.6.0 + - Improve support for JXcore + - Support "fake" stats objects in environments without `fs` + * deps: ms@0.7.1 + - Prevent extraordinarily long inputs + * deps: on-finished@~2.2.1 + +0.12.2 / 2015-03-13 +=================== + + * Throw errors early for invalid `extensions` or `index` options + * deps: debug@~2.1.3 + - Fix high intensity foreground color for bold + - deps: ms@0.7.0 + +0.12.1 / 2015-02-17 +=================== + + * Fix regression sending zero-length files + +0.12.0 / 2015-02-16 +=================== + + * Always read the stat size from the file + * Fix mutating passed-in `options` + * deps: mime@1.3.4 + +0.11.1 / 2015-01-20 +=================== + + * Fix `root` path disclosure + +0.11.0 / 2015-01-05 +=================== + + * deps: debug@~2.1.1 + * deps: etag@~1.5.1 + - deps: crc@3.2.1 + * deps: ms@0.7.0 + - Add `milliseconds` + - Add `msecs` + - Add `secs` + - Add `mins` + - Add `hrs` + - Add `yrs` + * deps: on-finished@~2.2.0 + +0.10.1 / 2014-10-22 +=================== + + * deps: on-finished@~2.1.1 + - Fix handling of pipelined requests + +0.10.0 / 2014-10-15 +=================== + + * deps: debug@~2.1.0 + - Implement `DEBUG_FD` env variable support + * deps: depd@~1.0.0 + * deps: etag@~1.5.0 + - Improve string performance + - Slightly improve speed for weak ETags over 1KB + +0.9.3 / 2014-09-24 +================== + + * deps: etag@~1.4.0 + - Support "fake" stats objects + +0.9.2 / 2014-09-15 +================== + + * deps: depd@0.4.5 + * deps: etag@~1.3.1 + * deps: range-parser@~1.0.2 + +0.9.1 / 2014-09-07 +================== + + * deps: fresh@0.2.4 + +0.9.0 / 2014-09-07 +================== + + * Add `lastModified` option + * Use `etag` to generate `ETag` header + * deps: debug@~2.0.0 + +0.8.5 / 2014-09-04 +================== + + * Fix malicious path detection for empty string path + +0.8.4 / 2014-09-04 +================== + + * Fix a path traversal issue when using `root` + +0.8.3 / 2014-08-16 +================== + + * deps: destroy@1.0.3 + - renamed from dethroy + * deps: on-finished@2.1.0 + +0.8.2 / 2014-08-14 +================== + + * Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` + * deps: dethroy@1.0.2 + +0.8.1 / 2014-08-05 +================== + + * Fix `extensions` behavior when file already has extension + +0.8.0 / 2014-08-05 +================== + + * Add `extensions` option + +0.7.4 / 2014-08-04 +================== + + * Fix serving index files without root dir + +0.7.3 / 2014-07-29 +================== + + * Fix incorrect 403 on Windows and Node.js 0.11 + +0.7.2 / 2014-07-27 +================== + + * deps: depd@0.4.4 + - Work-around v8 generating empty stack traces + +0.7.1 / 2014-07-26 +================== + + * deps: depd@0.4.3 + - Fix exception when global `Error.stackTraceLimit` is too low + +0.7.0 / 2014-07-20 +================== + + * Deprecate `hidden` option; use `dotfiles` option + * Add `dotfiles` option + * deps: debug@1.0.4 + * deps: depd@0.4.2 + - Add `TRACE_DEPRECATION` environment variable + - Remove non-standard grey color from color output + - Support `--no-deprecation` argument + - Support `--trace-deprecation` argument + +0.6.0 / 2014-07-11 +================== + + * Deprecate `from` option; use `root` option + * Deprecate `send.etag()` -- use `etag` in `options` + * Deprecate `send.hidden()` -- use `hidden` in `options` + * Deprecate `send.index()` -- use `index` in `options` + * Deprecate `send.maxage()` -- use `maxAge` in `options` + * Deprecate `send.root()` -- use `root` in `options` + * Cap `maxAge` value to 1 year + * deps: debug@1.0.3 + - Add support for multiple wildcards in namespaces + +0.5.0 / 2014-06-28 +================== + + * Accept string for `maxAge` (converted by `ms`) + * Add `headers` event + * Include link in default redirect response + * Use `EventEmitter.listenerCount` to count listeners + +0.4.3 / 2014-06-11 +================== + + * Do not throw un-catchable error on file open race condition + * Use `escape-html` for HTML escaping + * deps: debug@1.0.2 + - fix some debugging output colors on node.js 0.8 + * deps: finished@1.2.2 + * deps: fresh@0.2.2 + +0.4.2 / 2014-06-09 +================== + + * fix "event emitter leak" warnings + * deps: debug@1.0.1 + * deps: finished@1.2.1 + +0.4.1 / 2014-06-02 +================== + + * Send `max-age` in `Cache-Control` in correct format + +0.4.0 / 2014-05-27 +================== + + * Calculate ETag with md5 for reduced collisions + * Fix wrong behavior when index file matches directory + * Ignore stream errors after request ends + - Goodbye `EBADF, read` + * Skip directories in index file search + * deps: debug@0.8.1 + +0.3.0 / 2014-04-24 +================== + + * Fix sending files with dots without root set + * Coerce option types + * Accept API options in options object + * Set etags to "weak" + * Include file path in etag + * Make "Can't set headers after they are sent." catchable + * Send full entity-body for multi range requests + * Default directory access to 403 when index disabled + * Support multiple index paths + * Support "If-Range" header + * Control whether to generate etags + * deps: mime@1.2.11 + +0.2.0 / 2014-01-29 +================== + + * update range-parser and fresh + +0.1.4 / 2013-08-11 +================== + + * update fresh + +0.1.3 / 2013-07-08 +================== + + * Revert "Fix fd leak" + +0.1.2 / 2013-07-03 +================== + + * Fix fd leak + +0.1.0 / 2012-08-25 +================== + + * add options parameter to send() that is passed to fs.createReadStream() [kanongil] + +0.0.4 / 2012-08-16 +================== + + * allow custom "Accept-Ranges" definition + +0.0.3 / 2012-07-16 +================== + + * fix normalization of the root directory. Closes #3 + +0.0.2 / 2012-07-09 +================== + + * add passing of req explicitly for now (YUCK) + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/front/frontend/node_modules/send/LICENSE b/front/frontend/node_modules/send/LICENSE new file mode 100644 index 0000000..b6ea1c1 --- /dev/null +++ b/front/frontend/node_modules/send/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2012 TJ Holowaychuk +Copyright (c) 2014-2022 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/send/README.md b/front/frontend/node_modules/send/README.md new file mode 100644 index 0000000..350fccd --- /dev/null +++ b/front/frontend/node_modules/send/README.md @@ -0,0 +1,317 @@ +# send + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![CI][github-actions-ci-image]][github-actions-ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Send is a library for streaming files from the file system as a http response +supporting partial responses (Ranges), conditional-GET negotiation (If-Match, +If-Unmodified-Since, If-None-Match, If-Modified-Since), high test coverage, +and granular events which may be leveraged to take appropriate actions in your +application or framework. + +Looking to serve up entire folders mapped to URLs? Try [serve-static](https://www.npmjs.org/package/serve-static). + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```bash +$ npm install send +``` + +## API + +```js +var send = require('send') +``` + +### send(req, path, [options]) + +Create a new `SendStream` for the given path to send to a `res`. The `req` is +the Node.js HTTP request and the `path` is a urlencoded path to send (urlencoded, +not the actual file-system path). + +#### Options + +##### acceptRanges + +Enable or disable accepting ranged requests, defaults to true. +Disabling this will not send `Accept-Ranges` and ignore the contents +of the `Range` request header. + +##### cacheControl + +Enable or disable setting `Cache-Control` response header, defaults to +true. Disabling this will ignore the `immutable` and `maxAge` options. + +##### dotfiles + +Set how "dotfiles" are treated when encountered. A dotfile is a file +or directory that begins with a dot ("."). Note this check is done on +the path itself without checking if the path actually exists on the +disk. If `root` is specified, only the dotfiles above the root are +checked (i.e. the root itself can be within a dotfile when set +to "deny"). + + - `'allow'` No special treatment for dotfiles. + - `'deny'` Send a 403 for any request for a dotfile. + - `'ignore'` Pretend like the dotfile does not exist and 404. + +The default value is _similar_ to `'ignore'`, with the exception that +this default will not ignore the files within a directory that begins +with a dot, for backward-compatibility. + +##### end + +Byte offset at which the stream ends, defaults to the length of the file +minus 1. The end is inclusive in the stream, meaning `end: 3` will include +the 4th byte in the stream. + +##### etag + +Enable or disable etag generation, defaults to true. + +##### extensions + +If a given file doesn't exist, try appending one of the given extensions, +in the given order. By default, this is disabled (set to `false`). An +example value that will serve extension-less HTML files: `['html', 'htm']`. +This is skipped if the requested file already has an extension. + +##### immutable + +Enable or disable the `immutable` directive in the `Cache-Control` response +header, defaults to `false`. If set to `true`, the `maxAge` option should +also be specified to enable caching. The `immutable` directive will prevent +supported clients from making conditional requests during the life of the +`maxAge` option to check if the file has changed. + +##### index + +By default send supports "index.html" files, to disable this +set `false` or to supply a new index pass a string or an array +in preferred order. + +##### lastModified + +Enable or disable `Last-Modified` header, defaults to true. Uses the file +system's last modified value. + +##### maxAge + +Provide a max-age in milliseconds for http caching, defaults to 0. +This can also be a string accepted by the +[ms](https://www.npmjs.org/package/ms#readme) module. + +##### root + +Serve files relative to `path`. + +##### start + +Byte offset at which the stream starts, defaults to 0. The start is inclusive, +meaning `start: 2` will include the 3rd byte in the stream. + +#### Events + +The `SendStream` is an event emitter and will emit the following events: + + - `error` an error occurred `(err)` + - `directory` a directory was requested `(res, path)` + - `file` a file was requested `(path, stat)` + - `headers` the headers are about to be set on a file `(res, path, stat)` + - `stream` file streaming has started `(stream)` + - `end` streaming has completed + +#### .pipe + +The `pipe` method is used to pipe the response into the Node.js HTTP response +object, typically `send(req, path, options).pipe(res)`. + +## Error-handling + +By default when no `error` listeners are present an automatic response will be +made, otherwise you have full control over the response, aka you may show a 5xx +page etc. + +## Caching + +It does _not_ perform internal caching, you should use a reverse proxy cache +such as Varnish for this, or those fancy things called CDNs. If your +application is small enough that it would benefit from single-node memory +caching, it's small enough that it does not need caching at all ;). + +## Debugging + +To enable `debug()` instrumentation output export __DEBUG__: + +``` +$ DEBUG=send node app +``` + +## Running tests + +``` +$ npm install +$ npm test +``` + +## Examples + +### Serve a specific file + +This simple example will send a specific file to all requests. + +```js +var http = require('http') +var send = require('send') + +var server = http.createServer(function onRequest (req, res) { + send(req, '/path/to/index.html') + .pipe(res) +}) + +server.listen(3000) +``` + +### Serve all files from a directory + +This simple example will just serve up all the files in a +given directory as the top-level. For example, a request +`GET /foo.txt` will send back `/www/public/foo.txt`. + +```js +var http = require('http') +var parseUrl = require('parseurl') +var send = require('send') + +var server = http.createServer(function onRequest (req, res) { + send(req, parseUrl(req).pathname, { root: '/www/public' }) + .pipe(res) +}) + +server.listen(3000) +``` + +### Custom file types + +```js +var extname = require('path').extname +var http = require('http') +var parseUrl = require('parseurl') +var send = require('send') + +var server = http.createServer(function onRequest (req, res) { + send(req, parseUrl(req).pathname, { root: '/www/public' }) + .on('headers', function (res, path) { + switch (extname(path)) { + case '.x-mt': + case '.x-mtt': + // custom type for these extensions + res.setHeader('Content-Type', 'application/x-my-type') + break + } + }) + .pipe(res) +}) + +server.listen(3000) +``` + +### Custom directory index view + +This is an example of serving up a structure of directories with a +custom function to render a listing of a directory. + +```js +var http = require('http') +var fs = require('fs') +var parseUrl = require('parseurl') +var send = require('send') + +// Transfer arbitrary files from within /www/example.com/public/* +// with a custom handler for directory listing +var server = http.createServer(function onRequest (req, res) { + send(req, parseUrl(req).pathname, { index: false, root: '/www/public' }) + .once('directory', directory) + .pipe(res) +}) + +server.listen(3000) + +// Custom directory handler +function directory (res, path) { + var stream = this + + // redirect to trailing slash for consistent url + if (!stream.hasTrailingSlash()) { + return stream.redirect(path) + } + + // get directory list + fs.readdir(path, function onReaddir (err, list) { + if (err) return stream.error(err) + + // render an index for the directory + res.setHeader('Content-Type', 'text/plain; charset=UTF-8') + res.end(list.join('\n') + '\n') + }) +} +``` + +### Serving from a root directory with custom error-handling + +```js +var http = require('http') +var parseUrl = require('parseurl') +var send = require('send') + +var server = http.createServer(function onRequest (req, res) { + // your custom error-handling logic: + function error (err) { + res.statusCode = err.status || 500 + res.end(err.message) + } + + // your custom headers + function headers (res, path, stat) { + // serve all files for download + res.setHeader('Content-Disposition', 'attachment') + } + + // your custom directory handling logic: + function redirect () { + res.statusCode = 301 + res.setHeader('Location', req.url + '/') + res.end('Redirecting to ' + req.url + '/') + } + + // transfer arbitrary files from within + // /www/example.com/public/* + send(req, parseUrl(req).pathname, { root: '/www/public' }) + .on('error', error) + .on('directory', redirect) + .on('headers', headers) + .pipe(res) +}) + +server.listen(3000) +``` + +## License + +[MIT](LICENSE) + +[coveralls-image]: https://badgen.net/coveralls/c/github/pillarjs/send/master +[coveralls-url]: https://coveralls.io/r/pillarjs/send?branch=master +[github-actions-ci-image]: https://badgen.net/github/checks/pillarjs/send/master?label=linux +[github-actions-ci-url]: https://github.com/pillarjs/send/actions/workflows/ci.yml +[node-image]: https://badgen.net/npm/node/send +[node-url]: https://nodejs.org/en/download/ +[npm-downloads-image]: https://badgen.net/npm/dm/send +[npm-url]: https://npmjs.org/package/send +[npm-version-image]: https://badgen.net/npm/v/send diff --git a/front/frontend/node_modules/send/index.js b/front/frontend/node_modules/send/index.js new file mode 100644 index 0000000..1655053 --- /dev/null +++ b/front/frontend/node_modules/send/index.js @@ -0,0 +1,997 @@ +/*! + * send + * Copyright(c) 2012 TJ Holowaychuk + * Copyright(c) 2014-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var createError = require('http-errors') +var debug = require('debug')('send') +var encodeUrl = require('encodeurl') +var escapeHtml = require('escape-html') +var etag = require('etag') +var fresh = require('fresh') +var fs = require('fs') +var mime = require('mime-types') +var ms = require('ms') +var onFinished = require('on-finished') +var parseRange = require('range-parser') +var path = require('path') +var statuses = require('statuses') +var Stream = require('stream') +var util = require('util') + +/** + * Path function references. + * @private + */ + +var extname = path.extname +var join = path.join +var normalize = path.normalize +var resolve = path.resolve +var sep = path.sep + +/** + * Regular expression for identifying a bytes Range header. + * @private + */ + +var BYTES_RANGE_REGEXP = /^ *bytes=/ + +/** + * Maximum value allowed for the max age. + * @private + */ + +var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1000 // 1 year + +/** + * Regular expression to match a path with a directory up component. + * @private + */ + +var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/ + +/** + * Module exports. + * @public + */ + +module.exports = send + +/** + * Return a `SendStream` for `req` and `path`. + * + * @param {object} req + * @param {string} path + * @param {object} [options] + * @return {SendStream} + * @public + */ + +function send (req, path, options) { + return new SendStream(req, path, options) +} + +/** + * Initialize a `SendStream` with the given `path`. + * + * @param {Request} req + * @param {String} path + * @param {object} [options] + * @private + */ + +function SendStream (req, path, options) { + Stream.call(this) + + var opts = options || {} + + this.options = opts + this.path = path + this.req = req + + this._acceptRanges = opts.acceptRanges !== undefined + ? Boolean(opts.acceptRanges) + : true + + this._cacheControl = opts.cacheControl !== undefined + ? Boolean(opts.cacheControl) + : true + + this._etag = opts.etag !== undefined + ? Boolean(opts.etag) + : true + + this._dotfiles = opts.dotfiles !== undefined + ? opts.dotfiles + : 'ignore' + + if (this._dotfiles !== 'ignore' && this._dotfiles !== 'allow' && this._dotfiles !== 'deny') { + throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"') + } + + this._extensions = opts.extensions !== undefined + ? normalizeList(opts.extensions, 'extensions option') + : [] + + this._immutable = opts.immutable !== undefined + ? Boolean(opts.immutable) + : false + + this._index = opts.index !== undefined + ? normalizeList(opts.index, 'index option') + : ['index.html'] + + this._lastModified = opts.lastModified !== undefined + ? Boolean(opts.lastModified) + : true + + this._maxage = opts.maxAge || opts.maxage + this._maxage = typeof this._maxage === 'string' + ? ms(this._maxage) + : Number(this._maxage) + this._maxage = !isNaN(this._maxage) + ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) + : 0 + + this._root = opts.root + ? resolve(opts.root) + : null +} + +/** + * Inherits from `Stream`. + */ + +util.inherits(SendStream, Stream) + +/** + * Emit error with `status`. + * + * @param {number} status + * @param {Error} [err] + * @private + */ + +SendStream.prototype.error = function error (status, err) { + // emit if listeners instead of responding + if (hasListeners(this, 'error')) { + return this.emit('error', createHttpError(status, err)) + } + + var res = this.res + var msg = statuses.message[status] || String(status) + var doc = createHtmlDocument('Error', escapeHtml(msg)) + + // clear existing headers + clearHeaders(res) + + // add error headers + if (err && err.headers) { + setHeaders(res, err.headers) + } + + // send basic response + res.statusCode = status + res.setHeader('Content-Type', 'text/html; charset=UTF-8') + res.setHeader('Content-Length', Buffer.byteLength(doc)) + res.setHeader('Content-Security-Policy', "default-src 'none'") + res.setHeader('X-Content-Type-Options', 'nosniff') + res.end(doc) +} + +/** + * Check if the pathname ends with "/". + * + * @return {boolean} + * @private + */ + +SendStream.prototype.hasTrailingSlash = function hasTrailingSlash () { + return this.path[this.path.length - 1] === '/' +} + +/** + * Check if this is a conditional GET request. + * + * @return {Boolean} + * @api private + */ + +SendStream.prototype.isConditionalGET = function isConditionalGET () { + return this.req.headers['if-match'] || + this.req.headers['if-unmodified-since'] || + this.req.headers['if-none-match'] || + this.req.headers['if-modified-since'] +} + +/** + * Check if the request preconditions failed. + * + * @return {boolean} + * @private + */ + +SendStream.prototype.isPreconditionFailure = function isPreconditionFailure () { + var req = this.req + var res = this.res + + // if-match + var match = req.headers['if-match'] + if (match) { + var etag = res.getHeader('ETag') + return !etag || (match !== '*' && parseTokenList(match).every(function (match) { + return match !== etag && match !== 'W/' + etag && 'W/' + match !== etag + })) + } + + // if-unmodified-since + var unmodifiedSince = parseHttpDate(req.headers['if-unmodified-since']) + if (!isNaN(unmodifiedSince)) { + var lastModified = parseHttpDate(res.getHeader('Last-Modified')) + return isNaN(lastModified) || lastModified > unmodifiedSince + } + + return false +} + +/** + * Strip various content header fields for a change in entity. + * + * @private + */ + +SendStream.prototype.removeContentHeaderFields = function removeContentHeaderFields () { + var res = this.res + + res.removeHeader('Content-Encoding') + res.removeHeader('Content-Language') + res.removeHeader('Content-Length') + res.removeHeader('Content-Range') + res.removeHeader('Content-Type') +} + +/** + * Respond with 304 not modified. + * + * @api private + */ + +SendStream.prototype.notModified = function notModified () { + var res = this.res + debug('not modified') + this.removeContentHeaderFields() + res.statusCode = 304 + res.end() +} + +/** + * Raise error that headers already sent. + * + * @api private + */ + +SendStream.prototype.headersAlreadySent = function headersAlreadySent () { + var err = new Error('Can\'t set headers after they are sent.') + debug('headers already sent') + this.error(500, err) +} + +/** + * Check if the request is cacheable, aka + * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}). + * + * @return {Boolean} + * @api private + */ + +SendStream.prototype.isCachable = function isCachable () { + var statusCode = this.res.statusCode + return (statusCode >= 200 && statusCode < 300) || + statusCode === 304 +} + +/** + * Handle stat() error. + * + * @param {Error} error + * @private + */ + +SendStream.prototype.onStatError = function onStatError (error) { + switch (error.code) { + case 'ENAMETOOLONG': + case 'ENOENT': + case 'ENOTDIR': + this.error(404, error) + break + default: + this.error(500, error) + break + } +} + +/** + * Check if the cache is fresh. + * + * @return {Boolean} + * @api private + */ + +SendStream.prototype.isFresh = function isFresh () { + return fresh(this.req.headers, { + etag: this.res.getHeader('ETag'), + 'last-modified': this.res.getHeader('Last-Modified') + }) +} + +/** + * Check if the range is fresh. + * + * @return {Boolean} + * @api private + */ + +SendStream.prototype.isRangeFresh = function isRangeFresh () { + var ifRange = this.req.headers['if-range'] + + if (!ifRange) { + return true + } + + // if-range as etag + if (ifRange.indexOf('"') !== -1) { + var etag = this.res.getHeader('ETag') + return Boolean(etag && ifRange.indexOf(etag) !== -1) + } + + // if-range as modified date + var lastModified = this.res.getHeader('Last-Modified') + return parseHttpDate(lastModified) <= parseHttpDate(ifRange) +} + +/** + * Redirect to path. + * + * @param {string} path + * @private + */ + +SendStream.prototype.redirect = function redirect (path) { + var res = this.res + + if (hasListeners(this, 'directory')) { + this.emit('directory', res, path) + return + } + + if (this.hasTrailingSlash()) { + this.error(403) + return + } + + var loc = encodeUrl(collapseLeadingSlashes(this.path + '/')) + var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc)) + + // redirect + res.statusCode = 301 + res.setHeader('Content-Type', 'text/html; charset=UTF-8') + res.setHeader('Content-Length', Buffer.byteLength(doc)) + res.setHeader('Content-Security-Policy', "default-src 'none'") + res.setHeader('X-Content-Type-Options', 'nosniff') + res.setHeader('Location', loc) + res.end(doc) +} + +/** + * Pipe to `res. + * + * @param {Stream} res + * @return {Stream} res + * @api public + */ + +SendStream.prototype.pipe = function pipe (res) { + // root path + var root = this._root + + // references + this.res = res + + // decode the path + var path = decode(this.path) + if (path === -1) { + this.error(400) + return res + } + + // null byte(s) + if (~path.indexOf('\0')) { + this.error(400) + return res + } + + var parts + if (root !== null) { + // normalize + if (path) { + path = normalize('.' + sep + path) + } + + // malicious path + if (UP_PATH_REGEXP.test(path)) { + debug('malicious path "%s"', path) + this.error(403) + return res + } + + // explode path parts + parts = path.split(sep) + + // join / normalize from optional root dir + path = normalize(join(root, path)) + } else { + // ".." is malicious without "root" + if (UP_PATH_REGEXP.test(path)) { + debug('malicious path "%s"', path) + this.error(403) + return res + } + + // explode path parts + parts = normalize(path).split(sep) + + // resolve the path + path = resolve(path) + } + + // dotfile handling + if (containsDotFile(parts)) { + debug('%s dotfile "%s"', this._dotfiles, path) + switch (this._dotfiles) { + case 'allow': + break + case 'deny': + this.error(403) + return res + case 'ignore': + default: + this.error(404) + return res + } + } + + // index file support + if (this._index.length && this.hasTrailingSlash()) { + this.sendIndex(path) + return res + } + + this.sendFile(path) + return res +} + +/** + * Transfer `path`. + * + * @param {String} path + * @api public + */ + +SendStream.prototype.send = function send (path, stat) { + var len = stat.size + var options = this.options + var opts = {} + var res = this.res + var req = this.req + var ranges = req.headers.range + var offset = options.start || 0 + + if (res.headersSent) { + // impossible to send now + this.headersAlreadySent() + return + } + + debug('pipe "%s"', path) + + // set header fields + this.setHeader(path, stat) + + // set content-type + this.type(path) + + // conditional GET support + if (this.isConditionalGET()) { + if (this.isPreconditionFailure()) { + this.error(412) + return + } + + if (this.isCachable() && this.isFresh()) { + this.notModified() + return + } + } + + // adjust len to start/end options + len = Math.max(0, len - offset) + if (options.end !== undefined) { + var bytes = options.end - offset + 1 + if (len > bytes) len = bytes + } + + // Range support + if (this._acceptRanges && BYTES_RANGE_REGEXP.test(ranges)) { + // parse + ranges = parseRange(len, ranges, { + combine: true + }) + + // If-Range support + if (!this.isRangeFresh()) { + debug('range stale') + ranges = -2 + } + + // unsatisfiable + if (ranges === -1) { + debug('range unsatisfiable') + + // Content-Range + res.setHeader('Content-Range', contentRange('bytes', len)) + + // 416 Requested Range Not Satisfiable + return this.error(416, { + headers: { 'Content-Range': res.getHeader('Content-Range') } + }) + } + + // valid (syntactically invalid/multiple ranges are treated as a regular response) + if (ranges !== -2 && ranges.length === 1) { + debug('range %j', ranges) + + // Content-Range + res.statusCode = 206 + res.setHeader('Content-Range', contentRange('bytes', len, ranges[0])) + + // adjust for requested range + offset += ranges[0].start + len = ranges[0].end - ranges[0].start + 1 + } + } + + // clone options + for (var prop in options) { + opts[prop] = options[prop] + } + + // set read options + opts.start = offset + opts.end = Math.max(offset, offset + len - 1) + + // content-length + res.setHeader('Content-Length', len) + + // HEAD support + if (req.method === 'HEAD') { + res.end() + return + } + + this.stream(path, opts) +} + +/** + * Transfer file for `path`. + * + * @param {String} path + * @api private + */ +SendStream.prototype.sendFile = function sendFile (path) { + var i = 0 + var self = this + + debug('stat "%s"', path) + fs.stat(path, function onstat (err, stat) { + var pathEndsWithSep = path[path.length - 1] === sep + if (err && err.code === 'ENOENT' && !extname(path) && !pathEndsWithSep) { + // not found, check extensions + return next(err) + } + if (err) return self.onStatError(err) + if (stat.isDirectory()) return self.redirect(path) + if (pathEndsWithSep) return self.error(404) + self.emit('file', path, stat) + self.send(path, stat) + }) + + function next (err) { + if (self._extensions.length <= i) { + return err + ? self.onStatError(err) + : self.error(404) + } + + var p = path + '.' + self._extensions[i++] + + debug('stat "%s"', p) + fs.stat(p, function (err, stat) { + if (err) return next(err) + if (stat.isDirectory()) return next() + self.emit('file', p, stat) + self.send(p, stat) + }) + } +} + +/** + * Transfer index for `path`. + * + * @param {String} path + * @api private + */ +SendStream.prototype.sendIndex = function sendIndex (path) { + var i = -1 + var self = this + + function next (err) { + if (++i >= self._index.length) { + if (err) return self.onStatError(err) + return self.error(404) + } + + var p = join(path, self._index[i]) + + debug('stat "%s"', p) + fs.stat(p, function (err, stat) { + if (err) return next(err) + if (stat.isDirectory()) return next() + self.emit('file', p, stat) + self.send(p, stat) + }) + } + + next() +} + +/** + * Stream `path` to the response. + * + * @param {String} path + * @param {Object} options + * @api private + */ + +SendStream.prototype.stream = function stream (path, options) { + var self = this + var res = this.res + + // pipe + var stream = fs.createReadStream(path, options) + this.emit('stream', stream) + stream.pipe(res) + + // cleanup + function cleanup () { + stream.destroy() + } + + // response finished, cleanup + onFinished(res, cleanup) + + // error handling + stream.on('error', function onerror (err) { + // clean up stream early + cleanup() + + // error + self.onStatError(err) + }) + + // end + stream.on('end', function onend () { + self.emit('end') + }) +} + +/** + * Set content-type based on `path` + * if it hasn't been explicitly set. + * + * @param {String} path + * @api private + */ + +SendStream.prototype.type = function type (path) { + var res = this.res + + if (res.getHeader('Content-Type')) return + + var ext = extname(path) + var type = mime.contentType(ext) || 'application/octet-stream' + + debug('content-type %s', type) + res.setHeader('Content-Type', type) +} + +/** + * Set response header fields, most + * fields may be pre-defined. + * + * @param {String} path + * @param {Object} stat + * @api private + */ + +SendStream.prototype.setHeader = function setHeader (path, stat) { + var res = this.res + + this.emit('headers', res, path, stat) + + if (this._acceptRanges && !res.getHeader('Accept-Ranges')) { + debug('accept ranges') + res.setHeader('Accept-Ranges', 'bytes') + } + + if (this._cacheControl && !res.getHeader('Cache-Control')) { + var cacheControl = 'public, max-age=' + Math.floor(this._maxage / 1000) + + if (this._immutable) { + cacheControl += ', immutable' + } + + debug('cache-control %s', cacheControl) + res.setHeader('Cache-Control', cacheControl) + } + + if (this._lastModified && !res.getHeader('Last-Modified')) { + var modified = stat.mtime.toUTCString() + debug('modified %s', modified) + res.setHeader('Last-Modified', modified) + } + + if (this._etag && !res.getHeader('ETag')) { + var val = etag(stat) + debug('etag %s', val) + res.setHeader('ETag', val) + } +} + +/** + * Clear all headers from a response. + * + * @param {object} res + * @private + */ + +function clearHeaders (res) { + for (const header of res.getHeaderNames()) { + res.removeHeader(header) + } +} + +/** + * Collapse all leading slashes into a single slash + * + * @param {string} str + * @private + */ +function collapseLeadingSlashes (str) { + for (var i = 0; i < str.length; i++) { + if (str[i] !== '/') { + break + } + } + + return i > 1 + ? '/' + str.substr(i) + : str +} + +/** + * Determine if path parts contain a dotfile. + * + * @api private + */ + +function containsDotFile (parts) { + for (var i = 0; i < parts.length; i++) { + var part = parts[i] + if (part.length > 1 && part[0] === '.') { + return true + } + } + + return false +} + +/** + * Create a Content-Range header. + * + * @param {string} type + * @param {number} size + * @param {array} [range] + */ + +function contentRange (type, size, range) { + return type + ' ' + (range ? range.start + '-' + range.end : '*') + '/' + size +} + +/** + * Create a minimal HTML document. + * + * @param {string} title + * @param {string} body + * @private + */ + +function createHtmlDocument (title, body) { + return '\n' + + '\n' + + '\n' + + '\n' + + '' + title + '\n' + + '\n' + + '\n' + + '
    ' + body + '
    \n' + + '\n' + + '\n' +} + +/** + * Create a HttpError object from simple arguments. + * + * @param {number} status + * @param {Error|object} err + * @private + */ + +function createHttpError (status, err) { + if (!err) { + return createError(status) + } + + return err instanceof Error + ? createError(status, err, { expose: false }) + : createError(status, err) +} + +/** + * decodeURIComponent. + * + * Allows V8 to only deoptimize this fn instead of all + * of send(). + * + * @param {String} path + * @api private + */ + +function decode (path) { + try { + return decodeURIComponent(path) + } catch (err) { + return -1 + } +} + +/** + * Determine if emitter has listeners of a given type. + * + * The way to do this check is done three different ways in Node.js >= 0.10 + * so this consolidates them into a minimal set using instance methods. + * + * @param {EventEmitter} emitter + * @param {string} type + * @returns {boolean} + * @private + */ + +function hasListeners (emitter, type) { + var count = typeof emitter.listenerCount !== 'function' + ? emitter.listeners(type).length + : emitter.listenerCount(type) + + return count > 0 +} + +/** + * Normalize the index option into an array. + * + * @param {boolean|string|array} val + * @param {string} name + * @private + */ + +function normalizeList (val, name) { + var list = [].concat(val || []) + + for (var i = 0; i < list.length; i++) { + if (typeof list[i] !== 'string') { + throw new TypeError(name + ' must be array of strings or false') + } + } + + return list +} + +/** + * Parse an HTTP Date into a number. + * + * @param {string} date + * @private + */ + +function parseHttpDate (date) { + var timestamp = date && Date.parse(date) + + return typeof timestamp === 'number' + ? timestamp + : NaN +} + +/** + * Parse a HTTP token list. + * + * @param {string} str + * @private + */ + +function parseTokenList (str) { + var end = 0 + var list = [] + var start = 0 + + // gather tokens + for (var i = 0, len = str.length; i < len; i++) { + switch (str.charCodeAt(i)) { + case 0x20: /* */ + if (start === end) { + start = end = i + 1 + } + break + case 0x2c: /* , */ + if (start !== end) { + list.push(str.substring(start, end)) + } + start = end = i + 1 + break + default: + end = i + 1 + break + } + } + + // final token + if (start !== end) { + list.push(str.substring(start, end)) + } + + return list +} + +/** + * Set an object of headers on a response. + * + * @param {object} res + * @param {object} headers + * @private + */ + +function setHeaders (res, headers) { + var keys = Object.keys(headers) + + for (var i = 0; i < keys.length; i++) { + var key = keys[i] + res.setHeader(key, headers[key]) + } +} diff --git a/front/frontend/node_modules/send/node_modules/debug/LICENSE b/front/frontend/node_modules/send/node_modules/debug/LICENSE new file mode 100644 index 0000000..1a9820e --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/debug/LICENSE @@ -0,0 +1,20 @@ +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/front/frontend/node_modules/send/node_modules/debug/README.md b/front/frontend/node_modules/send/node_modules/debug/README.md new file mode 100644 index 0000000..9ebdfbf --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/debug/README.md @@ -0,0 +1,481 @@ +# debug +[![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) + + + +A tiny JavaScript debugging utility modelled after Node.js core's debugging +technique. Works in Node.js and web browsers. + +## Installation + +```bash +$ npm install debug +``` + +## Usage + +`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. + +Example [_app.js_](./examples/node/app.js): + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %o', name); + +http.createServer(function(req, res){ + debug(req.method + ' ' + req.url); + res.end('hello\n'); +}).listen(3000, function(){ + debug('listening'); +}); + +// fake worker of some kind + +require('./worker'); +``` + +Example [_worker.js_](./examples/node/worker.js): + +```js +var a = require('debug')('worker:a') + , b = require('debug')('worker:b'); + +function work() { + a('doing lots of uninteresting work'); + setTimeout(work, Math.random() * 1000); +} + +work(); + +function workb() { + b('doing some work'); + setTimeout(workb, Math.random() * 2000); +} + +workb(); +``` + +The `DEBUG` environment variable is then used to enable these based on space or +comma-delimited names. + +Here are some examples: + +screen shot 2017-08-08 at 12 53 04 pm +screen shot 2017-08-08 at 12 53 38 pm +screen shot 2017-08-08 at 12 53 25 pm + +#### Windows command prompt notes + +##### CMD + +On Windows the environment variable is set using the `set` command. + +```cmd +set DEBUG=*,-not_this +``` + +Example: + +```cmd +set DEBUG=* & node app.js +``` + +##### PowerShell (VS Code default) + +PowerShell uses different syntax to set environment variables. + +```cmd +$env:DEBUG = "*,-not_this" +``` + +Example: + +```cmd +$env:DEBUG='app';node app.js +``` + +Then, run the program to be debugged as usual. + +npm script example: +```js + "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", +``` + +## Namespace Colors + +Every debug instance has a color generated for it based on its namespace name. +This helps when visually parsing the debug output to identify which debug instance +a debug line belongs to. + +#### Node.js + +In Node.js, colors are enabled when stderr is a TTY. You also _should_ install +the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, +otherwise debug will only use a small handful of basic colors. + + + +#### Web Browser + +Colors are also enabled on "Web Inspectors" that understand the `%c` formatting +option. These are WebKit web inspectors, Firefox ([since version +31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) +and the Firebug plugin for Firefox (any version). + + + + +## Millisecond diff + +When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + + +When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: + + + + +## Conventions + +If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. + +## Wildcards + +The `*` character may be used as a wildcard. Suppose for example your library has +debuggers named "connect:bodyParser", "connect:compress", "connect:session", +instead of listing all three with +`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do +`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + +You can also exclude specific debuggers by prefixing them with a "-" character. +For example, `DEBUG=*,-connect:*` would include all debuggers except those +starting with "connect:". + +## Environment Variables + +When running through Node.js, you can set a few environment variables that will +change the behavior of the debug logging: + +| Name | Purpose | +|-----------|-------------------------------------------------| +| `DEBUG` | Enables/disables specific debugging namespaces. | +| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | +| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | +| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | + + +__Note:__ The environment variables beginning with `DEBUG_` end up being +converted into an Options object that gets used with `%o`/`%O` formatters. +See the Node.js documentation for +[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) +for the complete list. + +## Formatters + +Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. +Below are the officially supported formatters: + +| Formatter | Representation | +|-----------|----------------| +| `%O` | Pretty-print an Object on multiple lines. | +| `%o` | Pretty-print an Object all on a single line. | +| `%s` | String. | +| `%d` | Number (both integer and float). | +| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | +| `%%` | Single percent sign ('%'). This does not consume an argument. | + + +### Custom formatters + +You can add custom formatters by extending the `debug.formatters` object. +For example, if you wanted to add support for rendering a Buffer as hex with +`%h`, you could do something like: + +```js +const createDebug = require('debug') +createDebug.formatters.h = (v) => { + return v.toString('hex') +} + +// …elsewhere +const debug = createDebug('foo') +debug('this is hex: %h', new Buffer('hello world')) +// foo this is hex: 68656c6c6f20776f726c6421 +0ms +``` + + +## Browser Support + +You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), +or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), +if you don't want to build it yourself. + +Debug's enable state is currently persisted by `localStorage`. +Consider the situation shown below where you have `worker:a` and `worker:b`, +and wish to debug both. You can enable this using `localStorage.debug`: + +```js +localStorage.debug = 'worker:*' +``` + +And then refresh the page. + +```js +a = debug('worker:a'); +b = debug('worker:b'); + +setInterval(function(){ + a('doing some work'); +}, 1000); + +setInterval(function(){ + b('doing some work'); +}, 1200); +``` + +In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_. + + + +## Output streams + + By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: + +Example [_stdout.js_](./examples/node/stdout.js): + +```js +var debug = require('debug'); +var error = debug('app:error'); + +// by default stderr is used +error('goes to stderr!'); + +var log = debug('app:log'); +// set this namespace to log via console.log +log.log = console.log.bind(console); // don't forget to bind to console! +log('goes to stdout'); +error('still goes to stderr!'); + +// set all output to go via console.info +// overrides all per-namespace log settings +debug.log = console.info.bind(console); +error('now goes to stdout via console.info'); +log('still goes to stdout, but via console.info now'); +``` + +## Extend +You can simply extend debugger +```js +const log = require('debug')('auth'); + +//creates new debug instance with extended namespace +const logSign = log.extend('sign'); +const logLogin = log.extend('login'); + +log('hello'); // auth hello +logSign('hello'); //auth:sign hello +logLogin('hello'); //auth:login hello +``` + +## Set dynamically + +You can also enable debug dynamically by calling the `enable()` method : + +```js +let debug = require('debug'); + +console.log(1, debug.enabled('test')); + +debug.enable('test'); +console.log(2, debug.enabled('test')); + +debug.disable(); +console.log(3, debug.enabled('test')); + +``` + +print : +``` +1 false +2 true +3 false +``` + +Usage : +`enable(namespaces)` +`namespaces` can include modes separated by a colon and wildcards. + +Note that calling `enable()` completely overrides previously set DEBUG variable : + +``` +$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' +=> false +``` + +`disable()` + +Will disable all namespaces. The functions returns the namespaces currently +enabled (and skipped). This can be useful if you want to disable debugging +temporarily without knowing what was enabled to begin with. + +For example: + +```js +let debug = require('debug'); +debug.enable('foo:*,-foo:bar'); +let namespaces = debug.disable(); +debug.enable(namespaces); +``` + +Note: There is no guarantee that the string will be identical to the initial +enable string, but semantically they will be identical. + +## Checking whether a debug target is enabled + +After you've created a debug instance, you can determine whether or not it is +enabled by checking the `enabled` property: + +```javascript +const debug = require('debug')('http'); + +if (debug.enabled) { + // do stuff... +} +``` + +You can also manually toggle this property to force the debug instance to be +enabled or disabled. + +## Usage in child processes + +Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. +For example: + +```javascript +worker = fork(WORKER_WRAP_PATH, [workerPath], { + stdio: [ + /* stdin: */ 0, + /* stdout: */ 'pipe', + /* stderr: */ 'pipe', + 'ipc', + ], + env: Object.assign({}, process.env, { + DEBUG_COLORS: 1 // without this settings, colors won't be shown + }), +}); + +worker.stderr.pipe(process.stderr, { end: false }); +``` + + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + - Andrew Rhyne + - Josh Junon + +## Backers + +Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Sponsors + +Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## License + +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> +Copyright (c) 2018-2021 Josh Junon + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/send/node_modules/debug/package.json b/front/frontend/node_modules/send/node_modules/debug/package.json new file mode 100644 index 0000000..ee8abb5 --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/debug/package.json @@ -0,0 +1,64 @@ +{ + "name": "debug", + "version": "4.4.3", + "repository": { + "type": "git", + "url": "git://github.com/debug-js/debug.git" + }, + "description": "Lightweight debugging utility for Node.js and the browser", + "keywords": [ + "debug", + "log", + "debugger" + ], + "files": [ + "src", + "LICENSE", + "README.md" + ], + "author": "Josh Junon (https://github.com/qix-)", + "contributors": [ + "TJ Holowaychuk ", + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne " + ], + "license": "MIT", + "scripts": { + "lint": "xo", + "test": "npm run test:node && npm run test:browser && npm run lint", + "test:node": "mocha test.js test.node.js", + "test:browser": "karma start --single-run", + "test:coverage": "cat ./coverage/lcov.info | coveralls" + }, + "dependencies": { + "ms": "^2.1.3" + }, + "devDependencies": { + "brfs": "^2.0.1", + "browserify": "^16.2.3", + "coveralls": "^3.0.2", + "karma": "^3.1.4", + "karma-browserify": "^6.0.0", + "karma-chrome-launcher": "^2.2.0", + "karma-mocha": "^1.3.0", + "mocha": "^5.2.0", + "mocha-lcov-reporter": "^1.2.0", + "sinon": "^14.0.0", + "xo": "^0.23.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + }, + "main": "./src/index.js", + "browser": "./src/browser.js", + "engines": { + "node": ">=6.0" + }, + "xo": { + "rules": { + "import/extensions": "off" + } + } +} diff --git a/front/frontend/node_modules/send/node_modules/debug/src/browser.js b/front/frontend/node_modules/send/node_modules/debug/src/browser.js new file mode 100644 index 0000000..5993451 --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/debug/src/browser.js @@ -0,0 +1,272 @@ +/* eslint-env browser */ + +/** + * This is the web browser implementation of `debug()`. + */ + +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +exports.destroy = (() => { + let warned = false; + + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); + +/** + * Colors. + */ + +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } + + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + + let m; + + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + // eslint-disable-next-line no-return-assign + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. + * + * @api public + */ +exports.log = console.debug || console.log || (() => {}); + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ +function load() { + let r; + try { + r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +module.exports = require('./common')(exports); + +const {formatters} = module.exports; + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; diff --git a/front/frontend/node_modules/send/node_modules/debug/src/common.js b/front/frontend/node_modules/send/node_modules/debug/src/common.js new file mode 100644 index 0000000..141cb57 --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/debug/src/common.js @@ -0,0 +1,292 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require('ms'); + createDebug.destroy = destroy; + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + return debug; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + + createDebug.names = []; + createDebug.skips = []; + + const split = (typeof namespaces === 'string' ? namespaces : '') + .trim() + .replace(/\s+/g, ',') + .split(',') + .filter(Boolean); + + for (const ns of split) { + if (ns[0] === '-') { + createDebug.skips.push(ns.slice(1)); + } else { + createDebug.names.push(ns); + } + } + } + + /** + * Checks if the given string matches a namespace template, honoring + * asterisks as wildcards. + * + * @param {String} search + * @param {String} template + * @return {Boolean} + */ + function matchesTemplate(search, template) { + let searchIndex = 0; + let templateIndex = 0; + let starIndex = -1; + let matchIndex = 0; + + while (searchIndex < search.length) { + if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { + // Match character or proceed with wildcard + if (template[templateIndex] === '*') { + starIndex = templateIndex; + matchIndex = searchIndex; + templateIndex++; // Skip the '*' + } else { + searchIndex++; + templateIndex++; + } + } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition + // Backtrack to the last '*' and try to match more characters + templateIndex = starIndex + 1; + matchIndex++; + searchIndex = matchIndex; + } else { + return false; // No match + } + } + + // Handle trailing '*' in template + while (templateIndex < template.length && template[templateIndex] === '*') { + templateIndex++; + } + + return templateIndex === template.length; + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names, + ...createDebug.skips.map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + for (const skip of createDebug.skips) { + if (matchesTemplate(name, skip)) { + return false; + } + } + + for (const ns of createDebug.names) { + if (matchesTemplate(name, ns)) { + return true; + } + } + + return false; + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + + createDebug.enable(createDebug.load()); + + return createDebug; +} + +module.exports = setup; diff --git a/front/frontend/node_modules/send/node_modules/debug/src/index.js b/front/frontend/node_modules/send/node_modules/debug/src/index.js new file mode 100644 index 0000000..bf4c57f --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. + */ + +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/front/frontend/node_modules/send/node_modules/debug/src/node.js b/front/frontend/node_modules/send/node_modules/debug/src/node.js new file mode 100644 index 0000000..715560a --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/debug/src/node.js @@ -0,0 +1,263 @@ +/** + * Module dependencies. + */ + +const tty = require('tty'); +const util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + */ + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = require('supports-color'); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. +} + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); +} + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; +} + +/** + * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. + */ + +function log(...args) { + return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +module.exports = require('./common')(exports); + +const {formatters} = module.exports; + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); +}; + +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; diff --git a/front/frontend/node_modules/send/node_modules/encodeurl/LICENSE b/front/frontend/node_modules/send/node_modules/encodeurl/LICENSE new file mode 100644 index 0000000..8812229 --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/encodeurl/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2016 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/send/node_modules/encodeurl/README.md b/front/frontend/node_modules/send/node_modules/encodeurl/README.md new file mode 100644 index 0000000..3842493 --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/encodeurl/README.md @@ -0,0 +1,109 @@ +# Encode URL + +Encode a URL to a percent-encoded form, excluding already-encoded sequences. + +## Installation + +```sh +npm install encodeurl +``` + +## API + +```js +var encodeUrl = require('encodeurl') +``` + +### encodeUrl(url) + +Encode a URL to a percent-encoded form, excluding already-encoded sequences. + +This function accepts a URL and encodes all the non-URL code points (as UTF-8 byte sequences). It will not encode the "%" character unless it is not part of a valid sequence (`%20` will be left as-is, but `%foo` will be encoded as `%25foo`). + +This encode is meant to be "safe" and does not throw errors. It will try as hard as it can to properly encode the given URL, including replacing any raw, unpaired surrogate pairs with the Unicode replacement character prior to encoding. + +## Examples + +### Encode a URL containing user-controlled data + +```js +var encodeUrl = require('encodeurl') +var escapeHtml = require('escape-html') + +http.createServer(function onRequest (req, res) { + // get encoded form of inbound url + var url = encodeUrl(req.url) + + // create html message + var body = '

    Location ' + escapeHtml(url) + ' not found

    ' + + // send a 404 + res.statusCode = 404 + res.setHeader('Content-Type', 'text/html; charset=UTF-8') + res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8'))) + res.end(body, 'utf-8') +}) +``` + +### Encode a URL for use in a header field + +```js +var encodeUrl = require('encodeurl') +var escapeHtml = require('escape-html') +var url = require('url') + +http.createServer(function onRequest (req, res) { + // parse inbound url + var href = url.parse(req) + + // set new host for redirect + href.host = 'localhost' + href.protocol = 'https:' + href.slashes = true + + // create location header + var location = encodeUrl(url.format(href)) + + // create html message + var body = '

    Redirecting to new site: ' + escapeHtml(location) + '

    ' + + // send a 301 + res.statusCode = 301 + res.setHeader('Content-Type', 'text/html; charset=UTF-8') + res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8'))) + res.setHeader('Location', location) + res.end(body, 'utf-8') +}) +``` + +## Similarities + +This function is _similar_ to the intrinsic function `encodeURI`. However, it will not encode: + +* The `\`, `^`, or `|` characters +* The `%` character when it's part of a valid sequence +* `[` and `]` (for IPv6 hostnames) +* Replaces raw, unpaired surrogate pairs with the Unicode replacement character + +As a result, the encoding aligns closely with the behavior in the [WHATWG URL specification][whatwg-url]. However, this package only encodes strings and does not do any URL parsing or formatting. + +It is expected that any output from `new URL(url)` will not change when used with this package, as the output has already been encoded. Additionally, if we were to encode before `new URL(url)`, we do not expect the before and after encoded formats to be parsed any differently. + +## Testing + +```sh +$ npm test +$ npm run lint +``` + +## References + +- [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax][rfc-3986] +- [WHATWG URL Living Standard][whatwg-url] + +[rfc-3986]: https://tools.ietf.org/html/rfc3986 +[whatwg-url]: https://url.spec.whatwg.org/ + +## License + +[MIT](LICENSE) diff --git a/front/frontend/node_modules/send/node_modules/encodeurl/index.js b/front/frontend/node_modules/send/node_modules/encodeurl/index.js new file mode 100644 index 0000000..a49ee5a --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/encodeurl/index.js @@ -0,0 +1,60 @@ +/*! + * encodeurl + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = encodeUrl + +/** + * RegExp to match non-URL code points, *after* encoding (i.e. not including "%") + * and including invalid escape sequences. + * @private + */ + +var ENCODE_CHARS_REGEXP = /(?:[^\x21\x23-\x3B\x3D\x3F-\x5F\x61-\x7A\x7C\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g + +/** + * RegExp to match unmatched surrogate pair. + * @private + */ + +var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g + +/** + * String to replace unmatched surrogate pair with. + * @private + */ + +var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2' + +/** + * Encode a URL to a percent-encoded form, excluding already-encoded sequences. + * + * This function will take an already-encoded URL and encode all the non-URL + * code points. This function will not encode the "%" character unless it is + * not part of a valid sequence (`%20` will be left as-is, but `%foo` will + * be encoded as `%25foo`). + * + * This encode is meant to be "safe" and does not throw errors. It will try as + * hard as it can to properly encode the given URL, including replacing any raw, + * unpaired surrogate pairs with the Unicode replacement character prior to + * encoding. + * + * @param {string} url + * @return {string} + * @public + */ + +function encodeUrl (url) { + return String(url) + .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE) + .replace(ENCODE_CHARS_REGEXP, encodeURI) +} diff --git a/front/frontend/node_modules/send/node_modules/encodeurl/package.json b/front/frontend/node_modules/send/node_modules/encodeurl/package.json new file mode 100644 index 0000000..3133822 --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/encodeurl/package.json @@ -0,0 +1,40 @@ +{ + "name": "encodeurl", + "description": "Encode a URL to a percent-encoded form, excluding already-encoded sequences", + "version": "2.0.0", + "contributors": [ + "Douglas Christopher Wilson " + ], + "license": "MIT", + "keywords": [ + "encode", + "encodeurl", + "url" + ], + "repository": "pillarjs/encodeurl", + "devDependencies": { + "eslint": "5.11.1", + "eslint-config-standard": "12.0.0", + "eslint-plugin-import": "2.14.0", + "eslint-plugin-node": "7.0.1", + "eslint-plugin-promise": "4.0.1", + "eslint-plugin-standard": "4.0.0", + "istanbul": "0.4.5", + "mocha": "2.5.3" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + } +} diff --git a/front/frontend/node_modules/send/node_modules/ms/index.js b/front/frontend/node_modules/send/node_modules/ms/index.js new file mode 100644 index 0000000..ea734fb --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/ms/index.js @@ -0,0 +1,162 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function (val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} diff --git a/front/frontend/node_modules/send/node_modules/ms/license.md b/front/frontend/node_modules/send/node_modules/ms/license.md new file mode 100644 index 0000000..fa5d39b --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Vercel, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/front/frontend/node_modules/send/node_modules/ms/package.json b/front/frontend/node_modules/send/node_modules/ms/package.json new file mode 100644 index 0000000..4997189 --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/ms/package.json @@ -0,0 +1,38 @@ +{ + "name": "ms", + "version": "2.1.3", + "description": "Tiny millisecond conversion utility", + "repository": "vercel/ms", + "main": "./index", + "files": [ + "index.js" + ], + "scripts": { + "precommit": "lint-staged", + "lint": "eslint lib/* bin/*", + "test": "mocha tests.js" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "license": "MIT", + "devDependencies": { + "eslint": "4.18.2", + "expect.js": "0.3.1", + "husky": "0.14.3", + "lint-staged": "5.0.0", + "mocha": "4.0.1", + "prettier": "2.0.5" + } +} diff --git a/front/frontend/node_modules/send/node_modules/ms/readme.md b/front/frontend/node_modules/send/node_modules/ms/readme.md new file mode 100644 index 0000000..0fc1abb --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/ms/readme.md @@ -0,0 +1,59 @@ +# ms + +![CI](https://github.com/vercel/ms/workflows/CI/badge.svg) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +ms('-3 days') // -259200000 +ms('-1h') // -3600000 +ms('-200') // -200 +``` + +### Convert from Milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(-3 * 60000) // "-3m" +ms(ms('10 hours')) // "10h" +``` + +### Time Format Written-Out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(-3 * 60000, { long: true }) // "-3 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [Node.js](https://nodejs.org) and in the browser +- If a number is supplied to `ms`, a string with a unit is returned +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) +- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned + +## Related Packages + +- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. + +## Caught a Bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/front/frontend/node_modules/send/node_modules/on-finished/HISTORY.md b/front/frontend/node_modules/send/node_modules/on-finished/HISTORY.md new file mode 100644 index 0000000..1917595 --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/on-finished/HISTORY.md @@ -0,0 +1,98 @@ +2.4.1 / 2022-02-22 +================== + + * Fix error on early async hooks implementations + +2.4.0 / 2022-02-21 +================== + + * Prevent loss of async hooks context + +2.3.0 / 2015-05-26 +================== + + * Add defined behavior for HTTP `CONNECT` requests + * Add defined behavior for HTTP `Upgrade` requests + * deps: ee-first@1.1.1 + +2.2.1 / 2015-04-22 +================== + + * Fix `isFinished(req)` when data buffered + +2.2.0 / 2014-12-22 +================== + + * Add message object to callback arguments + +2.1.1 / 2014-10-22 +================== + + * Fix handling of pipelined requests + +2.1.0 / 2014-08-16 +================== + + * Check if `socket` is detached + * Return `undefined` for `isFinished` if state unknown + +2.0.0 / 2014-08-16 +================== + + * Add `isFinished` function + * Move to `jshttp` organization + * Remove support for plain socket argument + * Rename to `on-finished` + * Support both `req` and `res` as arguments + * deps: ee-first@1.0.5 + +1.2.2 / 2014-06-10 +================== + + * Reduce listeners added to emitters + - avoids "event emitter leak" warnings when used multiple times on same request + +1.2.1 / 2014-06-08 +================== + + * Fix returned value when already finished + +1.2.0 / 2014-06-05 +================== + + * Call callback when called on already-finished socket + +1.1.4 / 2014-05-27 +================== + + * Support node.js 0.8 + +1.1.3 / 2014-04-30 +================== + + * Make sure errors passed as instanceof `Error` + +1.1.2 / 2014-04-18 +================== + + * Default the `socket` to passed-in object + +1.1.1 / 2014-01-16 +================== + + * Rename module to `finished` + +1.1.0 / 2013-12-25 +================== + + * Call callback when called on already-errored socket + +1.0.1 / 2013-12-20 +================== + + * Actually pass the error to the callback + +1.0.0 / 2013-12-20 +================== + + * Initial release diff --git a/front/frontend/node_modules/send/node_modules/on-finished/LICENSE b/front/frontend/node_modules/send/node_modules/on-finished/LICENSE new file mode 100644 index 0000000..5931fd2 --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/on-finished/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2013 Jonathan Ong +Copyright (c) 2014 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/send/node_modules/on-finished/README.md b/front/frontend/node_modules/send/node_modules/on-finished/README.md new file mode 100644 index 0000000..8973cde --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/on-finished/README.md @@ -0,0 +1,162 @@ +# on-finished + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][ci-image]][ci-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +Execute a callback when a HTTP request closes, finishes, or errors. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install on-finished +``` + +## API + +```js +var onFinished = require('on-finished') +``` + +### onFinished(res, listener) + +Attach a listener to listen for the response to finish. The listener will +be invoked only once when the response finished. If the response finished +to an error, the first argument will contain the error. If the response +has already finished, the listener will be invoked. + +Listening to the end of a response would be used to close things associated +with the response, like open files. + +Listener is invoked as `listener(err, res)`. + + + +```js +onFinished(res, function (err, res) { + // clean up open fds, etc. + // err contains the error if request error'd +}) +``` + +### onFinished(req, listener) + +Attach a listener to listen for the request to finish. The listener will +be invoked only once when the request finished. If the request finished +to an error, the first argument will contain the error. If the request +has already finished, the listener will be invoked. + +Listening to the end of a request would be used to know when to continue +after reading the data. + +Listener is invoked as `listener(err, req)`. + + + +```js +var data = '' + +req.setEncoding('utf8') +req.on('data', function (str) { + data += str +}) + +onFinished(req, function (err, req) { + // data is read unless there is err +}) +``` + +### onFinished.isFinished(res) + +Determine if `res` is already finished. This would be useful to check and +not even start certain operations if the response has already finished. + +### onFinished.isFinished(req) + +Determine if `req` is already finished. This would be useful to check and +not even start certain operations if the request has already finished. + +## Special Node.js requests + +### HTTP CONNECT method + +The meaning of the `CONNECT` method from RFC 7231, section 4.3.6: + +> The CONNECT method requests that the recipient establish a tunnel to +> the destination origin server identified by the request-target and, +> if successful, thereafter restrict its behavior to blind forwarding +> of packets, in both directions, until the tunnel is closed. Tunnels +> are commonly used to create an end-to-end virtual connection, through +> one or more proxies, which can then be secured using TLS (Transport +> Layer Security, [RFC5246]). + +In Node.js, these request objects come from the `'connect'` event on +the HTTP server. + +When this module is used on a HTTP `CONNECT` request, the request is +considered "finished" immediately, **due to limitations in the Node.js +interface**. This means if the `CONNECT` request contains a request entity, +the request will be considered "finished" even before it has been read. + +There is no such thing as a response object to a `CONNECT` request in +Node.js, so there is no support for one. + +### HTTP Upgrade request + +The meaning of the `Upgrade` header from RFC 7230, section 6.1: + +> The "Upgrade" header field is intended to provide a simple mechanism +> for transitioning from HTTP/1.1 to some other protocol on the same +> connection. + +In Node.js, these request objects come from the `'upgrade'` event on +the HTTP server. + +When this module is used on a HTTP request with an `Upgrade` header, the +request is considered "finished" immediately, **due to limitations in the +Node.js interface**. This means if the `Upgrade` request contains a request +entity, the request will be considered "finished" even before it has been +read. + +There is no such thing as a response object to a `Upgrade` request in +Node.js, so there is no support for one. + +## Example + +The following code ensures that file descriptors are always closed +once the response finishes. + +```js +var destroy = require('destroy') +var fs = require('fs') +var http = require('http') +var onFinished = require('on-finished') + +http.createServer(function onRequest (req, res) { + var stream = fs.createReadStream('package.json') + stream.pipe(res) + onFinished(res, function () { + destroy(stream) + }) +}) +``` + +## License + +[MIT](LICENSE) + +[ci-image]: https://badgen.net/github/checks/jshttp/on-finished/master?label=ci +[ci-url]: https://github.com/jshttp/on-finished/actions/workflows/ci.yml +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/on-finished/master +[coveralls-url]: https://coveralls.io/r/jshttp/on-finished?branch=master +[node-image]: https://badgen.net/npm/node/on-finished +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/on-finished +[npm-url]: https://npmjs.org/package/on-finished +[npm-version-image]: https://badgen.net/npm/v/on-finished diff --git a/front/frontend/node_modules/send/node_modules/on-finished/index.js b/front/frontend/node_modules/send/node_modules/on-finished/index.js new file mode 100644 index 0000000..e68df7b --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/on-finished/index.js @@ -0,0 +1,234 @@ +/*! + * on-finished + * Copyright(c) 2013 Jonathan Ong + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = onFinished +module.exports.isFinished = isFinished + +/** + * Module dependencies. + * @private + */ + +var asyncHooks = tryRequireAsyncHooks() +var first = require('ee-first') + +/** + * Variables. + * @private + */ + +/* istanbul ignore next */ +var defer = typeof setImmediate === 'function' + ? setImmediate + : function (fn) { process.nextTick(fn.bind.apply(fn, arguments)) } + +/** + * Invoke callback when the response has finished, useful for + * cleaning up resources afterwards. + * + * @param {object} msg + * @param {function} listener + * @return {object} + * @public + */ + +function onFinished (msg, listener) { + if (isFinished(msg) !== false) { + defer(listener, null, msg) + return msg + } + + // attach the listener to the message + attachListener(msg, wrap(listener)) + + return msg +} + +/** + * Determine if message is already finished. + * + * @param {object} msg + * @return {boolean} + * @public + */ + +function isFinished (msg) { + var socket = msg.socket + + if (typeof msg.finished === 'boolean') { + // OutgoingMessage + return Boolean(msg.finished || (socket && !socket.writable)) + } + + if (typeof msg.complete === 'boolean') { + // IncomingMessage + return Boolean(msg.upgrade || !socket || !socket.readable || (msg.complete && !msg.readable)) + } + + // don't know + return undefined +} + +/** + * Attach a finished listener to the message. + * + * @param {object} msg + * @param {function} callback + * @private + */ + +function attachFinishedListener (msg, callback) { + var eeMsg + var eeSocket + var finished = false + + function onFinish (error) { + eeMsg.cancel() + eeSocket.cancel() + + finished = true + callback(error) + } + + // finished on first message event + eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish) + + function onSocket (socket) { + // remove listener + msg.removeListener('socket', onSocket) + + if (finished) return + if (eeMsg !== eeSocket) return + + // finished on first socket event + eeSocket = first([[socket, 'error', 'close']], onFinish) + } + + if (msg.socket) { + // socket already assigned + onSocket(msg.socket) + return + } + + // wait for socket to be assigned + msg.on('socket', onSocket) + + if (msg.socket === undefined) { + // istanbul ignore next: node.js 0.8 patch + patchAssignSocket(msg, onSocket) + } +} + +/** + * Attach the listener to the message. + * + * @param {object} msg + * @return {function} + * @private + */ + +function attachListener (msg, listener) { + var attached = msg.__onFinished + + // create a private single listener with queue + if (!attached || !attached.queue) { + attached = msg.__onFinished = createListener(msg) + attachFinishedListener(msg, attached) + } + + attached.queue.push(listener) +} + +/** + * Create listener on message. + * + * @param {object} msg + * @return {function} + * @private + */ + +function createListener (msg) { + function listener (err) { + if (msg.__onFinished === listener) msg.__onFinished = null + if (!listener.queue) return + + var queue = listener.queue + listener.queue = null + + for (var i = 0; i < queue.length; i++) { + queue[i](err, msg) + } + } + + listener.queue = [] + + return listener +} + +/** + * Patch ServerResponse.prototype.assignSocket for node.js 0.8. + * + * @param {ServerResponse} res + * @param {function} callback + * @private + */ + +// istanbul ignore next: node.js 0.8 patch +function patchAssignSocket (res, callback) { + var assignSocket = res.assignSocket + + if (typeof assignSocket !== 'function') return + + // res.on('socket', callback) is broken in 0.8 + res.assignSocket = function _assignSocket (socket) { + assignSocket.call(this, socket) + callback(socket) + } +} + +/** + * Try to require async_hooks + * @private + */ + +function tryRequireAsyncHooks () { + try { + return require('async_hooks') + } catch (e) { + return {} + } +} + +/** + * Wrap function with async resource, if possible. + * AsyncResource.bind static method backported. + * @private + */ + +function wrap (fn) { + var res + + // create anonymous resource + if (asyncHooks.AsyncResource) { + res = new asyncHooks.AsyncResource(fn.name || 'bound-anonymous-fn') + } + + // incompatible node.js + if (!res || !res.runInAsyncScope) { + return fn + } + + // return bound function + return res.runInAsyncScope.bind(res, fn, null) +} diff --git a/front/frontend/node_modules/send/node_modules/on-finished/package.json b/front/frontend/node_modules/send/node_modules/on-finished/package.json new file mode 100644 index 0000000..644cd81 --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/on-finished/package.json @@ -0,0 +1,39 @@ +{ + "name": "on-finished", + "description": "Execute a callback when a request closes, finishes, or errors", + "version": "2.4.1", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "repository": "jshttp/on-finished", + "dependencies": { + "ee-first": "1.1.1" + }, + "devDependencies": { + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.2.0", + "eslint-plugin-standard": "4.1.0", + "mocha": "9.2.1", + "nyc": "15.1.0" + }, + "engines": { + "node": ">= 0.8" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/front/frontend/node_modules/send/node_modules/statuses/HISTORY.md b/front/frontend/node_modules/send/node_modules/statuses/HISTORY.md new file mode 100644 index 0000000..dc549b8 --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/statuses/HISTORY.md @@ -0,0 +1,87 @@ +2.0.2 / 2025-06-06 +================== + + * Migrate to `String.prototype.slice()` + +2.0.1 / 2021-01-03 +================== + + * Fix returning values from `Object.prototype` + +2.0.0 / 2020-04-19 +================== + + * Drop support for Node.js 0.6 + * Fix messaging casing of `418 I'm a Teapot` + * Remove code 306 + * Remove `status[code]` exports; use `status.message[code]` + * Remove `status[msg]` exports; use `status.code[msg]` + * Rename `425 Unordered Collection` to standard `425 Too Early` + * Rename `STATUS_CODES` export to `message` + * Return status message for `statuses(code)` when given code + +1.5.0 / 2018-03-27 +================== + + * Add `103 Early Hints` + +1.4.0 / 2017-10-20 +================== + + * Add `STATUS_CODES` export + +1.3.1 / 2016-11-11 +================== + + * Fix return type in JSDoc + +1.3.0 / 2016-05-17 +================== + + * Add `421 Misdirected Request` + * perf: enable strict mode + +1.2.1 / 2015-02-01 +================== + + * Fix message for status 451 + - `451 Unavailable For Legal Reasons` + +1.2.0 / 2014-09-28 +================== + + * Add `208 Already Repored` + * Add `226 IM Used` + * Add `306 (Unused)` + * Add `415 Unable For Legal Reasons` + * Add `508 Loop Detected` + +1.1.1 / 2014-09-24 +================== + + * Add missing 308 to `codes.json` + +1.1.0 / 2014-09-21 +================== + + * Add `codes.json` for universal support + +1.0.4 / 2014-08-20 +================== + + * Package cleanup + +1.0.3 / 2014-06-08 +================== + + * Add 308 to `.redirect` category + +1.0.2 / 2014-03-13 +================== + + * Add `.retry` category + +1.0.1 / 2014-03-12 +================== + + * Initial release diff --git a/front/frontend/node_modules/send/node_modules/statuses/LICENSE b/front/frontend/node_modules/send/node_modules/statuses/LICENSE new file mode 100644 index 0000000..28a3161 --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/statuses/LICENSE @@ -0,0 +1,23 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2016 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/send/node_modules/statuses/README.md b/front/frontend/node_modules/send/node_modules/statuses/README.md new file mode 100644 index 0000000..89d542f --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/statuses/README.md @@ -0,0 +1,139 @@ +# statuses + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][ci-image]][ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] +[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer] + +HTTP status utility for node. + +This module provides a list of status codes and messages sourced from +a few different projects: + + * The [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) + * The [Node.js project](https://nodejs.org/) + * The [NGINX project](https://www.nginx.com/) + * The [Apache HTTP Server project](https://httpd.apache.org/) + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install statuses +``` + +## API + + + +```js +var status = require('statuses') +``` + +### status(code) + +Returns the status message string for a known HTTP status code. The code +may be a number or a string. An error is thrown for an unknown status code. + + + +```js +status(403) // => 'Forbidden' +status('403') // => 'Forbidden' +status(306) // throws +``` + +### status(msg) + +Returns the numeric status code for a known HTTP status message. The message +is case-insensitive. An error is thrown for an unknown status message. + + + +```js +status('forbidden') // => 403 +status('Forbidden') // => 403 +status('foo') // throws +``` + +### status.codes + +Returns an array of all the status codes as `Integer`s. + +### status.code[msg] + +Returns the numeric status code for a known status message (in lower-case), +otherwise `undefined`. + + + +```js +status['not found'] // => 404 +``` + +### status.empty[code] + +Returns `true` if a status code expects an empty body. + + + +```js +status.empty[200] // => undefined +status.empty[204] // => true +status.empty[304] // => true +``` + +### status.message[code] + +Returns the string message for a known numeric status code, otherwise +`undefined`. This object is the same format as the +[Node.js http module `http.STATUS_CODES`](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes). + + + +```js +status.message[404] // => 'Not Found' +``` + +### status.redirect[code] + +Returns `true` if a status code is a valid redirect status. + + + +```js +status.redirect[200] // => undefined +status.redirect[301] // => true +``` + +### status.retry[code] + +Returns `true` if you should retry the rest. + + + +```js +status.retry[501] // => undefined +status.retry[503] // => true +``` + +## License + +[MIT](LICENSE) + +[ci-image]: https://badgen.net/github/checks/jshttp/statuses/master?label=ci +[ci-url]: https://github.com/jshttp/statuses/actions?query=workflow%3Aci +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/statuses/master +[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master +[node-version-image]: https://badgen.net/npm/node/statuses +[node-version-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/statuses +[npm-url]: https://npmjs.org/package/statuses +[npm-version-image]: https://badgen.net/npm/v/statuses +[ossf-scorecard-badge]: https://api.securityscorecards.dev/projects/github.com/jshttp/statuses/badge +[ossf-scorecard-visualizer]: https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/jshttp/statuses diff --git a/front/frontend/node_modules/send/node_modules/statuses/codes.json b/front/frontend/node_modules/send/node_modules/statuses/codes.json new file mode 100644 index 0000000..1333ed1 --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/statuses/codes.json @@ -0,0 +1,65 @@ +{ + "100": "Continue", + "101": "Switching Protocols", + "102": "Processing", + "103": "Early Hints", + "200": "OK", + "201": "Created", + "202": "Accepted", + "203": "Non-Authoritative Information", + "204": "No Content", + "205": "Reset Content", + "206": "Partial Content", + "207": "Multi-Status", + "208": "Already Reported", + "226": "IM Used", + "300": "Multiple Choices", + "301": "Moved Permanently", + "302": "Found", + "303": "See Other", + "304": "Not Modified", + "305": "Use Proxy", + "307": "Temporary Redirect", + "308": "Permanent Redirect", + "400": "Bad Request", + "401": "Unauthorized", + "402": "Payment Required", + "403": "Forbidden", + "404": "Not Found", + "405": "Method Not Allowed", + "406": "Not Acceptable", + "407": "Proxy Authentication Required", + "408": "Request Timeout", + "409": "Conflict", + "410": "Gone", + "411": "Length Required", + "412": "Precondition Failed", + "413": "Payload Too Large", + "414": "URI Too Long", + "415": "Unsupported Media Type", + "416": "Range Not Satisfiable", + "417": "Expectation Failed", + "418": "I'm a Teapot", + "421": "Misdirected Request", + "422": "Unprocessable Entity", + "423": "Locked", + "424": "Failed Dependency", + "425": "Too Early", + "426": "Upgrade Required", + "428": "Precondition Required", + "429": "Too Many Requests", + "431": "Request Header Fields Too Large", + "451": "Unavailable For Legal Reasons", + "500": "Internal Server Error", + "501": "Not Implemented", + "502": "Bad Gateway", + "503": "Service Unavailable", + "504": "Gateway Timeout", + "505": "HTTP Version Not Supported", + "506": "Variant Also Negotiates", + "507": "Insufficient Storage", + "508": "Loop Detected", + "509": "Bandwidth Limit Exceeded", + "510": "Not Extended", + "511": "Network Authentication Required" +} diff --git a/front/frontend/node_modules/send/node_modules/statuses/index.js b/front/frontend/node_modules/send/node_modules/statuses/index.js new file mode 100644 index 0000000..ea351c5 --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/statuses/index.js @@ -0,0 +1,146 @@ +/*! + * statuses + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var codes = require('./codes.json') + +/** + * Module exports. + * @public + */ + +module.exports = status + +// status code to message map +status.message = codes + +// status message (lower-case) to code map +status.code = createMessageToStatusCodeMap(codes) + +// array of status codes +status.codes = createStatusCodeList(codes) + +// status codes for redirects +status.redirect = { + 300: true, + 301: true, + 302: true, + 303: true, + 305: true, + 307: true, + 308: true +} + +// status codes for empty bodies +status.empty = { + 204: true, + 205: true, + 304: true +} + +// status codes for when you should retry the request +status.retry = { + 502: true, + 503: true, + 504: true +} + +/** + * Create a map of message to status code. + * @private + */ + +function createMessageToStatusCodeMap (codes) { + var map = {} + + Object.keys(codes).forEach(function forEachCode (code) { + var message = codes[code] + var status = Number(code) + + // populate map + map[message.toLowerCase()] = status + }) + + return map +} + +/** + * Create a list of all status codes. + * @private + */ + +function createStatusCodeList (codes) { + return Object.keys(codes).map(function mapCode (code) { + return Number(code) + }) +} + +/** + * Get the status code for given message. + * @private + */ + +function getStatusCode (message) { + var msg = message.toLowerCase() + + if (!Object.prototype.hasOwnProperty.call(status.code, msg)) { + throw new Error('invalid status message: "' + message + '"') + } + + return status.code[msg] +} + +/** + * Get the status message for given code. + * @private + */ + +function getStatusMessage (code) { + if (!Object.prototype.hasOwnProperty.call(status.message, code)) { + throw new Error('invalid status code: ' + code) + } + + return status.message[code] +} + +/** + * Get the status code. + * + * Given a number, this will throw if it is not a known status + * code, otherwise the code will be returned. Given a string, + * the string will be parsed for a number and return the code + * if valid, otherwise will lookup the code assuming this is + * the status message. + * + * @param {string|number} code + * @returns {number} + * @public + */ + +function status (code) { + if (typeof code === 'number') { + return getStatusMessage(code) + } + + if (typeof code !== 'string') { + throw new TypeError('code must be a number or string') + } + + // '403' + var n = parseInt(code, 10) + if (!isNaN(n)) { + return getStatusMessage(n) + } + + return getStatusCode(code) +} diff --git a/front/frontend/node_modules/send/node_modules/statuses/package.json b/front/frontend/node_modules/send/node_modules/statuses/package.json new file mode 100644 index 0000000..b5d016e --- /dev/null +++ b/front/frontend/node_modules/send/node_modules/statuses/package.json @@ -0,0 +1,49 @@ +{ + "name": "statuses", + "description": "HTTP status utility", + "version": "2.0.2", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)" + ], + "repository": "jshttp/statuses", + "license": "MIT", + "keywords": [ + "http", + "status", + "code" + ], + "files": [ + "HISTORY.md", + "index.js", + "codes.json", + "LICENSE" + ], + "devDependencies": { + "csv-parse": "4.16.3", + "eslint": "7.19.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.31.0", + "eslint-plugin-markdown": "1.0.2", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "4.3.1", + "eslint-plugin-standard": "4.1.0", + "mocha": "8.4.0", + "nyc": "15.1.0", + "raw-body": "2.5.2", + "stream-to-array": "2.3.0" + }, + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "build": "node scripts/build.js", + "fetch": "node scripts/fetch-apache.js && node scripts/fetch-iana.js && node scripts/fetch-nginx.js && node scripts/fetch-node.js", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "update": "npm run fetch && npm run build", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/front/frontend/node_modules/send/package.json b/front/frontend/node_modules/send/package.json new file mode 100644 index 0000000..d6a969a --- /dev/null +++ b/front/frontend/node_modules/send/package.json @@ -0,0 +1,60 @@ +{ + "name": "send", + "description": "Better streaming static file server with Range and conditional-GET support", + "version": "1.2.0", + "author": "TJ Holowaychuk ", + "contributors": [ + "Douglas Christopher Wilson ", + "James Wyatt Cready ", + "Jesús Leganés Combarro " + ], + "license": "MIT", + "repository": "pillarjs/send", + "keywords": [ + "static", + "file", + "server" + ], + "dependencies": { + "debug": "^4.3.5", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "mime-types": "^3.0.1", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.1" + }, + "devDependencies": { + "after": "^0.8.2", + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.2.0", + "eslint-plugin-standard": "4.1.0", + "mocha": "^10.7.0", + "nyc": "^17.0.0", + "supertest": "6.2.2" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 18" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --check-leaks --reporter spec", + "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/front/frontend/node_modules/serve-index/HISTORY.md b/front/frontend/node_modules/serve-index/HISTORY.md new file mode 100644 index 0000000..4bc7d1a --- /dev/null +++ b/front/frontend/node_modules/serve-index/HISTORY.md @@ -0,0 +1,305 @@ +1.9.1 / 2017-09-28 +================== + + * deps: accepts@~1.3.4 + - deps: mime-types@~2.1.16 + * deps: debug@2.6.9 + * deps: http-errors@~1.6.2 + - deps: depd@1.1.1 + * deps: mime-types@~2.1.17 + - Add new mime types + - deps: mime-db@~1.30.0 + * deps: parseurl@~1.3.2 + - perf: reduce overhead for full URLs + - perf: unroll the "fast-path" `RegExp` + +1.9.0 / 2017-05-25 +================== + + * Set `X-Content-Type-Options: nosniff` header + * deps: batch@0.6.1 + * deps: debug@2.6.8 + - Allow colors in workers + - Deprecated `DEBUG_FD` environment variable set to `3` or higher + - Fix `DEBUG_MAX_ARRAY_LENGTH` + - Fix error when running under React Native + - Use same color for same namespace + - deps: ms@2.0.0 + * deps: http-errors@~1.6.1 + - Make `message` property enumerable for `HttpError`s + - deps: inherits@2.0.3 + - deps: setprototypeof@1.0.3 + - deps: statuses@'>= 1.3.1 < 2' + * deps: mime-types@~2.1.15 + - Add new mime types + - Add `audio/mp3` + +1.8.0 / 2016-06-17 +================== + + * Make inline file search case-insensitive + * deps: accepts@~1.3.3 + - deps: mime-types@~2.1.11 + - deps: negotiator@0.6.1 + - perf: improve header parsing speed + * deps: http-errors@~1.5.0 + - Use `setprototypeof` module to replace `__proto__` setting + - deps: inherits@2.0.1 + - deps: statuses@'>= 1.3.0 < 2' + - perf: enable strict mode + * deps: mime-types@~2.1.11 + - Add new mime types + - Update primary extension for `audio/mp4` + - deps: mime-db@~1.23.0 + +1.7.3 / 2016-01-24 +================== + + * deps: accepts@~1.2.13 + - deps: mime-types@~2.1.6 + * deps: batch@0.5.3 + - Fix invalid dependency for browserify + * deps: escape-html@~1.0.3 + - perf: enable strict mode + - perf: optimize string replacement + - perf: use faster string coercion + * deps: mime-types@~2.1.9 + - Add new mime types + * deps: parseurl@~1.3.1 + - perf: enable strict mode + +1.7.2 / 2015-07-30 +================== + + * deps: accepts@~1.2.12 + - deps: mime-types@~2.1.4 + * deps: mime-types@~2.1.4 + - Add new mime types + +1.7.1 / 2015-07-05 +================== + + * deps: accepts@~1.2.10 + - deps: mime-types@~2.1.2 + * deps: mime-types@~2.1.2 + - Add new mime types + +1.7.0 / 2015-06-15 +================== + + * Accept `function` value for `template` option + * Send non-chunked response for `OPTIONS` + * Stat parent directory when necessary + * Use `Date.prototype.toLocaleDateString` to format date + * deps: accepts@~1.2.9 + - deps: mime-types@~2.1.1 + - deps: negotiator@0.5.3 + - perf: avoid argument reassignment & argument slice + - perf: avoid negotiator recursive construction + - perf: enable strict mode + - perf: remove unnecessary bitwise operator + * deps: escape-html@1.0.2 + * deps: mime-types@~2.1.1 + - Add new mime types + * perf: enable strict mode + * perf: remove argument reassignment + +1.6.4 / 2015-05-12 +================== + + * deps: accepts@~1.2.7 + - deps: mime-types@~2.0.11 + - deps: negotiator@0.5.3 + * deps: debug@~2.2.0 + - deps: ms@0.7.1 + * deps: mime-types@~2.0.11 + - Add new mime types + +1.6.3 / 2015-03-13 +================== + + * Properly escape file names in HTML + * deps: accepts@~1.2.5 + - deps: mime-types@~2.0.10 + * deps: debug@~2.1.3 + - Fix high intensity foreground color for bold + - deps: ms@0.7.0 + * deps: escape-html@1.0.1 + * deps: mime-types@~2.0.10 + - Add new mime types + +1.6.2 / 2015-02-16 +================== + + * deps: accepts@~1.2.4 + - deps: mime-types@~2.0.9 + - deps: negotiator@0.5.1 + * deps: http-errors@~1.3.1 + - Construct errors using defined constructors from `createError` + - Fix error names that are not identifiers + - Set a meaningful `name` property on constructed errors + * deps: mime-types@~2.0.9 + - Add new mime types + - deps: mime-db@~1.7.0 + +1.6.1 / 2015-01-31 +================== + + * deps: accepts@~1.2.3 + - deps: mime-types@~2.0.8 + * deps: mime-types@~2.0.8 + - Add new mime types + - deps: mime-db@~1.6.0 + +1.6.0 / 2015-01-01 +================== + + * Add link to root directory + * deps: accepts@~1.2.2 + - deps: mime-types@~2.0.7 + - deps: negotiator@0.5.0 + * deps: batch@0.5.2 + * deps: debug@~2.1.1 + * deps: mime-types@~2.0.7 + - Add new mime types + - Fix missing extensions + - Fix various invalid MIME type entries + - Remove example template MIME types + - deps: mime-db@~1.5.0 + +1.5.3 / 2014-12-10 +================== + + * deps: accepts@~1.1.4 + - deps: mime-types@~2.0.4 + * deps: http-errors@~1.2.8 + - Fix stack trace from exported function + * deps: mime-types@~2.0.4 + - Add new mime types + - deps: mime-db@~1.3.0 + +1.5.2 / 2014-12-03 +================== + + * Fix icon name background alignment on mobile view + +1.5.1 / 2014-11-22 +================== + + * deps: accepts@~1.1.3 + - deps: mime-types@~2.0.3 + * deps: mime-types@~2.0.3 + - Add new mime types + - deps: mime-db@~1.2.0 + +1.5.0 / 2014-10-16 +================== + + * Create errors with `http-errors` + * deps: debug@~2.1.0 + - Implement `DEBUG_FD` env variable support + * deps: mime-types@~2.0.2 + - deps: mime-db@~1.1.0 + +1.4.1 / 2014-10-15 +================== + + * deps: accepts@~1.1.2 + - Fix error when media type has invalid parameter + - deps: negotiator@0.4.9 + +1.4.0 / 2014-10-03 +================== + + * Add `dir` argument to `filter` function + * Support using tokens multiple times + +1.3.1 / 2014-10-01 +================== + + * Fix incorrect 403 on Windows and Node.js 0.11 + * deps: accepts@~1.1.1 + - deps: mime-types@~2.0.2 + - deps: negotiator@0.4.8 + +1.3.0 / 2014-09-20 +================== + + * Add icon for mkv files + * Lookup icon by mime type for greater icon support + +1.2.1 / 2014-09-05 +================== + + * deps: accepts@~1.1.0 + * deps: debug@~2.0.0 + +1.2.0 / 2014-08-25 +================== + + * Add `debug` messages + * Resolve relative paths at middleware setup + +1.1.6 / 2014-08-10 +================== + + * Fix URL parsing + * deps: parseurl@~1.3.0 + +1.1.5 / 2014-07-27 +================== + + * Fix Content-Length calculation for multi-byte file names + * deps: accepts@~1.0.7 + - deps: negotiator@0.4.7 + +1.1.4 / 2014-06-20 +================== + + * deps: accepts@~1.0.5 + +1.1.3 / 2014-06-20 +================== + + * deps: accepts@~1.0.4 + - use `mime-types` + +1.1.2 / 2014-06-19 +================== + + * deps: batch@0.5.1 + +1.1.1 / 2014-06-11 +================== + + * deps: accepts@1.0.3 + +1.1.0 / 2014-05-29 +================== + + * Fix content negotiation when no `Accept` header + * Properly support all HTTP methods + * Support vanilla node.js http servers + * Treat `ENAMETOOLONG` as code 414 + * Use accepts for negotiation + +1.0.3 / 2014-05-20 +================== + + * Fix error from non-statable files in HTML view + +1.0.2 / 2014-04-28 +================== + + * Add `stylesheet` option + * deps: negotiator@0.4.3 + +1.0.1 / 2014-03-05 +================== + + * deps: negotiator@0.4.2 + +1.0.0 / 2014-03-05 +================== + + * Genesis from connect diff --git a/front/frontend/node_modules/serve-index/LICENSE b/front/frontend/node_modules/serve-index/LICENSE new file mode 100644 index 0000000..d8cce67 --- /dev/null +++ b/front/frontend/node_modules/serve-index/LICENSE @@ -0,0 +1,25 @@ +(The MIT License) + +Copyright (c) 2010 Sencha Inc. +Copyright (c) 2011 LearnBoost +Copyright (c) 2011 TJ Holowaychuk +Copyright (c) 2014-2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/serve-index/README.md b/front/frontend/node_modules/serve-index/README.md new file mode 100644 index 0000000..c21db28 --- /dev/null +++ b/front/frontend/node_modules/serve-index/README.md @@ -0,0 +1,154 @@ +# serve-index + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Linux Build][travis-image]][travis-url] +[![Windows Build][appveyor-image]][appveyor-url] +[![Test Coverage][coveralls-image]][coveralls-url] +[![Gratipay][gratipay-image]][gratipay-url] + + Serves pages that contain directory listings for a given path. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install serve-index +``` + +## API + +```js +var serveIndex = require('serve-index') +``` + +### serveIndex(path, options) + +Returns middlware that serves an index of the directory in the given `path`. + +The `path` is based off the `req.url` value, so a `req.url` of `'/some/dir` +with a `path` of `'public'` will look at `'public/some/dir'`. If you are using +something like `express`, you can change the URL "base" with `app.use` (see +the express example). + +#### Options + +Serve index accepts these properties in the options object. + +##### filter + +Apply this filter function to files. Defaults to `false`. The `filter` function +is called for each file, with the signature `filter(filename, index, files, dir)` +where `filename` is the name of the file, `index` is the array index, `files` is +the array of files and `dir` is the absolute path the file is located (and thus, +the directory the listing is for). + +##### hidden + +Display hidden (dot) files. Defaults to `false`. + +##### icons + +Display icons. Defaults to `false`. + +##### stylesheet + +Optional path to a CSS stylesheet. Defaults to a built-in stylesheet. + +##### template + +Optional path to an HTML template or a function that will render a HTML +string. Defaults to a built-in template. + +When given a string, the string is used as a file path to load and then the +following tokens are replaced in templates: + + * `{directory}` with the name of the directory. + * `{files}` with the HTML of an unordered list of file links. + * `{linked-path}` with the HTML of a link to the directory. + * `{style}` with the specified stylesheet and embedded images. + +When given as a function, the function is called as `template(locals, callback)` +and it needs to invoke `callback(error, htmlString)`. The following are the +provided locals: + + * `directory` is the directory being displayed (where `/` is the root). + * `displayIcons` is a Boolean for if icons should be rendered or not. + * `fileList` is a sorted array of files in the directory. The array contains + objects with the following properties: + - `name` is the relative name for the file. + - `stat` is a `fs.Stats` object for the file. + * `path` is the full filesystem path to `directory`. + * `style` is the default stylesheet or the contents of the `stylesheet` option. + * `viewName` is the view name provided by the `view` option. + +##### view + +Display mode. `tiles` and `details` are available. Defaults to `tiles`. + +## Examples + +### Serve directory indexes with vanilla node.js http server + +```js +var finalhandler = require('finalhandler') +var http = require('http') +var serveIndex = require('serve-index') +var serveStatic = require('serve-static') + +// Serve directory indexes for public/ftp folder (with icons) +var index = serveIndex('public/ftp', {'icons': true}) + +// Serve up public/ftp folder files +var serve = serveStatic('public/ftp') + +// Create server +var server = http.createServer(function onRequest(req, res){ + var done = finalhandler(req, res) + serve(req, res, function onNext(err) { + if (err) return done(err) + index(req, res, done) + }) +}) + +// Listen +server.listen(3000) +``` + +### Serve directory indexes with express + +```js +var express = require('express') +var serveIndex = require('serve-index') + +var app = express() + +// Serve URLs like /ftp/thing as public/ftp/thing +// The express.static serves the file contents +// The serveIndex is this module serving the directory +app.use('/ftp', express.static('public/ftp'), serveIndex('public/ftp', {'icons': true})) + +// Listen +app.listen(3000) +``` + +## License + +[MIT](LICENSE). The [Silk](http://www.famfamfam.com/lab/icons/silk/) icons +are created by/copyright of [FAMFAMFAM](http://www.famfamfam.com/). + +[npm-image]: https://img.shields.io/npm/v/serve-index.svg +[npm-url]: https://npmjs.org/package/serve-index +[travis-image]: https://img.shields.io/travis/expressjs/serve-index/master.svg?label=linux +[travis-url]: https://travis-ci.org/expressjs/serve-index +[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/serve-index/master.svg?label=windows +[appveyor-url]: https://ci.appveyor.com/project/dougwilson/serve-index +[coveralls-image]: https://img.shields.io/coveralls/expressjs/serve-index/master.svg +[coveralls-url]: https://coveralls.io/r/expressjs/serve-index?branch=master +[downloads-image]: https://img.shields.io/npm/dm/serve-index.svg +[downloads-url]: https://npmjs.org/package/serve-index +[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg +[gratipay-url]: https://www.gratipay.com/dougwilson/ diff --git a/front/frontend/node_modules/serve-index/index.js b/front/frontend/node_modules/serve-index/index.js new file mode 100644 index 0000000..e3a619f --- /dev/null +++ b/front/frontend/node_modules/serve-index/index.js @@ -0,0 +1,646 @@ +/*! + * serve-index + * Copyright(c) 2011 Sencha Inc. + * Copyright(c) 2011 TJ Holowaychuk + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var accepts = require('accepts'); +var createError = require('http-errors'); +var debug = require('debug')('serve-index'); +var escapeHtml = require('escape-html'); +var fs = require('fs') + , path = require('path') + , normalize = path.normalize + , sep = path.sep + , extname = path.extname + , join = path.join; +var Batch = require('batch'); +var mime = require('mime-types'); +var parseUrl = require('parseurl'); +var resolve = require('path').resolve; + +/** + * Module exports. + * @public + */ + +module.exports = serveIndex; + +/*! + * Icon cache. + */ + +var cache = {}; + +/*! + * Default template. + */ + +var defaultTemplate = join(__dirname, 'public', 'directory.html'); + +/*! + * Stylesheet. + */ + +var defaultStylesheet = join(__dirname, 'public', 'style.css'); + +/** + * Media types and the map for content negotiation. + */ + +var mediaTypes = [ + 'text/html', + 'text/plain', + 'application/json' +]; + +var mediaType = { + 'text/html': 'html', + 'text/plain': 'plain', + 'application/json': 'json' +}; + +/** + * Serve directory listings with the given `root` path. + * + * See Readme.md for documentation of options. + * + * @param {String} root + * @param {Object} options + * @return {Function} middleware + * @public + */ + +function serveIndex(root, options) { + var opts = options || {}; + + // root required + if (!root) { + throw new TypeError('serveIndex() root path required'); + } + + // resolve root to absolute and normalize + var rootPath = normalize(resolve(root) + sep); + + var filter = opts.filter; + var hidden = opts.hidden; + var icons = opts.icons; + var stylesheet = opts.stylesheet || defaultStylesheet; + var template = opts.template || defaultTemplate; + var view = opts.view || 'tiles'; + + return function (req, res, next) { + if (req.method !== 'GET' && req.method !== 'HEAD') { + res.statusCode = 'OPTIONS' === req.method ? 200 : 405; + res.setHeader('Allow', 'GET, HEAD, OPTIONS'); + res.setHeader('Content-Length', '0'); + res.end(); + return; + } + + // parse URLs + var url = parseUrl(req); + var originalUrl = parseUrl.original(req); + var dir = decodeURIComponent(url.pathname); + var originalDir = decodeURIComponent(originalUrl.pathname); + + // join / normalize from root dir + var path = normalize(join(rootPath, dir)); + + // null byte(s), bad request + if (~path.indexOf('\0')) return next(createError(400)); + + // malicious path + if ((path + sep).substr(0, rootPath.length) !== rootPath) { + debug('malicious path "%s"', path); + return next(createError(403)); + } + + // determine ".." display + var showUp = normalize(resolve(path) + sep) !== rootPath; + + // check if we have a directory + debug('stat "%s"', path); + fs.stat(path, function(err, stat){ + if (err && err.code === 'ENOENT') { + return next(); + } + + if (err) { + err.status = err.code === 'ENAMETOOLONG' + ? 414 + : 500; + return next(err); + } + + if (!stat.isDirectory()) return next(); + + // fetch files + debug('readdir "%s"', path); + fs.readdir(path, function(err, files){ + if (err) return next(err); + if (!hidden) files = removeHidden(files); + if (filter) files = files.filter(function(filename, index, list) { + return filter(filename, index, list, path); + }); + files.sort(); + + // content-negotiation + var accept = accepts(req); + var type = accept.type(mediaTypes); + + // not acceptable + if (!type) return next(createError(406)); + serveIndex[mediaType[type]](req, res, files, next, originalDir, showUp, icons, path, view, template, stylesheet); + }); + }); + }; +}; + +/** + * Respond with text/html. + */ + +serveIndex.html = function _html(req, res, files, next, dir, showUp, icons, path, view, template, stylesheet) { + var render = typeof template !== 'function' + ? createHtmlRender(template) + : template + + if (showUp) { + files.unshift('..'); + } + + // stat all files + stat(path, files, function (err, stats) { + if (err) return next(err); + + // combine the stats into the file list + var fileList = files.map(function (file, i) { + return { name: file, stat: stats[i] }; + }); + + // sort file list + fileList.sort(fileSort); + + // read stylesheet + fs.readFile(stylesheet, 'utf8', function (err, style) { + if (err) return next(err); + + // create locals for rendering + var locals = { + directory: dir, + displayIcons: Boolean(icons), + fileList: fileList, + path: path, + style: style, + viewName: view + }; + + // render html + render(locals, function (err, body) { + if (err) return next(err); + send(res, 'text/html', body) + }); + }); + }); +}; + +/** + * Respond with application/json. + */ + +serveIndex.json = function _json(req, res, files) { + send(res, 'application/json', JSON.stringify(files)) +}; + +/** + * Respond with text/plain. + */ + +serveIndex.plain = function _plain(req, res, files) { + send(res, 'text/plain', (files.join('\n') + '\n')) +}; + +/** + * Map html `files`, returning an html unordered list. + * @private + */ + +function createHtmlFileList(files, dir, useIcons, view) { + var html = '
      ' + + (view == 'details' ? ( + '
    • ' + + 'Name' + + 'Size' + + 'Modified' + + '
    • ') : ''); + + html += files.map(function (file) { + var classes = []; + var isDir = file.stat && file.stat.isDirectory(); + var path = dir.split('/').map(function (c) { return encodeURIComponent(c); }); + + if (useIcons) { + classes.push('icon'); + + if (isDir) { + classes.push('icon-directory'); + } else { + var ext = extname(file.name); + var icon = iconLookup(file.name); + + classes.push('icon'); + classes.push('icon-' + ext.substring(1)); + + if (classes.indexOf(icon.className) === -1) { + classes.push(icon.className); + } + } + } + + path.push(encodeURIComponent(file.name)); + + var date = file.stat && file.name !== '..' + ? file.stat.mtime.toLocaleDateString() + ' ' + file.stat.mtime.toLocaleTimeString() + : ''; + var size = file.stat && !isDir + ? file.stat.size + : ''; + + return '
    • ' + + '' + escapeHtml(file.name) + '' + + '' + escapeHtml(size) + '' + + '' + escapeHtml(date) + '' + + '
    • '; + }).join('\n'); + + html += '
    '; + + return html; +} + +/** + * Create function to render html. + */ + +function createHtmlRender(template) { + return function render(locals, callback) { + // read template + fs.readFile(template, 'utf8', function (err, str) { + if (err) return callback(err); + + var body = str + .replace(/\{style\}/g, locals.style.concat(iconStyle(locals.fileList, locals.displayIcons))) + .replace(/\{files\}/g, createHtmlFileList(locals.fileList, locals.directory, locals.displayIcons, locals.viewName)) + .replace(/\{directory\}/g, escapeHtml(locals.directory)) + .replace(/\{linked-path\}/g, htmlPath(locals.directory)); + + callback(null, body); + }); + }; +} + +/** + * Sort function for with directories first. + */ + +function fileSort(a, b) { + // sort ".." to the top + if (a.name === '..' || b.name === '..') { + return a.name === b.name ? 0 + : a.name === '..' ? -1 : 1; + } + + return Number(b.stat && b.stat.isDirectory()) - Number(a.stat && a.stat.isDirectory()) || + String(a.name).toLocaleLowerCase().localeCompare(String(b.name).toLocaleLowerCase()); +} + +/** + * Map html `dir`, returning a linked path. + */ + +function htmlPath(dir) { + var parts = dir.split('/'); + var crumb = new Array(parts.length); + + for (var i = 0; i < parts.length; i++) { + var part = parts[i]; + + if (part) { + parts[i] = encodeURIComponent(part); + crumb[i] = '' + escapeHtml(part) + ''; + } + } + + return crumb.join(' / '); +} + +/** + * Get the icon data for the file name. + */ + +function iconLookup(filename) { + var ext = extname(filename); + + // try by extension + if (icons[ext]) { + return { + className: 'icon-' + ext.substring(1), + fileName: icons[ext] + }; + } + + var mimetype = mime.lookup(ext); + + // default if no mime type + if (mimetype === false) { + return { + className: 'icon-default', + fileName: icons.default + }; + } + + // try by mime type + if (icons[mimetype]) { + return { + className: 'icon-' + mimetype.replace('/', '-'), + fileName: icons[mimetype] + }; + } + + var suffix = mimetype.split('+')[1]; + + if (suffix && icons['+' + suffix]) { + return { + className: 'icon-' + suffix, + fileName: icons['+' + suffix] + }; + } + + var type = mimetype.split('/')[0]; + + // try by type only + if (icons[type]) { + return { + className: 'icon-' + type, + fileName: icons[type] + }; + } + + return { + className: 'icon-default', + fileName: icons.default + }; +} + +/** + * Load icon images, return css string. + */ + +function iconStyle(files, useIcons) { + if (!useIcons) return ''; + var i; + var list = []; + var rules = {}; + var selector; + var selectors = {}; + var style = ''; + + for (i = 0; i < files.length; i++) { + var file = files[i]; + + var isDir = file.stat && file.stat.isDirectory(); + var icon = isDir + ? { className: 'icon-directory', fileName: icons.folder } + : iconLookup(file.name); + var iconName = icon.fileName; + + selector = '#files .' + icon.className + ' .name'; + + if (!rules[iconName]) { + rules[iconName] = 'background-image: url(data:image/png;base64,' + load(iconName) + ');' + selectors[iconName] = []; + list.push(iconName); + } + + if (selectors[iconName].indexOf(selector) === -1) { + selectors[iconName].push(selector); + } + } + + for (i = 0; i < list.length; i++) { + iconName = list[i]; + style += selectors[iconName].join(',\n') + ' {\n ' + rules[iconName] + '\n}\n'; + } + + return style; +} + +/** + * Load and cache the given `icon`. + * + * @param {String} icon + * @return {String} + * @api private + */ + +function load(icon) { + if (cache[icon]) return cache[icon]; + return cache[icon] = fs.readFileSync(__dirname + '/public/icons/' + icon, 'base64'); +} + +/** + * Normalizes the path separator from system separator + * to URL separator, aka `/`. + * + * @param {String} path + * @return {String} + * @api private + */ + +function normalizeSlashes(path) { + return path.split(sep).join('/'); +}; + +/** + * Filter "hidden" `files`, aka files + * beginning with a `.`. + * + * @param {Array} files + * @return {Array} + * @api private + */ + +function removeHidden(files) { + return files.filter(function(file){ + return '.' != file[0]; + }); +} + +/** + * Send a response. + * @private + */ + +function send (res, type, body) { + // security header for content sniffing + res.setHeader('X-Content-Type-Options', 'nosniff') + + // standard headers + res.setHeader('Content-Type', type + '; charset=utf-8') + res.setHeader('Content-Length', Buffer.byteLength(body, 'utf8')) + + // body + res.end(body, 'utf8') +} + +/** + * Stat all files and return array of stat + * in same order. + */ + +function stat(dir, files, cb) { + var batch = new Batch(); + + batch.concurrency(10); + + files.forEach(function(file){ + batch.push(function(done){ + fs.stat(join(dir, file), function(err, stat){ + if (err && err.code !== 'ENOENT') return done(err); + + // pass ENOENT as null stat, not error + done(null, stat || null); + }); + }); + }); + + batch.end(cb); +} + +/** + * Icon map. + */ + +var icons = { + // base icons + 'default': 'page_white.png', + 'folder': 'folder.png', + + // generic mime type icons + 'image': 'image.png', + 'text': 'page_white_text.png', + 'video': 'film.png', + + // generic mime suffix icons + '+json': 'page_white_code.png', + '+xml': 'page_white_code.png', + '+zip': 'box.png', + + // specific mime type icons + 'application/font-woff': 'font.png', + 'application/javascript': 'page_white_code_red.png', + 'application/json': 'page_white_code.png', + 'application/msword': 'page_white_word.png', + 'application/pdf': 'page_white_acrobat.png', + 'application/postscript': 'page_white_vector.png', + 'application/rtf': 'page_white_word.png', + 'application/vnd.ms-excel': 'page_white_excel.png', + 'application/vnd.ms-powerpoint': 'page_white_powerpoint.png', + 'application/vnd.oasis.opendocument.presentation': 'page_white_powerpoint.png', + 'application/vnd.oasis.opendocument.spreadsheet': 'page_white_excel.png', + 'application/vnd.oasis.opendocument.text': 'page_white_word.png', + 'application/x-7z-compressed': 'box.png', + 'application/x-sh': 'application_xp_terminal.png', + 'application/x-font-ttf': 'font.png', + 'application/x-msaccess': 'page_white_database.png', + 'application/x-shockwave-flash': 'page_white_flash.png', + 'application/x-sql': 'page_white_database.png', + 'application/x-tar': 'box.png', + 'application/x-xz': 'box.png', + 'application/xml': 'page_white_code.png', + 'application/zip': 'box.png', + 'image/svg+xml': 'page_white_vector.png', + 'text/css': 'page_white_code.png', + 'text/html': 'page_white_code.png', + 'text/less': 'page_white_code.png', + + // other, extension-specific icons + '.accdb': 'page_white_database.png', + '.apk': 'box.png', + '.app': 'application_xp.png', + '.as': 'page_white_actionscript.png', + '.asp': 'page_white_code.png', + '.aspx': 'page_white_code.png', + '.bat': 'application_xp_terminal.png', + '.bz2': 'box.png', + '.c': 'page_white_c.png', + '.cab': 'box.png', + '.cfm': 'page_white_coldfusion.png', + '.clj': 'page_white_code.png', + '.cc': 'page_white_cplusplus.png', + '.cgi': 'application_xp_terminal.png', + '.cpp': 'page_white_cplusplus.png', + '.cs': 'page_white_csharp.png', + '.db': 'page_white_database.png', + '.dbf': 'page_white_database.png', + '.deb': 'box.png', + '.dll': 'page_white_gear.png', + '.dmg': 'drive.png', + '.docx': 'page_white_word.png', + '.erb': 'page_white_ruby.png', + '.exe': 'application_xp.png', + '.fnt': 'font.png', + '.gam': 'controller.png', + '.gz': 'box.png', + '.h': 'page_white_h.png', + '.ini': 'page_white_gear.png', + '.iso': 'cd.png', + '.jar': 'box.png', + '.java': 'page_white_cup.png', + '.jsp': 'page_white_cup.png', + '.lua': 'page_white_code.png', + '.lz': 'box.png', + '.lzma': 'box.png', + '.m': 'page_white_code.png', + '.map': 'map.png', + '.msi': 'box.png', + '.mv4': 'film.png', + '.otf': 'font.png', + '.pdb': 'page_white_database.png', + '.php': 'page_white_php.png', + '.pl': 'page_white_code.png', + '.pkg': 'box.png', + '.pptx': 'page_white_powerpoint.png', + '.psd': 'page_white_picture.png', + '.py': 'page_white_code.png', + '.rar': 'box.png', + '.rb': 'page_white_ruby.png', + '.rm': 'film.png', + '.rom': 'controller.png', + '.rpm': 'box.png', + '.sass': 'page_white_code.png', + '.sav': 'controller.png', + '.scss': 'page_white_code.png', + '.srt': 'page_white_text.png', + '.tbz2': 'box.png', + '.tgz': 'box.png', + '.tlz': 'box.png', + '.vb': 'page_white_code.png', + '.vbs': 'page_white_code.png', + '.xcf': 'page_white_picture.png', + '.xlsx': 'page_white_excel.png', + '.yaws': 'page_white_code.png' +}; diff --git a/front/frontend/node_modules/serve-index/node_modules/depd/History.md b/front/frontend/node_modules/serve-index/node_modules/depd/History.md new file mode 100644 index 0000000..507ecb8 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/depd/History.md @@ -0,0 +1,96 @@ +1.1.2 / 2018-01-11 +================== + + * perf: remove argument reassignment + * Support Node.js 0.6 to 9.x + +1.1.1 / 2017-07-27 +================== + + * Remove unnecessary `Buffer` loading + * Support Node.js 0.6 to 8.x + +1.1.0 / 2015-09-14 +================== + + * Enable strict mode in more places + * Support io.js 3.x + * Support io.js 2.x + * Support web browser loading + - Requires bundler like Browserify or webpack + +1.0.1 / 2015-04-07 +================== + + * Fix `TypeError`s when under `'use strict'` code + * Fix useless type name on auto-generated messages + * Support io.js 1.x + * Support Node.js 0.12 + +1.0.0 / 2014-09-17 +================== + + * No changes + +0.4.5 / 2014-09-09 +================== + + * Improve call speed to functions using the function wrapper + * Support Node.js 0.6 + +0.4.4 / 2014-07-27 +================== + + * Work-around v8 generating empty stack traces + +0.4.3 / 2014-07-26 +================== + + * Fix exception when global `Error.stackTraceLimit` is too low + +0.4.2 / 2014-07-19 +================== + + * Correct call site for wrapped functions and properties + +0.4.1 / 2014-07-19 +================== + + * Improve automatic message generation for function properties + +0.4.0 / 2014-07-19 +================== + + * Add `TRACE_DEPRECATION` environment variable + * Remove non-standard grey color from color output + * Support `--no-deprecation` argument + * Support `--trace-deprecation` argument + * Support `deprecate.property(fn, prop, message)` + +0.3.0 / 2014-06-16 +================== + + * Add `NO_DEPRECATION` environment variable + +0.2.0 / 2014-06-15 +================== + + * Add `deprecate.property(obj, prop, message)` + * Remove `supports-color` dependency for node.js 0.8 + +0.1.0 / 2014-06-15 +================== + + * Add `deprecate.function(fn, message)` + * Add `process.on('deprecation', fn)` emitter + * Automatically generate message when omitted from `deprecate()` + +0.0.1 / 2014-06-15 +================== + + * Fix warning for dynamic calls at singe call site + +0.0.0 / 2014-06-15 +================== + + * Initial implementation diff --git a/front/frontend/node_modules/serve-index/node_modules/depd/LICENSE b/front/frontend/node_modules/serve-index/node_modules/depd/LICENSE new file mode 100644 index 0000000..84441fb --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/depd/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2017 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/serve-index/node_modules/depd/Readme.md b/front/frontend/node_modules/serve-index/node_modules/depd/Readme.md new file mode 100644 index 0000000..7790670 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/depd/Readme.md @@ -0,0 +1,280 @@ +# depd + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Linux Build][travis-image]][travis-url] +[![Windows Build][appveyor-image]][appveyor-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +Deprecate all the things + +> With great modules comes great responsibility; mark things deprecated! + +## Install + +This module is installed directly using `npm`: + +```sh +$ npm install depd +``` + +This module can also be bundled with systems like +[Browserify](http://browserify.org/) or [webpack](https://webpack.github.io/), +though by default this module will alter it's API to no longer display or +track deprecations. + +## API + + + +```js +var deprecate = require('depd')('my-module') +``` + +This library allows you to display deprecation messages to your users. +This library goes above and beyond with deprecation warnings by +introspection of the call stack (but only the bits that it is interested +in). + +Instead of just warning on the first invocation of a deprecated +function and never again, this module will warn on the first invocation +of a deprecated function per unique call site, making it ideal to alert +users of all deprecated uses across the code base, rather than just +whatever happens to execute first. + +The deprecation warnings from this module also include the file and line +information for the call into the module that the deprecated function was +in. + +**NOTE** this library has a similar interface to the `debug` module, and +this module uses the calling file to get the boundary for the call stacks, +so you should always create a new `deprecate` object in each file and not +within some central file. + +### depd(namespace) + +Create a new deprecate function that uses the given namespace name in the +messages and will display the call site prior to the stack entering the +file this function was called from. It is highly suggested you use the +name of your module as the namespace. + +### deprecate(message) + +Call this function from deprecated code to display a deprecation message. +This message will appear once per unique caller site. Caller site is the +first call site in the stack in a different file from the caller of this +function. + +If the message is omitted, a message is generated for you based on the site +of the `deprecate()` call and will display the name of the function called, +similar to the name displayed in a stack trace. + +### deprecate.function(fn, message) + +Call this function to wrap a given function in a deprecation message on any +call to the function. An optional message can be supplied to provide a custom +message. + +### deprecate.property(obj, prop, message) + +Call this function to wrap a given property on object in a deprecation message +on any accessing or setting of the property. An optional message can be supplied +to provide a custom message. + +The method must be called on the object where the property belongs (not +inherited from the prototype). + +If the property is a data descriptor, it will be converted to an accessor +descriptor in order to display the deprecation message. + +### process.on('deprecation', fn) + +This module will allow easy capturing of deprecation errors by emitting the +errors as the type "deprecation" on the global `process`. If there are no +listeners for this type, the errors are written to STDERR as normal, but if +there are any listeners, nothing will be written to STDERR and instead only +emitted. From there, you can write the errors in a different format or to a +logging source. + +The error represents the deprecation and is emitted only once with the same +rules as writing to STDERR. The error has the following properties: + + - `message` - This is the message given by the library + - `name` - This is always `'DeprecationError'` + - `namespace` - This is the namespace the deprecation came from + - `stack` - This is the stack of the call to the deprecated thing + +Example `error.stack` output: + +``` +DeprecationError: my-cool-module deprecated oldfunction + at Object. ([eval]-wrapper:6:22) + at Module._compile (module.js:456:26) + at evalScript (node.js:532:25) + at startup (node.js:80:7) + at node.js:902:3 +``` + +### process.env.NO_DEPRECATION + +As a user of modules that are deprecated, the environment variable `NO_DEPRECATION` +is provided as a quick solution to silencing deprecation warnings from being +output. The format of this is similar to that of `DEBUG`: + +```sh +$ NO_DEPRECATION=my-module,othermod node app.js +``` + +This will suppress deprecations from being output for "my-module" and "othermod". +The value is a list of comma-separated namespaces. To suppress every warning +across all namespaces, use the value `*` for a namespace. + +Providing the argument `--no-deprecation` to the `node` executable will suppress +all deprecations (only available in Node.js 0.8 or higher). + +**NOTE** This will not suppress the deperecations given to any "deprecation" +event listeners, just the output to STDERR. + +### process.env.TRACE_DEPRECATION + +As a user of modules that are deprecated, the environment variable `TRACE_DEPRECATION` +is provided as a solution to getting more detailed location information in deprecation +warnings by including the entire stack trace. The format of this is the same as +`NO_DEPRECATION`: + +```sh +$ TRACE_DEPRECATION=my-module,othermod node app.js +``` + +This will include stack traces for deprecations being output for "my-module" and +"othermod". The value is a list of comma-separated namespaces. To trace every +warning across all namespaces, use the value `*` for a namespace. + +Providing the argument `--trace-deprecation` to the `node` executable will trace +all deprecations (only available in Node.js 0.8 or higher). + +**NOTE** This will not trace the deperecations silenced by `NO_DEPRECATION`. + +## Display + +![message](files/message.png) + +When a user calls a function in your library that you mark deprecated, they +will see the following written to STDERR (in the given colors, similar colors +and layout to the `debug` module): + +``` +bright cyan bright yellow +| | reset cyan +| | | | +▼ ▼ ▼ ▼ +my-cool-module deprecated oldfunction [eval]-wrapper:6:22 +▲ ▲ ▲ ▲ +| | | | +namespace | | location of mycoolmod.oldfunction() call + | deprecation message + the word "deprecated" +``` + +If the user redirects their STDERR to a file or somewhere that does not support +colors, they see (similar layout to the `debug` module): + +``` +Sun, 15 Jun 2014 05:21:37 GMT my-cool-module deprecated oldfunction at [eval]-wrapper:6:22 +▲ ▲ ▲ ▲ ▲ +| | | | | +timestamp of message namespace | | location of mycoolmod.oldfunction() call + | deprecation message + the word "deprecated" +``` + +## Examples + +### Deprecating all calls to a function + +This will display a deprecated message about "oldfunction" being deprecated +from "my-module" on STDERR. + +```js +var deprecate = require('depd')('my-cool-module') + +// message automatically derived from function name +// Object.oldfunction +exports.oldfunction = deprecate.function(function oldfunction () { + // all calls to function are deprecated +}) + +// specific message +exports.oldfunction = deprecate.function(function () { + // all calls to function are deprecated +}, 'oldfunction') +``` + +### Conditionally deprecating a function call + +This will display a deprecated message about "weirdfunction" being deprecated +from "my-module" on STDERR when called with less than 2 arguments. + +```js +var deprecate = require('depd')('my-cool-module') + +exports.weirdfunction = function () { + if (arguments.length < 2) { + // calls with 0 or 1 args are deprecated + deprecate('weirdfunction args < 2') + } +} +``` + +When calling `deprecate` as a function, the warning is counted per call site +within your own module, so you can display different deprecations depending +on different situations and the users will still get all the warnings: + +```js +var deprecate = require('depd')('my-cool-module') + +exports.weirdfunction = function () { + if (arguments.length < 2) { + // calls with 0 or 1 args are deprecated + deprecate('weirdfunction args < 2') + } else if (typeof arguments[0] !== 'string') { + // calls with non-string first argument are deprecated + deprecate('weirdfunction non-string first arg') + } +} +``` + +### Deprecating property access + +This will display a deprecated message about "oldprop" being deprecated +from "my-module" on STDERR when accessed. A deprecation will be displayed +when setting the value and when getting the value. + +```js +var deprecate = require('depd')('my-cool-module') + +exports.oldprop = 'something' + +// message automatically derives from property name +deprecate.property(exports, 'oldprop') + +// explicit message +deprecate.property(exports, 'oldprop', 'oldprop >= 0.10') +``` + +## License + +[MIT](LICENSE) + +[npm-version-image]: https://img.shields.io/npm/v/depd.svg +[npm-downloads-image]: https://img.shields.io/npm/dm/depd.svg +[npm-url]: https://npmjs.org/package/depd +[travis-image]: https://img.shields.io/travis/dougwilson/nodejs-depd/master.svg?label=linux +[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd +[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/nodejs-depd/master.svg?label=windows +[appveyor-url]: https://ci.appveyor.com/project/dougwilson/nodejs-depd +[coveralls-image]: https://img.shields.io/coveralls/dougwilson/nodejs-depd/master.svg +[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master +[node-image]: https://img.shields.io/node/v/depd.svg +[node-url]: https://nodejs.org/en/download/ diff --git a/front/frontend/node_modules/serve-index/node_modules/depd/index.js b/front/frontend/node_modules/serve-index/node_modules/depd/index.js new file mode 100644 index 0000000..d758d3c --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/depd/index.js @@ -0,0 +1,522 @@ +/*! + * depd + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module dependencies. + */ + +var callSiteToString = require('./lib/compat').callSiteToString +var eventListenerCount = require('./lib/compat').eventListenerCount +var relative = require('path').relative + +/** + * Module exports. + */ + +module.exports = depd + +/** + * Get the path to base files on. + */ + +var basePath = process.cwd() + +/** + * Determine if namespace is contained in the string. + */ + +function containsNamespace (str, namespace) { + var vals = str.split(/[ ,]+/) + var ns = String(namespace).toLowerCase() + + for (var i = 0; i < vals.length; i++) { + var val = vals[i] + + // namespace contained + if (val && (val === '*' || val.toLowerCase() === ns)) { + return true + } + } + + return false +} + +/** + * Convert a data descriptor to accessor descriptor. + */ + +function convertDataDescriptorToAccessor (obj, prop, message) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop) + var value = descriptor.value + + descriptor.get = function getter () { return value } + + if (descriptor.writable) { + descriptor.set = function setter (val) { return (value = val) } + } + + delete descriptor.value + delete descriptor.writable + + Object.defineProperty(obj, prop, descriptor) + + return descriptor +} + +/** + * Create arguments string to keep arity. + */ + +function createArgumentsString (arity) { + var str = '' + + for (var i = 0; i < arity; i++) { + str += ', arg' + i + } + + return str.substr(2) +} + +/** + * Create stack string from stack. + */ + +function createStackString (stack) { + var str = this.name + ': ' + this.namespace + + if (this.message) { + str += ' deprecated ' + this.message + } + + for (var i = 0; i < stack.length; i++) { + str += '\n at ' + callSiteToString(stack[i]) + } + + return str +} + +/** + * Create deprecate for namespace in caller. + */ + +function depd (namespace) { + if (!namespace) { + throw new TypeError('argument namespace is required') + } + + var stack = getStack() + var site = callSiteLocation(stack[1]) + var file = site[0] + + function deprecate (message) { + // call to self as log + log.call(deprecate, message) + } + + deprecate._file = file + deprecate._ignored = isignored(namespace) + deprecate._namespace = namespace + deprecate._traced = istraced(namespace) + deprecate._warned = Object.create(null) + + deprecate.function = wrapfunction + deprecate.property = wrapproperty + + return deprecate +} + +/** + * Determine if namespace is ignored. + */ + +function isignored (namespace) { + /* istanbul ignore next: tested in a child processs */ + if (process.noDeprecation) { + // --no-deprecation support + return true + } + + var str = process.env.NO_DEPRECATION || '' + + // namespace ignored + return containsNamespace(str, namespace) +} + +/** + * Determine if namespace is traced. + */ + +function istraced (namespace) { + /* istanbul ignore next: tested in a child processs */ + if (process.traceDeprecation) { + // --trace-deprecation support + return true + } + + var str = process.env.TRACE_DEPRECATION || '' + + // namespace traced + return containsNamespace(str, namespace) +} + +/** + * Display deprecation message. + */ + +function log (message, site) { + var haslisteners = eventListenerCount(process, 'deprecation') !== 0 + + // abort early if no destination + if (!haslisteners && this._ignored) { + return + } + + var caller + var callFile + var callSite + var depSite + var i = 0 + var seen = false + var stack = getStack() + var file = this._file + + if (site) { + // provided site + depSite = site + callSite = callSiteLocation(stack[1]) + callSite.name = depSite.name + file = callSite[0] + } else { + // get call site + i = 2 + depSite = callSiteLocation(stack[i]) + callSite = depSite + } + + // get caller of deprecated thing in relation to file + for (; i < stack.length; i++) { + caller = callSiteLocation(stack[i]) + callFile = caller[0] + + if (callFile === file) { + seen = true + } else if (callFile === this._file) { + file = this._file + } else if (seen) { + break + } + } + + var key = caller + ? depSite.join(':') + '__' + caller.join(':') + : undefined + + if (key !== undefined && key in this._warned) { + // already warned + return + } + + this._warned[key] = true + + // generate automatic message from call site + var msg = message + if (!msg) { + msg = callSite === depSite || !callSite.name + ? defaultMessage(depSite) + : defaultMessage(callSite) + } + + // emit deprecation if listeners exist + if (haslisteners) { + var err = DeprecationError(this._namespace, msg, stack.slice(i)) + process.emit('deprecation', err) + return + } + + // format and write message + var format = process.stderr.isTTY + ? formatColor + : formatPlain + var output = format.call(this, msg, caller, stack.slice(i)) + process.stderr.write(output + '\n', 'utf8') +} + +/** + * Get call site location as array. + */ + +function callSiteLocation (callSite) { + var file = callSite.getFileName() || '' + var line = callSite.getLineNumber() + var colm = callSite.getColumnNumber() + + if (callSite.isEval()) { + file = callSite.getEvalOrigin() + ', ' + file + } + + var site = [file, line, colm] + + site.callSite = callSite + site.name = callSite.getFunctionName() + + return site +} + +/** + * Generate a default message from the site. + */ + +function defaultMessage (site) { + var callSite = site.callSite + var funcName = site.name + + // make useful anonymous name + if (!funcName) { + funcName = '' + } + + var context = callSite.getThis() + var typeName = context && callSite.getTypeName() + + // ignore useless type name + if (typeName === 'Object') { + typeName = undefined + } + + // make useful type name + if (typeName === 'Function') { + typeName = context.name || typeName + } + + return typeName && callSite.getMethodName() + ? typeName + '.' + funcName + : funcName +} + +/** + * Format deprecation message without color. + */ + +function formatPlain (msg, caller, stack) { + var timestamp = new Date().toUTCString() + + var formatted = timestamp + + ' ' + this._namespace + + ' deprecated ' + msg + + // add stack trace + if (this._traced) { + for (var i = 0; i < stack.length; i++) { + formatted += '\n at ' + callSiteToString(stack[i]) + } + + return formatted + } + + if (caller) { + formatted += ' at ' + formatLocation(caller) + } + + return formatted +} + +/** + * Format deprecation message with color. + */ + +function formatColor (msg, caller, stack) { + var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' + // bold cyan + ' \x1b[33;1mdeprecated\x1b[22;39m' + // bold yellow + ' \x1b[0m' + msg + '\x1b[39m' // reset + + // add stack trace + if (this._traced) { + for (var i = 0; i < stack.length; i++) { + formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan + } + + return formatted + } + + if (caller) { + formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan + } + + return formatted +} + +/** + * Format call site location. + */ + +function formatLocation (callSite) { + return relative(basePath, callSite[0]) + + ':' + callSite[1] + + ':' + callSite[2] +} + +/** + * Get the stack as array of call sites. + */ + +function getStack () { + var limit = Error.stackTraceLimit + var obj = {} + var prep = Error.prepareStackTrace + + Error.prepareStackTrace = prepareObjectStackTrace + Error.stackTraceLimit = Math.max(10, limit) + + // capture the stack + Error.captureStackTrace(obj) + + // slice this function off the top + var stack = obj.stack.slice(1) + + Error.prepareStackTrace = prep + Error.stackTraceLimit = limit + + return stack +} + +/** + * Capture call site stack from v8. + */ + +function prepareObjectStackTrace (obj, stack) { + return stack +} + +/** + * Return a wrapped function in a deprecation message. + */ + +function wrapfunction (fn, message) { + if (typeof fn !== 'function') { + throw new TypeError('argument fn must be a function') + } + + var args = createArgumentsString(fn.length) + var deprecate = this // eslint-disable-line no-unused-vars + var stack = getStack() + var site = callSiteLocation(stack[1]) + + site.name = fn.name + + // eslint-disable-next-line no-eval + var deprecatedfn = eval('(function (' + args + ') {\n' + + '"use strict"\n' + + 'log.call(deprecate, message, site)\n' + + 'return fn.apply(this, arguments)\n' + + '})') + + return deprecatedfn +} + +/** + * Wrap property in a deprecation message. + */ + +function wrapproperty (obj, prop, message) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new TypeError('argument obj must be object') + } + + var descriptor = Object.getOwnPropertyDescriptor(obj, prop) + + if (!descriptor) { + throw new TypeError('must call property on owner object') + } + + if (!descriptor.configurable) { + throw new TypeError('property must be configurable') + } + + var deprecate = this + var stack = getStack() + var site = callSiteLocation(stack[1]) + + // set site name + site.name = prop + + // convert data descriptor + if ('value' in descriptor) { + descriptor = convertDataDescriptorToAccessor(obj, prop, message) + } + + var get = descriptor.get + var set = descriptor.set + + // wrap getter + if (typeof get === 'function') { + descriptor.get = function getter () { + log.call(deprecate, message, site) + return get.apply(this, arguments) + } + } + + // wrap setter + if (typeof set === 'function') { + descriptor.set = function setter () { + log.call(deprecate, message, site) + return set.apply(this, arguments) + } + } + + Object.defineProperty(obj, prop, descriptor) +} + +/** + * Create DeprecationError for deprecation + */ + +function DeprecationError (namespace, message, stack) { + var error = new Error() + var stackString + + Object.defineProperty(error, 'constructor', { + value: DeprecationError + }) + + Object.defineProperty(error, 'message', { + configurable: true, + enumerable: false, + value: message, + writable: true + }) + + Object.defineProperty(error, 'name', { + enumerable: false, + configurable: true, + value: 'DeprecationError', + writable: true + }) + + Object.defineProperty(error, 'namespace', { + configurable: true, + enumerable: false, + value: namespace, + writable: true + }) + + Object.defineProperty(error, 'stack', { + configurable: true, + enumerable: false, + get: function () { + if (stackString !== undefined) { + return stackString + } + + // prepare stack trace + return (stackString = createStackString.call(this, stack)) + }, + set: function setter (val) { + stackString = val + } + }) + + return error +} diff --git a/front/frontend/node_modules/serve-index/node_modules/depd/lib/browser/index.js b/front/frontend/node_modules/serve-index/node_modules/depd/lib/browser/index.js new file mode 100644 index 0000000..6be45cc --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/depd/lib/browser/index.js @@ -0,0 +1,77 @@ +/*! + * depd + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = depd + +/** + * Create deprecate for namespace in caller. + */ + +function depd (namespace) { + if (!namespace) { + throw new TypeError('argument namespace is required') + } + + function deprecate (message) { + // no-op in browser + } + + deprecate._file = undefined + deprecate._ignored = true + deprecate._namespace = namespace + deprecate._traced = false + deprecate._warned = Object.create(null) + + deprecate.function = wrapfunction + deprecate.property = wrapproperty + + return deprecate +} + +/** + * Return a wrapped function in a deprecation message. + * + * This is a no-op version of the wrapper, which does nothing but call + * validation. + */ + +function wrapfunction (fn, message) { + if (typeof fn !== 'function') { + throw new TypeError('argument fn must be a function') + } + + return fn +} + +/** + * Wrap property in a deprecation message. + * + * This is a no-op version of the wrapper, which does nothing but call + * validation. + */ + +function wrapproperty (obj, prop, message) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new TypeError('argument obj must be object') + } + + var descriptor = Object.getOwnPropertyDescriptor(obj, prop) + + if (!descriptor) { + throw new TypeError('must call property on owner object') + } + + if (!descriptor.configurable) { + throw new TypeError('property must be configurable') + } +} diff --git a/front/frontend/node_modules/serve-index/node_modules/depd/lib/compat/callsite-tostring.js b/front/frontend/node_modules/serve-index/node_modules/depd/lib/compat/callsite-tostring.js new file mode 100644 index 0000000..73186dc --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/depd/lib/compat/callsite-tostring.js @@ -0,0 +1,103 @@ +/*! + * depd + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + */ + +module.exports = callSiteToString + +/** + * Format a CallSite file location to a string. + */ + +function callSiteFileLocation (callSite) { + var fileName + var fileLocation = '' + + if (callSite.isNative()) { + fileLocation = 'native' + } else if (callSite.isEval()) { + fileName = callSite.getScriptNameOrSourceURL() + if (!fileName) { + fileLocation = callSite.getEvalOrigin() + } + } else { + fileName = callSite.getFileName() + } + + if (fileName) { + fileLocation += fileName + + var lineNumber = callSite.getLineNumber() + if (lineNumber != null) { + fileLocation += ':' + lineNumber + + var columnNumber = callSite.getColumnNumber() + if (columnNumber) { + fileLocation += ':' + columnNumber + } + } + } + + return fileLocation || 'unknown source' +} + +/** + * Format a CallSite to a string. + */ + +function callSiteToString (callSite) { + var addSuffix = true + var fileLocation = callSiteFileLocation(callSite) + var functionName = callSite.getFunctionName() + var isConstructor = callSite.isConstructor() + var isMethodCall = !(callSite.isToplevel() || isConstructor) + var line = '' + + if (isMethodCall) { + var methodName = callSite.getMethodName() + var typeName = getConstructorName(callSite) + + if (functionName) { + if (typeName && functionName.indexOf(typeName) !== 0) { + line += typeName + '.' + } + + line += functionName + + if (methodName && functionName.lastIndexOf('.' + methodName) !== functionName.length - methodName.length - 1) { + line += ' [as ' + methodName + ']' + } + } else { + line += typeName + '.' + (methodName || '') + } + } else if (isConstructor) { + line += 'new ' + (functionName || '') + } else if (functionName) { + line += functionName + } else { + addSuffix = false + line += fileLocation + } + + if (addSuffix) { + line += ' (' + fileLocation + ')' + } + + return line +} + +/** + * Get constructor name of reviver. + */ + +function getConstructorName (obj) { + var receiver = obj.receiver + return (receiver.constructor && receiver.constructor.name) || null +} diff --git a/front/frontend/node_modules/serve-index/node_modules/depd/lib/compat/event-listener-count.js b/front/frontend/node_modules/serve-index/node_modules/depd/lib/compat/event-listener-count.js new file mode 100644 index 0000000..3a8925d --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/depd/lib/compat/event-listener-count.js @@ -0,0 +1,22 @@ +/*! + * depd + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = eventListenerCount + +/** + * Get the count of listeners on an event emitter of a specific type. + */ + +function eventListenerCount (emitter, type) { + return emitter.listeners(type).length +} diff --git a/front/frontend/node_modules/serve-index/node_modules/depd/lib/compat/index.js b/front/frontend/node_modules/serve-index/node_modules/depd/lib/compat/index.js new file mode 100644 index 0000000..955b333 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/depd/lib/compat/index.js @@ -0,0 +1,79 @@ +/*! + * depd + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var EventEmitter = require('events').EventEmitter + +/** + * Module exports. + * @public + */ + +lazyProperty(module.exports, 'callSiteToString', function callSiteToString () { + var limit = Error.stackTraceLimit + var obj = {} + var prep = Error.prepareStackTrace + + function prepareObjectStackTrace (obj, stack) { + return stack + } + + Error.prepareStackTrace = prepareObjectStackTrace + Error.stackTraceLimit = 2 + + // capture the stack + Error.captureStackTrace(obj) + + // slice the stack + var stack = obj.stack.slice() + + Error.prepareStackTrace = prep + Error.stackTraceLimit = limit + + return stack[0].toString ? toString : require('./callsite-tostring') +}) + +lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount () { + return EventEmitter.listenerCount || require('./event-listener-count') +}) + +/** + * Define a lazy property. + */ + +function lazyProperty (obj, prop, getter) { + function get () { + var val = getter() + + Object.defineProperty(obj, prop, { + configurable: true, + enumerable: true, + value: val + }) + + return val + } + + Object.defineProperty(obj, prop, { + configurable: true, + enumerable: true, + get: get + }) +} + +/** + * Call toString() on the obj + */ + +function toString (obj) { + return obj.toString() +} diff --git a/front/frontend/node_modules/serve-index/node_modules/depd/package.json b/front/frontend/node_modules/serve-index/node_modules/depd/package.json new file mode 100644 index 0000000..5e3c863 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/depd/package.json @@ -0,0 +1,41 @@ +{ + "name": "depd", + "description": "Deprecate all the things", + "version": "1.1.2", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "keywords": [ + "deprecate", + "deprecated" + ], + "repository": "dougwilson/nodejs-depd", + "browser": "lib/browser/index.js", + "devDependencies": { + "benchmark": "2.1.4", + "beautify-benchmark": "0.2.4", + "eslint": "3.19.0", + "eslint-config-standard": "7.1.0", + "eslint-plugin-markdown": "1.0.0-beta.7", + "eslint-plugin-promise": "3.6.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "~1.21.5" + }, + "files": [ + "lib/", + "History.md", + "LICENSE", + "index.js", + "Readme.md" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail test/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --no-exit test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/" + } +} diff --git a/front/frontend/node_modules/serve-index/node_modules/http-errors/HISTORY.md b/front/frontend/node_modules/serve-index/node_modules/http-errors/HISTORY.md new file mode 100644 index 0000000..cba86e2 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/http-errors/HISTORY.md @@ -0,0 +1,132 @@ +2018-03-29 / 1.6.3 +================== + + * deps: depd@~1.1.2 + - perf: remove argument reassignment + * deps: setprototypeof@1.1.0 + * deps: statuses@'>= 1.3.1 < 2' + +2017-08-04 / 1.6.2 +================== + + * deps: depd@1.1.1 + - Remove unnecessary `Buffer` loading + +2017-02-20 / 1.6.1 +================== + + * deps: setprototypeof@1.0.3 + - Fix shim for old browsers + +2017-02-14 / 1.6.0 +================== + + * Accept custom 4xx and 5xx status codes in factory + * Add deprecation message to `"I'mateapot"` export + * Deprecate passing status code as anything except first argument in factory + * Deprecate using non-error status codes + * Make `message` property enumerable for `HttpError`s + +2016-11-16 / 1.5.1 +================== + + * deps: inherits@2.0.3 + - Fix issue loading in browser + * deps: setprototypeof@1.0.2 + * deps: statuses@'>= 1.3.1 < 2' + +2016-05-18 / 1.5.0 +================== + + * Support new code `421 Misdirected Request` + * Use `setprototypeof` module to replace `__proto__` setting + * deps: statuses@'>= 1.3.0 < 2' + - Add `421 Misdirected Request` + - perf: enable strict mode + * perf: enable strict mode + +2016-01-28 / 1.4.0 +================== + + * Add `HttpError` export, for `err instanceof createError.HttpError` + * deps: inherits@2.0.1 + * deps: statuses@'>= 1.2.1 < 2' + - Fix message for status 451 + - Remove incorrect nginx status code + +2015-02-02 / 1.3.1 +================== + + * Fix regression where status can be overwritten in `createError` `props` + +2015-02-01 / 1.3.0 +================== + + * Construct errors using defined constructors from `createError` + * Fix error names that are not identifiers + - `createError["I'mateapot"]` is now `createError.ImATeapot` + * Set a meaningful `name` property on constructed errors + +2014-12-09 / 1.2.8 +================== + + * Fix stack trace from exported function + * Remove `arguments.callee` usage + +2014-10-14 / 1.2.7 +================== + + * Remove duplicate line + +2014-10-02 / 1.2.6 +================== + + * Fix `expose` to be `true` for `ClientError` constructor + +2014-09-28 / 1.2.5 +================== + + * deps: statuses@1 + +2014-09-21 / 1.2.4 +================== + + * Fix dependency version to work with old `npm`s + +2014-09-21 / 1.2.3 +================== + + * deps: statuses@~1.1.0 + +2014-09-21 / 1.2.2 +================== + + * Fix publish error + +2014-09-21 / 1.2.1 +================== + + * Support Node.js 0.6 + * Use `inherits` instead of `util` + +2014-09-09 / 1.2.0 +================== + + * Fix the way inheriting functions + * Support `expose` being provided in properties argument + +2014-09-08 / 1.1.0 +================== + + * Default status to 500 + * Support provided `error` to extend + +2014-09-08 / 1.0.1 +================== + + * Fix accepting string message + +2014-09-08 / 1.0.0 +================== + + * Initial release diff --git a/front/frontend/node_modules/serve-index/node_modules/http-errors/LICENSE b/front/frontend/node_modules/serve-index/node_modules/http-errors/LICENSE new file mode 100644 index 0000000..82af4df --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/http-errors/LICENSE @@ -0,0 +1,23 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com +Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/serve-index/node_modules/http-errors/README.md b/front/frontend/node_modules/serve-index/node_modules/http-errors/README.md new file mode 100644 index 0000000..79663d8 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/http-errors/README.md @@ -0,0 +1,135 @@ +# http-errors + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Create HTTP errors for Express, Koa, Connect, etc. with ease. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```bash +$ npm install http-errors +``` + +## Example + +```js +var createError = require('http-errors') +var express = require('express') +var app = express() + +app.use(function (req, res, next) { + if (!req.user) return next(createError(401, 'Please login to view this page.')) + next() +}) +``` + +## API + +This is the current API, currently extracted from Koa and subject to change. + +All errors inherit from JavaScript `Error` and the exported `createError.HttpError`. + +### Error Properties + +- `expose` - can be used to signal if `message` should be sent to the client, + defaulting to `false` when `status` >= 500 +- `headers` - can be an object of header names to values to be sent to the + client, defaulting to `undefined`. When defined, the key names should all + be lower-cased +- `message` - the traditional error message, which should be kept short and all + single line +- `status` - the status code of the error, mirroring `statusCode` for general + compatibility +- `statusCode` - the status code of the error, defaulting to `500` + +### createError([status], [message], [properties]) + + + +```js +var err = createError(404, 'This video does not exist!') +``` + +- `status: 500` - the status code as a number +- `message` - the message of the error, defaulting to node's text for that status code. +- `properties` - custom properties to attach to the object + +### new createError\[code || name\](\[msg]\)) + + + +```js +var err = new createError.NotFound() +``` + +- `code` - the status code as a number +- `name` - the name of the error as a "bumpy case", i.e. `NotFound` or `InternalServerError`. + +#### List of all constructors + +|Status Code|Constructor Name | +|-----------|-----------------------------| +|400 |BadRequest | +|401 |Unauthorized | +|402 |PaymentRequired | +|403 |Forbidden | +|404 |NotFound | +|405 |MethodNotAllowed | +|406 |NotAcceptable | +|407 |ProxyAuthenticationRequired | +|408 |RequestTimeout | +|409 |Conflict | +|410 |Gone | +|411 |LengthRequired | +|412 |PreconditionFailed | +|413 |PayloadTooLarge | +|414 |URITooLong | +|415 |UnsupportedMediaType | +|416 |RangeNotSatisfiable | +|417 |ExpectationFailed | +|418 |ImATeapot | +|421 |MisdirectedRequest | +|422 |UnprocessableEntity | +|423 |Locked | +|424 |FailedDependency | +|425 |UnorderedCollection | +|426 |UpgradeRequired | +|428 |PreconditionRequired | +|429 |TooManyRequests | +|431 |RequestHeaderFieldsTooLarge | +|451 |UnavailableForLegalReasons | +|500 |InternalServerError | +|501 |NotImplemented | +|502 |BadGateway | +|503 |ServiceUnavailable | +|504 |GatewayTimeout | +|505 |HTTPVersionNotSupported | +|506 |VariantAlsoNegotiates | +|507 |InsufficientStorage | +|508 |LoopDetected | +|509 |BandwidthLimitExceeded | +|510 |NotExtended | +|511 |NetworkAuthenticationRequired| + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/http-errors.svg +[npm-url]: https://npmjs.org/package/http-errors +[node-version-image]: https://img.shields.io/node/v/http-errors.svg +[node-version-url]: https://nodejs.org/en/download/ +[travis-image]: https://img.shields.io/travis/jshttp/http-errors.svg +[travis-url]: https://travis-ci.org/jshttp/http-errors +[coveralls-image]: https://img.shields.io/coveralls/jshttp/http-errors.svg +[coveralls-url]: https://coveralls.io/r/jshttp/http-errors +[downloads-image]: https://img.shields.io/npm/dm/http-errors.svg +[downloads-url]: https://npmjs.org/package/http-errors diff --git a/front/frontend/node_modules/serve-index/node_modules/http-errors/index.js b/front/frontend/node_modules/serve-index/node_modules/http-errors/index.js new file mode 100644 index 0000000..9509303 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/http-errors/index.js @@ -0,0 +1,260 @@ +/*! + * http-errors + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var deprecate = require('depd')('http-errors') +var setPrototypeOf = require('setprototypeof') +var statuses = require('statuses') +var inherits = require('inherits') + +/** + * Module exports. + * @public + */ + +module.exports = createError +module.exports.HttpError = createHttpErrorConstructor() + +// Populate exports for all constructors +populateConstructorExports(module.exports, statuses.codes, module.exports.HttpError) + +/** + * Get the code class of a status code. + * @private + */ + +function codeClass (status) { + return Number(String(status).charAt(0) + '00') +} + +/** + * Create a new HTTP Error. + * + * @returns {Error} + * @public + */ + +function createError () { + // so much arity going on ~_~ + var err + var msg + var status = 500 + var props = {} + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i] + if (arg instanceof Error) { + err = arg + status = err.status || err.statusCode || status + continue + } + switch (typeof arg) { + case 'string': + msg = arg + break + case 'number': + status = arg + if (i !== 0) { + deprecate('non-first-argument status code; replace with createError(' + arg + ', ...)') + } + break + case 'object': + props = arg + break + } + } + + if (typeof status === 'number' && (status < 400 || status >= 600)) { + deprecate('non-error status code; use only 4xx or 5xx status codes') + } + + if (typeof status !== 'number' || + (!statuses[status] && (status < 400 || status >= 600))) { + status = 500 + } + + // constructor + var HttpError = createError[status] || createError[codeClass(status)] + + if (!err) { + // create error + err = HttpError + ? new HttpError(msg) + : new Error(msg || statuses[status]) + Error.captureStackTrace(err, createError) + } + + if (!HttpError || !(err instanceof HttpError) || err.status !== status) { + // add properties to generic error + err.expose = status < 500 + err.status = err.statusCode = status + } + + for (var key in props) { + if (key !== 'status' && key !== 'statusCode') { + err[key] = props[key] + } + } + + return err +} + +/** + * Create HTTP error abstract base class. + * @private + */ + +function createHttpErrorConstructor () { + function HttpError () { + throw new TypeError('cannot construct abstract class') + } + + inherits(HttpError, Error) + + return HttpError +} + +/** + * Create a constructor for a client error. + * @private + */ + +function createClientErrorConstructor (HttpError, name, code) { + var className = name.match(/Error$/) ? name : name + 'Error' + + function ClientError (message) { + // create the error object + var msg = message != null ? message : statuses[code] + var err = new Error(msg) + + // capture a stack trace to the construction point + Error.captureStackTrace(err, ClientError) + + // adjust the [[Prototype]] + setPrototypeOf(err, ClientError.prototype) + + // redefine the error message + Object.defineProperty(err, 'message', { + enumerable: true, + configurable: true, + value: msg, + writable: true + }) + + // redefine the error name + Object.defineProperty(err, 'name', { + enumerable: false, + configurable: true, + value: className, + writable: true + }) + + return err + } + + inherits(ClientError, HttpError) + + ClientError.prototype.status = code + ClientError.prototype.statusCode = code + ClientError.prototype.expose = true + + return ClientError +} + +/** + * Create a constructor for a server error. + * @private + */ + +function createServerErrorConstructor (HttpError, name, code) { + var className = name.match(/Error$/) ? name : name + 'Error' + + function ServerError (message) { + // create the error object + var msg = message != null ? message : statuses[code] + var err = new Error(msg) + + // capture a stack trace to the construction point + Error.captureStackTrace(err, ServerError) + + // adjust the [[Prototype]] + setPrototypeOf(err, ServerError.prototype) + + // redefine the error message + Object.defineProperty(err, 'message', { + enumerable: true, + configurable: true, + value: msg, + writable: true + }) + + // redefine the error name + Object.defineProperty(err, 'name', { + enumerable: false, + configurable: true, + value: className, + writable: true + }) + + return err + } + + inherits(ServerError, HttpError) + + ServerError.prototype.status = code + ServerError.prototype.statusCode = code + ServerError.prototype.expose = false + + return ServerError +} + +/** + * Populate the exports object with constructors for every error class. + * @private + */ + +function populateConstructorExports (exports, codes, HttpError) { + codes.forEach(function forEachCode (code) { + var CodeError + var name = toIdentifier(statuses[code]) + + switch (codeClass(code)) { + case 400: + CodeError = createClientErrorConstructor(HttpError, name, code) + break + case 500: + CodeError = createServerErrorConstructor(HttpError, name, code) + break + } + + if (CodeError) { + // export the constructor + exports[code] = CodeError + exports[name] = CodeError + } + }) + + // backwards-compatibility + exports["I'mateapot"] = deprecate.function(exports.ImATeapot, + '"I\'mateapot"; use "ImATeapot" instead') +} + +/** + * Convert a string of words to a JavaScript identifier. + * @private + */ + +function toIdentifier (str) { + return str.split(' ').map(function (token) { + return token.slice(0, 1).toUpperCase() + token.slice(1) + }).join('').replace(/[^ _0-9a-z]/gi, '') +} diff --git a/front/frontend/node_modules/serve-index/node_modules/http-errors/package.json b/front/frontend/node_modules/serve-index/node_modules/http-errors/package.json new file mode 100644 index 0000000..a8d28e4 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/http-errors/package.json @@ -0,0 +1,48 @@ +{ + "name": "http-errors", + "description": "Create HTTP error objects", + "version": "1.6.3", + "author": "Jonathan Ong (http://jongleberry.com)", + "contributors": [ + "Alan Plum ", + "Douglas Christopher Wilson " + ], + "license": "MIT", + "repository": "jshttp/http-errors", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "devDependencies": { + "eslint": "4.18.1", + "eslint-config-standard": "11.0.0", + "eslint-plugin-import": "2.9.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "6.0.1", + "eslint-plugin-promise": "3.6.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5" + }, + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot" + }, + "keywords": [ + "http", + "error" + ], + "files": [ + "index.js", + "HISTORY.md", + "LICENSE", + "README.md" + ] +} diff --git a/front/frontend/node_modules/serve-index/node_modules/inherits/LICENSE b/front/frontend/node_modules/serve-index/node_modules/inherits/LICENSE new file mode 100644 index 0000000..dea3013 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/inherits/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/front/frontend/node_modules/serve-index/node_modules/inherits/README.md b/front/frontend/node_modules/serve-index/node_modules/inherits/README.md new file mode 100644 index 0000000..b1c5665 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/inherits/README.md @@ -0,0 +1,42 @@ +Browser-friendly inheritance fully compatible with standard node.js +[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). + +This package exports standard `inherits` from node.js `util` module in +node environment, but also provides alternative browser-friendly +implementation through [browser +field](https://gist.github.com/shtylman/4339901). Alternative +implementation is a literal copy of standard one located in standalone +module to avoid requiring of `util`. It also has a shim for old +browsers with no `Object.create` support. + +While keeping you sure you are using standard `inherits` +implementation in node.js environment, it allows bundlers such as +[browserify](https://github.com/substack/node-browserify) to not +include full `util` package to your client code if all you need is +just `inherits` function. It worth, because browser shim for `util` +package is large and `inherits` is often the single function you need +from it. + +It's recommended to use this package instead of +`require('util').inherits` for any code that has chances to be used +not only in node.js but in browser too. + +## usage + +```js +var inherits = require('inherits'); +// then use exactly as the standard one +``` + +## note on version ~1.0 + +Version ~1.0 had completely different motivation and is not compatible +neither with 2.0 nor with standard node.js `inherits`. + +If you are using version ~1.0 and planning to switch to ~2.0, be +careful: + +* new version uses `super_` instead of `super` for referencing + superclass +* new version overwrites current prototype while old one preserves any + existing fields on it diff --git a/front/frontend/node_modules/serve-index/node_modules/inherits/inherits.js b/front/frontend/node_modules/serve-index/node_modules/inherits/inherits.js new file mode 100644 index 0000000..3b94763 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/inherits/inherits.js @@ -0,0 +1,7 @@ +try { + var util = require('util'); + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + module.exports = require('./inherits_browser.js'); +} diff --git a/front/frontend/node_modules/serve-index/node_modules/inherits/inherits_browser.js b/front/frontend/node_modules/serve-index/node_modules/inherits/inherits_browser.js new file mode 100644 index 0000000..c1e78a7 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/inherits/inherits_browser.js @@ -0,0 +1,23 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} diff --git a/front/frontend/node_modules/serve-index/node_modules/inherits/package.json b/front/frontend/node_modules/serve-index/node_modules/inherits/package.json new file mode 100644 index 0000000..7cf62b9 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/inherits/package.json @@ -0,0 +1,29 @@ +{ + "name": "inherits", + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "version": "2.0.3", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "main": "./inherits.js", + "browser": "./inherits_browser.js", + "repository": "git://github.com/isaacs/inherits", + "license": "ISC", + "scripts": { + "test": "node test" + }, + "devDependencies": { + "tap": "^7.1.0" + }, + "files": [ + "inherits.js", + "inherits_browser.js" + ] +} diff --git a/front/frontend/node_modules/serve-index/node_modules/mime-db/HISTORY.md b/front/frontend/node_modules/serve-index/node_modules/mime-db/HISTORY.md new file mode 100644 index 0000000..7436f64 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/mime-db/HISTORY.md @@ -0,0 +1,507 @@ +1.52.0 / 2022-02-21 +=================== + + * Add extensions from IANA for more `image/*` types + * Add extension `.asc` to `application/pgp-keys` + * Add extensions to various XML types + * Add new upstream MIME types + +1.51.0 / 2021-11-08 +=================== + + * Add new upstream MIME types + * Mark `image/vnd.microsoft.icon` as compressible + * Mark `image/vnd.ms-dds` as compressible + +1.50.0 / 2021-09-15 +=================== + + * Add deprecated iWorks mime types and extensions + * Add new upstream MIME types + +1.49.0 / 2021-07-26 +=================== + + * Add extension `.trig` to `application/trig` + * Add new upstream MIME types + +1.48.0 / 2021-05-30 +=================== + + * Add extension `.mvt` to `application/vnd.mapbox-vector-tile` + * Add new upstream MIME types + * Mark `text/yaml` as compressible + +1.47.0 / 2021-04-01 +=================== + + * Add new upstream MIME types + * Remove ambigious extensions from IANA for `application/*+xml` types + * Update primary extension to `.es` for `application/ecmascript` + +1.46.0 / 2021-02-13 +=================== + + * Add extension `.amr` to `audio/amr` + * Add extension `.m4s` to `video/iso.segment` + * Add extension `.opus` to `audio/ogg` + * Add new upstream MIME types + +1.45.0 / 2020-09-22 +=================== + + * Add `application/ubjson` with extension `.ubj` + * Add `image/avif` with extension `.avif` + * Add `image/ktx2` with extension `.ktx2` + * Add extension `.dbf` to `application/vnd.dbf` + * Add extension `.rar` to `application/vnd.rar` + * Add extension `.td` to `application/urc-targetdesc+xml` + * Add new upstream MIME types + * Fix extension of `application/vnd.apple.keynote` to be `.key` + +1.44.0 / 2020-04-22 +=================== + + * Add charsets from IANA + * Add extension `.cjs` to `application/node` + * Add new upstream MIME types + +1.43.0 / 2020-01-05 +=================== + + * Add `application/x-keepass2` with extension `.kdbx` + * Add extension `.mxmf` to `audio/mobile-xmf` + * Add extensions from IANA for `application/*+xml` types + * Add new upstream MIME types + +1.42.0 / 2019-09-25 +=================== + + * Add `image/vnd.ms-dds` with extension `.dds` + * Add new upstream MIME types + * Remove compressible from `multipart/mixed` + +1.41.0 / 2019-08-30 +=================== + + * Add new upstream MIME types + * Add `application/toml` with extension `.toml` + * Mark `font/ttf` as compressible + +1.40.0 / 2019-04-20 +=================== + + * Add extensions from IANA for `model/*` types + * Add `text/mdx` with extension `.mdx` + +1.39.0 / 2019-04-04 +=================== + + * Add extensions `.siv` and `.sieve` to `application/sieve` + * Add new upstream MIME types + +1.38.0 / 2019-02-04 +=================== + + * Add extension `.nq` to `application/n-quads` + * Add extension `.nt` to `application/n-triples` + * Add new upstream MIME types + * Mark `text/less` as compressible + +1.37.0 / 2018-10-19 +=================== + + * Add extensions to HEIC image types + * Add new upstream MIME types + +1.36.0 / 2018-08-20 +=================== + + * Add Apple file extensions from IANA + * Add extensions from IANA for `image/*` types + * Add new upstream MIME types + +1.35.0 / 2018-07-15 +=================== + + * Add extension `.owl` to `application/rdf+xml` + * Add new upstream MIME types + - Removes extension `.woff` from `application/font-woff` + +1.34.0 / 2018-06-03 +=================== + + * Add extension `.csl` to `application/vnd.citationstyles.style+xml` + * Add extension `.es` to `application/ecmascript` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/turtle` + * Mark all XML-derived types as compressible + +1.33.0 / 2018-02-15 +=================== + + * Add extensions from IANA for `message/*` types + * Add new upstream MIME types + * Fix some incorrect OOXML types + * Remove `application/font-woff2` + +1.32.0 / 2017-11-29 +=================== + + * Add new upstream MIME types + * Update `text/hjson` to registered `application/hjson` + * Add `text/shex` with extension `.shex` + +1.31.0 / 2017-10-25 +=================== + + * Add `application/raml+yaml` with extension `.raml` + * Add `application/wasm` with extension `.wasm` + * Add new `font` type from IANA + * Add new upstream font extensions + * Add new upstream MIME types + * Add extensions for JPEG-2000 images + +1.30.0 / 2017-08-27 +=================== + + * Add `application/vnd.ms-outlook` + * Add `application/x-arj` + * Add extension `.mjs` to `application/javascript` + * Add glTF types and extensions + * Add new upstream MIME types + * Add `text/x-org` + * Add VirtualBox MIME types + * Fix `source` records for `video/*` types that are IANA + * Update `font/opentype` to registered `font/otf` + +1.29.0 / 2017-07-10 +=================== + + * Add `application/fido.trusted-apps+json` + * Add extension `.wadl` to `application/vnd.sun.wadl+xml` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/css` + +1.28.0 / 2017-05-14 +=================== + + * Add new upstream MIME types + * Add extension `.gz` to `application/gzip` + * Update extensions `.md` and `.markdown` to be `text/markdown` + +1.27.0 / 2017-03-16 +=================== + + * Add new upstream MIME types + * Add `image/apng` with extension `.apng` + +1.26.0 / 2017-01-14 +=================== + + * Add new upstream MIME types + * Add extension `.geojson` to `application/geo+json` + +1.25.0 / 2016-11-11 +=================== + + * Add new upstream MIME types + +1.24.0 / 2016-09-18 +=================== + + * Add `audio/mp3` + * Add new upstream MIME types + +1.23.0 / 2016-05-01 +=================== + + * Add new upstream MIME types + * Add extension `.3gpp` to `audio/3gpp` + +1.22.0 / 2016-02-15 +=================== + + * Add `text/slim` + * Add extension `.rng` to `application/xml` + * Add new upstream MIME types + * Fix extension of `application/dash+xml` to be `.mpd` + * Update primary extension to `.m4a` for `audio/mp4` + +1.21.0 / 2016-01-06 +=================== + + * Add Google document types + * Add new upstream MIME types + +1.20.0 / 2015-11-10 +=================== + + * Add `text/x-suse-ymp` + * Add new upstream MIME types + +1.19.0 / 2015-09-17 +=================== + + * Add `application/vnd.apple.pkpass` + * Add new upstream MIME types + +1.18.0 / 2015-09-03 +=================== + + * Add new upstream MIME types + +1.17.0 / 2015-08-13 +=================== + + * Add `application/x-msdos-program` + * Add `audio/g711-0` + * Add `image/vnd.mozilla.apng` + * Add extension `.exe` to `application/x-msdos-program` + +1.16.0 / 2015-07-29 +=================== + + * Add `application/vnd.uri-map` + +1.15.0 / 2015-07-13 +=================== + + * Add `application/x-httpd-php` + +1.14.0 / 2015-06-25 +=================== + + * Add `application/scim+json` + * Add `application/vnd.3gpp.ussd+xml` + * Add `application/vnd.biopax.rdf+xml` + * Add `text/x-processing` + +1.13.0 / 2015-06-07 +=================== + + * Add nginx as a source + * Add `application/x-cocoa` + * Add `application/x-java-archive-diff` + * Add `application/x-makeself` + * Add `application/x-perl` + * Add `application/x-pilot` + * Add `application/x-redhat-package-manager` + * Add `application/x-sea` + * Add `audio/x-m4a` + * Add `audio/x-realaudio` + * Add `image/x-jng` + * Add `text/mathml` + +1.12.0 / 2015-06-05 +=================== + + * Add `application/bdoc` + * Add `application/vnd.hyperdrive+json` + * Add `application/x-bdoc` + * Add extension `.rtf` to `text/rtf` + +1.11.0 / 2015-05-31 +=================== + + * Add `audio/wav` + * Add `audio/wave` + * Add extension `.litcoffee` to `text/coffeescript` + * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` + * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` + +1.10.0 / 2015-05-19 +=================== + + * Add `application/vnd.balsamiq.bmpr` + * Add `application/vnd.microsoft.portable-executable` + * Add `application/x-ns-proxy-autoconfig` + +1.9.1 / 2015-04-19 +================== + + * Remove `.json` extension from `application/manifest+json` + - This is causing bugs downstream + +1.9.0 / 2015-04-19 +================== + + * Add `application/manifest+json` + * Add `application/vnd.micro+json` + * Add `image/vnd.zbrush.pcx` + * Add `image/x-ms-bmp` + +1.8.0 / 2015-03-13 +================== + + * Add `application/vnd.citationstyles.style+xml` + * Add `application/vnd.fastcopy-disk-image` + * Add `application/vnd.gov.sk.xmldatacontainer+xml` + * Add extension `.jsonld` to `application/ld+json` + +1.7.0 / 2015-02-08 +================== + + * Add `application/vnd.gerber` + * Add `application/vnd.msa-disk-image` + +1.6.1 / 2015-02-05 +================== + + * Community extensions ownership transferred from `node-mime` + +1.6.0 / 2015-01-29 +================== + + * Add `application/jose` + * Add `application/jose+json` + * Add `application/json-seq` + * Add `application/jwk+json` + * Add `application/jwk-set+json` + * Add `application/jwt` + * Add `application/rdap+json` + * Add `application/vnd.gov.sk.e-form+xml` + * Add `application/vnd.ims.imsccv1p3` + +1.5.0 / 2014-12-30 +================== + + * Add `application/vnd.oracle.resource+json` + * Fix various invalid MIME type entries + - `application/mbox+xml` + - `application/oscp-response` + - `application/vwg-multiplexed` + - `audio/g721` + +1.4.0 / 2014-12-21 +================== + + * Add `application/vnd.ims.imsccv1p2` + * Fix various invalid MIME type entries + - `application/vnd-acucobol` + - `application/vnd-curl` + - `application/vnd-dart` + - `application/vnd-dxr` + - `application/vnd-fdf` + - `application/vnd-mif` + - `application/vnd-sema` + - `application/vnd-wap-wmlc` + - `application/vnd.adobe.flash-movie` + - `application/vnd.dece-zip` + - `application/vnd.dvb_service` + - `application/vnd.micrografx-igx` + - `application/vnd.sealed-doc` + - `application/vnd.sealed-eml` + - `application/vnd.sealed-mht` + - `application/vnd.sealed-ppt` + - `application/vnd.sealed-tiff` + - `application/vnd.sealed-xls` + - `application/vnd.sealedmedia.softseal-html` + - `application/vnd.sealedmedia.softseal-pdf` + - `application/vnd.wap-slc` + - `application/vnd.wap-wbxml` + - `audio/vnd.sealedmedia.softseal-mpeg` + - `image/vnd-djvu` + - `image/vnd-svf` + - `image/vnd-wap-wbmp` + - `image/vnd.sealed-png` + - `image/vnd.sealedmedia.softseal-gif` + - `image/vnd.sealedmedia.softseal-jpg` + - `model/vnd-dwf` + - `model/vnd.parasolid.transmit-binary` + - `model/vnd.parasolid.transmit-text` + - `text/vnd-a` + - `text/vnd-curl` + - `text/vnd.wap-wml` + * Remove example template MIME types + - `application/example` + - `audio/example` + - `image/example` + - `message/example` + - `model/example` + - `multipart/example` + - `text/example` + - `video/example` + +1.3.1 / 2014-12-16 +================== + + * Fix missing extensions + - `application/json5` + - `text/hjson` + +1.3.0 / 2014-12-07 +================== + + * Add `application/a2l` + * Add `application/aml` + * Add `application/atfx` + * Add `application/atxml` + * Add `application/cdfx+xml` + * Add `application/dii` + * Add `application/json5` + * Add `application/lxf` + * Add `application/mf4` + * Add `application/vnd.apache.thrift.compact` + * Add `application/vnd.apache.thrift.json` + * Add `application/vnd.coffeescript` + * Add `application/vnd.enphase.envoy` + * Add `application/vnd.ims.imsccv1p1` + * Add `text/csv-schema` + * Add `text/hjson` + * Add `text/markdown` + * Add `text/yaml` + +1.2.0 / 2014-11-09 +================== + + * Add `application/cea` + * Add `application/dit` + * Add `application/vnd.gov.sk.e-form+zip` + * Add `application/vnd.tmd.mediaflex.api+xml` + * Type `application/epub+zip` is now IANA-registered + +1.1.2 / 2014-10-23 +================== + + * Rebuild database for `application/x-www-form-urlencoded` change + +1.1.1 / 2014-10-20 +================== + + * Mark `application/x-www-form-urlencoded` as compressible. + +1.1.0 / 2014-09-28 +================== + + * Add `application/font-woff2` + +1.0.3 / 2014-09-25 +================== + + * Fix engine requirement in package + +1.0.2 / 2014-09-25 +================== + + * Add `application/coap-group+json` + * Add `application/dcd` + * Add `application/vnd.apache.thrift.binary` + * Add `image/vnd.tencent.tap` + * Mark all JSON-derived types as compressible + * Update `text/vtt` data + +1.0.1 / 2014-08-30 +================== + + * Fix extension ordering + +1.0.0 / 2014-08-30 +================== + + * Add `application/atf` + * Add `application/merge-patch+json` + * Add `multipart/x-mixed-replace` + * Add `source: 'apache'` metadata + * Add `source: 'iana'` metadata + * Remove badly-assumed charset data diff --git a/front/frontend/node_modules/serve-index/node_modules/mime-db/LICENSE b/front/frontend/node_modules/serve-index/node_modules/mime-db/LICENSE new file mode 100644 index 0000000..0751cb1 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/mime-db/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015-2022 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/serve-index/node_modules/mime-db/README.md b/front/frontend/node_modules/serve-index/node_modules/mime-db/README.md new file mode 100644 index 0000000..5a8fcfe --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/mime-db/README.md @@ -0,0 +1,100 @@ +# mime-db + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][ci-image]][ci-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +This is a large database of mime types and information about them. +It consists of a single, public JSON file and does not include any logic, +allowing it to remain as un-opinionated as possible with an API. +It aggregates data from the following sources: + +- http://www.iana.org/assignments/media-types/media-types.xhtml +- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types +- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types + +## Installation + +```bash +npm install mime-db +``` + +### Database Download + +If you're crazy enough to use this in the browser, you can just grab the +JSON file using [jsDelivr](https://www.jsdelivr.com/). It is recommended to +replace `master` with [a release tag](https://github.com/jshttp/mime-db/tags) +as the JSON format may change in the future. + +``` +https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json +``` + +## Usage + +```js +var db = require('mime-db') + +// grab data on .js files +var data = db['application/javascript'] +``` + +## Data Structure + +The JSON file is a map lookup for lowercased mime types. +Each mime type has the following properties: + +- `.source` - where the mime type is defined. + If not set, it's probably a custom media type. + - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) + - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) + - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) +- `.extensions[]` - known extensions associated with this mime type. +- `.compressible` - whether a file of this type can be gzipped. +- `.charset` - the default charset associated with this type, if any. + +If unknown, every property could be `undefined`. + +## Contributing + +To edit the database, only make PRs against `src/custom-types.json` or +`src/custom-suffix.json`. + +The `src/custom-types.json` file is a JSON object with the MIME type as the +keys and the values being an object with the following keys: + +- `compressible` - leave out if you don't know, otherwise `true`/`false` to + indicate whether the data represented by the type is typically compressible. +- `extensions` - include an array of file extensions that are associated with + the type. +- `notes` - human-readable notes about the type, typically what the type is. +- `sources` - include an array of URLs of where the MIME type and the associated + extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source); + links to type aggregating sites and Wikipedia are _not acceptable_. + +To update the build, run `npm run build`. + +### Adding Custom Media Types + +The best way to get new media types included in this library is to register +them with the IANA. The community registration procedure is outlined in +[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types +registered with the IANA are automatically pulled into this library. + +If that is not possible / feasible, they can be added directly here as a +"custom" type. To do this, it is required to have a primary source that +definitively lists the media type. If an extension is going to be listed as +associateed with this media type, the source must definitively link the +media type and extension as well. + +[ci-image]: https://badgen.net/github/checks/jshttp/mime-db/master?label=ci +[ci-url]: https://github.com/jshttp/mime-db/actions?query=workflow%3Aci +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master +[node-image]: https://badgen.net/npm/node/mime-db +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-db +[npm-url]: https://npmjs.org/package/mime-db +[npm-version-image]: https://badgen.net/npm/v/mime-db diff --git a/front/frontend/node_modules/serve-index/node_modules/mime-db/db.json b/front/frontend/node_modules/serve-index/node_modules/mime-db/db.json new file mode 100644 index 0000000..eb9c42c --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/mime-db/db.json @@ -0,0 +1,8519 @@ +{ + "application/1d-interleaved-parityfec": { + "source": "iana" + }, + "application/3gpdash-qoe-report+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/3gpp-ims+xml": { + "source": "iana", + "compressible": true + }, + "application/3gpphal+json": { + "source": "iana", + "compressible": true + }, + "application/3gpphalforms+json": { + "source": "iana", + "compressible": true + }, + "application/a2l": { + "source": "iana" + }, + "application/ace+cbor": { + "source": "iana" + }, + "application/activemessage": { + "source": "iana" + }, + "application/activity+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-directory+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcost+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcostparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointprop+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointpropparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-error+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamcontrol+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamparams+json": { + "source": "iana", + "compressible": true + }, + "application/aml": { + "source": "iana" + }, + "application/andrew-inset": { + "source": "iana", + "extensions": ["ez"] + }, + "application/applefile": { + "source": "iana" + }, + "application/applixware": { + "source": "apache", + "extensions": ["aw"] + }, + "application/at+jwt": { + "source": "iana" + }, + "application/atf": { + "source": "iana" + }, + "application/atfx": { + "source": "iana" + }, + "application/atom+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atom"] + }, + "application/atomcat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomcat"] + }, + "application/atomdeleted+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomdeleted"] + }, + "application/atomicmail": { + "source": "iana" + }, + "application/atomsvc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomsvc"] + }, + "application/atsc-dwd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dwd"] + }, + "application/atsc-dynamic-event-message": { + "source": "iana" + }, + "application/atsc-held+xml": { + "source": "iana", + "compressible": true, + "extensions": ["held"] + }, + "application/atsc-rdt+json": { + "source": "iana", + "compressible": true + }, + "application/atsc-rsat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsat"] + }, + "application/atxml": { + "source": "iana" + }, + "application/auth-policy+xml": { + "source": "iana", + "compressible": true + }, + "application/bacnet-xdd+zip": { + "source": "iana", + "compressible": false + }, + "application/batch-smtp": { + "source": "iana" + }, + "application/bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/beep+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/calendar+json": { + "source": "iana", + "compressible": true + }, + "application/calendar+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xcs"] + }, + "application/call-completion": { + "source": "iana" + }, + "application/cals-1840": { + "source": "iana" + }, + "application/captive+json": { + "source": "iana", + "compressible": true + }, + "application/cbor": { + "source": "iana" + }, + "application/cbor-seq": { + "source": "iana" + }, + "application/cccex": { + "source": "iana" + }, + "application/ccmp+xml": { + "source": "iana", + "compressible": true + }, + "application/ccxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ccxml"] + }, + "application/cdfx+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdfx"] + }, + "application/cdmi-capability": { + "source": "iana", + "extensions": ["cdmia"] + }, + "application/cdmi-container": { + "source": "iana", + "extensions": ["cdmic"] + }, + "application/cdmi-domain": { + "source": "iana", + "extensions": ["cdmid"] + }, + "application/cdmi-object": { + "source": "iana", + "extensions": ["cdmio"] + }, + "application/cdmi-queue": { + "source": "iana", + "extensions": ["cdmiq"] + }, + "application/cdni": { + "source": "iana" + }, + "application/cea": { + "source": "iana" + }, + "application/cea-2018+xml": { + "source": "iana", + "compressible": true + }, + "application/cellml+xml": { + "source": "iana", + "compressible": true + }, + "application/cfw": { + "source": "iana" + }, + "application/city+json": { + "source": "iana", + "compressible": true + }, + "application/clr": { + "source": "iana" + }, + "application/clue+xml": { + "source": "iana", + "compressible": true + }, + "application/clue_info+xml": { + "source": "iana", + "compressible": true + }, + "application/cms": { + "source": "iana" + }, + "application/cnrp+xml": { + "source": "iana", + "compressible": true + }, + "application/coap-group+json": { + "source": "iana", + "compressible": true + }, + "application/coap-payload": { + "source": "iana" + }, + "application/commonground": { + "source": "iana" + }, + "application/conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/cose": { + "source": "iana" + }, + "application/cose-key": { + "source": "iana" + }, + "application/cose-key-set": { + "source": "iana" + }, + "application/cpl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cpl"] + }, + "application/csrattrs": { + "source": "iana" + }, + "application/csta+xml": { + "source": "iana", + "compressible": true + }, + "application/cstadata+xml": { + "source": "iana", + "compressible": true + }, + "application/csvm+json": { + "source": "iana", + "compressible": true + }, + "application/cu-seeme": { + "source": "apache", + "extensions": ["cu"] + }, + "application/cwt": { + "source": "iana" + }, + "application/cybercash": { + "source": "iana" + }, + "application/dart": { + "compressible": true + }, + "application/dash+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpd"] + }, + "application/dash-patch+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpp"] + }, + "application/dashdelta": { + "source": "iana" + }, + "application/davmount+xml": { + "source": "iana", + "compressible": true, + "extensions": ["davmount"] + }, + "application/dca-rft": { + "source": "iana" + }, + "application/dcd": { + "source": "iana" + }, + "application/dec-dx": { + "source": "iana" + }, + "application/dialog-info+xml": { + "source": "iana", + "compressible": true + }, + "application/dicom": { + "source": "iana" + }, + "application/dicom+json": { + "source": "iana", + "compressible": true + }, + "application/dicom+xml": { + "source": "iana", + "compressible": true + }, + "application/dii": { + "source": "iana" + }, + "application/dit": { + "source": "iana" + }, + "application/dns": { + "source": "iana" + }, + "application/dns+json": { + "source": "iana", + "compressible": true + }, + "application/dns-message": { + "source": "iana" + }, + "application/docbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dbk"] + }, + "application/dots+cbor": { + "source": "iana" + }, + "application/dskpp+xml": { + "source": "iana", + "compressible": true + }, + "application/dssc+der": { + "source": "iana", + "extensions": ["dssc"] + }, + "application/dssc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdssc"] + }, + "application/dvcs": { + "source": "iana" + }, + "application/ecmascript": { + "source": "iana", + "compressible": true, + "extensions": ["es","ecma"] + }, + "application/edi-consent": { + "source": "iana" + }, + "application/edi-x12": { + "source": "iana", + "compressible": false + }, + "application/edifact": { + "source": "iana", + "compressible": false + }, + "application/efi": { + "source": "iana" + }, + "application/elm+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/elm+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.cap+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/emergencycalldata.comment+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.control+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.deviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.ecall.msd": { + "source": "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.serviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.subscriberinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.veds+xml": { + "source": "iana", + "compressible": true + }, + "application/emma+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emma"] + }, + "application/emotionml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emotionml"] + }, + "application/encaprtp": { + "source": "iana" + }, + "application/epp+xml": { + "source": "iana", + "compressible": true + }, + "application/epub+zip": { + "source": "iana", + "compressible": false, + "extensions": ["epub"] + }, + "application/eshop": { + "source": "iana" + }, + "application/exi": { + "source": "iana", + "extensions": ["exi"] + }, + "application/expect-ct-report+json": { + "source": "iana", + "compressible": true + }, + "application/express": { + "source": "iana", + "extensions": ["exp"] + }, + "application/fastinfoset": { + "source": "iana" + }, + "application/fastsoap": { + "source": "iana" + }, + "application/fdt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fdt"] + }, + "application/fhir+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fhir+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fido.trusted-apps+json": { + "compressible": true + }, + "application/fits": { + "source": "iana" + }, + "application/flexfec": { + "source": "iana" + }, + "application/font-sfnt": { + "source": "iana" + }, + "application/font-tdpfr": { + "source": "iana", + "extensions": ["pfr"] + }, + "application/font-woff": { + "source": "iana", + "compressible": false + }, + "application/framework-attributes+xml": { + "source": "iana", + "compressible": true + }, + "application/geo+json": { + "source": "iana", + "compressible": true, + "extensions": ["geojson"] + }, + "application/geo+json-seq": { + "source": "iana" + }, + "application/geopackage+sqlite3": { + "source": "iana" + }, + "application/geoxacml+xml": { + "source": "iana", + "compressible": true + }, + "application/gltf-buffer": { + "source": "iana" + }, + "application/gml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["gml"] + }, + "application/gpx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["gpx"] + }, + "application/gxf": { + "source": "apache", + "extensions": ["gxf"] + }, + "application/gzip": { + "source": "iana", + "compressible": false, + "extensions": ["gz"] + }, + "application/h224": { + "source": "iana" + }, + "application/held+xml": { + "source": "iana", + "compressible": true + }, + "application/hjson": { + "extensions": ["hjson"] + }, + "application/http": { + "source": "iana" + }, + "application/hyperstudio": { + "source": "iana", + "extensions": ["stk"] + }, + "application/ibe-key-request+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pkg-reply+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pp-data": { + "source": "iana" + }, + "application/iges": { + "source": "iana" + }, + "application/im-iscomposing+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/index": { + "source": "iana" + }, + "application/index.cmd": { + "source": "iana" + }, + "application/index.obj": { + "source": "iana" + }, + "application/index.response": { + "source": "iana" + }, + "application/index.vnd": { + "source": "iana" + }, + "application/inkml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ink","inkml"] + }, + "application/iotp": { + "source": "iana" + }, + "application/ipfix": { + "source": "iana", + "extensions": ["ipfix"] + }, + "application/ipp": { + "source": "iana" + }, + "application/isup": { + "source": "iana" + }, + "application/its+xml": { + "source": "iana", + "compressible": true, + "extensions": ["its"] + }, + "application/java-archive": { + "source": "apache", + "compressible": false, + "extensions": ["jar","war","ear"] + }, + "application/java-serialized-object": { + "source": "apache", + "compressible": false, + "extensions": ["ser"] + }, + "application/java-vm": { + "source": "apache", + "compressible": false, + "extensions": ["class"] + }, + "application/javascript": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js","mjs"] + }, + "application/jf2feed+json": { + "source": "iana", + "compressible": true + }, + "application/jose": { + "source": "iana" + }, + "application/jose+json": { + "source": "iana", + "compressible": true + }, + "application/jrd+json": { + "source": "iana", + "compressible": true + }, + "application/jscalendar+json": { + "source": "iana", + "compressible": true + }, + "application/json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["json","map"] + }, + "application/json-patch+json": { + "source": "iana", + "compressible": true + }, + "application/json-seq": { + "source": "iana" + }, + "application/json5": { + "extensions": ["json5"] + }, + "application/jsonml+json": { + "source": "apache", + "compressible": true, + "extensions": ["jsonml"] + }, + "application/jwk+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+json": { + "source": "iana", + "compressible": true + }, + "application/jwt": { + "source": "iana" + }, + "application/kpml-request+xml": { + "source": "iana", + "compressible": true + }, + "application/kpml-response+xml": { + "source": "iana", + "compressible": true + }, + "application/ld+json": { + "source": "iana", + "compressible": true, + "extensions": ["jsonld"] + }, + "application/lgr+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lgr"] + }, + "application/link-format": { + "source": "iana" + }, + "application/load-control+xml": { + "source": "iana", + "compressible": true + }, + "application/lost+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lostxml"] + }, + "application/lostsync+xml": { + "source": "iana", + "compressible": true + }, + "application/lpf+zip": { + "source": "iana", + "compressible": false + }, + "application/lxf": { + "source": "iana" + }, + "application/mac-binhex40": { + "source": "iana", + "extensions": ["hqx"] + }, + "application/mac-compactpro": { + "source": "apache", + "extensions": ["cpt"] + }, + "application/macwriteii": { + "source": "iana" + }, + "application/mads+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mads"] + }, + "application/manifest+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["webmanifest"] + }, + "application/marc": { + "source": "iana", + "extensions": ["mrc"] + }, + "application/marcxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mrcx"] + }, + "application/mathematica": { + "source": "iana", + "extensions": ["ma","nb","mb"] + }, + "application/mathml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mathml"] + }, + "application/mathml-content+xml": { + "source": "iana", + "compressible": true + }, + "application/mathml-presentation+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-associated-procedure-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-deregister+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-envelope+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-protection-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-reception-report+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-schedule+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-user-service-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbox": { + "source": "iana", + "extensions": ["mbox"] + }, + "application/media-policy-dataset+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpf"] + }, + "application/media_control+xml": { + "source": "iana", + "compressible": true + }, + "application/mediaservercontrol+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mscml"] + }, + "application/merge-patch+json": { + "source": "iana", + "compressible": true + }, + "application/metalink+xml": { + "source": "apache", + "compressible": true, + "extensions": ["metalink"] + }, + "application/metalink4+xml": { + "source": "iana", + "compressible": true, + "extensions": ["meta4"] + }, + "application/mets+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mets"] + }, + "application/mf4": { + "source": "iana" + }, + "application/mikey": { + "source": "iana" + }, + "application/mipc": { + "source": "iana" + }, + "application/missing-blocks+cbor-seq": { + "source": "iana" + }, + "application/mmt-aei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["maei"] + }, + "application/mmt-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musd"] + }, + "application/mods+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mods"] + }, + "application/moss-keys": { + "source": "iana" + }, + "application/moss-signature": { + "source": "iana" + }, + "application/mosskey-data": { + "source": "iana" + }, + "application/mosskey-request": { + "source": "iana" + }, + "application/mp21": { + "source": "iana", + "extensions": ["m21","mp21"] + }, + "application/mp4": { + "source": "iana", + "extensions": ["mp4s","m4p"] + }, + "application/mpeg4-generic": { + "source": "iana" + }, + "application/mpeg4-iod": { + "source": "iana" + }, + "application/mpeg4-iod-xmt": { + "source": "iana" + }, + "application/mrb-consumer+xml": { + "source": "iana", + "compressible": true + }, + "application/mrb-publish+xml": { + "source": "iana", + "compressible": true + }, + "application/msc-ivr+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msc-mixer+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msword": { + "source": "iana", + "compressible": false, + "extensions": ["doc","dot"] + }, + "application/mud+json": { + "source": "iana", + "compressible": true + }, + "application/multipart-core": { + "source": "iana" + }, + "application/mxf": { + "source": "iana", + "extensions": ["mxf"] + }, + "application/n-quads": { + "source": "iana", + "extensions": ["nq"] + }, + "application/n-triples": { + "source": "iana", + "extensions": ["nt"] + }, + "application/nasdata": { + "source": "iana" + }, + "application/news-checkgroups": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-groupinfo": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-transmission": { + "source": "iana" + }, + "application/nlsml+xml": { + "source": "iana", + "compressible": true + }, + "application/node": { + "source": "iana", + "extensions": ["cjs"] + }, + "application/nss": { + "source": "iana" + }, + "application/oauth-authz-req+jwt": { + "source": "iana" + }, + "application/oblivious-dns-message": { + "source": "iana" + }, + "application/ocsp-request": { + "source": "iana" + }, + "application/ocsp-response": { + "source": "iana" + }, + "application/octet-stream": { + "source": "iana", + "compressible": false, + "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] + }, + "application/oda": { + "source": "iana", + "extensions": ["oda"] + }, + "application/odm+xml": { + "source": "iana", + "compressible": true + }, + "application/odx": { + "source": "iana" + }, + "application/oebps-package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["opf"] + }, + "application/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogx"] + }, + "application/omdoc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["omdoc"] + }, + "application/onenote": { + "source": "apache", + "extensions": ["onetoc","onetoc2","onetmp","onepkg"] + }, + "application/opc-nodeset+xml": { + "source": "iana", + "compressible": true + }, + "application/oscore": { + "source": "iana" + }, + "application/oxps": { + "source": "iana", + "extensions": ["oxps"] + }, + "application/p21": { + "source": "iana" + }, + "application/p21+zip": { + "source": "iana", + "compressible": false + }, + "application/p2p-overlay+xml": { + "source": "iana", + "compressible": true, + "extensions": ["relo"] + }, + "application/parityfec": { + "source": "iana" + }, + "application/passport": { + "source": "iana" + }, + "application/patch-ops-error+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xer"] + }, + "application/pdf": { + "source": "iana", + "compressible": false, + "extensions": ["pdf"] + }, + "application/pdx": { + "source": "iana" + }, + "application/pem-certificate-chain": { + "source": "iana" + }, + "application/pgp-encrypted": { + "source": "iana", + "compressible": false, + "extensions": ["pgp"] + }, + "application/pgp-keys": { + "source": "iana", + "extensions": ["asc"] + }, + "application/pgp-signature": { + "source": "iana", + "extensions": ["asc","sig"] + }, + "application/pics-rules": { + "source": "apache", + "extensions": ["prf"] + }, + "application/pidf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pidf-diff+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pkcs10": { + "source": "iana", + "extensions": ["p10"] + }, + "application/pkcs12": { + "source": "iana" + }, + "application/pkcs7-mime": { + "source": "iana", + "extensions": ["p7m","p7c"] + }, + "application/pkcs7-signature": { + "source": "iana", + "extensions": ["p7s"] + }, + "application/pkcs8": { + "source": "iana", + "extensions": ["p8"] + }, + "application/pkcs8-encrypted": { + "source": "iana" + }, + "application/pkix-attr-cert": { + "source": "iana", + "extensions": ["ac"] + }, + "application/pkix-cert": { + "source": "iana", + "extensions": ["cer"] + }, + "application/pkix-crl": { + "source": "iana", + "extensions": ["crl"] + }, + "application/pkix-pkipath": { + "source": "iana", + "extensions": ["pkipath"] + }, + "application/pkixcmp": { + "source": "iana", + "extensions": ["pki"] + }, + "application/pls+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pls"] + }, + "application/poc-settings+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/postscript": { + "source": "iana", + "compressible": true, + "extensions": ["ai","eps","ps"] + }, + "application/ppsp-tracker+json": { + "source": "iana", + "compressible": true + }, + "application/problem+json": { + "source": "iana", + "compressible": true + }, + "application/problem+xml": { + "source": "iana", + "compressible": true + }, + "application/provenance+xml": { + "source": "iana", + "compressible": true, + "extensions": ["provx"] + }, + "application/prs.alvestrand.titrax-sheet": { + "source": "iana" + }, + "application/prs.cww": { + "source": "iana", + "extensions": ["cww"] + }, + "application/prs.cyn": { + "source": "iana", + "charset": "7-BIT" + }, + "application/prs.hpub+zip": { + "source": "iana", + "compressible": false + }, + "application/prs.nprend": { + "source": "iana" + }, + "application/prs.plucker": { + "source": "iana" + }, + "application/prs.rdf-xml-crypt": { + "source": "iana" + }, + "application/prs.xsf+xml": { + "source": "iana", + "compressible": true + }, + "application/pskc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pskcxml"] + }, + "application/pvd+json": { + "source": "iana", + "compressible": true + }, + "application/qsig": { + "source": "iana" + }, + "application/raml+yaml": { + "compressible": true, + "extensions": ["raml"] + }, + "application/raptorfec": { + "source": "iana" + }, + "application/rdap+json": { + "source": "iana", + "compressible": true + }, + "application/rdf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rdf","owl"] + }, + "application/reginfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rif"] + }, + "application/relax-ng-compact-syntax": { + "source": "iana", + "extensions": ["rnc"] + }, + "application/remote-printing": { + "source": "iana" + }, + "application/reputon+json": { + "source": "iana", + "compressible": true + }, + "application/resource-lists+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rl"] + }, + "application/resource-lists-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rld"] + }, + "application/rfc+xml": { + "source": "iana", + "compressible": true + }, + "application/riscos": { + "source": "iana" + }, + "application/rlmi+xml": { + "source": "iana", + "compressible": true + }, + "application/rls-services+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rs"] + }, + "application/route-apd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rapd"] + }, + "application/route-s-tsid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sls"] + }, + "application/route-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rusd"] + }, + "application/rpki-ghostbusters": { + "source": "iana", + "extensions": ["gbr"] + }, + "application/rpki-manifest": { + "source": "iana", + "extensions": ["mft"] + }, + "application/rpki-publication": { + "source": "iana" + }, + "application/rpki-roa": { + "source": "iana", + "extensions": ["roa"] + }, + "application/rpki-updown": { + "source": "iana" + }, + "application/rsd+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rsd"] + }, + "application/rss+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rss"] + }, + "application/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "application/rtploopback": { + "source": "iana" + }, + "application/rtx": { + "source": "iana" + }, + "application/samlassertion+xml": { + "source": "iana", + "compressible": true + }, + "application/samlmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/sarif+json": { + "source": "iana", + "compressible": true + }, + "application/sarif-external-properties+json": { + "source": "iana", + "compressible": true + }, + "application/sbe": { + "source": "iana" + }, + "application/sbml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sbml"] + }, + "application/scaip+xml": { + "source": "iana", + "compressible": true + }, + "application/scim+json": { + "source": "iana", + "compressible": true + }, + "application/scvp-cv-request": { + "source": "iana", + "extensions": ["scq"] + }, + "application/scvp-cv-response": { + "source": "iana", + "extensions": ["scs"] + }, + "application/scvp-vp-request": { + "source": "iana", + "extensions": ["spq"] + }, + "application/scvp-vp-response": { + "source": "iana", + "extensions": ["spp"] + }, + "application/sdp": { + "source": "iana", + "extensions": ["sdp"] + }, + "application/secevent+jwt": { + "source": "iana" + }, + "application/senml+cbor": { + "source": "iana" + }, + "application/senml+json": { + "source": "iana", + "compressible": true + }, + "application/senml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["senmlx"] + }, + "application/senml-etch+cbor": { + "source": "iana" + }, + "application/senml-etch+json": { + "source": "iana", + "compressible": true + }, + "application/senml-exi": { + "source": "iana" + }, + "application/sensml+cbor": { + "source": "iana" + }, + "application/sensml+json": { + "source": "iana", + "compressible": true + }, + "application/sensml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sensmlx"] + }, + "application/sensml-exi": { + "source": "iana" + }, + "application/sep+xml": { + "source": "iana", + "compressible": true + }, + "application/sep-exi": { + "source": "iana" + }, + "application/session-info": { + "source": "iana" + }, + "application/set-payment": { + "source": "iana" + }, + "application/set-payment-initiation": { + "source": "iana", + "extensions": ["setpay"] + }, + "application/set-registration": { + "source": "iana" + }, + "application/set-registration-initiation": { + "source": "iana", + "extensions": ["setreg"] + }, + "application/sgml": { + "source": "iana" + }, + "application/sgml-open-catalog": { + "source": "iana" + }, + "application/shf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["shf"] + }, + "application/sieve": { + "source": "iana", + "extensions": ["siv","sieve"] + }, + "application/simple-filter+xml": { + "source": "iana", + "compressible": true + }, + "application/simple-message-summary": { + "source": "iana" + }, + "application/simplesymbolcontainer": { + "source": "iana" + }, + "application/sipc": { + "source": "iana" + }, + "application/slate": { + "source": "iana" + }, + "application/smil": { + "source": "iana" + }, + "application/smil+xml": { + "source": "iana", + "compressible": true, + "extensions": ["smi","smil"] + }, + "application/smpte336m": { + "source": "iana" + }, + "application/soap+fastinfoset": { + "source": "iana" + }, + "application/soap+xml": { + "source": "iana", + "compressible": true + }, + "application/sparql-query": { + "source": "iana", + "extensions": ["rq"] + }, + "application/sparql-results+xml": { + "source": "iana", + "compressible": true, + "extensions": ["srx"] + }, + "application/spdx+json": { + "source": "iana", + "compressible": true + }, + "application/spirits-event+xml": { + "source": "iana", + "compressible": true + }, + "application/sql": { + "source": "iana" + }, + "application/srgs": { + "source": "iana", + "extensions": ["gram"] + }, + "application/srgs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["grxml"] + }, + "application/sru+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sru"] + }, + "application/ssdl+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ssdl"] + }, + "application/ssml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ssml"] + }, + "application/stix+json": { + "source": "iana", + "compressible": true + }, + "application/swid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["swidtag"] + }, + "application/tamp-apex-update": { + "source": "iana" + }, + "application/tamp-apex-update-confirm": { + "source": "iana" + }, + "application/tamp-community-update": { + "source": "iana" + }, + "application/tamp-community-update-confirm": { + "source": "iana" + }, + "application/tamp-error": { + "source": "iana" + }, + "application/tamp-sequence-adjust": { + "source": "iana" + }, + "application/tamp-sequence-adjust-confirm": { + "source": "iana" + }, + "application/tamp-status-query": { + "source": "iana" + }, + "application/tamp-status-response": { + "source": "iana" + }, + "application/tamp-update": { + "source": "iana" + }, + "application/tamp-update-confirm": { + "source": "iana" + }, + "application/tar": { + "compressible": true + }, + "application/taxii+json": { + "source": "iana", + "compressible": true + }, + "application/td+json": { + "source": "iana", + "compressible": true + }, + "application/tei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tei","teicorpus"] + }, + "application/tetra_isi": { + "source": "iana" + }, + "application/thraud+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tfi"] + }, + "application/timestamp-query": { + "source": "iana" + }, + "application/timestamp-reply": { + "source": "iana" + }, + "application/timestamped-data": { + "source": "iana", + "extensions": ["tsd"] + }, + "application/tlsrpt+gzip": { + "source": "iana" + }, + "application/tlsrpt+json": { + "source": "iana", + "compressible": true + }, + "application/tnauthlist": { + "source": "iana" + }, + "application/token-introspection+jwt": { + "source": "iana" + }, + "application/toml": { + "compressible": true, + "extensions": ["toml"] + }, + "application/trickle-ice-sdpfrag": { + "source": "iana" + }, + "application/trig": { + "source": "iana", + "extensions": ["trig"] + }, + "application/ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ttml"] + }, + "application/tve-trigger": { + "source": "iana" + }, + "application/tzif": { + "source": "iana" + }, + "application/tzif-leap": { + "source": "iana" + }, + "application/ubjson": { + "compressible": false, + "extensions": ["ubj"] + }, + "application/ulpfec": { + "source": "iana" + }, + "application/urc-grpsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/urc-ressheet+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsheet"] + }, + "application/urc-targetdesc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["td"] + }, + "application/urc-uisocketdesc+xml": { + "source": "iana", + "compressible": true + }, + "application/vcard+json": { + "source": "iana", + "compressible": true + }, + "application/vcard+xml": { + "source": "iana", + "compressible": true + }, + "application/vemmi": { + "source": "iana" + }, + "application/vividence.scriptfile": { + "source": "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + "source": "iana", + "compressible": true, + "extensions": ["1km"] + }, + "application/vnd.3gpp-prose+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-v2x-local-service-information": { + "source": "iana" + }, + "application/vnd.3gpp.5gnas": { + "source": "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.bsf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gmop+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gtpc": { + "source": "iana" + }, + "application/vnd.3gpp.interworking-data": { + "source": "iana" + }, + "application/vnd.3gpp.lpp": { + "source": "iana" + }, + "application/vnd.3gpp.mc-signalling-ear": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-payload": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-signalling": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-floor-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-signed+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-init-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-transmission-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mid-call+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ngap": { + "source": "iana" + }, + "application/vnd.3gpp.pfcp": { + "source": "iana" + }, + "application/vnd.3gpp.pic-bw-large": { + "source": "iana", + "extensions": ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + "source": "iana", + "extensions": ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + "source": "iana", + "extensions": ["pvb"] + }, + "application/vnd.3gpp.s1ap": { + "source": "iana" + }, + "application/vnd.3gpp.sms": { + "source": "iana" + }, + "application/vnd.3gpp.sms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-ext+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.state-and-event-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ussd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.sms": { + "source": "iana" + }, + "application/vnd.3gpp2.tcap": { + "source": "iana", + "extensions": ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + "source": "iana" + }, + "application/vnd.3m.post-it-notes": { + "source": "iana", + "extensions": ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + "source": "iana", + "extensions": ["aso"] + }, + "application/vnd.accpac.simply.imp": { + "source": "iana", + "extensions": ["imp"] + }, + "application/vnd.acucobol": { + "source": "iana", + "extensions": ["acu"] + }, + "application/vnd.acucorp": { + "source": "iana", + "extensions": ["atc","acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + "source": "apache", + "compressible": false, + "extensions": ["air"] + }, + "application/vnd.adobe.flash.movie": { + "source": "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + "source": "iana", + "extensions": ["fcdt"] + }, + "application/vnd.adobe.fxp": { + "source": "iana", + "extensions": ["fxp","fxpl"] + }, + "application/vnd.adobe.partial-upload": { + "source": "iana" + }, + "application/vnd.adobe.xdp+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdp"] + }, + "application/vnd.adobe.xfdf": { + "source": "iana", + "extensions": ["xfdf"] + }, + "application/vnd.aether.imp": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata-pagedef": { + "source": "iana" + }, + "application/vnd.afpc.cmoca-cmresource": { + "source": "iana" + }, + "application/vnd.afpc.foca-charset": { + "source": "iana" + }, + "application/vnd.afpc.foca-codedfont": { + "source": "iana" + }, + "application/vnd.afpc.foca-codepage": { + "source": "iana" + }, + "application/vnd.afpc.modca": { + "source": "iana" + }, + "application/vnd.afpc.modca-cmtable": { + "source": "iana" + }, + "application/vnd.afpc.modca-formdef": { + "source": "iana" + }, + "application/vnd.afpc.modca-mediummap": { + "source": "iana" + }, + "application/vnd.afpc.modca-objectcontainer": { + "source": "iana" + }, + "application/vnd.afpc.modca-overlay": { + "source": "iana" + }, + "application/vnd.afpc.modca-pagesegment": { + "source": "iana" + }, + "application/vnd.age": { + "source": "iana", + "extensions": ["age"] + }, + "application/vnd.ah-barcode": { + "source": "iana" + }, + "application/vnd.ahead.space": { + "source": "iana", + "extensions": ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + "source": "iana", + "extensions": ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + "source": "iana", + "extensions": ["azs"] + }, + "application/vnd.amadeus+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.amazon.ebook": { + "source": "apache", + "extensions": ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + "source": "iana" + }, + "application/vnd.americandynamics.acc": { + "source": "iana", + "extensions": ["acc"] + }, + "application/vnd.amiga.ami": { + "source": "iana", + "extensions": ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.android.ota": { + "source": "iana" + }, + "application/vnd.android.package-archive": { + "source": "apache", + "compressible": false, + "extensions": ["apk"] + }, + "application/vnd.anki": { + "source": "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + "source": "iana", + "extensions": ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + "source": "apache", + "extensions": ["fti"] + }, + "application/vnd.antix.game-component": { + "source": "iana", + "extensions": ["atx"] + }, + "application/vnd.apache.arrow.file": { + "source": "iana" + }, + "application/vnd.apache.arrow.stream": { + "source": "iana" + }, + "application/vnd.apache.thrift.binary": { + "source": "iana" + }, + "application/vnd.apache.thrift.compact": { + "source": "iana" + }, + "application/vnd.apache.thrift.json": { + "source": "iana" + }, + "application/vnd.api+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.aplextor.warrp+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apothekende.reservation+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apple.installer+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpkg"] + }, + "application/vnd.apple.keynote": { + "source": "iana", + "extensions": ["key"] + }, + "application/vnd.apple.mpegurl": { + "source": "iana", + "extensions": ["m3u8"] + }, + "application/vnd.apple.numbers": { + "source": "iana", + "extensions": ["numbers"] + }, + "application/vnd.apple.pages": { + "source": "iana", + "extensions": ["pages"] + }, + "application/vnd.apple.pkpass": { + "compressible": false, + "extensions": ["pkpass"] + }, + "application/vnd.arastra.swi": { + "source": "iana" + }, + "application/vnd.aristanetworks.swi": { + "source": "iana", + "extensions": ["swi"] + }, + "application/vnd.artisan+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.artsquare": { + "source": "iana" + }, + "application/vnd.astraea-software.iota": { + "source": "iana", + "extensions": ["iota"] + }, + "application/vnd.audiograph": { + "source": "iana", + "extensions": ["aep"] + }, + "application/vnd.autopackage": { + "source": "iana" + }, + "application/vnd.avalon+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.avistar+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.balsamiq.bmml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["bmml"] + }, + "application/vnd.balsamiq.bmpr": { + "source": "iana" + }, + "application/vnd.banana-accounting": { + "source": "iana" + }, + "application/vnd.bbf.usp.error": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bekitzur-stech+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bint.med-content": { + "source": "iana" + }, + "application/vnd.biopax.rdf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.blink-idb-value-wrapper": { + "source": "iana" + }, + "application/vnd.blueice.multipass": { + "source": "iana", + "extensions": ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + "source": "iana" + }, + "application/vnd.bluetooth.le.oob": { + "source": "iana" + }, + "application/vnd.bmi": { + "source": "iana", + "extensions": ["bmi"] + }, + "application/vnd.bpf": { + "source": "iana" + }, + "application/vnd.bpf3": { + "source": "iana" + }, + "application/vnd.businessobjects": { + "source": "iana", + "extensions": ["rep"] + }, + "application/vnd.byu.uapi+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cab-jscript": { + "source": "iana" + }, + "application/vnd.canon-cpdl": { + "source": "iana" + }, + "application/vnd.canon-lips": { + "source": "iana" + }, + "application/vnd.capasystems-pg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cendio.thinlinc.clientconf": { + "source": "iana" + }, + "application/vnd.century-systems.tcp_stream": { + "source": "iana" + }, + "application/vnd.chemdraw+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdxml"] + }, + "application/vnd.chess-pgn": { + "source": "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + "source": "iana", + "extensions": ["mmd"] + }, + "application/vnd.ciedi": { + "source": "iana" + }, + "application/vnd.cinderella": { + "source": "iana", + "extensions": ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + "source": "iana" + }, + "application/vnd.citationstyles.style+xml": { + "source": "iana", + "compressible": true, + "extensions": ["csl"] + }, + "application/vnd.claymore": { + "source": "iana", + "extensions": ["cla"] + }, + "application/vnd.cloanto.rp9": { + "source": "iana", + "extensions": ["rp9"] + }, + "application/vnd.clonk.c4group": { + "source": "iana", + "extensions": ["c4g","c4d","c4f","c4p","c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + "source": "iana", + "extensions": ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + "source": "iana", + "extensions": ["c11amz"] + }, + "application/vnd.coffeescript": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet-template": { + "source": "iana" + }, + "application/vnd.collection+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.doc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.next+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.comicbook+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.comicbook-rar": { + "source": "iana" + }, + "application/vnd.commerce-battelle": { + "source": "iana" + }, + "application/vnd.commonspace": { + "source": "iana", + "extensions": ["csp"] + }, + "application/vnd.contact.cmsg": { + "source": "iana", + "extensions": ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cosmocaller": { + "source": "iana", + "extensions": ["cmc"] + }, + "application/vnd.crick.clicker": { + "source": "iana", + "extensions": ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + "source": "iana", + "extensions": ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + "source": "iana", + "extensions": ["clkp"] + }, + "application/vnd.crick.clicker.template": { + "source": "iana", + "extensions": ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + "source": "iana", + "extensions": ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wbs"] + }, + "application/vnd.cryptii.pipe+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.crypto-shade-file": { + "source": "iana" + }, + "application/vnd.cryptomator.encrypted": { + "source": "iana" + }, + "application/vnd.cryptomator.vault": { + "source": "iana" + }, + "application/vnd.ctc-posml": { + "source": "iana", + "extensions": ["pml"] + }, + "application/vnd.ctct.ws+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cups-pdf": { + "source": "iana" + }, + "application/vnd.cups-postscript": { + "source": "iana" + }, + "application/vnd.cups-ppd": { + "source": "iana", + "extensions": ["ppd"] + }, + "application/vnd.cups-raster": { + "source": "iana" + }, + "application/vnd.cups-raw": { + "source": "iana" + }, + "application/vnd.curl": { + "source": "iana" + }, + "application/vnd.curl.car": { + "source": "apache", + "extensions": ["car"] + }, + "application/vnd.curl.pcurl": { + "source": "apache", + "extensions": ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cybank": { + "source": "iana" + }, + "application/vnd.cyclonedx+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cyclonedx+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.d2l.coursepackage1p0+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.d3m-dataset": { + "source": "iana" + }, + "application/vnd.d3m-problem": { + "source": "iana" + }, + "application/vnd.dart": { + "source": "iana", + "compressible": true, + "extensions": ["dart"] + }, + "application/vnd.data-vision.rdz": { + "source": "iana", + "extensions": ["rdz"] + }, + "application/vnd.datapackage+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dataresource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dbf": { + "source": "iana", + "extensions": ["dbf"] + }, + "application/vnd.debian.binary-package": { + "source": "iana" + }, + "application/vnd.dece.data": { + "source": "iana", + "extensions": ["uvf","uvvf","uvd","uvvd"] + }, + "application/vnd.dece.ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uvt","uvvt"] + }, + "application/vnd.dece.unspecified": { + "source": "iana", + "extensions": ["uvx","uvvx"] + }, + "application/vnd.dece.zip": { + "source": "iana", + "extensions": ["uvz","uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + "source": "iana", + "extensions": ["fe_launch"] + }, + "application/vnd.desmume.movie": { + "source": "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + "source": "iana" + }, + "application/vnd.dm.delegation+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dna": { + "source": "iana", + "extensions": ["dna"] + }, + "application/vnd.document+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dolby.mlp": { + "source": "apache", + "extensions": ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + "source": "iana" + }, + "application/vnd.dolby.mobile.2": { + "source": "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + "source": "iana" + }, + "application/vnd.dpgraph": { + "source": "iana", + "extensions": ["dpg"] + }, + "application/vnd.dreamfactory": { + "source": "iana", + "extensions": ["dfac"] + }, + "application/vnd.drive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ds-keypoint": { + "source": "apache", + "extensions": ["kpxx"] + }, + "application/vnd.dtg.local": { + "source": "iana" + }, + "application/vnd.dtg.local.flash": { + "source": "iana" + }, + "application/vnd.dtg.local.html": { + "source": "iana" + }, + "application/vnd.dvb.ait": { + "source": "iana", + "extensions": ["ait"] + }, + "application/vnd.dvb.dvbisl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.dvbj": { + "source": "iana" + }, + "application/vnd.dvb.esgcontainer": { + "source": "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + "source": "iana" + }, + "application/vnd.dvb.ipdcroaming": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + "source": "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-container+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-generic+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-init+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.pfr": { + "source": "iana" + }, + "application/vnd.dvb.service": { + "source": "iana", + "extensions": ["svc"] + }, + "application/vnd.dxr": { + "source": "iana" + }, + "application/vnd.dynageo": { + "source": "iana", + "extensions": ["geo"] + }, + "application/vnd.dzr": { + "source": "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + "source": "iana" + }, + "application/vnd.ecdis-update": { + "source": "iana" + }, + "application/vnd.ecip.rlp": { + "source": "iana" + }, + "application/vnd.eclipse.ditto+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ecowin.chart": { + "source": "iana", + "extensions": ["mag"] + }, + "application/vnd.ecowin.filerequest": { + "source": "iana" + }, + "application/vnd.ecowin.fileupdate": { + "source": "iana" + }, + "application/vnd.ecowin.series": { + "source": "iana" + }, + "application/vnd.ecowin.seriesrequest": { + "source": "iana" + }, + "application/vnd.ecowin.seriesupdate": { + "source": "iana" + }, + "application/vnd.efi.img": { + "source": "iana" + }, + "application/vnd.efi.iso": { + "source": "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.enliven": { + "source": "iana", + "extensions": ["nml"] + }, + "application/vnd.enphase.envoy": { + "source": "iana" + }, + "application/vnd.eprints.data+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.epson.esf": { + "source": "iana", + "extensions": ["esf"] + }, + "application/vnd.epson.msf": { + "source": "iana", + "extensions": ["msf"] + }, + "application/vnd.epson.quickanime": { + "source": "iana", + "extensions": ["qam"] + }, + "application/vnd.epson.salt": { + "source": "iana", + "extensions": ["slt"] + }, + "application/vnd.epson.ssf": { + "source": "iana", + "extensions": ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + "source": "iana" + }, + "application/vnd.espass-espass+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.eszigno3+xml": { + "source": "iana", + "compressible": true, + "extensions": ["es3","et3"] + }, + "application/vnd.etsi.aoc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.asic-e+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.asic-s+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.cug+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvcommand+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-bc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-cod+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvservice+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsync+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mcid+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mheg5": { + "source": "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.pstn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.sci+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.simservs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.timestamp-token": { + "source": "iana" + }, + "application/vnd.etsi.tsl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.tsl.der": { + "source": "iana" + }, + "application/vnd.eu.kasparian.car+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.eudora.data": { + "source": "iana" + }, + "application/vnd.evolv.ecig.profile": { + "source": "iana" + }, + "application/vnd.evolv.ecig.settings": { + "source": "iana" + }, + "application/vnd.evolv.ecig.theme": { + "source": "iana" + }, + "application/vnd.exstream-empower+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.exstream-package": { + "source": "iana" + }, + "application/vnd.ezpix-album": { + "source": "iana", + "extensions": ["ez2"] + }, + "application/vnd.ezpix-package": { + "source": "iana", + "extensions": ["ez3"] + }, + "application/vnd.f-secure.mobile": { + "source": "iana" + }, + "application/vnd.familysearch.gedcom+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.fastcopy-disk-image": { + "source": "iana" + }, + "application/vnd.fdf": { + "source": "iana", + "extensions": ["fdf"] + }, + "application/vnd.fdsn.mseed": { + "source": "iana", + "extensions": ["mseed"] + }, + "application/vnd.fdsn.seed": { + "source": "iana", + "extensions": ["seed","dataless"] + }, + "application/vnd.ffsns": { + "source": "iana" + }, + "application/vnd.ficlab.flb+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.filmit.zfc": { + "source": "iana" + }, + "application/vnd.fints": { + "source": "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + "source": "iana" + }, + "application/vnd.flographit": { + "source": "iana", + "extensions": ["gph"] + }, + "application/vnd.fluxtime.clip": { + "source": "iana", + "extensions": ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + "source": "iana" + }, + "application/vnd.framemaker": { + "source": "iana", + "extensions": ["fm","frame","maker","book"] + }, + "application/vnd.frogans.fnc": { + "source": "iana", + "extensions": ["fnc"] + }, + "application/vnd.frogans.ltf": { + "source": "iana", + "extensions": ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + "source": "iana", + "extensions": ["fsc"] + }, + "application/vnd.fujifilm.fb.docuworks": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.docuworks.binder": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.jfi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.fujitsu.oasys": { + "source": "iana", + "extensions": ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + "source": "iana", + "extensions": ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + "source": "iana", + "extensions": ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + "source": "iana", + "extensions": ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + "source": "iana", + "extensions": ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + "source": "iana" + }, + "application/vnd.fujixerox.art4": { + "source": "iana" + }, + "application/vnd.fujixerox.ddd": { + "source": "iana", + "extensions": ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + "source": "iana", + "extensions": ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + "source": "iana", + "extensions": ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujixerox.hbpl": { + "source": "iana" + }, + "application/vnd.fut-misnet": { + "source": "iana" + }, + "application/vnd.futoin+cbor": { + "source": "iana" + }, + "application/vnd.futoin+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.fuzzysheet": { + "source": "iana", + "extensions": ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + "source": "iana", + "extensions": ["txd"] + }, + "application/vnd.gentics.grd+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geo+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geocube+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.geogebra.file": { + "source": "iana", + "extensions": ["ggb"] + }, + "application/vnd.geogebra.slides": { + "source": "iana" + }, + "application/vnd.geogebra.tool": { + "source": "iana", + "extensions": ["ggt"] + }, + "application/vnd.geometry-explorer": { + "source": "iana", + "extensions": ["gex","gre"] + }, + "application/vnd.geonext": { + "source": "iana", + "extensions": ["gxt"] + }, + "application/vnd.geoplan": { + "source": "iana", + "extensions": ["g2w"] + }, + "application/vnd.geospace": { + "source": "iana", + "extensions": ["g3w"] + }, + "application/vnd.gerber": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + "source": "iana" + }, + "application/vnd.gmx": { + "source": "iana", + "extensions": ["gmx"] + }, + "application/vnd.google-apps.document": { + "compressible": false, + "extensions": ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + "compressible": false, + "extensions": ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + "compressible": false, + "extensions": ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["kml"] + }, + "application/vnd.google-earth.kmz": { + "source": "iana", + "compressible": false, + "extensions": ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.gov.sk.e-form+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.grafeq": { + "source": "iana", + "extensions": ["gqf","gqs"] + }, + "application/vnd.gridmp": { + "source": "iana" + }, + "application/vnd.groove-account": { + "source": "iana", + "extensions": ["gac"] + }, + "application/vnd.groove-help": { + "source": "iana", + "extensions": ["ghf"] + }, + "application/vnd.groove-identity-message": { + "source": "iana", + "extensions": ["gim"] + }, + "application/vnd.groove-injector": { + "source": "iana", + "extensions": ["grv"] + }, + "application/vnd.groove-tool-message": { + "source": "iana", + "extensions": ["gtm"] + }, + "application/vnd.groove-tool-template": { + "source": "iana", + "extensions": ["tpl"] + }, + "application/vnd.groove-vcard": { + "source": "iana", + "extensions": ["vcg"] + }, + "application/vnd.hal+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hal+xml": { + "source": "iana", + "compressible": true, + "extensions": ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zmm"] + }, + "application/vnd.hbci": { + "source": "iana", + "extensions": ["hbci"] + }, + "application/vnd.hc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hcl-bireports": { + "source": "iana" + }, + "application/vnd.hdt": { + "source": "iana" + }, + "application/vnd.heroku+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hhe.lesson-player": { + "source": "iana", + "extensions": ["les"] + }, + "application/vnd.hl7cda+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.hl7v2+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.hp-hpgl": { + "source": "iana", + "extensions": ["hpgl"] + }, + "application/vnd.hp-hpid": { + "source": "iana", + "extensions": ["hpid"] + }, + "application/vnd.hp-hps": { + "source": "iana", + "extensions": ["hps"] + }, + "application/vnd.hp-jlyt": { + "source": "iana", + "extensions": ["jlt"] + }, + "application/vnd.hp-pcl": { + "source": "iana", + "extensions": ["pcl"] + }, + "application/vnd.hp-pclxl": { + "source": "iana", + "extensions": ["pclxl"] + }, + "application/vnd.httphone": { + "source": "iana" + }, + "application/vnd.hydrostatix.sof-data": { + "source": "iana", + "extensions": ["sfd-hdstx"] + }, + "application/vnd.hyper+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyper-item+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyperdrive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hzn-3d-crossword": { + "source": "iana" + }, + "application/vnd.ibm.afplinedata": { + "source": "iana" + }, + "application/vnd.ibm.electronic-media": { + "source": "iana" + }, + "application/vnd.ibm.minipay": { + "source": "iana", + "extensions": ["mpy"] + }, + "application/vnd.ibm.modcap": { + "source": "iana", + "extensions": ["afp","listafp","list3820"] + }, + "application/vnd.ibm.rights-management": { + "source": "iana", + "extensions": ["irm"] + }, + "application/vnd.ibm.secure-container": { + "source": "iana", + "extensions": ["sc"] + }, + "application/vnd.iccprofile": { + "source": "iana", + "extensions": ["icc","icm"] + }, + "application/vnd.ieee.1905": { + "source": "iana" + }, + "application/vnd.igloader": { + "source": "iana", + "extensions": ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.imagemeter.image+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.immervision-ivp": { + "source": "iana", + "extensions": ["ivp"] + }, + "application/vnd.immervision-ivu": { + "source": "iana", + "extensions": ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p2": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p3": { + "source": "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.informedcontrol.rms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.informix-visionary": { + "source": "iana" + }, + "application/vnd.infotech.project": { + "source": "iana" + }, + "application/vnd.infotech.project+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.innopath.wamp.notification": { + "source": "iana" + }, + "application/vnd.insors.igm": { + "source": "iana", + "extensions": ["igm"] + }, + "application/vnd.intercon.formnet": { + "source": "iana", + "extensions": ["xpw","xpx"] + }, + "application/vnd.intergeo": { + "source": "iana", + "extensions": ["i2g"] + }, + "application/vnd.intertrust.digibox": { + "source": "iana" + }, + "application/vnd.intertrust.nncp": { + "source": "iana" + }, + "application/vnd.intu.qbo": { + "source": "iana", + "extensions": ["qbo"] + }, + "application/vnd.intu.qfx": { + "source": "iana", + "extensions": ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.conceptitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.packageitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.planningitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ipunplugged.rcprofile": { + "source": "iana", + "extensions": ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["irp"] + }, + "application/vnd.is-xpr": { + "source": "iana", + "extensions": ["xpr"] + }, + "application/vnd.isac.fcs": { + "source": "iana", + "extensions": ["fcs"] + }, + "application/vnd.iso11783-10+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.jam": { + "source": "iana", + "extensions": ["jam"] + }, + "application/vnd.japannet-directory-service": { + "source": "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-payment-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-registration": { + "source": "iana" + }, + "application/vnd.japannet-registration-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-verification": { + "source": "iana" + }, + "application/vnd.japannet-verification-wakeup": { + "source": "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + "source": "iana", + "extensions": ["rms"] + }, + "application/vnd.jisp": { + "source": "iana", + "extensions": ["jisp"] + }, + "application/vnd.joost.joda-archive": { + "source": "iana", + "extensions": ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + "source": "iana" + }, + "application/vnd.kahootz": { + "source": "iana", + "extensions": ["ktz","ktr"] + }, + "application/vnd.kde.karbon": { + "source": "iana", + "extensions": ["karbon"] + }, + "application/vnd.kde.kchart": { + "source": "iana", + "extensions": ["chrt"] + }, + "application/vnd.kde.kformula": { + "source": "iana", + "extensions": ["kfo"] + }, + "application/vnd.kde.kivio": { + "source": "iana", + "extensions": ["flw"] + }, + "application/vnd.kde.kontour": { + "source": "iana", + "extensions": ["kon"] + }, + "application/vnd.kde.kpresenter": { + "source": "iana", + "extensions": ["kpr","kpt"] + }, + "application/vnd.kde.kspread": { + "source": "iana", + "extensions": ["ksp"] + }, + "application/vnd.kde.kword": { + "source": "iana", + "extensions": ["kwd","kwt"] + }, + "application/vnd.kenameaapp": { + "source": "iana", + "extensions": ["htke"] + }, + "application/vnd.kidspiration": { + "source": "iana", + "extensions": ["kia"] + }, + "application/vnd.kinar": { + "source": "iana", + "extensions": ["kne","knp"] + }, + "application/vnd.koan": { + "source": "iana", + "extensions": ["skp","skd","skt","skm"] + }, + "application/vnd.kodak-descriptor": { + "source": "iana", + "extensions": ["sse"] + }, + "application/vnd.las": { + "source": "iana" + }, + "application/vnd.las.las+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.las.las+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lasxml"] + }, + "application/vnd.laszip": { + "source": "iana" + }, + "application/vnd.leap+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.liberty-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.llamagraphics.life-balance.desktop": { + "source": "iana", + "extensions": ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lbe"] + }, + "application/vnd.logipipe.circuit+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.loom": { + "source": "iana" + }, + "application/vnd.lotus-1-2-3": { + "source": "iana", + "extensions": ["123"] + }, + "application/vnd.lotus-approach": { + "source": "iana", + "extensions": ["apr"] + }, + "application/vnd.lotus-freelance": { + "source": "iana", + "extensions": ["pre"] + }, + "application/vnd.lotus-notes": { + "source": "iana", + "extensions": ["nsf"] + }, + "application/vnd.lotus-organizer": { + "source": "iana", + "extensions": ["org"] + }, + "application/vnd.lotus-screencam": { + "source": "iana", + "extensions": ["scm"] + }, + "application/vnd.lotus-wordpro": { + "source": "iana", + "extensions": ["lwp"] + }, + "application/vnd.macports.portpkg": { + "source": "iana", + "extensions": ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + "source": "iana", + "extensions": ["mvt"] + }, + "application/vnd.marlin.drm.actiontoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.conftoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.license+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.mdcf": { + "source": "iana" + }, + "application/vnd.mason+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.maxar.archive.3tz+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.maxmind.maxmind-db": { + "source": "iana" + }, + "application/vnd.mcd": { + "source": "iana", + "extensions": ["mcd"] + }, + "application/vnd.medcalcdata": { + "source": "iana", + "extensions": ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + "source": "iana", + "extensions": ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + "source": "iana" + }, + "application/vnd.mfer": { + "source": "iana", + "extensions": ["mwf"] + }, + "application/vnd.mfmp": { + "source": "iana", + "extensions": ["mfm"] + }, + "application/vnd.micro+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.micrografx.flo": { + "source": "iana", + "extensions": ["flo"] + }, + "application/vnd.micrografx.igx": { + "source": "iana", + "extensions": ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + "source": "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + "source": "iana" + }, + "application/vnd.miele+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.mif": { + "source": "iana", + "extensions": ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + "source": "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + "source": "iana" + }, + "application/vnd.mobius.daf": { + "source": "iana", + "extensions": ["daf"] + }, + "application/vnd.mobius.dis": { + "source": "iana", + "extensions": ["dis"] + }, + "application/vnd.mobius.mbk": { + "source": "iana", + "extensions": ["mbk"] + }, + "application/vnd.mobius.mqy": { + "source": "iana", + "extensions": ["mqy"] + }, + "application/vnd.mobius.msl": { + "source": "iana", + "extensions": ["msl"] + }, + "application/vnd.mobius.plc": { + "source": "iana", + "extensions": ["plc"] + }, + "application/vnd.mobius.txf": { + "source": "iana", + "extensions": ["txf"] + }, + "application/vnd.mophun.application": { + "source": "iana", + "extensions": ["mpn"] + }, + "application/vnd.mophun.certificate": { + "source": "iana", + "extensions": ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + "source": "iana" + }, + "application/vnd.motorola.iprm": { + "source": "iana" + }, + "application/vnd.mozilla.xul+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xul"] + }, + "application/vnd.ms-3mfdocument": { + "source": "iana" + }, + "application/vnd.ms-artgalry": { + "source": "iana", + "extensions": ["cil"] + }, + "application/vnd.ms-asf": { + "source": "iana" + }, + "application/vnd.ms-cab-compressed": { + "source": "iana", + "extensions": ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + "source": "apache" + }, + "application/vnd.ms-excel": { + "source": "iana", + "compressible": false, + "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + "source": "iana", + "extensions": ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + "source": "iana", + "extensions": ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + "source": "iana", + "extensions": ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + "source": "iana", + "extensions": ["xltm"] + }, + "application/vnd.ms-fontobject": { + "source": "iana", + "compressible": true, + "extensions": ["eot"] + }, + "application/vnd.ms-htmlhelp": { + "source": "iana", + "extensions": ["chm"] + }, + "application/vnd.ms-ims": { + "source": "iana", + "extensions": ["ims"] + }, + "application/vnd.ms-lrm": { + "source": "iana", + "extensions": ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-officetheme": { + "source": "iana", + "extensions": ["thmx"] + }, + "application/vnd.ms-opentype": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-outlook": { + "compressible": false, + "extensions": ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + "source": "apache" + }, + "application/vnd.ms-pki.seccat": { + "source": "apache", + "extensions": ["cat"] + }, + "application/vnd.ms-pki.stl": { + "source": "apache", + "extensions": ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-powerpoint": { + "source": "iana", + "compressible": false, + "extensions": ["ppt","pps","pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + "source": "iana", + "extensions": ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + "source": "iana", + "extensions": ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + "source": "iana", + "extensions": ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + "source": "iana", + "extensions": ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + "source": "iana", + "extensions": ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-printing.printticket+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-printschematicket+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-project": { + "source": "iana", + "extensions": ["mpp","mpt"] + }, + "application/vnd.ms-tnef": { + "source": "iana" + }, + "application/vnd.ms-windows.devicepairing": { + "source": "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + "source": "iana" + }, + "application/vnd.ms-windows.printerpairing": { + "source": "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + "source": "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + "source": "iana", + "extensions": ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + "source": "iana", + "extensions": ["dotm"] + }, + "application/vnd.ms-works": { + "source": "iana", + "extensions": ["wps","wks","wcm","wdb"] + }, + "application/vnd.ms-wpl": { + "source": "iana", + "extensions": ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + "source": "iana", + "compressible": false, + "extensions": ["xps"] + }, + "application/vnd.msa-disk-image": { + "source": "iana" + }, + "application/vnd.mseq": { + "source": "iana", + "extensions": ["mseq"] + }, + "application/vnd.msign": { + "source": "iana" + }, + "application/vnd.multiad.creator": { + "source": "iana" + }, + "application/vnd.multiad.creator.cif": { + "source": "iana" + }, + "application/vnd.music-niff": { + "source": "iana" + }, + "application/vnd.musician": { + "source": "iana", + "extensions": ["mus"] + }, + "application/vnd.muvee.style": { + "source": "iana", + "extensions": ["msty"] + }, + "application/vnd.mynfc": { + "source": "iana", + "extensions": ["taglet"] + }, + "application/vnd.nacamar.ybrid+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ncd.control": { + "source": "iana" + }, + "application/vnd.ncd.reference": { + "source": "iana" + }, + "application/vnd.nearst.inv+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nebumind.line": { + "source": "iana" + }, + "application/vnd.nervana": { + "source": "iana" + }, + "application/vnd.netfpx": { + "source": "iana" + }, + "application/vnd.neurolanguage.nlu": { + "source": "iana", + "extensions": ["nlu"] + }, + "application/vnd.nimn": { + "source": "iana" + }, + "application/vnd.nintendo.nitro.rom": { + "source": "iana" + }, + "application/vnd.nintendo.snes.rom": { + "source": "iana" + }, + "application/vnd.nitf": { + "source": "iana", + "extensions": ["ntf","nitf"] + }, + "application/vnd.noblenet-directory": { + "source": "iana", + "extensions": ["nnd"] + }, + "application/vnd.noblenet-sealer": { + "source": "iana", + "extensions": ["nns"] + }, + "application/vnd.noblenet-web": { + "source": "iana", + "extensions": ["nnw"] + }, + "application/vnd.nokia.catalogs": { + "source": "iana" + }, + "application/vnd.nokia.conml+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.conml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.iptv.config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.isds-radio-presets": { + "source": "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.landmark+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.landmarkcollection+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.n-gage.ac+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ac"] + }, + "application/vnd.nokia.n-gage.data": { + "source": "iana", + "extensions": ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + "source": "iana", + "extensions": ["n-gage"] + }, + "application/vnd.nokia.ncd": { + "source": "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.pcd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.radio-preset": { + "source": "iana", + "extensions": ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + "source": "iana", + "extensions": ["rpss"] + }, + "application/vnd.novadigm.edm": { + "source": "iana", + "extensions": ["edm"] + }, + "application/vnd.novadigm.edx": { + "source": "iana", + "extensions": ["edx"] + }, + "application/vnd.novadigm.ext": { + "source": "iana", + "extensions": ["ext"] + }, + "application/vnd.ntt-local.content-share": { + "source": "iana" + }, + "application/vnd.ntt-local.file-transfer": { + "source": "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.chart": { + "source": "iana", + "extensions": ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + "source": "iana", + "extensions": ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + "source": "iana", + "extensions": ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + "source": "iana", + "extensions": ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + "source": "iana", + "extensions": ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + "source": "iana", + "compressible": false, + "extensions": ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + "source": "iana", + "extensions": ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + "source": "iana", + "extensions": ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + "source": "iana", + "extensions": ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + "source": "iana", + "extensions": ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + "source": "iana", + "compressible": false, + "extensions": ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + "source": "iana", + "extensions": ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + "source": "iana", + "compressible": false, + "extensions": ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + "source": "iana", + "extensions": ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + "source": "iana", + "extensions": ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + "source": "iana", + "extensions": ["oth"] + }, + "application/vnd.obn": { + "source": "iana" + }, + "application/vnd.ocf+cbor": { + "source": "iana" + }, + "application/vnd.oci.image.manifest.v1+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oftn.l10n+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.cspg-hexbinary": { + "source": "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.dae.xhtml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.pae.gem": { + "source": "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.spdlist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.ueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.userprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.olpc-sugar": { + "source": "iana", + "extensions": ["xo"] + }, + "application/vnd.oma-scws-config": { + "source": "iana" + }, + "application/vnd.oma-scws-http-request": { + "source": "iana" + }, + "application/vnd.oma-scws-http-response": { + "source": "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.imd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.ltkm": { + "source": "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.provisioningtrigger": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgboot": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sgdu": { + "source": "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + "source": "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sprov+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.stkm": { + "source": "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-feature-handler+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-pcc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-subs-invite+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-user-prefs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.dcd": { + "source": "iana" + }, + "application/vnd.oma.dcdc": { + "source": "iana" + }, + "application/vnd.oma.dd2+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.group-usage-list+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+cbor": { + "source": "iana" + }, + "application/vnd.oma.lwm2m+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+tlv": { + "source": "iana" + }, + "application/vnd.oma.pal+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.final-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.groups+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.push": { + "source": "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.xcap-directory+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omads-email+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-file+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-folder+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omaloc-supl-init": { + "source": "iana" + }, + "application/vnd.onepager": { + "source": "iana" + }, + "application/vnd.onepagertamp": { + "source": "iana" + }, + "application/vnd.onepagertamx": { + "source": "iana" + }, + "application/vnd.onepagertat": { + "source": "iana" + }, + "application/vnd.onepagertatp": { + "source": "iana" + }, + "application/vnd.onepagertatx": { + "source": "iana" + }, + "application/vnd.openblox.game+xml": { + "source": "iana", + "compressible": true, + "extensions": ["obgx"] + }, + "application/vnd.openblox.game-binary": { + "source": "iana" + }, + "application/vnd.openeye.oeb": { + "source": "iana" + }, + "application/vnd.openofficeorg.extension": { + "source": "apache", + "extensions": ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osm"] + }, + "application/vnd.opentimestamps.ots": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + "source": "iana", + "extensions": ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + "source": "iana", + "extensions": ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + "source": "iana", + "extensions": ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + "source": "iana", + "compressible": false, + "extensions": ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + "source": "iana", + "extensions": ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "source": "iana", + "compressible": false, + "extensions": ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + "source": "iana", + "extensions": ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.relationships+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oracle.resource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.orange.indata": { + "source": "iana" + }, + "application/vnd.osa.netdeploy": { + "source": "iana" + }, + "application/vnd.osgeo.mapguide.package": { + "source": "iana", + "extensions": ["mgp"] + }, + "application/vnd.osgi.bundle": { + "source": "iana" + }, + "application/vnd.osgi.dp": { + "source": "iana", + "extensions": ["dp"] + }, + "application/vnd.osgi.subsystem": { + "source": "iana", + "extensions": ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oxli.countgraph": { + "source": "iana" + }, + "application/vnd.pagerduty+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.palm": { + "source": "iana", + "extensions": ["pdb","pqa","oprc"] + }, + "application/vnd.panoply": { + "source": "iana" + }, + "application/vnd.paos.xml": { + "source": "iana" + }, + "application/vnd.patentdive": { + "source": "iana" + }, + "application/vnd.patientecommsdoc": { + "source": "iana" + }, + "application/vnd.pawaafile": { + "source": "iana", + "extensions": ["paw"] + }, + "application/vnd.pcos": { + "source": "iana" + }, + "application/vnd.pg.format": { + "source": "iana", + "extensions": ["str"] + }, + "application/vnd.pg.osasli": { + "source": "iana", + "extensions": ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + "source": "iana" + }, + "application/vnd.picsel": { + "source": "iana", + "extensions": ["efif"] + }, + "application/vnd.pmi.widget": { + "source": "iana", + "extensions": ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.pocketlearn": { + "source": "iana", + "extensions": ["plf"] + }, + "application/vnd.powerbuilder6": { + "source": "iana", + "extensions": ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + "source": "iana" + }, + "application/vnd.powerbuilder7": { + "source": "iana" + }, + "application/vnd.powerbuilder7-s": { + "source": "iana" + }, + "application/vnd.powerbuilder75": { + "source": "iana" + }, + "application/vnd.powerbuilder75-s": { + "source": "iana" + }, + "application/vnd.preminet": { + "source": "iana" + }, + "application/vnd.previewsystems.box": { + "source": "iana", + "extensions": ["box"] + }, + "application/vnd.proteus.magazine": { + "source": "iana", + "extensions": ["mgz"] + }, + "application/vnd.psfs": { + "source": "iana" + }, + "application/vnd.publishare-delta-tree": { + "source": "iana", + "extensions": ["qps"] + }, + "application/vnd.pvi.ptid1": { + "source": "iana", + "extensions": ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + "source": "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.qualcomm.brew-app-res": { + "source": "iana" + }, + "application/vnd.quarantainenet": { + "source": "iana" + }, + "application/vnd.quark.quarkxpress": { + "source": "iana", + "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] + }, + "application/vnd.quobject-quoxdocument": { + "source": "iana" + }, + "application/vnd.radisys.moml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-stream+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-base+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-group+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.rainstor.data": { + "source": "iana" + }, + "application/vnd.rapid": { + "source": "iana" + }, + "application/vnd.rar": { + "source": "iana", + "extensions": ["rar"] + }, + "application/vnd.realvnc.bed": { + "source": "iana", + "extensions": ["bed"] + }, + "application/vnd.recordare.musicxml": { + "source": "iana", + "extensions": ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + "source": "iana" + }, + "application/vnd.resilient.logic": { + "source": "iana" + }, + "application/vnd.restful+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.rig.cryptonote": { + "source": "iana", + "extensions": ["cryptonote"] + }, + "application/vnd.rim.cod": { + "source": "apache", + "extensions": ["cod"] + }, + "application/vnd.rn-realmedia": { + "source": "apache", + "extensions": ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + "source": "apache", + "extensions": ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + "source": "iana", + "compressible": true, + "extensions": ["link66"] + }, + "application/vnd.rs-274x": { + "source": "iana" + }, + "application/vnd.ruckus.download": { + "source": "iana" + }, + "application/vnd.s3sms": { + "source": "iana" + }, + "application/vnd.sailingtracker.track": { + "source": "iana", + "extensions": ["st"] + }, + "application/vnd.sar": { + "source": "iana" + }, + "application/vnd.sbm.cid": { + "source": "iana" + }, + "application/vnd.sbm.mid2": { + "source": "iana" + }, + "application/vnd.scribus": { + "source": "iana" + }, + "application/vnd.sealed.3df": { + "source": "iana" + }, + "application/vnd.sealed.csf": { + "source": "iana" + }, + "application/vnd.sealed.doc": { + "source": "iana" + }, + "application/vnd.sealed.eml": { + "source": "iana" + }, + "application/vnd.sealed.mht": { + "source": "iana" + }, + "application/vnd.sealed.net": { + "source": "iana" + }, + "application/vnd.sealed.ppt": { + "source": "iana" + }, + "application/vnd.sealed.tiff": { + "source": "iana" + }, + "application/vnd.sealed.xls": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + "source": "iana" + }, + "application/vnd.seemail": { + "source": "iana", + "extensions": ["see"] + }, + "application/vnd.seis+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.sema": { + "source": "iana", + "extensions": ["sema"] + }, + "application/vnd.semd": { + "source": "iana", + "extensions": ["semd"] + }, + "application/vnd.semf": { + "source": "iana", + "extensions": ["semf"] + }, + "application/vnd.shade-save-file": { + "source": "iana" + }, + "application/vnd.shana.informed.formdata": { + "source": "iana", + "extensions": ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + "source": "iana", + "extensions": ["itp"] + }, + "application/vnd.shana.informed.interchange": { + "source": "iana", + "extensions": ["iif"] + }, + "application/vnd.shana.informed.package": { + "source": "iana", + "extensions": ["ipk"] + }, + "application/vnd.shootproof+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shopkick+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shp": { + "source": "iana" + }, + "application/vnd.shx": { + "source": "iana" + }, + "application/vnd.sigrok.session": { + "source": "iana" + }, + "application/vnd.simtech-mindmapper": { + "source": "iana", + "extensions": ["twd","twds"] + }, + "application/vnd.siren+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.smaf": { + "source": "iana", + "extensions": ["mmf"] + }, + "application/vnd.smart.notebook": { + "source": "iana" + }, + "application/vnd.smart.teacher": { + "source": "iana", + "extensions": ["teacher"] + }, + "application/vnd.snesdev-page-table": { + "source": "iana" + }, + "application/vnd.software602.filler.form+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fo"] + }, + "application/vnd.software602.filler.form-xml-zip": { + "source": "iana" + }, + "application/vnd.solent.sdkm+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sdkm","sdkd"] + }, + "application/vnd.spotfire.dxp": { + "source": "iana", + "extensions": ["dxp"] + }, + "application/vnd.spotfire.sfs": { + "source": "iana", + "extensions": ["sfs"] + }, + "application/vnd.sqlite3": { + "source": "iana" + }, + "application/vnd.sss-cod": { + "source": "iana" + }, + "application/vnd.sss-dtf": { + "source": "iana" + }, + "application/vnd.sss-ntf": { + "source": "iana" + }, + "application/vnd.stardivision.calc": { + "source": "apache", + "extensions": ["sdc"] + }, + "application/vnd.stardivision.draw": { + "source": "apache", + "extensions": ["sda"] + }, + "application/vnd.stardivision.impress": { + "source": "apache", + "extensions": ["sdd"] + }, + "application/vnd.stardivision.math": { + "source": "apache", + "extensions": ["smf"] + }, + "application/vnd.stardivision.writer": { + "source": "apache", + "extensions": ["sdw","vor"] + }, + "application/vnd.stardivision.writer-global": { + "source": "apache", + "extensions": ["sgl"] + }, + "application/vnd.stepmania.package": { + "source": "iana", + "extensions": ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + "source": "iana", + "extensions": ["sm"] + }, + "application/vnd.street-stream": { + "source": "iana" + }, + "application/vnd.sun.wadl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wadl"] + }, + "application/vnd.sun.xml.calc": { + "source": "apache", + "extensions": ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + "source": "apache", + "extensions": ["stc"] + }, + "application/vnd.sun.xml.draw": { + "source": "apache", + "extensions": ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + "source": "apache", + "extensions": ["std"] + }, + "application/vnd.sun.xml.impress": { + "source": "apache", + "extensions": ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + "source": "apache", + "extensions": ["sti"] + }, + "application/vnd.sun.xml.math": { + "source": "apache", + "extensions": ["sxm"] + }, + "application/vnd.sun.xml.writer": { + "source": "apache", + "extensions": ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + "source": "apache", + "extensions": ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + "source": "apache", + "extensions": ["stw"] + }, + "application/vnd.sus-calendar": { + "source": "iana", + "extensions": ["sus","susp"] + }, + "application/vnd.svd": { + "source": "iana", + "extensions": ["svd"] + }, + "application/vnd.swiftview-ics": { + "source": "iana" + }, + "application/vnd.sycle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.syft+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.symbian.install": { + "source": "apache", + "extensions": ["sis","sisx"] + }, + "application/vnd.syncml+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["ddf"] + }, + "application/vnd.syncml.dmtnds+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.syncml.ds.notification": { + "source": "iana" + }, + "application/vnd.tableschema+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tao.intent-module-archive": { + "source": "iana", + "extensions": ["tao"] + }, + "application/vnd.tcpdump.pcap": { + "source": "iana", + "extensions": ["pcap","cap","dmp"] + }, + "application/vnd.think-cell.ppttc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tmd.mediaflex.api+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.tml": { + "source": "iana" + }, + "application/vnd.tmobile-livetv": { + "source": "iana", + "extensions": ["tmo"] + }, + "application/vnd.tri.onesource": { + "source": "iana" + }, + "application/vnd.trid.tpt": { + "source": "iana", + "extensions": ["tpt"] + }, + "application/vnd.triscape.mxs": { + "source": "iana", + "extensions": ["mxs"] + }, + "application/vnd.trueapp": { + "source": "iana", + "extensions": ["tra"] + }, + "application/vnd.truedoc": { + "source": "iana" + }, + "application/vnd.ubisoft.webplayer": { + "source": "iana" + }, + "application/vnd.ufdl": { + "source": "iana", + "extensions": ["ufd","ufdl"] + }, + "application/vnd.uiq.theme": { + "source": "iana", + "extensions": ["utz"] + }, + "application/vnd.umajin": { + "source": "iana", + "extensions": ["umj"] + }, + "application/vnd.unity": { + "source": "iana", + "extensions": ["unityweb"] + }, + "application/vnd.uoml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uoml"] + }, + "application/vnd.uplanet.alert": { + "source": "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.channel": { + "source": "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.list": { + "source": "iana" + }, + "application/vnd.uplanet.list-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.signal": { + "source": "iana" + }, + "application/vnd.uri-map": { + "source": "iana" + }, + "application/vnd.valve.source.material": { + "source": "iana" + }, + "application/vnd.vcx": { + "source": "iana", + "extensions": ["vcx"] + }, + "application/vnd.vd-study": { + "source": "iana" + }, + "application/vnd.vectorworks": { + "source": "iana" + }, + "application/vnd.vel+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.verimatrix.vcas": { + "source": "iana" + }, + "application/vnd.veritone.aion+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.veryant.thin": { + "source": "iana" + }, + "application/vnd.ves.encrypted": { + "source": "iana" + }, + "application/vnd.vidsoft.vidconference": { + "source": "iana" + }, + "application/vnd.visio": { + "source": "iana", + "extensions": ["vsd","vst","vss","vsw"] + }, + "application/vnd.visionary": { + "source": "iana", + "extensions": ["vis"] + }, + "application/vnd.vividence.scriptfile": { + "source": "iana" + }, + "application/vnd.vsf": { + "source": "iana", + "extensions": ["vsf"] + }, + "application/vnd.wap.sic": { + "source": "iana" + }, + "application/vnd.wap.slc": { + "source": "iana" + }, + "application/vnd.wap.wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["wbxml"] + }, + "application/vnd.wap.wmlc": { + "source": "iana", + "extensions": ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + "source": "iana", + "extensions": ["wmlsc"] + }, + "application/vnd.webturbo": { + "source": "iana", + "extensions": ["wtb"] + }, + "application/vnd.wfa.dpp": { + "source": "iana" + }, + "application/vnd.wfa.p2p": { + "source": "iana" + }, + "application/vnd.wfa.wsc": { + "source": "iana" + }, + "application/vnd.windows.devicepairing": { + "source": "iana" + }, + "application/vnd.wmc": { + "source": "iana" + }, + "application/vnd.wmf.bootstrap": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica.package": { + "source": "iana" + }, + "application/vnd.wolfram.player": { + "source": "iana", + "extensions": ["nbp"] + }, + "application/vnd.wordperfect": { + "source": "iana", + "extensions": ["wpd"] + }, + "application/vnd.wqd": { + "source": "iana", + "extensions": ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + "source": "iana" + }, + "application/vnd.wt.stf": { + "source": "iana", + "extensions": ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + "source": "iana" + }, + "application/vnd.wv.csp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.wv.ssp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xacml+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.xara": { + "source": "iana", + "extensions": ["xar"] + }, + "application/vnd.xfdl": { + "source": "iana", + "extensions": ["xfdl"] + }, + "application/vnd.xfdl.webform": { + "source": "iana" + }, + "application/vnd.xmi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xmpie.cpkg": { + "source": "iana" + }, + "application/vnd.xmpie.dpkg": { + "source": "iana" + }, + "application/vnd.xmpie.plan": { + "source": "iana" + }, + "application/vnd.xmpie.ppkg": { + "source": "iana" + }, + "application/vnd.xmpie.xlim": { + "source": "iana" + }, + "application/vnd.yamaha.hv-dic": { + "source": "iana", + "extensions": ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + "source": "iana", + "extensions": ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + "source": "iana", + "extensions": ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + "source": "iana", + "extensions": ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + "source": "iana" + }, + "application/vnd.yamaha.smaf-audio": { + "source": "iana", + "extensions": ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + "source": "iana", + "extensions": ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + "source": "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + "source": "iana" + }, + "application/vnd.yaoweme": { + "source": "iana" + }, + "application/vnd.yellowriver-custom-menu": { + "source": "iana", + "extensions": ["cmp"] + }, + "application/vnd.youtube.yt": { + "source": "iana" + }, + "application/vnd.zul": { + "source": "iana", + "extensions": ["zir","zirz"] + }, + "application/vnd.zzazz.deck+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zaz"] + }, + "application/voicexml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["vxml"] + }, + "application/voucher-cms+json": { + "source": "iana", + "compressible": true + }, + "application/vq-rtcpxr": { + "source": "iana" + }, + "application/wasm": { + "source": "iana", + "compressible": true, + "extensions": ["wasm"] + }, + "application/watcherinfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wif"] + }, + "application/webpush-options+json": { + "source": "iana", + "compressible": true + }, + "application/whoispp-query": { + "source": "iana" + }, + "application/whoispp-response": { + "source": "iana" + }, + "application/widget": { + "source": "iana", + "extensions": ["wgt"] + }, + "application/winhlp": { + "source": "apache", + "extensions": ["hlp"] + }, + "application/wita": { + "source": "iana" + }, + "application/wordperfect5.1": { + "source": "iana" + }, + "application/wsdl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wsdl"] + }, + "application/wspolicy+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wspolicy"] + }, + "application/x-7z-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["7z"] + }, + "application/x-abiword": { + "source": "apache", + "extensions": ["abw"] + }, + "application/x-ace-compressed": { + "source": "apache", + "extensions": ["ace"] + }, + "application/x-amf": { + "source": "apache" + }, + "application/x-apple-diskimage": { + "source": "apache", + "extensions": ["dmg"] + }, + "application/x-arj": { + "compressible": false, + "extensions": ["arj"] + }, + "application/x-authorware-bin": { + "source": "apache", + "extensions": ["aab","x32","u32","vox"] + }, + "application/x-authorware-map": { + "source": "apache", + "extensions": ["aam"] + }, + "application/x-authorware-seg": { + "source": "apache", + "extensions": ["aas"] + }, + "application/x-bcpio": { + "source": "apache", + "extensions": ["bcpio"] + }, + "application/x-bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/x-bittorrent": { + "source": "apache", + "extensions": ["torrent"] + }, + "application/x-blorb": { + "source": "apache", + "extensions": ["blb","blorb"] + }, + "application/x-bzip": { + "source": "apache", + "compressible": false, + "extensions": ["bz"] + }, + "application/x-bzip2": { + "source": "apache", + "compressible": false, + "extensions": ["bz2","boz"] + }, + "application/x-cbr": { + "source": "apache", + "extensions": ["cbr","cba","cbt","cbz","cb7"] + }, + "application/x-cdlink": { + "source": "apache", + "extensions": ["vcd"] + }, + "application/x-cfs-compressed": { + "source": "apache", + "extensions": ["cfs"] + }, + "application/x-chat": { + "source": "apache", + "extensions": ["chat"] + }, + "application/x-chess-pgn": { + "source": "apache", + "extensions": ["pgn"] + }, + "application/x-chrome-extension": { + "extensions": ["crx"] + }, + "application/x-cocoa": { + "source": "nginx", + "extensions": ["cco"] + }, + "application/x-compress": { + "source": "apache" + }, + "application/x-conference": { + "source": "apache", + "extensions": ["nsc"] + }, + "application/x-cpio": { + "source": "apache", + "extensions": ["cpio"] + }, + "application/x-csh": { + "source": "apache", + "extensions": ["csh"] + }, + "application/x-deb": { + "compressible": false + }, + "application/x-debian-package": { + "source": "apache", + "extensions": ["deb","udeb"] + }, + "application/x-dgc-compressed": { + "source": "apache", + "extensions": ["dgc"] + }, + "application/x-director": { + "source": "apache", + "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] + }, + "application/x-doom": { + "source": "apache", + "extensions": ["wad"] + }, + "application/x-dtbncx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ncx"] + }, + "application/x-dtbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dtb"] + }, + "application/x-dtbresource+xml": { + "source": "apache", + "compressible": true, + "extensions": ["res"] + }, + "application/x-dvi": { + "source": "apache", + "compressible": false, + "extensions": ["dvi"] + }, + "application/x-envoy": { + "source": "apache", + "extensions": ["evy"] + }, + "application/x-eva": { + "source": "apache", + "extensions": ["eva"] + }, + "application/x-font-bdf": { + "source": "apache", + "extensions": ["bdf"] + }, + "application/x-font-dos": { + "source": "apache" + }, + "application/x-font-framemaker": { + "source": "apache" + }, + "application/x-font-ghostscript": { + "source": "apache", + "extensions": ["gsf"] + }, + "application/x-font-libgrx": { + "source": "apache" + }, + "application/x-font-linux-psf": { + "source": "apache", + "extensions": ["psf"] + }, + "application/x-font-pcf": { + "source": "apache", + "extensions": ["pcf"] + }, + "application/x-font-snf": { + "source": "apache", + "extensions": ["snf"] + }, + "application/x-font-speedo": { + "source": "apache" + }, + "application/x-font-sunos-news": { + "source": "apache" + }, + "application/x-font-type1": { + "source": "apache", + "extensions": ["pfa","pfb","pfm","afm"] + }, + "application/x-font-vfont": { + "source": "apache" + }, + "application/x-freearc": { + "source": "apache", + "extensions": ["arc"] + }, + "application/x-futuresplash": { + "source": "apache", + "extensions": ["spl"] + }, + "application/x-gca-compressed": { + "source": "apache", + "extensions": ["gca"] + }, + "application/x-glulx": { + "source": "apache", + "extensions": ["ulx"] + }, + "application/x-gnumeric": { + "source": "apache", + "extensions": ["gnumeric"] + }, + "application/x-gramps-xml": { + "source": "apache", + "extensions": ["gramps"] + }, + "application/x-gtar": { + "source": "apache", + "extensions": ["gtar"] + }, + "application/x-gzip": { + "source": "apache" + }, + "application/x-hdf": { + "source": "apache", + "extensions": ["hdf"] + }, + "application/x-httpd-php": { + "compressible": true, + "extensions": ["php"] + }, + "application/x-install-instructions": { + "source": "apache", + "extensions": ["install"] + }, + "application/x-iso9660-image": { + "source": "apache", + "extensions": ["iso"] + }, + "application/x-iwork-keynote-sffkey": { + "extensions": ["key"] + }, + "application/x-iwork-numbers-sffnumbers": { + "extensions": ["numbers"] + }, + "application/x-iwork-pages-sffpages": { + "extensions": ["pages"] + }, + "application/x-java-archive-diff": { + "source": "nginx", + "extensions": ["jardiff"] + }, + "application/x-java-jnlp-file": { + "source": "apache", + "compressible": false, + "extensions": ["jnlp"] + }, + "application/x-javascript": { + "compressible": true + }, + "application/x-keepass2": { + "extensions": ["kdbx"] + }, + "application/x-latex": { + "source": "apache", + "compressible": false, + "extensions": ["latex"] + }, + "application/x-lua-bytecode": { + "extensions": ["luac"] + }, + "application/x-lzh-compressed": { + "source": "apache", + "extensions": ["lzh","lha"] + }, + "application/x-makeself": { + "source": "nginx", + "extensions": ["run"] + }, + "application/x-mie": { + "source": "apache", + "extensions": ["mie"] + }, + "application/x-mobipocket-ebook": { + "source": "apache", + "extensions": ["prc","mobi"] + }, + "application/x-mpegurl": { + "compressible": false + }, + "application/x-ms-application": { + "source": "apache", + "extensions": ["application"] + }, + "application/x-ms-shortcut": { + "source": "apache", + "extensions": ["lnk"] + }, + "application/x-ms-wmd": { + "source": "apache", + "extensions": ["wmd"] + }, + "application/x-ms-wmz": { + "source": "apache", + "extensions": ["wmz"] + }, + "application/x-ms-xbap": { + "source": "apache", + "extensions": ["xbap"] + }, + "application/x-msaccess": { + "source": "apache", + "extensions": ["mdb"] + }, + "application/x-msbinder": { + "source": "apache", + "extensions": ["obd"] + }, + "application/x-mscardfile": { + "source": "apache", + "extensions": ["crd"] + }, + "application/x-msclip": { + "source": "apache", + "extensions": ["clp"] + }, + "application/x-msdos-program": { + "extensions": ["exe"] + }, + "application/x-msdownload": { + "source": "apache", + "extensions": ["exe","dll","com","bat","msi"] + }, + "application/x-msmediaview": { + "source": "apache", + "extensions": ["mvb","m13","m14"] + }, + "application/x-msmetafile": { + "source": "apache", + "extensions": ["wmf","wmz","emf","emz"] + }, + "application/x-msmoney": { + "source": "apache", + "extensions": ["mny"] + }, + "application/x-mspublisher": { + "source": "apache", + "extensions": ["pub"] + }, + "application/x-msschedule": { + "source": "apache", + "extensions": ["scd"] + }, + "application/x-msterminal": { + "source": "apache", + "extensions": ["trm"] + }, + "application/x-mswrite": { + "source": "apache", + "extensions": ["wri"] + }, + "application/x-netcdf": { + "source": "apache", + "extensions": ["nc","cdf"] + }, + "application/x-ns-proxy-autoconfig": { + "compressible": true, + "extensions": ["pac"] + }, + "application/x-nzb": { + "source": "apache", + "extensions": ["nzb"] + }, + "application/x-perl": { + "source": "nginx", + "extensions": ["pl","pm"] + }, + "application/x-pilot": { + "source": "nginx", + "extensions": ["prc","pdb"] + }, + "application/x-pkcs12": { + "source": "apache", + "compressible": false, + "extensions": ["p12","pfx"] + }, + "application/x-pkcs7-certificates": { + "source": "apache", + "extensions": ["p7b","spc"] + }, + "application/x-pkcs7-certreqresp": { + "source": "apache", + "extensions": ["p7r"] + }, + "application/x-pki-message": { + "source": "iana" + }, + "application/x-rar-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["rar"] + }, + "application/x-redhat-package-manager": { + "source": "nginx", + "extensions": ["rpm"] + }, + "application/x-research-info-systems": { + "source": "apache", + "extensions": ["ris"] + }, + "application/x-sea": { + "source": "nginx", + "extensions": ["sea"] + }, + "application/x-sh": { + "source": "apache", + "compressible": true, + "extensions": ["sh"] + }, + "application/x-shar": { + "source": "apache", + "extensions": ["shar"] + }, + "application/x-shockwave-flash": { + "source": "apache", + "compressible": false, + "extensions": ["swf"] + }, + "application/x-silverlight-app": { + "source": "apache", + "extensions": ["xap"] + }, + "application/x-sql": { + "source": "apache", + "extensions": ["sql"] + }, + "application/x-stuffit": { + "source": "apache", + "compressible": false, + "extensions": ["sit"] + }, + "application/x-stuffitx": { + "source": "apache", + "extensions": ["sitx"] + }, + "application/x-subrip": { + "source": "apache", + "extensions": ["srt"] + }, + "application/x-sv4cpio": { + "source": "apache", + "extensions": ["sv4cpio"] + }, + "application/x-sv4crc": { + "source": "apache", + "extensions": ["sv4crc"] + }, + "application/x-t3vm-image": { + "source": "apache", + "extensions": ["t3"] + }, + "application/x-tads": { + "source": "apache", + "extensions": ["gam"] + }, + "application/x-tar": { + "source": "apache", + "compressible": true, + "extensions": ["tar"] + }, + "application/x-tcl": { + "source": "apache", + "extensions": ["tcl","tk"] + }, + "application/x-tex": { + "source": "apache", + "extensions": ["tex"] + }, + "application/x-tex-tfm": { + "source": "apache", + "extensions": ["tfm"] + }, + "application/x-texinfo": { + "source": "apache", + "extensions": ["texinfo","texi"] + }, + "application/x-tgif": { + "source": "apache", + "extensions": ["obj"] + }, + "application/x-ustar": { + "source": "apache", + "extensions": ["ustar"] + }, + "application/x-virtualbox-hdd": { + "compressible": true, + "extensions": ["hdd"] + }, + "application/x-virtualbox-ova": { + "compressible": true, + "extensions": ["ova"] + }, + "application/x-virtualbox-ovf": { + "compressible": true, + "extensions": ["ovf"] + }, + "application/x-virtualbox-vbox": { + "compressible": true, + "extensions": ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + "compressible": false, + "extensions": ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + "compressible": true, + "extensions": ["vdi"] + }, + "application/x-virtualbox-vhd": { + "compressible": true, + "extensions": ["vhd"] + }, + "application/x-virtualbox-vmdk": { + "compressible": true, + "extensions": ["vmdk"] + }, + "application/x-wais-source": { + "source": "apache", + "extensions": ["src"] + }, + "application/x-web-app-manifest+json": { + "compressible": true, + "extensions": ["webapp"] + }, + "application/x-www-form-urlencoded": { + "source": "iana", + "compressible": true + }, + "application/x-x509-ca-cert": { + "source": "iana", + "extensions": ["der","crt","pem"] + }, + "application/x-x509-ca-ra-cert": { + "source": "iana" + }, + "application/x-x509-next-ca-cert": { + "source": "iana" + }, + "application/x-xfig": { + "source": "apache", + "extensions": ["fig"] + }, + "application/x-xliff+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xlf"] + }, + "application/x-xpinstall": { + "source": "apache", + "compressible": false, + "extensions": ["xpi"] + }, + "application/x-xz": { + "source": "apache", + "extensions": ["xz"] + }, + "application/x-zmachine": { + "source": "apache", + "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] + }, + "application/x400-bp": { + "source": "iana" + }, + "application/xacml+xml": { + "source": "iana", + "compressible": true + }, + "application/xaml+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xaml"] + }, + "application/xcap-att+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xav"] + }, + "application/xcap-caps+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xca"] + }, + "application/xcap-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdf"] + }, + "application/xcap-el+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xel"] + }, + "application/xcap-error+xml": { + "source": "iana", + "compressible": true + }, + "application/xcap-ns+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xns"] + }, + "application/xcon-conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/xcon-conference-info-diff+xml": { + "source": "iana", + "compressible": true + }, + "application/xenc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xenc"] + }, + "application/xhtml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtml","xht"] + }, + "application/xhtml-voice+xml": { + "source": "apache", + "compressible": true + }, + "application/xliff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xlf"] + }, + "application/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml","xsl","xsd","rng"] + }, + "application/xml-dtd": { + "source": "iana", + "compressible": true, + "extensions": ["dtd"] + }, + "application/xml-external-parsed-entity": { + "source": "iana" + }, + "application/xml-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/xmpp+xml": { + "source": "iana", + "compressible": true + }, + "application/xop+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xop"] + }, + "application/xproc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xpl"] + }, + "application/xslt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xsl","xslt"] + }, + "application/xspf+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xspf"] + }, + "application/xv+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mxml","xhvml","xvml","xvm"] + }, + "application/yang": { + "source": "iana", + "extensions": ["yang"] + }, + "application/yang-data+json": { + "source": "iana", + "compressible": true + }, + "application/yang-data+xml": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+json": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/yin+xml": { + "source": "iana", + "compressible": true, + "extensions": ["yin"] + }, + "application/zip": { + "source": "iana", + "compressible": false, + "extensions": ["zip"] + }, + "application/zlib": { + "source": "iana" + }, + "application/zstd": { + "source": "iana" + }, + "audio/1d-interleaved-parityfec": { + "source": "iana" + }, + "audio/32kadpcm": { + "source": "iana" + }, + "audio/3gpp": { + "source": "iana", + "compressible": false, + "extensions": ["3gpp"] + }, + "audio/3gpp2": { + "source": "iana" + }, + "audio/aac": { + "source": "iana" + }, + "audio/ac3": { + "source": "iana" + }, + "audio/adpcm": { + "source": "apache", + "extensions": ["adp"] + }, + "audio/amr": { + "source": "iana", + "extensions": ["amr"] + }, + "audio/amr-wb": { + "source": "iana" + }, + "audio/amr-wb+": { + "source": "iana" + }, + "audio/aptx": { + "source": "iana" + }, + "audio/asc": { + "source": "iana" + }, + "audio/atrac-advanced-lossless": { + "source": "iana" + }, + "audio/atrac-x": { + "source": "iana" + }, + "audio/atrac3": { + "source": "iana" + }, + "audio/basic": { + "source": "iana", + "compressible": false, + "extensions": ["au","snd"] + }, + "audio/bv16": { + "source": "iana" + }, + "audio/bv32": { + "source": "iana" + }, + "audio/clearmode": { + "source": "iana" + }, + "audio/cn": { + "source": "iana" + }, + "audio/dat12": { + "source": "iana" + }, + "audio/dls": { + "source": "iana" + }, + "audio/dsr-es201108": { + "source": "iana" + }, + "audio/dsr-es202050": { + "source": "iana" + }, + "audio/dsr-es202211": { + "source": "iana" + }, + "audio/dsr-es202212": { + "source": "iana" + }, + "audio/dv": { + "source": "iana" + }, + "audio/dvi4": { + "source": "iana" + }, + "audio/eac3": { + "source": "iana" + }, + "audio/encaprtp": { + "source": "iana" + }, + "audio/evrc": { + "source": "iana" + }, + "audio/evrc-qcp": { + "source": "iana" + }, + "audio/evrc0": { + "source": "iana" + }, + "audio/evrc1": { + "source": "iana" + }, + "audio/evrcb": { + "source": "iana" + }, + "audio/evrcb0": { + "source": "iana" + }, + "audio/evrcb1": { + "source": "iana" + }, + "audio/evrcnw": { + "source": "iana" + }, + "audio/evrcnw0": { + "source": "iana" + }, + "audio/evrcnw1": { + "source": "iana" + }, + "audio/evrcwb": { + "source": "iana" + }, + "audio/evrcwb0": { + "source": "iana" + }, + "audio/evrcwb1": { + "source": "iana" + }, + "audio/evs": { + "source": "iana" + }, + "audio/flexfec": { + "source": "iana" + }, + "audio/fwdred": { + "source": "iana" + }, + "audio/g711-0": { + "source": "iana" + }, + "audio/g719": { + "source": "iana" + }, + "audio/g722": { + "source": "iana" + }, + "audio/g7221": { + "source": "iana" + }, + "audio/g723": { + "source": "iana" + }, + "audio/g726-16": { + "source": "iana" + }, + "audio/g726-24": { + "source": "iana" + }, + "audio/g726-32": { + "source": "iana" + }, + "audio/g726-40": { + "source": "iana" + }, + "audio/g728": { + "source": "iana" + }, + "audio/g729": { + "source": "iana" + }, + "audio/g7291": { + "source": "iana" + }, + "audio/g729d": { + "source": "iana" + }, + "audio/g729e": { + "source": "iana" + }, + "audio/gsm": { + "source": "iana" + }, + "audio/gsm-efr": { + "source": "iana" + }, + "audio/gsm-hr-08": { + "source": "iana" + }, + "audio/ilbc": { + "source": "iana" + }, + "audio/ip-mr_v2.5": { + "source": "iana" + }, + "audio/isac": { + "source": "apache" + }, + "audio/l16": { + "source": "iana" + }, + "audio/l20": { + "source": "iana" + }, + "audio/l24": { + "source": "iana", + "compressible": false + }, + "audio/l8": { + "source": "iana" + }, + "audio/lpc": { + "source": "iana" + }, + "audio/melp": { + "source": "iana" + }, + "audio/melp1200": { + "source": "iana" + }, + "audio/melp2400": { + "source": "iana" + }, + "audio/melp600": { + "source": "iana" + }, + "audio/mhas": { + "source": "iana" + }, + "audio/midi": { + "source": "apache", + "extensions": ["mid","midi","kar","rmi"] + }, + "audio/mobile-xmf": { + "source": "iana", + "extensions": ["mxmf"] + }, + "audio/mp3": { + "compressible": false, + "extensions": ["mp3"] + }, + "audio/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["m4a","mp4a"] + }, + "audio/mp4a-latm": { + "source": "iana" + }, + "audio/mpa": { + "source": "iana" + }, + "audio/mpa-robust": { + "source": "iana" + }, + "audio/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] + }, + "audio/mpeg4-generic": { + "source": "iana" + }, + "audio/musepack": { + "source": "apache" + }, + "audio/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["oga","ogg","spx","opus"] + }, + "audio/opus": { + "source": "iana" + }, + "audio/parityfec": { + "source": "iana" + }, + "audio/pcma": { + "source": "iana" + }, + "audio/pcma-wb": { + "source": "iana" + }, + "audio/pcmu": { + "source": "iana" + }, + "audio/pcmu-wb": { + "source": "iana" + }, + "audio/prs.sid": { + "source": "iana" + }, + "audio/qcelp": { + "source": "iana" + }, + "audio/raptorfec": { + "source": "iana" + }, + "audio/red": { + "source": "iana" + }, + "audio/rtp-enc-aescm128": { + "source": "iana" + }, + "audio/rtp-midi": { + "source": "iana" + }, + "audio/rtploopback": { + "source": "iana" + }, + "audio/rtx": { + "source": "iana" + }, + "audio/s3m": { + "source": "apache", + "extensions": ["s3m"] + }, + "audio/scip": { + "source": "iana" + }, + "audio/silk": { + "source": "apache", + "extensions": ["sil"] + }, + "audio/smv": { + "source": "iana" + }, + "audio/smv-qcp": { + "source": "iana" + }, + "audio/smv0": { + "source": "iana" + }, + "audio/sofa": { + "source": "iana" + }, + "audio/sp-midi": { + "source": "iana" + }, + "audio/speex": { + "source": "iana" + }, + "audio/t140c": { + "source": "iana" + }, + "audio/t38": { + "source": "iana" + }, + "audio/telephone-event": { + "source": "iana" + }, + "audio/tetra_acelp": { + "source": "iana" + }, + "audio/tetra_acelp_bb": { + "source": "iana" + }, + "audio/tone": { + "source": "iana" + }, + "audio/tsvcis": { + "source": "iana" + }, + "audio/uemclip": { + "source": "iana" + }, + "audio/ulpfec": { + "source": "iana" + }, + "audio/usac": { + "source": "iana" + }, + "audio/vdvi": { + "source": "iana" + }, + "audio/vmr-wb": { + "source": "iana" + }, + "audio/vnd.3gpp.iufp": { + "source": "iana" + }, + "audio/vnd.4sb": { + "source": "iana" + }, + "audio/vnd.audiokoz": { + "source": "iana" + }, + "audio/vnd.celp": { + "source": "iana" + }, + "audio/vnd.cisco.nse": { + "source": "iana" + }, + "audio/vnd.cmles.radio-events": { + "source": "iana" + }, + "audio/vnd.cns.anp1": { + "source": "iana" + }, + "audio/vnd.cns.inf1": { + "source": "iana" + }, + "audio/vnd.dece.audio": { + "source": "iana", + "extensions": ["uva","uvva"] + }, + "audio/vnd.digital-winds": { + "source": "iana", + "extensions": ["eol"] + }, + "audio/vnd.dlna.adts": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.1": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.2": { + "source": "iana" + }, + "audio/vnd.dolby.mlp": { + "source": "iana" + }, + "audio/vnd.dolby.mps": { + "source": "iana" + }, + "audio/vnd.dolby.pl2": { + "source": "iana" + }, + "audio/vnd.dolby.pl2x": { + "source": "iana" + }, + "audio/vnd.dolby.pl2z": { + "source": "iana" + }, + "audio/vnd.dolby.pulse.1": { + "source": "iana" + }, + "audio/vnd.dra": { + "source": "iana", + "extensions": ["dra"] + }, + "audio/vnd.dts": { + "source": "iana", + "extensions": ["dts"] + }, + "audio/vnd.dts.hd": { + "source": "iana", + "extensions": ["dtshd"] + }, + "audio/vnd.dts.uhd": { + "source": "iana" + }, + "audio/vnd.dvb.file": { + "source": "iana" + }, + "audio/vnd.everad.plj": { + "source": "iana" + }, + "audio/vnd.hns.audio": { + "source": "iana" + }, + "audio/vnd.lucent.voice": { + "source": "iana", + "extensions": ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + "source": "iana", + "extensions": ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + "source": "iana" + }, + "audio/vnd.nortel.vbk": { + "source": "iana" + }, + "audio/vnd.nuera.ecelp4800": { + "source": "iana", + "extensions": ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + "source": "iana", + "extensions": ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + "source": "iana", + "extensions": ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + "source": "iana" + }, + "audio/vnd.presonus.multitrack": { + "source": "iana" + }, + "audio/vnd.qcelp": { + "source": "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + "source": "iana" + }, + "audio/vnd.rip": { + "source": "iana", + "extensions": ["rip"] + }, + "audio/vnd.rn-realaudio": { + "compressible": false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + "source": "iana" + }, + "audio/vnd.vmx.cvsd": { + "source": "iana" + }, + "audio/vnd.wave": { + "compressible": false + }, + "audio/vorbis": { + "source": "iana", + "compressible": false + }, + "audio/vorbis-config": { + "source": "iana" + }, + "audio/wav": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/wave": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/webm": { + "source": "apache", + "compressible": false, + "extensions": ["weba"] + }, + "audio/x-aac": { + "source": "apache", + "compressible": false, + "extensions": ["aac"] + }, + "audio/x-aiff": { + "source": "apache", + "extensions": ["aif","aiff","aifc"] + }, + "audio/x-caf": { + "source": "apache", + "compressible": false, + "extensions": ["caf"] + }, + "audio/x-flac": { + "source": "apache", + "extensions": ["flac"] + }, + "audio/x-m4a": { + "source": "nginx", + "extensions": ["m4a"] + }, + "audio/x-matroska": { + "source": "apache", + "extensions": ["mka"] + }, + "audio/x-mpegurl": { + "source": "apache", + "extensions": ["m3u"] + }, + "audio/x-ms-wax": { + "source": "apache", + "extensions": ["wax"] + }, + "audio/x-ms-wma": { + "source": "apache", + "extensions": ["wma"] + }, + "audio/x-pn-realaudio": { + "source": "apache", + "extensions": ["ram","ra"] + }, + "audio/x-pn-realaudio-plugin": { + "source": "apache", + "extensions": ["rmp"] + }, + "audio/x-realaudio": { + "source": "nginx", + "extensions": ["ra"] + }, + "audio/x-tta": { + "source": "apache" + }, + "audio/x-wav": { + "source": "apache", + "extensions": ["wav"] + }, + "audio/xm": { + "source": "apache", + "extensions": ["xm"] + }, + "chemical/x-cdx": { + "source": "apache", + "extensions": ["cdx"] + }, + "chemical/x-cif": { + "source": "apache", + "extensions": ["cif"] + }, + "chemical/x-cmdf": { + "source": "apache", + "extensions": ["cmdf"] + }, + "chemical/x-cml": { + "source": "apache", + "extensions": ["cml"] + }, + "chemical/x-csml": { + "source": "apache", + "extensions": ["csml"] + }, + "chemical/x-pdb": { + "source": "apache" + }, + "chemical/x-xyz": { + "source": "apache", + "extensions": ["xyz"] + }, + "font/collection": { + "source": "iana", + "extensions": ["ttc"] + }, + "font/otf": { + "source": "iana", + "compressible": true, + "extensions": ["otf"] + }, + "font/sfnt": { + "source": "iana" + }, + "font/ttf": { + "source": "iana", + "compressible": true, + "extensions": ["ttf"] + }, + "font/woff": { + "source": "iana", + "extensions": ["woff"] + }, + "font/woff2": { + "source": "iana", + "extensions": ["woff2"] + }, + "image/aces": { + "source": "iana", + "extensions": ["exr"] + }, + "image/apng": { + "compressible": false, + "extensions": ["apng"] + }, + "image/avci": { + "source": "iana", + "extensions": ["avci"] + }, + "image/avcs": { + "source": "iana", + "extensions": ["avcs"] + }, + "image/avif": { + "source": "iana", + "compressible": false, + "extensions": ["avif"] + }, + "image/bmp": { + "source": "iana", + "compressible": true, + "extensions": ["bmp"] + }, + "image/cgm": { + "source": "iana", + "extensions": ["cgm"] + }, + "image/dicom-rle": { + "source": "iana", + "extensions": ["drle"] + }, + "image/emf": { + "source": "iana", + "extensions": ["emf"] + }, + "image/fits": { + "source": "iana", + "extensions": ["fits"] + }, + "image/g3fax": { + "source": "iana", + "extensions": ["g3"] + }, + "image/gif": { + "source": "iana", + "compressible": false, + "extensions": ["gif"] + }, + "image/heic": { + "source": "iana", + "extensions": ["heic"] + }, + "image/heic-sequence": { + "source": "iana", + "extensions": ["heics"] + }, + "image/heif": { + "source": "iana", + "extensions": ["heif"] + }, + "image/heif-sequence": { + "source": "iana", + "extensions": ["heifs"] + }, + "image/hej2k": { + "source": "iana", + "extensions": ["hej2"] + }, + "image/hsj2": { + "source": "iana", + "extensions": ["hsj2"] + }, + "image/ief": { + "source": "iana", + "extensions": ["ief"] + }, + "image/jls": { + "source": "iana", + "extensions": ["jls"] + }, + "image/jp2": { + "source": "iana", + "compressible": false, + "extensions": ["jp2","jpg2"] + }, + "image/jpeg": { + "source": "iana", + "compressible": false, + "extensions": ["jpeg","jpg","jpe"] + }, + "image/jph": { + "source": "iana", + "extensions": ["jph"] + }, + "image/jphc": { + "source": "iana", + "extensions": ["jhc"] + }, + "image/jpm": { + "source": "iana", + "compressible": false, + "extensions": ["jpm"] + }, + "image/jpx": { + "source": "iana", + "compressible": false, + "extensions": ["jpx","jpf"] + }, + "image/jxr": { + "source": "iana", + "extensions": ["jxr"] + }, + "image/jxra": { + "source": "iana", + "extensions": ["jxra"] + }, + "image/jxrs": { + "source": "iana", + "extensions": ["jxrs"] + }, + "image/jxs": { + "source": "iana", + "extensions": ["jxs"] + }, + "image/jxsc": { + "source": "iana", + "extensions": ["jxsc"] + }, + "image/jxsi": { + "source": "iana", + "extensions": ["jxsi"] + }, + "image/jxss": { + "source": "iana", + "extensions": ["jxss"] + }, + "image/ktx": { + "source": "iana", + "extensions": ["ktx"] + }, + "image/ktx2": { + "source": "iana", + "extensions": ["ktx2"] + }, + "image/naplps": { + "source": "iana" + }, + "image/pjpeg": { + "compressible": false + }, + "image/png": { + "source": "iana", + "compressible": false, + "extensions": ["png"] + }, + "image/prs.btif": { + "source": "iana", + "extensions": ["btif"] + }, + "image/prs.pti": { + "source": "iana", + "extensions": ["pti"] + }, + "image/pwg-raster": { + "source": "iana" + }, + "image/sgi": { + "source": "apache", + "extensions": ["sgi"] + }, + "image/svg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["svg","svgz"] + }, + "image/t38": { + "source": "iana", + "extensions": ["t38"] + }, + "image/tiff": { + "source": "iana", + "compressible": false, + "extensions": ["tif","tiff"] + }, + "image/tiff-fx": { + "source": "iana", + "extensions": ["tfx"] + }, + "image/vnd.adobe.photoshop": { + "source": "iana", + "compressible": true, + "extensions": ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + "source": "iana", + "extensions": ["azv"] + }, + "image/vnd.cns.inf2": { + "source": "iana" + }, + "image/vnd.dece.graphic": { + "source": "iana", + "extensions": ["uvi","uvvi","uvg","uvvg"] + }, + "image/vnd.djvu": { + "source": "iana", + "extensions": ["djvu","djv"] + }, + "image/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "image/vnd.dwg": { + "source": "iana", + "extensions": ["dwg"] + }, + "image/vnd.dxf": { + "source": "iana", + "extensions": ["dxf"] + }, + "image/vnd.fastbidsheet": { + "source": "iana", + "extensions": ["fbs"] + }, + "image/vnd.fpx": { + "source": "iana", + "extensions": ["fpx"] + }, + "image/vnd.fst": { + "source": "iana", + "extensions": ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + "source": "iana", + "extensions": ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + "source": "iana", + "extensions": ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + "source": "iana" + }, + "image/vnd.microsoft.icon": { + "source": "iana", + "compressible": true, + "extensions": ["ico"] + }, + "image/vnd.mix": { + "source": "iana" + }, + "image/vnd.mozilla.apng": { + "source": "iana" + }, + "image/vnd.ms-dds": { + "compressible": true, + "extensions": ["dds"] + }, + "image/vnd.ms-modi": { + "source": "iana", + "extensions": ["mdi"] + }, + "image/vnd.ms-photo": { + "source": "apache", + "extensions": ["wdp"] + }, + "image/vnd.net-fpx": { + "source": "iana", + "extensions": ["npx"] + }, + "image/vnd.pco.b16": { + "source": "iana", + "extensions": ["b16"] + }, + "image/vnd.radiance": { + "source": "iana" + }, + "image/vnd.sealed.png": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + "source": "iana" + }, + "image/vnd.svf": { + "source": "iana" + }, + "image/vnd.tencent.tap": { + "source": "iana", + "extensions": ["tap"] + }, + "image/vnd.valve.source.texture": { + "source": "iana", + "extensions": ["vtf"] + }, + "image/vnd.wap.wbmp": { + "source": "iana", + "extensions": ["wbmp"] + }, + "image/vnd.xiff": { + "source": "iana", + "extensions": ["xif"] + }, + "image/vnd.zbrush.pcx": { + "source": "iana", + "extensions": ["pcx"] + }, + "image/webp": { + "source": "apache", + "extensions": ["webp"] + }, + "image/wmf": { + "source": "iana", + "extensions": ["wmf"] + }, + "image/x-3ds": { + "source": "apache", + "extensions": ["3ds"] + }, + "image/x-cmu-raster": { + "source": "apache", + "extensions": ["ras"] + }, + "image/x-cmx": { + "source": "apache", + "extensions": ["cmx"] + }, + "image/x-freehand": { + "source": "apache", + "extensions": ["fh","fhc","fh4","fh5","fh7"] + }, + "image/x-icon": { + "source": "apache", + "compressible": true, + "extensions": ["ico"] + }, + "image/x-jng": { + "source": "nginx", + "extensions": ["jng"] + }, + "image/x-mrsid-image": { + "source": "apache", + "extensions": ["sid"] + }, + "image/x-ms-bmp": { + "source": "nginx", + "compressible": true, + "extensions": ["bmp"] + }, + "image/x-pcx": { + "source": "apache", + "extensions": ["pcx"] + }, + "image/x-pict": { + "source": "apache", + "extensions": ["pic","pct"] + }, + "image/x-portable-anymap": { + "source": "apache", + "extensions": ["pnm"] + }, + "image/x-portable-bitmap": { + "source": "apache", + "extensions": ["pbm"] + }, + "image/x-portable-graymap": { + "source": "apache", + "extensions": ["pgm"] + }, + "image/x-portable-pixmap": { + "source": "apache", + "extensions": ["ppm"] + }, + "image/x-rgb": { + "source": "apache", + "extensions": ["rgb"] + }, + "image/x-tga": { + "source": "apache", + "extensions": ["tga"] + }, + "image/x-xbitmap": { + "source": "apache", + "extensions": ["xbm"] + }, + "image/x-xcf": { + "compressible": false + }, + "image/x-xpixmap": { + "source": "apache", + "extensions": ["xpm"] + }, + "image/x-xwindowdump": { + "source": "apache", + "extensions": ["xwd"] + }, + "message/cpim": { + "source": "iana" + }, + "message/delivery-status": { + "source": "iana" + }, + "message/disposition-notification": { + "source": "iana", + "extensions": [ + "disposition-notification" + ] + }, + "message/external-body": { + "source": "iana" + }, + "message/feedback-report": { + "source": "iana" + }, + "message/global": { + "source": "iana", + "extensions": ["u8msg"] + }, + "message/global-delivery-status": { + "source": "iana", + "extensions": ["u8dsn"] + }, + "message/global-disposition-notification": { + "source": "iana", + "extensions": ["u8mdn"] + }, + "message/global-headers": { + "source": "iana", + "extensions": ["u8hdr"] + }, + "message/http": { + "source": "iana", + "compressible": false + }, + "message/imdn+xml": { + "source": "iana", + "compressible": true + }, + "message/news": { + "source": "iana" + }, + "message/partial": { + "source": "iana", + "compressible": false + }, + "message/rfc822": { + "source": "iana", + "compressible": true, + "extensions": ["eml","mime"] + }, + "message/s-http": { + "source": "iana" + }, + "message/sip": { + "source": "iana" + }, + "message/sipfrag": { + "source": "iana" + }, + "message/tracking-status": { + "source": "iana" + }, + "message/vnd.si.simp": { + "source": "iana" + }, + "message/vnd.wfa.wsc": { + "source": "iana", + "extensions": ["wsc"] + }, + "model/3mf": { + "source": "iana", + "extensions": ["3mf"] + }, + "model/e57": { + "source": "iana" + }, + "model/gltf+json": { + "source": "iana", + "compressible": true, + "extensions": ["gltf"] + }, + "model/gltf-binary": { + "source": "iana", + "compressible": true, + "extensions": ["glb"] + }, + "model/iges": { + "source": "iana", + "compressible": false, + "extensions": ["igs","iges"] + }, + "model/mesh": { + "source": "iana", + "compressible": false, + "extensions": ["msh","mesh","silo"] + }, + "model/mtl": { + "source": "iana", + "extensions": ["mtl"] + }, + "model/obj": { + "source": "iana", + "extensions": ["obj"] + }, + "model/step": { + "source": "iana" + }, + "model/step+xml": { + "source": "iana", + "compressible": true, + "extensions": ["stpx"] + }, + "model/step+zip": { + "source": "iana", + "compressible": false, + "extensions": ["stpz"] + }, + "model/step-xml+zip": { + "source": "iana", + "compressible": false, + "extensions": ["stpxz"] + }, + "model/stl": { + "source": "iana", + "extensions": ["stl"] + }, + "model/vnd.collada+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dae"] + }, + "model/vnd.dwf": { + "source": "iana", + "extensions": ["dwf"] + }, + "model/vnd.flatland.3dml": { + "source": "iana" + }, + "model/vnd.gdl": { + "source": "iana", + "extensions": ["gdl"] + }, + "model/vnd.gs-gdl": { + "source": "apache" + }, + "model/vnd.gs.gdl": { + "source": "iana" + }, + "model/vnd.gtw": { + "source": "iana", + "extensions": ["gtw"] + }, + "model/vnd.moml+xml": { + "source": "iana", + "compressible": true + }, + "model/vnd.mts": { + "source": "iana", + "extensions": ["mts"] + }, + "model/vnd.opengex": { + "source": "iana", + "extensions": ["ogex"] + }, + "model/vnd.parasolid.transmit.binary": { + "source": "iana", + "extensions": ["x_b"] + }, + "model/vnd.parasolid.transmit.text": { + "source": "iana", + "extensions": ["x_t"] + }, + "model/vnd.pytha.pyox": { + "source": "iana" + }, + "model/vnd.rosette.annotated-data-model": { + "source": "iana" + }, + "model/vnd.sap.vds": { + "source": "iana", + "extensions": ["vds"] + }, + "model/vnd.usdz+zip": { + "source": "iana", + "compressible": false, + "extensions": ["usdz"] + }, + "model/vnd.valve.source.compiled-map": { + "source": "iana", + "extensions": ["bsp"] + }, + "model/vnd.vtu": { + "source": "iana", + "extensions": ["vtu"] + }, + "model/vrml": { + "source": "iana", + "compressible": false, + "extensions": ["wrl","vrml"] + }, + "model/x3d+binary": { + "source": "apache", + "compressible": false, + "extensions": ["x3db","x3dbz"] + }, + "model/x3d+fastinfoset": { + "source": "iana", + "extensions": ["x3db"] + }, + "model/x3d+vrml": { + "source": "apache", + "compressible": false, + "extensions": ["x3dv","x3dvz"] + }, + "model/x3d+xml": { + "source": "iana", + "compressible": true, + "extensions": ["x3d","x3dz"] + }, + "model/x3d-vrml": { + "source": "iana", + "extensions": ["x3dv"] + }, + "multipart/alternative": { + "source": "iana", + "compressible": false + }, + "multipart/appledouble": { + "source": "iana" + }, + "multipart/byteranges": { + "source": "iana" + }, + "multipart/digest": { + "source": "iana" + }, + "multipart/encrypted": { + "source": "iana", + "compressible": false + }, + "multipart/form-data": { + "source": "iana", + "compressible": false + }, + "multipart/header-set": { + "source": "iana" + }, + "multipart/mixed": { + "source": "iana" + }, + "multipart/multilingual": { + "source": "iana" + }, + "multipart/parallel": { + "source": "iana" + }, + "multipart/related": { + "source": "iana", + "compressible": false + }, + "multipart/report": { + "source": "iana" + }, + "multipart/signed": { + "source": "iana", + "compressible": false + }, + "multipart/vnd.bint.med-plus": { + "source": "iana" + }, + "multipart/voice-message": { + "source": "iana" + }, + "multipart/x-mixed-replace": { + "source": "iana" + }, + "text/1d-interleaved-parityfec": { + "source": "iana" + }, + "text/cache-manifest": { + "source": "iana", + "compressible": true, + "extensions": ["appcache","manifest"] + }, + "text/calendar": { + "source": "iana", + "extensions": ["ics","ifb"] + }, + "text/calender": { + "compressible": true + }, + "text/cmd": { + "compressible": true + }, + "text/coffeescript": { + "extensions": ["coffee","litcoffee"] + }, + "text/cql": { + "source": "iana" + }, + "text/cql-expression": { + "source": "iana" + }, + "text/cql-identifier": { + "source": "iana" + }, + "text/css": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["css"] + }, + "text/csv": { + "source": "iana", + "compressible": true, + "extensions": ["csv"] + }, + "text/csv-schema": { + "source": "iana" + }, + "text/directory": { + "source": "iana" + }, + "text/dns": { + "source": "iana" + }, + "text/ecmascript": { + "source": "iana" + }, + "text/encaprtp": { + "source": "iana" + }, + "text/enriched": { + "source": "iana" + }, + "text/fhirpath": { + "source": "iana" + }, + "text/flexfec": { + "source": "iana" + }, + "text/fwdred": { + "source": "iana" + }, + "text/gff3": { + "source": "iana" + }, + "text/grammar-ref-list": { + "source": "iana" + }, + "text/html": { + "source": "iana", + "compressible": true, + "extensions": ["html","htm","shtml"] + }, + "text/jade": { + "extensions": ["jade"] + }, + "text/javascript": { + "source": "iana", + "compressible": true + }, + "text/jcr-cnd": { + "source": "iana" + }, + "text/jsx": { + "compressible": true, + "extensions": ["jsx"] + }, + "text/less": { + "compressible": true, + "extensions": ["less"] + }, + "text/markdown": { + "source": "iana", + "compressible": true, + "extensions": ["markdown","md"] + }, + "text/mathml": { + "source": "nginx", + "extensions": ["mml"] + }, + "text/mdx": { + "compressible": true, + "extensions": ["mdx"] + }, + "text/mizar": { + "source": "iana" + }, + "text/n3": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["n3"] + }, + "text/parameters": { + "source": "iana", + "charset": "UTF-8" + }, + "text/parityfec": { + "source": "iana" + }, + "text/plain": { + "source": "iana", + "compressible": true, + "extensions": ["txt","text","conf","def","list","log","in","ini"] + }, + "text/provenance-notation": { + "source": "iana", + "charset": "UTF-8" + }, + "text/prs.fallenstein.rst": { + "source": "iana" + }, + "text/prs.lines.tag": { + "source": "iana", + "extensions": ["dsc"] + }, + "text/prs.prop.logic": { + "source": "iana" + }, + "text/raptorfec": { + "source": "iana" + }, + "text/red": { + "source": "iana" + }, + "text/rfc822-headers": { + "source": "iana" + }, + "text/richtext": { + "source": "iana", + "compressible": true, + "extensions": ["rtx"] + }, + "text/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "text/rtp-enc-aescm128": { + "source": "iana" + }, + "text/rtploopback": { + "source": "iana" + }, + "text/rtx": { + "source": "iana" + }, + "text/sgml": { + "source": "iana", + "extensions": ["sgml","sgm"] + }, + "text/shaclc": { + "source": "iana" + }, + "text/shex": { + "source": "iana", + "extensions": ["shex"] + }, + "text/slim": { + "extensions": ["slim","slm"] + }, + "text/spdx": { + "source": "iana", + "extensions": ["spdx"] + }, + "text/strings": { + "source": "iana" + }, + "text/stylus": { + "extensions": ["stylus","styl"] + }, + "text/t140": { + "source": "iana" + }, + "text/tab-separated-values": { + "source": "iana", + "compressible": true, + "extensions": ["tsv"] + }, + "text/troff": { + "source": "iana", + "extensions": ["t","tr","roff","man","me","ms"] + }, + "text/turtle": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["ttl"] + }, + "text/ulpfec": { + "source": "iana" + }, + "text/uri-list": { + "source": "iana", + "compressible": true, + "extensions": ["uri","uris","urls"] + }, + "text/vcard": { + "source": "iana", + "compressible": true, + "extensions": ["vcard"] + }, + "text/vnd.a": { + "source": "iana" + }, + "text/vnd.abc": { + "source": "iana" + }, + "text/vnd.ascii-art": { + "source": "iana" + }, + "text/vnd.curl": { + "source": "iana", + "extensions": ["curl"] + }, + "text/vnd.curl.dcurl": { + "source": "apache", + "extensions": ["dcurl"] + }, + "text/vnd.curl.mcurl": { + "source": "apache", + "extensions": ["mcurl"] + }, + "text/vnd.curl.scurl": { + "source": "apache", + "extensions": ["scurl"] + }, + "text/vnd.debian.copyright": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.dmclientscript": { + "source": "iana" + }, + "text/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.familysearch.gedcom": { + "source": "iana", + "extensions": ["ged"] + }, + "text/vnd.ficlab.flt": { + "source": "iana" + }, + "text/vnd.fly": { + "source": "iana", + "extensions": ["fly"] + }, + "text/vnd.fmi.flexstor": { + "source": "iana", + "extensions": ["flx"] + }, + "text/vnd.gml": { + "source": "iana" + }, + "text/vnd.graphviz": { + "source": "iana", + "extensions": ["gv"] + }, + "text/vnd.hans": { + "source": "iana" + }, + "text/vnd.hgl": { + "source": "iana" + }, + "text/vnd.in3d.3dml": { + "source": "iana", + "extensions": ["3dml"] + }, + "text/vnd.in3d.spot": { + "source": "iana", + "extensions": ["spot"] + }, + "text/vnd.iptc.newsml": { + "source": "iana" + }, + "text/vnd.iptc.nitf": { + "source": "iana" + }, + "text/vnd.latex-z": { + "source": "iana" + }, + "text/vnd.motorola.reflex": { + "source": "iana" + }, + "text/vnd.ms-mediapackage": { + "source": "iana" + }, + "text/vnd.net2phone.commcenter.command": { + "source": "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + "source": "iana" + }, + "text/vnd.senx.warpscript": { + "source": "iana" + }, + "text/vnd.si.uricatalogue": { + "source": "iana" + }, + "text/vnd.sosi": { + "source": "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["jad"] + }, + "text/vnd.trolltech.linguist": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.wap.si": { + "source": "iana" + }, + "text/vnd.wap.sl": { + "source": "iana" + }, + "text/vnd.wap.wml": { + "source": "iana", + "extensions": ["wml"] + }, + "text/vnd.wap.wmlscript": { + "source": "iana", + "extensions": ["wmls"] + }, + "text/vtt": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["vtt"] + }, + "text/x-asm": { + "source": "apache", + "extensions": ["s","asm"] + }, + "text/x-c": { + "source": "apache", + "extensions": ["c","cc","cxx","cpp","h","hh","dic"] + }, + "text/x-component": { + "source": "nginx", + "extensions": ["htc"] + }, + "text/x-fortran": { + "source": "apache", + "extensions": ["f","for","f77","f90"] + }, + "text/x-gwt-rpc": { + "compressible": true + }, + "text/x-handlebars-template": { + "extensions": ["hbs"] + }, + "text/x-java-source": { + "source": "apache", + "extensions": ["java"] + }, + "text/x-jquery-tmpl": { + "compressible": true + }, + "text/x-lua": { + "extensions": ["lua"] + }, + "text/x-markdown": { + "compressible": true, + "extensions": ["mkd"] + }, + "text/x-nfo": { + "source": "apache", + "extensions": ["nfo"] + }, + "text/x-opml": { + "source": "apache", + "extensions": ["opml"] + }, + "text/x-org": { + "compressible": true, + "extensions": ["org"] + }, + "text/x-pascal": { + "source": "apache", + "extensions": ["p","pas"] + }, + "text/x-processing": { + "compressible": true, + "extensions": ["pde"] + }, + "text/x-sass": { + "extensions": ["sass"] + }, + "text/x-scss": { + "extensions": ["scss"] + }, + "text/x-setext": { + "source": "apache", + "extensions": ["etx"] + }, + "text/x-sfv": { + "source": "apache", + "extensions": ["sfv"] + }, + "text/x-suse-ymp": { + "compressible": true, + "extensions": ["ymp"] + }, + "text/x-uuencode": { + "source": "apache", + "extensions": ["uu"] + }, + "text/x-vcalendar": { + "source": "apache", + "extensions": ["vcs"] + }, + "text/x-vcard": { + "source": "apache", + "extensions": ["vcf"] + }, + "text/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml"] + }, + "text/xml-external-parsed-entity": { + "source": "iana" + }, + "text/yaml": { + "compressible": true, + "extensions": ["yaml","yml"] + }, + "video/1d-interleaved-parityfec": { + "source": "iana" + }, + "video/3gpp": { + "source": "iana", + "extensions": ["3gp","3gpp"] + }, + "video/3gpp-tt": { + "source": "iana" + }, + "video/3gpp2": { + "source": "iana", + "extensions": ["3g2"] + }, + "video/av1": { + "source": "iana" + }, + "video/bmpeg": { + "source": "iana" + }, + "video/bt656": { + "source": "iana" + }, + "video/celb": { + "source": "iana" + }, + "video/dv": { + "source": "iana" + }, + "video/encaprtp": { + "source": "iana" + }, + "video/ffv1": { + "source": "iana" + }, + "video/flexfec": { + "source": "iana" + }, + "video/h261": { + "source": "iana", + "extensions": ["h261"] + }, + "video/h263": { + "source": "iana", + "extensions": ["h263"] + }, + "video/h263-1998": { + "source": "iana" + }, + "video/h263-2000": { + "source": "iana" + }, + "video/h264": { + "source": "iana", + "extensions": ["h264"] + }, + "video/h264-rcdo": { + "source": "iana" + }, + "video/h264-svc": { + "source": "iana" + }, + "video/h265": { + "source": "iana" + }, + "video/iso.segment": { + "source": "iana", + "extensions": ["m4s"] + }, + "video/jpeg": { + "source": "iana", + "extensions": ["jpgv"] + }, + "video/jpeg2000": { + "source": "iana" + }, + "video/jpm": { + "source": "apache", + "extensions": ["jpm","jpgm"] + }, + "video/jxsv": { + "source": "iana" + }, + "video/mj2": { + "source": "iana", + "extensions": ["mj2","mjp2"] + }, + "video/mp1s": { + "source": "iana" + }, + "video/mp2p": { + "source": "iana" + }, + "video/mp2t": { + "source": "iana", + "extensions": ["ts"] + }, + "video/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["mp4","mp4v","mpg4"] + }, + "video/mp4v-es": { + "source": "iana" + }, + "video/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpeg","mpg","mpe","m1v","m2v"] + }, + "video/mpeg4-generic": { + "source": "iana" + }, + "video/mpv": { + "source": "iana" + }, + "video/nv": { + "source": "iana" + }, + "video/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogv"] + }, + "video/parityfec": { + "source": "iana" + }, + "video/pointer": { + "source": "iana" + }, + "video/quicktime": { + "source": "iana", + "compressible": false, + "extensions": ["qt","mov"] + }, + "video/raptorfec": { + "source": "iana" + }, + "video/raw": { + "source": "iana" + }, + "video/rtp-enc-aescm128": { + "source": "iana" + }, + "video/rtploopback": { + "source": "iana" + }, + "video/rtx": { + "source": "iana" + }, + "video/scip": { + "source": "iana" + }, + "video/smpte291": { + "source": "iana" + }, + "video/smpte292m": { + "source": "iana" + }, + "video/ulpfec": { + "source": "iana" + }, + "video/vc1": { + "source": "iana" + }, + "video/vc2": { + "source": "iana" + }, + "video/vnd.cctv": { + "source": "iana" + }, + "video/vnd.dece.hd": { + "source": "iana", + "extensions": ["uvh","uvvh"] + }, + "video/vnd.dece.mobile": { + "source": "iana", + "extensions": ["uvm","uvvm"] + }, + "video/vnd.dece.mp4": { + "source": "iana" + }, + "video/vnd.dece.pd": { + "source": "iana", + "extensions": ["uvp","uvvp"] + }, + "video/vnd.dece.sd": { + "source": "iana", + "extensions": ["uvs","uvvs"] + }, + "video/vnd.dece.video": { + "source": "iana", + "extensions": ["uvv","uvvv"] + }, + "video/vnd.directv.mpeg": { + "source": "iana" + }, + "video/vnd.directv.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dlna.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dvb.file": { + "source": "iana", + "extensions": ["dvb"] + }, + "video/vnd.fvt": { + "source": "iana", + "extensions": ["fvt"] + }, + "video/vnd.hns.video": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsavc": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + "source": "iana" + }, + "video/vnd.motorola.video": { + "source": "iana" + }, + "video/vnd.motorola.videop": { + "source": "iana" + }, + "video/vnd.mpegurl": { + "source": "iana", + "extensions": ["mxu","m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + "source": "iana", + "extensions": ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + "source": "iana" + }, + "video/vnd.nokia.mp4vr": { + "source": "iana" + }, + "video/vnd.nokia.videovoip": { + "source": "iana" + }, + "video/vnd.objectvideo": { + "source": "iana" + }, + "video/vnd.radgamettools.bink": { + "source": "iana" + }, + "video/vnd.radgamettools.smacker": { + "source": "iana" + }, + "video/vnd.sealed.mpeg1": { + "source": "iana" + }, + "video/vnd.sealed.mpeg4": { + "source": "iana" + }, + "video/vnd.sealed.swf": { + "source": "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + "source": "iana" + }, + "video/vnd.uvvu.mp4": { + "source": "iana", + "extensions": ["uvu","uvvu"] + }, + "video/vnd.vivo": { + "source": "iana", + "extensions": ["viv"] + }, + "video/vnd.youtube.yt": { + "source": "iana" + }, + "video/vp8": { + "source": "iana" + }, + "video/vp9": { + "source": "iana" + }, + "video/webm": { + "source": "apache", + "compressible": false, + "extensions": ["webm"] + }, + "video/x-f4v": { + "source": "apache", + "extensions": ["f4v"] + }, + "video/x-fli": { + "source": "apache", + "extensions": ["fli"] + }, + "video/x-flv": { + "source": "apache", + "compressible": false, + "extensions": ["flv"] + }, + "video/x-m4v": { + "source": "apache", + "extensions": ["m4v"] + }, + "video/x-matroska": { + "source": "apache", + "compressible": false, + "extensions": ["mkv","mk3d","mks"] + }, + "video/x-mng": { + "source": "apache", + "extensions": ["mng"] + }, + "video/x-ms-asf": { + "source": "apache", + "extensions": ["asf","asx"] + }, + "video/x-ms-vob": { + "source": "apache", + "extensions": ["vob"] + }, + "video/x-ms-wm": { + "source": "apache", + "extensions": ["wm"] + }, + "video/x-ms-wmv": { + "source": "apache", + "compressible": false, + "extensions": ["wmv"] + }, + "video/x-ms-wmx": { + "source": "apache", + "extensions": ["wmx"] + }, + "video/x-ms-wvx": { + "source": "apache", + "extensions": ["wvx"] + }, + "video/x-msvideo": { + "source": "apache", + "extensions": ["avi"] + }, + "video/x-sgi-movie": { + "source": "apache", + "extensions": ["movie"] + }, + "video/x-smv": { + "source": "apache", + "extensions": ["smv"] + }, + "x-conference/x-cooltalk": { + "source": "apache", + "extensions": ["ice"] + }, + "x-shader/x-fragment": { + "compressible": true + }, + "x-shader/x-vertex": { + "compressible": true + } +} diff --git a/front/frontend/node_modules/serve-index/node_modules/mime-db/index.js b/front/frontend/node_modules/serve-index/node_modules/mime-db/index.js new file mode 100644 index 0000000..ec2be30 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/mime-db/index.js @@ -0,0 +1,12 @@ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = require('./db.json') diff --git a/front/frontend/node_modules/serve-index/node_modules/mime-db/package.json b/front/frontend/node_modules/serve-index/node_modules/mime-db/package.json new file mode 100644 index 0000000..32c14b8 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/mime-db/package.json @@ -0,0 +1,60 @@ +{ + "name": "mime-db", + "description": "Media Type Database", + "version": "1.52.0", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)", + "Robert Kieffer (http://github.com/broofa)" + ], + "license": "MIT", + "keywords": [ + "mime", + "db", + "type", + "types", + "database", + "charset", + "charsets" + ], + "repository": "jshttp/mime-db", + "devDependencies": { + "bluebird": "3.7.2", + "co": "4.6.0", + "cogent": "1.0.1", + "csv-parse": "4.16.3", + "eslint": "7.32.0", + "eslint-config-standard": "15.0.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.1.1", + "eslint-plugin-standard": "4.1.0", + "gnode": "0.1.2", + "media-typer": "1.1.0", + "mocha": "9.2.1", + "nyc": "15.1.0", + "raw-body": "2.5.0", + "stream-to-array": "2.3.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "db.json", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "build": "node scripts/build", + "fetch": "node scripts/fetch-apache && gnode scripts/fetch-iana && node scripts/fetch-nginx", + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "update": "npm run fetch && npm run build", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/front/frontend/node_modules/serve-index/node_modules/mime-types/HISTORY.md b/front/frontend/node_modules/serve-index/node_modules/mime-types/HISTORY.md new file mode 100644 index 0000000..c5043b7 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/mime-types/HISTORY.md @@ -0,0 +1,397 @@ +2.1.35 / 2022-03-12 +=================== + + * deps: mime-db@1.52.0 + - Add extensions from IANA for more `image/*` types + - Add extension `.asc` to `application/pgp-keys` + - Add extensions to various XML types + - Add new upstream MIME types + +2.1.34 / 2021-11-08 +=================== + + * deps: mime-db@1.51.0 + - Add new upstream MIME types + +2.1.33 / 2021-10-01 +=================== + + * deps: mime-db@1.50.0 + - Add deprecated iWorks mime types and extensions + - Add new upstream MIME types + +2.1.32 / 2021-07-27 +=================== + + * deps: mime-db@1.49.0 + - Add extension `.trig` to `application/trig` + - Add new upstream MIME types + +2.1.31 / 2021-06-01 +=================== + + * deps: mime-db@1.48.0 + - Add extension `.mvt` to `application/vnd.mapbox-vector-tile` + - Add new upstream MIME types + +2.1.30 / 2021-04-02 +=================== + + * deps: mime-db@1.47.0 + - Add extension `.amr` to `audio/amr` + - Remove ambigious extensions from IANA for `application/*+xml` types + - Update primary extension to `.es` for `application/ecmascript` + +2.1.29 / 2021-02-17 +=================== + + * deps: mime-db@1.46.0 + - Add extension `.amr` to `audio/amr` + - Add extension `.m4s` to `video/iso.segment` + - Add extension `.opus` to `audio/ogg` + - Add new upstream MIME types + +2.1.28 / 2021-01-01 +=================== + + * deps: mime-db@1.45.0 + - Add `application/ubjson` with extension `.ubj` + - Add `image/avif` with extension `.avif` + - Add `image/ktx2` with extension `.ktx2` + - Add extension `.dbf` to `application/vnd.dbf` + - Add extension `.rar` to `application/vnd.rar` + - Add extension `.td` to `application/urc-targetdesc+xml` + - Add new upstream MIME types + - Fix extension of `application/vnd.apple.keynote` to be `.key` + +2.1.27 / 2020-04-23 +=================== + + * deps: mime-db@1.44.0 + - Add charsets from IANA + - Add extension `.cjs` to `application/node` + - Add new upstream MIME types + +2.1.26 / 2020-01-05 +=================== + + * deps: mime-db@1.43.0 + - Add `application/x-keepass2` with extension `.kdbx` + - Add extension `.mxmf` to `audio/mobile-xmf` + - Add extensions from IANA for `application/*+xml` types + - Add new upstream MIME types + +2.1.25 / 2019-11-12 +=================== + + * deps: mime-db@1.42.0 + - Add new upstream MIME types + - Add `application/toml` with extension `.toml` + - Add `image/vnd.ms-dds` with extension `.dds` + +2.1.24 / 2019-04-20 +=================== + + * deps: mime-db@1.40.0 + - Add extensions from IANA for `model/*` types + - Add `text/mdx` with extension `.mdx` + +2.1.23 / 2019-04-17 +=================== + + * deps: mime-db@~1.39.0 + - Add extensions `.siv` and `.sieve` to `application/sieve` + - Add new upstream MIME types + +2.1.22 / 2019-02-14 +=================== + + * deps: mime-db@~1.38.0 + - Add extension `.nq` to `application/n-quads` + - Add extension `.nt` to `application/n-triples` + - Add new upstream MIME types + +2.1.21 / 2018-10-19 +=================== + + * deps: mime-db@~1.37.0 + - Add extensions to HEIC image types + - Add new upstream MIME types + +2.1.20 / 2018-08-26 +=================== + + * deps: mime-db@~1.36.0 + - Add Apple file extensions from IANA + - Add extensions from IANA for `image/*` types + - Add new upstream MIME types + +2.1.19 / 2018-07-17 +=================== + + * deps: mime-db@~1.35.0 + - Add extension `.csl` to `application/vnd.citationstyles.style+xml` + - Add extension `.es` to `application/ecmascript` + - Add extension `.owl` to `application/rdf+xml` + - Add new upstream MIME types + - Add UTF-8 as default charset for `text/turtle` + +2.1.18 / 2018-02-16 +=================== + + * deps: mime-db@~1.33.0 + - Add `application/raml+yaml` with extension `.raml` + - Add `application/wasm` with extension `.wasm` + - Add `text/shex` with extension `.shex` + - Add extensions for JPEG-2000 images + - Add extensions from IANA for `message/*` types + - Add new upstream MIME types + - Update font MIME types + - Update `text/hjson` to registered `application/hjson` + +2.1.17 / 2017-09-01 +=================== + + * deps: mime-db@~1.30.0 + - Add `application/vnd.ms-outlook` + - Add `application/x-arj` + - Add extension `.mjs` to `application/javascript` + - Add glTF types and extensions + - Add new upstream MIME types + - Add `text/x-org` + - Add VirtualBox MIME types + - Fix `source` records for `video/*` types that are IANA + - Update `font/opentype` to registered `font/otf` + +2.1.16 / 2017-07-24 +=================== + + * deps: mime-db@~1.29.0 + - Add `application/fido.trusted-apps+json` + - Add extension `.wadl` to `application/vnd.sun.wadl+xml` + - Add extension `.gz` to `application/gzip` + - Add new upstream MIME types + - Update extensions `.md` and `.markdown` to be `text/markdown` + +2.1.15 / 2017-03-23 +=================== + + * deps: mime-db@~1.27.0 + - Add new mime types + - Add `image/apng` + +2.1.14 / 2017-01-14 +=================== + + * deps: mime-db@~1.26.0 + - Add new mime types + +2.1.13 / 2016-11-18 +=================== + + * deps: mime-db@~1.25.0 + - Add new mime types + +2.1.12 / 2016-09-18 +=================== + + * deps: mime-db@~1.24.0 + - Add new mime types + - Add `audio/mp3` + +2.1.11 / 2016-05-01 +=================== + + * deps: mime-db@~1.23.0 + - Add new mime types + +2.1.10 / 2016-02-15 +=================== + + * deps: mime-db@~1.22.0 + - Add new mime types + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + +2.1.9 / 2016-01-06 +================== + + * deps: mime-db@~1.21.0 + - Add new mime types + +2.1.8 / 2015-11-30 +================== + + * deps: mime-db@~1.20.0 + - Add new mime types + +2.1.7 / 2015-09-20 +================== + + * deps: mime-db@~1.19.0 + - Add new mime types + +2.1.6 / 2015-09-03 +================== + + * deps: mime-db@~1.18.0 + - Add new mime types + +2.1.5 / 2015-08-20 +================== + + * deps: mime-db@~1.17.0 + - Add new mime types + +2.1.4 / 2015-07-30 +================== + + * deps: mime-db@~1.16.0 + - Add new mime types + +2.1.3 / 2015-07-13 +================== + + * deps: mime-db@~1.15.0 + - Add new mime types + +2.1.2 / 2015-06-25 +================== + + * deps: mime-db@~1.14.0 + - Add new mime types + +2.1.1 / 2015-06-08 +================== + + * perf: fix deopt during mapping + +2.1.0 / 2015-06-07 +================== + + * Fix incorrectly treating extension-less file name as extension + - i.e. `'path/to/json'` will no longer return `application/json` + * Fix `.charset(type)` to accept parameters + * Fix `.charset(type)` to match case-insensitive + * Improve generation of extension to MIME mapping + * Refactor internals for readability and no argument reassignment + * Prefer `application/*` MIME types from the same source + * Prefer any type over `application/octet-stream` + * deps: mime-db@~1.13.0 + - Add nginx as a source + - Add new mime types + +2.0.14 / 2015-06-06 +=================== + + * deps: mime-db@~1.12.0 + - Add new mime types + +2.0.13 / 2015-05-31 +=================== + + * deps: mime-db@~1.11.0 + - Add new mime types + +2.0.12 / 2015-05-19 +=================== + + * deps: mime-db@~1.10.0 + - Add new mime types + +2.0.11 / 2015-05-05 +=================== + + * deps: mime-db@~1.9.1 + - Add new mime types + +2.0.10 / 2015-03-13 +=================== + + * deps: mime-db@~1.8.0 + - Add new mime types + +2.0.9 / 2015-02-09 +================== + + * deps: mime-db@~1.7.0 + - Add new mime types + - Community extensions ownership transferred from `node-mime` + +2.0.8 / 2015-01-29 +================== + + * deps: mime-db@~1.6.0 + - Add new mime types + +2.0.7 / 2014-12-30 +================== + + * deps: mime-db@~1.5.0 + - Add new mime types + - Fix various invalid MIME type entries + +2.0.6 / 2014-12-30 +================== + + * deps: mime-db@~1.4.0 + - Add new mime types + - Fix various invalid MIME type entries + - Remove example template MIME types + +2.0.5 / 2014-12-29 +================== + + * deps: mime-db@~1.3.1 + - Fix missing extensions + +2.0.4 / 2014-12-10 +================== + + * deps: mime-db@~1.3.0 + - Add new mime types + +2.0.3 / 2014-11-09 +================== + + * deps: mime-db@~1.2.0 + - Add new mime types + +2.0.2 / 2014-09-28 +================== + + * deps: mime-db@~1.1.0 + - Add new mime types + - Update charsets + +2.0.1 / 2014-09-07 +================== + + * Support Node.js 0.6 + +2.0.0 / 2014-09-02 +================== + + * Use `mime-db` + * Remove `.define()` + +1.0.2 / 2014-08-04 +================== + + * Set charset=utf-8 for `text/javascript` + +1.0.1 / 2014-06-24 +================== + + * Add `text/jsx` type + +1.0.0 / 2014-05-12 +================== + + * Return `false` for unknown types + * Set charset=utf-8 for `application/json` + +0.1.0 / 2014-05-02 +================== + + * Initial release diff --git a/front/frontend/node_modules/serve-index/node_modules/mime-types/LICENSE b/front/frontend/node_modules/serve-index/node_modules/mime-types/LICENSE new file mode 100644 index 0000000..0616607 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/mime-types/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/serve-index/node_modules/mime-types/README.md b/front/frontend/node_modules/serve-index/node_modules/mime-types/README.md new file mode 100644 index 0000000..48d2fb4 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/mime-types/README.md @@ -0,0 +1,113 @@ +# mime-types + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][ci-image]][ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +The ultimate javascript content-type utility. + +Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except: + +- __No fallbacks.__ Instead of naively returning the first available type, + `mime-types` simply returns `false`, so do + `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. +- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. +- No `.define()` functionality +- Bug fixes for `.lookup(path)` + +Otherwise, the API is compatible with `mime` 1.x. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install mime-types +``` + +## Adding Types + +All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db), +so open a PR there if you'd like to add mime types. + +## API + +```js +var mime = require('mime-types') +``` + +All functions return `false` if input is invalid or not found. + +### mime.lookup(path) + +Lookup the content-type associated with a file. + +```js +mime.lookup('json') // 'application/json' +mime.lookup('.md') // 'text/markdown' +mime.lookup('file.html') // 'text/html' +mime.lookup('folder/file.js') // 'application/javascript' +mime.lookup('folder/.htaccess') // false + +mime.lookup('cats') // false +``` + +### mime.contentType(type) + +Create a full content-type header given a content-type or extension. +When given an extension, `mime.lookup` is used to get the matching +content-type, otherwise the given content-type is used. Then if the +content-type does not already have a `charset` parameter, `mime.charset` +is used to get the default charset and add to the returned content-type. + +```js +mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' +mime.contentType('file.json') // 'application/json; charset=utf-8' +mime.contentType('text/html') // 'text/html; charset=utf-8' +mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1' + +// from a full path +mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' +``` + +### mime.extension(type) + +Get the default extension for a content-type. + +```js +mime.extension('application/octet-stream') // 'bin' +``` + +### mime.charset(type) + +Lookup the implied default charset of a content-type. + +```js +mime.charset('text/markdown') // 'UTF-8' +``` + +### var type = mime.types[extension] + +A map of content-types by extension. + +### [extensions...] = mime.extensions[type] + +A map of extensions by content-type. + +## License + +[MIT](LICENSE) + +[ci-image]: https://badgen.net/github/checks/jshttp/mime-types/master?label=ci +[ci-url]: https://github.com/jshttp/mime-types/actions/workflows/ci.yml +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master +[node-version-image]: https://badgen.net/npm/node/mime-types +[node-version-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-types +[npm-url]: https://npmjs.org/package/mime-types +[npm-version-image]: https://badgen.net/npm/v/mime-types diff --git a/front/frontend/node_modules/serve-index/node_modules/mime-types/index.js b/front/frontend/node_modules/serve-index/node_modules/mime-types/index.js new file mode 100644 index 0000000..b9f34d5 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/mime-types/index.js @@ -0,0 +1,188 @@ +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var db = require('mime-db') +var extname = require('path').extname + +/** + * Module variables. + * @private + */ + +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps (extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] + + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) + + if (types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { + // skip the remapping + continue + } + } + + // set the extension -> mime + types[extension] = type + } + }) +} diff --git a/front/frontend/node_modules/serve-index/node_modules/mime-types/package.json b/front/frontend/node_modules/serve-index/node_modules/mime-types/package.json new file mode 100644 index 0000000..bbef696 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/mime-types/package.json @@ -0,0 +1,44 @@ +{ + "name": "mime-types", + "description": "The ultimate javascript content-type utility.", + "version": "2.1.35", + "contributors": [ + "Douglas Christopher Wilson ", + "Jeremiah Senkpiel (https://searchbeam.jit.su)", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "keywords": [ + "mime", + "types" + ], + "repository": "jshttp/mime-types", + "dependencies": { + "mime-db": "1.52.0" + }, + "devDependencies": { + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.2.0", + "eslint-plugin-standard": "4.1.0", + "mocha": "9.2.2", + "nyc": "15.1.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec test/test.js", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/front/frontend/node_modules/serve-index/node_modules/setprototypeof/LICENSE b/front/frontend/node_modules/serve-index/node_modules/setprototypeof/LICENSE new file mode 100644 index 0000000..61afa2f --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/setprototypeof/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Wes Todd + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/front/frontend/node_modules/serve-index/node_modules/setprototypeof/README.md b/front/frontend/node_modules/serve-index/node_modules/setprototypeof/README.md new file mode 100644 index 0000000..826bf02 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/setprototypeof/README.md @@ -0,0 +1,26 @@ +# Polyfill for `Object.setPrototypeOf` + +A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8. + +## Usage: + +``` +$ npm install --save setprototypeof +``` + +```javascript +var setPrototypeOf = require('setprototypeof'); + +var obj = {}; +setPrototypeOf(obj, { + foo: function() { + return 'bar'; + } +}); +obj.foo(); // bar +``` + +TypeScript is also supported: +```typescript +import setPrototypeOf = require('setprototypeof'); +``` \ No newline at end of file diff --git a/front/frontend/node_modules/serve-index/node_modules/setprototypeof/index.d.ts b/front/frontend/node_modules/serve-index/node_modules/setprototypeof/index.d.ts new file mode 100644 index 0000000..f108ecd --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/setprototypeof/index.d.ts @@ -0,0 +1,2 @@ +declare function setPrototypeOf(o: any, proto: object | null): any; +export = setPrototypeOf; diff --git a/front/frontend/node_modules/serve-index/node_modules/setprototypeof/index.js b/front/frontend/node_modules/serve-index/node_modules/setprototypeof/index.js new file mode 100644 index 0000000..93ea417 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/setprototypeof/index.js @@ -0,0 +1,15 @@ +module.exports = Object.setPrototypeOf || ({__proto__:[]} instanceof Array ? setProtoOf : mixinProperties); + +function setProtoOf(obj, proto) { + obj.__proto__ = proto; + return obj; +} + +function mixinProperties(obj, proto) { + for (var prop in proto) { + if (!obj.hasOwnProperty(prop)) { + obj[prop] = proto[prop]; + } + } + return obj; +} diff --git a/front/frontend/node_modules/serve-index/node_modules/setprototypeof/package.json b/front/frontend/node_modules/serve-index/node_modules/setprototypeof/package.json new file mode 100644 index 0000000..793c504 --- /dev/null +++ b/front/frontend/node_modules/serve-index/node_modules/setprototypeof/package.json @@ -0,0 +1,25 @@ +{ + "name": "setprototypeof", + "version": "1.1.0", + "description": "A small polyfill for Object.setprototypeof", + "main": "index.js", + "typings": "index.d.ts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/wesleytodd/setprototypeof.git" + }, + "keywords": [ + "polyfill", + "object", + "setprototypeof" + ], + "author": "Wes Todd", + "license": "ISC", + "bugs": { + "url": "https://github.com/wesleytodd/setprototypeof/issues" + }, + "homepage": "https://github.com/wesleytodd/setprototypeof" +} diff --git a/front/frontend/node_modules/serve-index/package.json b/front/frontend/node_modules/serve-index/package.json new file mode 100644 index 0000000..ba69e7c --- /dev/null +++ b/front/frontend/node_modules/serve-index/package.json @@ -0,0 +1,37 @@ +{ + "name": "serve-index", + "description": "Serve directory listings", + "version": "1.9.1", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "repository": "expressjs/serve-index", + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "devDependencies": { + "after": "0.8.2", + "istanbul": "0.4.5", + "mocha": "2.5.3", + "supertest": "1.1.0" + }, + "files": [ + "public/", + "LICENSE", + "HISTORY.md", + "index.js" + ], + "engines": { + "node": ">= 0.8.0" + }, + "scripts": { + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" + } +} diff --git a/front/frontend/node_modules/serve-index/public/directory.html b/front/frontend/node_modules/serve-index/public/directory.html new file mode 100644 index 0000000..6f7e7b6 --- /dev/null +++ b/front/frontend/node_modules/serve-index/public/directory.html @@ -0,0 +1,82 @@ + + + + + + listing directory {directory} + + + + + +
    +

    ~{linked-path}

    + {files} +
    + + \ No newline at end of file diff --git a/front/frontend/node_modules/serve-index/public/icons/application_xp.png b/front/frontend/node_modules/serve-index/public/icons/application_xp.png new file mode 100644 index 0000000..d22860a Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/application_xp.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/application_xp_terminal.png b/front/frontend/node_modules/serve-index/public/icons/application_xp_terminal.png new file mode 100644 index 0000000..c28dd63 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/application_xp_terminal.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/box.png b/front/frontend/node_modules/serve-index/public/icons/box.png new file mode 100644 index 0000000..8443c23 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/box.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/cd.png b/front/frontend/node_modules/serve-index/public/icons/cd.png new file mode 100644 index 0000000..ef43223 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/cd.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/controller.png b/front/frontend/node_modules/serve-index/public/icons/controller.png new file mode 100644 index 0000000..5cf76ed Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/controller.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/drive.png b/front/frontend/node_modules/serve-index/public/icons/drive.png new file mode 100644 index 0000000..37b7c9b Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/drive.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/film.png b/front/frontend/node_modules/serve-index/public/icons/film.png new file mode 100644 index 0000000..b0ce7bb Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/film.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/folder.png b/front/frontend/node_modules/serve-index/public/icons/folder.png new file mode 100644 index 0000000..698f3d3 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/folder.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/font.png b/front/frontend/node_modules/serve-index/public/icons/font.png new file mode 100644 index 0000000..b7960db Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/font.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/image.png b/front/frontend/node_modules/serve-index/public/icons/image.png new file mode 100644 index 0000000..fc3c393 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/image.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/map.png b/front/frontend/node_modules/serve-index/public/icons/map.png new file mode 100644 index 0000000..f90ef25 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/map.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page.png b/front/frontend/node_modules/serve-index/public/icons/page.png new file mode 100644 index 0000000..03ddd79 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_add.png b/front/frontend/node_modules/serve-index/public/icons/page_add.png new file mode 100644 index 0000000..d5bfa07 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_add.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_attach.png b/front/frontend/node_modules/serve-index/public/icons/page_attach.png new file mode 100644 index 0000000..89ee2da Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_attach.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_code.png b/front/frontend/node_modules/serve-index/public/icons/page_code.png new file mode 100644 index 0000000..f7ea904 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_code.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_copy.png b/front/frontend/node_modules/serve-index/public/icons/page_copy.png new file mode 100644 index 0000000..195dc6d Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_copy.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_delete.png b/front/frontend/node_modules/serve-index/public/icons/page_delete.png new file mode 100644 index 0000000..3141467 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_delete.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_edit.png b/front/frontend/node_modules/serve-index/public/icons/page_edit.png new file mode 100644 index 0000000..046811e Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_edit.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_error.png b/front/frontend/node_modules/serve-index/public/icons/page_error.png new file mode 100644 index 0000000..f07f449 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_error.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_excel.png b/front/frontend/node_modules/serve-index/public/icons/page_excel.png new file mode 100644 index 0000000..eb6158e Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_excel.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_find.png b/front/frontend/node_modules/serve-index/public/icons/page_find.png new file mode 100644 index 0000000..2f19388 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_find.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_gear.png b/front/frontend/node_modules/serve-index/public/icons/page_gear.png new file mode 100644 index 0000000..8e83281 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_gear.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_go.png b/front/frontend/node_modules/serve-index/public/icons/page_go.png new file mode 100644 index 0000000..80fe1ed Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_go.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_green.png b/front/frontend/node_modules/serve-index/public/icons/page_green.png new file mode 100644 index 0000000..de8e003 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_green.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_key.png b/front/frontend/node_modules/serve-index/public/icons/page_key.png new file mode 100644 index 0000000..d6626cb Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_key.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_lightning.png b/front/frontend/node_modules/serve-index/public/icons/page_lightning.png new file mode 100644 index 0000000..7e56870 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_lightning.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_link.png b/front/frontend/node_modules/serve-index/public/icons/page_link.png new file mode 100644 index 0000000..312eab0 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_link.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_paintbrush.png b/front/frontend/node_modules/serve-index/public/icons/page_paintbrush.png new file mode 100644 index 0000000..246a2f0 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_paintbrush.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_paste.png b/front/frontend/node_modules/serve-index/public/icons/page_paste.png new file mode 100644 index 0000000..968f073 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_paste.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_red.png b/front/frontend/node_modules/serve-index/public/icons/page_red.png new file mode 100644 index 0000000..0b18247 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_red.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_refresh.png b/front/frontend/node_modules/serve-index/public/icons/page_refresh.png new file mode 100644 index 0000000..cf347c7 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_refresh.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_save.png b/front/frontend/node_modules/serve-index/public/icons/page_save.png new file mode 100644 index 0000000..caea546 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_save.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white.png b/front/frontend/node_modules/serve-index/public/icons/page_white.png new file mode 100644 index 0000000..8b8b1ca Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_acrobat.png b/front/frontend/node_modules/serve-index/public/icons/page_white_acrobat.png new file mode 100644 index 0000000..8f8095e Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_acrobat.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_actionscript.png b/front/frontend/node_modules/serve-index/public/icons/page_white_actionscript.png new file mode 100644 index 0000000..159b240 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_actionscript.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_add.png b/front/frontend/node_modules/serve-index/public/icons/page_white_add.png new file mode 100644 index 0000000..aa23dde Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_add.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_c.png b/front/frontend/node_modules/serve-index/public/icons/page_white_c.png new file mode 100644 index 0000000..34a05cc Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_c.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_camera.png b/front/frontend/node_modules/serve-index/public/icons/page_white_camera.png new file mode 100644 index 0000000..f501a59 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_camera.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_cd.png b/front/frontend/node_modules/serve-index/public/icons/page_white_cd.png new file mode 100644 index 0000000..848bdaf Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_cd.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_code.png b/front/frontend/node_modules/serve-index/public/icons/page_white_code.png new file mode 100644 index 0000000..0c76bd1 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_code.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_code_red.png b/front/frontend/node_modules/serve-index/public/icons/page_white_code_red.png new file mode 100644 index 0000000..87a6914 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_code_red.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_coldfusion.png b/front/frontend/node_modules/serve-index/public/icons/page_white_coldfusion.png new file mode 100644 index 0000000..c66011f Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_coldfusion.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_compressed.png b/front/frontend/node_modules/serve-index/public/icons/page_white_compressed.png new file mode 100644 index 0000000..2b6b100 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_compressed.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_copy.png b/front/frontend/node_modules/serve-index/public/icons/page_white_copy.png new file mode 100644 index 0000000..a9f31a2 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_copy.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_cplusplus.png b/front/frontend/node_modules/serve-index/public/icons/page_white_cplusplus.png new file mode 100644 index 0000000..a87cf84 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_cplusplus.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_csharp.png b/front/frontend/node_modules/serve-index/public/icons/page_white_csharp.png new file mode 100644 index 0000000..ffb8fc9 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_csharp.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_cup.png b/front/frontend/node_modules/serve-index/public/icons/page_white_cup.png new file mode 100644 index 0000000..0a7d6f4 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_cup.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_database.png b/front/frontend/node_modules/serve-index/public/icons/page_white_database.png new file mode 100644 index 0000000..bddba1f Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_database.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_delete.png b/front/frontend/node_modules/serve-index/public/icons/page_white_delete.png new file mode 100644 index 0000000..af1ecaf Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_delete.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_dvd.png b/front/frontend/node_modules/serve-index/public/icons/page_white_dvd.png new file mode 100644 index 0000000..4cc537a Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_dvd.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_edit.png b/front/frontend/node_modules/serve-index/public/icons/page_white_edit.png new file mode 100644 index 0000000..b93e776 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_edit.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_error.png b/front/frontend/node_modules/serve-index/public/icons/page_white_error.png new file mode 100644 index 0000000..9fc5a0a Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_error.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_excel.png b/front/frontend/node_modules/serve-index/public/icons/page_white_excel.png new file mode 100644 index 0000000..b977d7e Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_excel.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_find.png b/front/frontend/node_modules/serve-index/public/icons/page_white_find.png new file mode 100644 index 0000000..5818436 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_find.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_flash.png b/front/frontend/node_modules/serve-index/public/icons/page_white_flash.png new file mode 100644 index 0000000..5769120 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_flash.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_freehand.png b/front/frontend/node_modules/serve-index/public/icons/page_white_freehand.png new file mode 100644 index 0000000..8d719df Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_freehand.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_gear.png b/front/frontend/node_modules/serve-index/public/icons/page_white_gear.png new file mode 100644 index 0000000..106f5aa Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_gear.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_get.png b/front/frontend/node_modules/serve-index/public/icons/page_white_get.png new file mode 100644 index 0000000..e4a1ecb Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_get.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_go.png b/front/frontend/node_modules/serve-index/public/icons/page_white_go.png new file mode 100644 index 0000000..7e62a92 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_go.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_h.png b/front/frontend/node_modules/serve-index/public/icons/page_white_h.png new file mode 100644 index 0000000..e902abb Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_h.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_horizontal.png b/front/frontend/node_modules/serve-index/public/icons/page_white_horizontal.png new file mode 100644 index 0000000..1d2d0a4 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_horizontal.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_key.png b/front/frontend/node_modules/serve-index/public/icons/page_white_key.png new file mode 100644 index 0000000..d616484 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_key.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_lightning.png b/front/frontend/node_modules/serve-index/public/icons/page_white_lightning.png new file mode 100644 index 0000000..7215d1e Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_lightning.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_link.png b/front/frontend/node_modules/serve-index/public/icons/page_white_link.png new file mode 100644 index 0000000..bf7bd1c Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_link.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_magnify.png b/front/frontend/node_modules/serve-index/public/icons/page_white_magnify.png new file mode 100644 index 0000000..f6b74cc Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_magnify.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_medal.png b/front/frontend/node_modules/serve-index/public/icons/page_white_medal.png new file mode 100644 index 0000000..d3fffb6 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_medal.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_office.png b/front/frontend/node_modules/serve-index/public/icons/page_white_office.png new file mode 100644 index 0000000..a65bcb3 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_office.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_paint.png b/front/frontend/node_modules/serve-index/public/icons/page_white_paint.png new file mode 100644 index 0000000..23a37b8 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_paint.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_paintbrush.png b/front/frontend/node_modules/serve-index/public/icons/page_white_paintbrush.png new file mode 100644 index 0000000..f907e44 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_paintbrush.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_paste.png b/front/frontend/node_modules/serve-index/public/icons/page_white_paste.png new file mode 100644 index 0000000..5b2cbb3 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_paste.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_php.png b/front/frontend/node_modules/serve-index/public/icons/page_white_php.png new file mode 100644 index 0000000..7868a25 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_php.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_picture.png b/front/frontend/node_modules/serve-index/public/icons/page_white_picture.png new file mode 100644 index 0000000..134b669 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_picture.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_powerpoint.png b/front/frontend/node_modules/serve-index/public/icons/page_white_powerpoint.png new file mode 100644 index 0000000..c4eff03 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_powerpoint.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_put.png b/front/frontend/node_modules/serve-index/public/icons/page_white_put.png new file mode 100644 index 0000000..884ffd6 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_put.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_ruby.png b/front/frontend/node_modules/serve-index/public/icons/page_white_ruby.png new file mode 100644 index 0000000..f59b7c4 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_ruby.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_stack.png b/front/frontend/node_modules/serve-index/public/icons/page_white_stack.png new file mode 100644 index 0000000..44084ad Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_stack.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_star.png b/front/frontend/node_modules/serve-index/public/icons/page_white_star.png new file mode 100644 index 0000000..3a1441c Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_star.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_swoosh.png b/front/frontend/node_modules/serve-index/public/icons/page_white_swoosh.png new file mode 100644 index 0000000..e770829 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_swoosh.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_text.png b/front/frontend/node_modules/serve-index/public/icons/page_white_text.png new file mode 100644 index 0000000..813f712 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_text.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_text_width.png b/front/frontend/node_modules/serve-index/public/icons/page_white_text_width.png new file mode 100644 index 0000000..d9cf132 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_text_width.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_tux.png b/front/frontend/node_modules/serve-index/public/icons/page_white_tux.png new file mode 100644 index 0000000..52699bf Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_tux.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_vector.png b/front/frontend/node_modules/serve-index/public/icons/page_white_vector.png new file mode 100644 index 0000000..4a05955 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_vector.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_visualstudio.png b/front/frontend/node_modules/serve-index/public/icons/page_white_visualstudio.png new file mode 100644 index 0000000..a0a433d Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_visualstudio.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_width.png b/front/frontend/node_modules/serve-index/public/icons/page_white_width.png new file mode 100644 index 0000000..1eb8809 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_width.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_word.png b/front/frontend/node_modules/serve-index/public/icons/page_white_word.png new file mode 100644 index 0000000..ae8ecbf Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_word.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_world.png b/front/frontend/node_modules/serve-index/public/icons/page_white_world.png new file mode 100644 index 0000000..6ed2490 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_world.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_wrench.png b/front/frontend/node_modules/serve-index/public/icons/page_white_wrench.png new file mode 100644 index 0000000..fecadd0 Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_wrench.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_white_zip.png b/front/frontend/node_modules/serve-index/public/icons/page_white_zip.png new file mode 100644 index 0000000..fd4bbcc Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_white_zip.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_word.png b/front/frontend/node_modules/serve-index/public/icons/page_word.png new file mode 100644 index 0000000..834cdfa Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_word.png differ diff --git a/front/frontend/node_modules/serve-index/public/icons/page_world.png b/front/frontend/node_modules/serve-index/public/icons/page_world.png new file mode 100644 index 0000000..b8895dd Binary files /dev/null and b/front/frontend/node_modules/serve-index/public/icons/page_world.png differ diff --git a/front/frontend/node_modules/serve-index/public/style.css b/front/frontend/node_modules/serve-index/public/style.css new file mode 100644 index 0000000..eb99dc9 --- /dev/null +++ b/front/frontend/node_modules/serve-index/public/style.css @@ -0,0 +1,257 @@ +* { + margin: 0; + padding: 0; + outline: 0; +} + +body { + padding: 80px 100px; + font: 13px "Helvetica Neue", "Lucida Grande", "Arial"; + background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9)); + background: #ECE9E9 -moz-linear-gradient(top, #fff, #ECE9E9); + background-repeat: no-repeat; + color: #555; + -webkit-font-smoothing: antialiased; +} +h1, h2, h3 { + font-size: 22px; + color: #343434; +} +h1 em, h2 em { + padding: 0 5px; + font-weight: normal; +} +h1 { + font-size: 60px; +} +h2 { + margin-top: 10px; +} +h3 { + margin: 5px 0 10px 0; + padding-bottom: 5px; + border-bottom: 1px solid #eee; + font-size: 18px; +} +ul li { + list-style: none; +} +ul li:hover { + cursor: pointer; + color: #2e2e2e; +} +ul li .path { + padding-left: 5px; + font-weight: bold; +} +ul li .line { + padding-right: 5px; + font-style: italic; +} +ul li:first-child .path { + padding-left: 0; +} +p { + line-height: 1.5; +} +a { + color: #555; + text-decoration: none; +} +a:hover { + color: #303030; +} +#stacktrace { + margin-top: 15px; +} +.directory h1 { + margin-bottom: 15px; + font-size: 18px; +} +ul#files { + width: 100%; + height: 100%; + overflow: hidden; +} +ul#files li { + float: left; + width: 30%; + line-height: 25px; + margin: 1px; +} +ul#files li a { + display: block; + height: 25px; + border: 1px solid transparent; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + overflow: hidden; + white-space: nowrap; +} +ul#files li a:focus, +ul#files li a:hover { + background: rgba(255,255,255,0.65); + border: 1px solid #ececec; +} +ul#files li a.highlight { + -webkit-transition: background .4s ease-in-out; + background: #ffff4f; + border-color: #E9DC51; +} +#search { + display: block; + position: fixed; + top: 20px; + right: 20px; + width: 90px; + -webkit-transition: width ease 0.2s, opacity ease 0.4s; + -moz-transition: width ease 0.2s, opacity ease 0.4s; + -webkit-border-radius: 32px; + -moz-border-radius: 32px; + -webkit-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); + -moz-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); + -webkit-font-smoothing: antialiased; + text-align: left; + font: 13px "Helvetica Neue", Arial, sans-serif; + padding: 4px 10px; + border: none; + background: transparent; + margin-bottom: 0; + outline: none; + opacity: 0.7; + color: #888; +} +#search:focus { + width: 120px; + opacity: 1.0; +} + +/*views*/ +#files span { + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + text-indent: 10px; +} +#files .name { + background-repeat: no-repeat; +} +#files .icon .name { + text-indent: 28px; +} + +/*tiles*/ +.view-tiles .name { + width: 100%; + background-position: 8px 5px; +} +.view-tiles .size, +.view-tiles .date { + display: none; +} + +/*details*/ +ul#files.view-details li { + float: none; + display: block; + width: 90%; +} +ul#files.view-details li.header { + height: 25px; + background: #000; + color: #fff; + font-weight: bold; +} +.view-details .header { + border-radius: 5px; +} +.view-details .name { + width: 60%; + background-position: 8px 5px; +} +.view-details .size { + width: 10%; +} +.view-details .date { + width: 30%; +} +.view-details .size, +.view-details .date { + text-align: right; + direction: rtl; +} + +/*mobile*/ +@media (max-width: 768px) { + body { + font-size: 13px; + line-height: 16px; + padding: 0; + } + #search { + position: static; + width: 100%; + font-size: 2em; + line-height: 1.8em; + text-indent: 10px; + border: 0; + border-radius: 0; + padding: 10px 0; + margin: 0; + } + #search:focus { + width: 100%; + border: 0; + opacity: 1; + } + .directory h1 { + font-size: 2em; + line-height: 1.5em; + color: #fff; + background: #000; + padding: 15px 10px; + margin: 0; + } + ul#files { + border-top: 1px solid #cacaca; + } + ul#files li { + float: none; + width: auto !important; + display: block; + border-bottom: 1px solid #cacaca; + font-size: 2em; + line-height: 1.2em; + text-indent: 0; + margin: 0; + } + ul#files li:nth-child(odd) { + background: #e0e0e0; + } + ul#files li a { + height: auto; + border: 0; + border-radius: 0; + padding: 15px 10px; + } + ul#files li a:focus, + ul#files li a:hover { + border: 0; + } + #files .header, + #files .size, + #files .date { + display: none !important; + } + #files .name { + float: none; + display: inline-block; + width: 100%; + text-indent: 0; + background-position: 0 50%; + } + #files .icon .name { + text-indent: 41px; + } +} diff --git a/front/frontend/node_modules/set-value/LICENSE b/front/frontend/node_modules/set-value/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/front/frontend/node_modules/set-value/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/set-value/README.md b/front/frontend/node_modules/set-value/README.md new file mode 100644 index 0000000..e336d74 --- /dev/null +++ b/front/frontend/node_modules/set-value/README.md @@ -0,0 +1,150 @@ +# set-value [![NPM version](https://img.shields.io/npm/v/set-value.svg?style=flat)](https://www.npmjs.com/package/set-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![NPM total downloads](https://img.shields.io/npm/dt/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/set-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/set-value) + +> Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save set-value +``` + +## Usage + +```js +var set = require('set-value'); +set(object, prop, value); +``` + +### Params + +* `object` **{object}**: The object to set `value` on +* `prop` **{string}**: The property to set. Dot-notation may be used. +* `value` **{any}**: The value to set on `object[prop]` + +## Examples + +Updates and returns the given object: + +```js +var obj = {}; +set(obj, 'a.b.c', 'd'); +console.log(obj); +//=> { a: { b: { c: 'd' } } } +``` + +### Escaping + +**Escaping with backslashes** + +Prevent set-value from splitting on a dot by prefixing it with backslashes: + +```js +console.log(set({}, 'a\\.b.c', 'd')); +//=> { 'a.b': { c: 'd' } } + +console.log(set({}, 'a\\.b\\.c', 'd')); +//=> { 'a.b.c': 'd' } +``` + +**Escaping with double-quotes or single-quotes** + +Wrap double or single quotes around the string, or part of the string, that should not be split by set-value: + +```js +console.log(set({}, '"a.b".c', 'd')); +//=> { 'a.b': { c: 'd' } } + +console.log(set({}, "'a.b'.c", "d")); +//=> { 'a.b': { c: 'd' } } + +console.log(set({}, '"this/is/a/.file.path"', 'd')); +//=> { 'this/is/a/file.path': 'd' } +``` + +### Bracket support + +set-value does not split inside brackets or braces: + +```js +console.log(set({}, '[a.b].c', 'd')); +//=> { '[a.b]': { c: 'd' } } + +console.log(set({}, "(a.b).c", "d")); +//=> { '(a.b)': { c: 'd' } } + +console.log(set({}, ".c", "d")); +//=> { '': { c: 'd' } } + +console.log(set({}, "{a..b}.c", "d")); +//=> { '{a..b}': { c: 'd' } } +``` + +## History + +### v2.0.0 + +* Adds support for escaping with double or single quotes. See [escaping](#escaping) for examples. +* Will no longer split inside brackets or braces. See [bracket support](#bracket-support) for examples. + +If there are any regressions please create a [bug report](../../issues/new). Thanks! + +## About + +### Related projects + +* [assign-value](https://www.npmjs.com/package/assign-value): Assign a value or extend a deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/assign-value) | [homepage](https://github.com/jonschlinkert/assign-value "Assign a value or extend a deeply nested property of an object using object path notation.") +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.") +* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://github.com/jonschlinkert/has-value) | [homepage](https://github.com/jonschlinkert/has-value "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.") +* [merge-value](https://www.npmjs.com/package/merge-value): Similar to assign-value but deeply merges object values or nested values using object path/dot notation. | [homepage](https://github.com/jonschlinkert/merge-value "Similar to assign-value but deeply merges object values or nested values using object path/dot notation.") +* [omit-value](https://www.npmjs.com/package/omit-value): Omit properties from an object or deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/omit-value) | [homepage](https://github.com/jonschlinkert/omit-value "Omit properties from an object or deeply nested property of an object using object path notation.") +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.") +* [union-value](https://www.npmjs.com/package/union-value): Set an array of unique values as the property of an object. Supports setting deeply… [more](https://github.com/jonschlinkert/union-value) | [homepage](https://github.com/jonschlinkert/union-value "Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation.") +* [unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value "Delete nested properties from an object using dot notation.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 59 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [vadimdemedes](https://github.com/vadimdemedes) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 21, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/set-value/index.js b/front/frontend/node_modules/set-value/index.js new file mode 100644 index 0000000..0b32e8f --- /dev/null +++ b/front/frontend/node_modules/set-value/index.js @@ -0,0 +1,55 @@ +/*! + * set-value + * + * Copyright (c) 2014-2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var split = require('split-string'); +var extend = require('extend-shallow'); +var isPlainObject = require('is-plain-object'); +var isObject = require('is-extendable'); + +module.exports = function(obj, prop, val) { + if (!isObject(obj)) { + return obj; + } + + if (Array.isArray(prop)) { + prop = [].concat.apply([], prop).join('.'); + } + + if (typeof prop !== 'string') { + return obj; + } + + var keys = split(prop, {sep: '.', brackets: true}).filter(isValidKey); + var len = keys.length; + var idx = -1; + var current = obj; + + while (++idx < len) { + var key = keys[idx]; + if (idx !== len - 1) { + if (!isObject(current[key])) { + current[key] = {}; + } + current = current[key]; + continue; + } + + if (isPlainObject(current[key]) && isPlainObject(val)) { + current[key] = extend({}, current[key], val); + } else { + current[key] = val; + } + } + + return obj; +}; + +function isValidKey(key) { + return key !== '__proto__' && key !== 'constructor' && key !== 'prototype'; +} diff --git a/front/frontend/node_modules/set-value/package.json b/front/frontend/node_modules/set-value/package.json new file mode 100644 index 0000000..736db34 --- /dev/null +++ b/front/frontend/node_modules/set-value/package.json @@ -0,0 +1,79 @@ +{ + "name": "set-value", + "description": "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.", + "version": "2.0.1", + "homepage": "https://github.com/jonschlinkert/set-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)", + "Vadim Demedes (https://vadimdemedes.com)" + ], + "repository": "jonschlinkert/set-value", + "bugs": { + "url": "https://github.com/jonschlinkert/set-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.2" + }, + "keywords": [ + "get", + "has", + "hasown", + "key", + "keys", + "nested", + "notation", + "object", + "prop", + "properties", + "property", + "props", + "set", + "value", + "values" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assign-value", + "get-value", + "has-value", + "merge-value", + "omit-value", + "set-value", + "union-value", + "unset-value" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/setprototypeof/LICENSE b/front/frontend/node_modules/setprototypeof/LICENSE new file mode 100644 index 0000000..61afa2f --- /dev/null +++ b/front/frontend/node_modules/setprototypeof/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Wes Todd + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/front/frontend/node_modules/setprototypeof/README.md b/front/frontend/node_modules/setprototypeof/README.md new file mode 100644 index 0000000..791eeff --- /dev/null +++ b/front/frontend/node_modules/setprototypeof/README.md @@ -0,0 +1,31 @@ +# Polyfill for `Object.setPrototypeOf` + +[![NPM Version](https://img.shields.io/npm/v/setprototypeof.svg)](https://npmjs.org/package/setprototypeof) +[![NPM Downloads](https://img.shields.io/npm/dm/setprototypeof.svg)](https://npmjs.org/package/setprototypeof) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/standard/standard) + +A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8. + +## Usage: + +``` +$ npm install --save setprototypeof +``` + +```javascript +var setPrototypeOf = require('setprototypeof') + +var obj = {} +setPrototypeOf(obj, { + foo: function () { + return 'bar' + } +}) +obj.foo() // bar +``` + +TypeScript is also supported: + +```typescript +import setPrototypeOf from 'setprototypeof' +``` diff --git a/front/frontend/node_modules/setprototypeof/index.d.ts b/front/frontend/node_modules/setprototypeof/index.d.ts new file mode 100644 index 0000000..f108ecd --- /dev/null +++ b/front/frontend/node_modules/setprototypeof/index.d.ts @@ -0,0 +1,2 @@ +declare function setPrototypeOf(o: any, proto: object | null): any; +export = setPrototypeOf; diff --git a/front/frontend/node_modules/setprototypeof/index.js b/front/frontend/node_modules/setprototypeof/index.js new file mode 100644 index 0000000..c527055 --- /dev/null +++ b/front/frontend/node_modules/setprototypeof/index.js @@ -0,0 +1,17 @@ +'use strict' +/* eslint no-proto: 0 */ +module.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties) + +function setProtoOf (obj, proto) { + obj.__proto__ = proto + return obj +} + +function mixinProperties (obj, proto) { + for (var prop in proto) { + if (!Object.prototype.hasOwnProperty.call(obj, prop)) { + obj[prop] = proto[prop] + } + } + return obj +} diff --git a/front/frontend/node_modules/setprototypeof/package.json b/front/frontend/node_modules/setprototypeof/package.json new file mode 100644 index 0000000..f20915b --- /dev/null +++ b/front/frontend/node_modules/setprototypeof/package.json @@ -0,0 +1,38 @@ +{ + "name": "setprototypeof", + "version": "1.2.0", + "description": "A small polyfill for Object.setprototypeof", + "main": "index.js", + "typings": "index.d.ts", + "scripts": { + "test": "standard && mocha", + "testallversions": "npm run node010 && npm run node4 && npm run node6 && npm run node9 && npm run node11", + "testversion": "docker run -it --rm -v $(PWD):/usr/src/app -w /usr/src/app node:${NODE_VER} npm install mocha@${MOCHA_VER:-latest} && npm t", + "node010": "NODE_VER=0.10 MOCHA_VER=3 npm run testversion", + "node4": "NODE_VER=4 npm run testversion", + "node6": "NODE_VER=6 npm run testversion", + "node9": "NODE_VER=9 npm run testversion", + "node11": "NODE_VER=11 npm run testversion", + "prepublishOnly": "npm t", + "postpublish": "git push origin && git push origin --tags" + }, + "repository": { + "type": "git", + "url": "https://github.com/wesleytodd/setprototypeof.git" + }, + "keywords": [ + "polyfill", + "object", + "setprototypeof" + ], + "author": "Wes Todd", + "license": "ISC", + "bugs": { + "url": "https://github.com/wesleytodd/setprototypeof/issues" + }, + "homepage": "https://github.com/wesleytodd/setprototypeof", + "devDependencies": { + "mocha": "^6.1.4", + "standard": "^13.0.2" + } +} diff --git a/front/frontend/node_modules/setprototypeof/test/index.js b/front/frontend/node_modules/setprototypeof/test/index.js new file mode 100644 index 0000000..afeb4dd --- /dev/null +++ b/front/frontend/node_modules/setprototypeof/test/index.js @@ -0,0 +1,24 @@ +'use strict' +/* eslint-env mocha */ +/* eslint no-proto: 0 */ +var assert = require('assert') +var setPrototypeOf = require('..') + +describe('setProtoOf(obj, proto)', function () { + it('should merge objects', function () { + var obj = { a: 1, b: 2 } + var proto = { b: 3, c: 4 } + var mergeObj = setPrototypeOf(obj, proto) + + if (Object.getPrototypeOf) { + assert.strictEqual(Object.getPrototypeOf(obj), proto) + } else if ({ __proto__: [] } instanceof Array) { + assert.strictEqual(obj.__proto__, proto) + } else { + assert.strictEqual(obj.a, 1) + assert.strictEqual(obj.b, 2) + assert.strictEqual(obj.c, 4) + } + assert.strictEqual(mergeObj, obj) + }) +}) diff --git a/front/frontend/node_modules/snapdragon-node/LICENSE b/front/frontend/node_modules/snapdragon-node/LICENSE new file mode 100644 index 0000000..9a1c856 --- /dev/null +++ b/front/frontend/node_modules/snapdragon-node/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/snapdragon-node/README.md b/front/frontend/node_modules/snapdragon-node/README.md new file mode 100644 index 0000000..2300a3c --- /dev/null +++ b/front/frontend/node_modules/snapdragon-node/README.md @@ -0,0 +1,453 @@ +# snapdragon-node [![NPM version](https://img.shields.io/npm/v/snapdragon-node.svg?style=flat)](https://www.npmjs.com/package/snapdragon-node) [![NPM monthly downloads](https://img.shields.io/npm/dm/snapdragon-node.svg?style=flat)](https://npmjs.org/package/snapdragon-node) [![NPM total downloads](https://img.shields.io/npm/dt/snapdragon-node.svg?style=flat)](https://npmjs.org/package/snapdragon-node) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/snapdragon-node.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/snapdragon-node) + +> Snapdragon utility for creating a new AST node in custom code, such as plugins. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save snapdragon-node +``` + +## Usage + +With [snapdragon](https://github.com/jonschlinkert/snapdragon) v0.9.0 and higher you can use `this.node()` to create a new `Node`, whenever it makes sense. + +```js +var Node = require('snapdragon-node'); +var Snapdragon = require('snapdragon'); +var snapdragon = new Snapdragon(); + +// example usage inside a parser visitor function +snapdragon.parser.set('foo', function() { + // get the current "start" position + var pos = this.position(); + + // returns the match if regex matches the substring + // at the current position on `parser.input` + var match = this.match(/foo/); + if (match) { + // call "pos" on the node, to set the start and end + // positions, and return the node to push it onto the AST + // (snapdragon will push the node onto the correct + // nodes array, based on the stack) + return pos(new Node({type: 'bar', val: match[0]})); + } +}); +``` + +## API + +### [Node](index.js#L22) + +Create a new AST `Node` with the given `val` and `type`. + +**Params** + +* `val` **{String|Object}**: Pass a matched substring, or an object to merge onto the node. +* `type` **{String}**: The node type to use when `val` is a string. +* `returns` **{Object}**: node instance + +**Example** + +```js +var node = new Node('*', 'Star'); +var node = new Node({type: 'star', val: '*'}); +``` + +### [.isNode](index.js#L61) + +Returns true if the given value is a node. + +**Params** + +* `node` **{Object}** +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var node = new Node({type: 'foo'}); +console.log(Node.isNode(node)); //=> true +console.log(Node.isNode({})); //=> false +``` + +### [.define](index.js#L80) + +Define a non-enumberable property on the node instance. Useful for adding properties that shouldn't be extended or visible during debugging. + +**Params** + +* `name` **{String}** +* `val` **{any}** +* `returns` **{Object}**: returns the node instance + +**Example** + +```js +var node = new Node(); +node.define('foo', 'something non-enumerable'); +``` + +### [.isEmpty](index.js#L100) + +Returns true if `node.val` is an empty string, or `node.nodes` does not contain any non-empty text nodes. + +**Params** + +* `fn` **{Function}**: (optional) Filter function that is called on `node` and/or child nodes. `isEmpty` will return false immediately when the filter function returns false on any nodes. +* `returns` **{Boolean}** + +**Example** + +```js +var node = new Node({type: 'text'}); +node.isEmpty(); //=> true +node.val = 'foo'; +node.isEmpty(); //=> false +``` + +### [.push](index.js#L118) + +Given node `foo` and node `bar`, push node `bar` onto `foo.nodes`, and set `foo` as `bar.parent`. + +**Params** + +* `node` **{Object}** +* `returns` **{Number}**: Returns the length of `node.nodes` + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +foo.push(bar); +``` + +### [.unshift](index.js#L140) + +Given node `foo` and node `bar`, unshift node `bar` onto `foo.nodes`, and set `foo` as `bar.parent`. + +**Params** + +* `node` **{Object}** +* `returns` **{Number}**: Returns the length of `node.nodes` + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +foo.unshift(bar); +``` + +### [.pop](index.js#L167) + +Pop a node from `node.nodes`. + +* `returns` **{Number}**: Returns the popped `node` + +**Example** + +```js +var node = new Node({type: 'foo'}); +node.push(new Node({type: 'a'})); +node.push(new Node({type: 'b'})); +node.push(new Node({type: 'c'})); +node.push(new Node({type: 'd'})); +console.log(node.nodes.length); +//=> 4 +node.pop(); +console.log(node.nodes.length); +//=> 3 +``` + +### [.shift](index.js#L190) + +Shift a node from `node.nodes`. + +* `returns` **{Object}**: Returns the shifted `node` + +**Example** + +```js +var node = new Node({type: 'foo'}); +node.push(new Node({type: 'a'})); +node.push(new Node({type: 'b'})); +node.push(new Node({type: 'c'})); +node.push(new Node({type: 'd'})); +console.log(node.nodes.length); +//=> 4 +node.shift(); +console.log(node.nodes.length); +//=> 3 +``` + +### [.remove](index.js#L205) + +Remove `node` from `node.nodes`. + +**Params** + +* `node` **{Object}** +* `returns` **{Object}**: Returns the removed node. + +**Example** + +```js +node.remove(childNode); +``` + +### [.find](index.js#L231) + +Get the first child node from `node.nodes` that matches the given `type`. If `type` is a number, the child node at that index is returned. + +**Params** + +* `type` **{String}** +* `returns` **{Object}**: Returns a child node or undefined. + +**Example** + +```js +var child = node.find(1); //<= index of the node to get +var child = node.find('foo'); //<= node.type of a child node +var child = node.find(/^(foo|bar)$/); //<= regex to match node.type +var child = node.find(['foo', 'bar']); //<= array of node.type(s) +``` + +### [.isType](index.js#L249) + +Return true if the node is the given `type`. + +**Params** + +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var node = new Node({type: 'bar'}); +cosole.log(node.isType('foo')); // false +cosole.log(node.isType(/^(foo|bar)$/)); // true +cosole.log(node.isType(['foo', 'bar'])); // true +``` + +### [.hasType](index.js#L270) + +Return true if the `node.nodes` has the given `type`. + +**Params** + +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +foo.push(bar); + +cosole.log(foo.hasType('qux')); // false +cosole.log(foo.hasType(/^(qux|bar)$/)); // true +cosole.log(foo.hasType(['qux', 'bar'])); // true +``` + +* `returns` **{Array}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +foo.push(bar); +foo.push(baz); + +console.log(bar.siblings.length) // 2 +console.log(baz.siblings.length) // 2 +``` + +* `returns` **{Number}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +var qux = new Node({type: 'qux'}); +foo.push(bar); +foo.push(baz); +foo.unshift(qux); + +console.log(bar.index) // 1 +console.log(baz.index) // 2 +console.log(qux.index) // 0 +``` + +* `returns` **{Object}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +foo.push(bar); +foo.push(baz); + +console.log(baz.prev.type) // 'bar' +``` + +* `returns` **{Object}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +foo.push(bar); +foo.push(baz); + +console.log(bar.siblings.length) // 2 +console.log(baz.siblings.length) // 2 +``` + +* `returns` **{Object}**: The first node, or undefiend + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +var qux = new Node({type: 'qux'}); +foo.push(bar); +foo.push(baz); +foo.push(qux); + +console.log(foo.first.type) // 'bar' +``` + +* `returns` **{Object}**: The last node, or undefiend + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +var qux = new Node({type: 'qux'}); +foo.push(bar); +foo.push(baz); +foo.push(qux); + +console.log(foo.last.type) // 'qux' +``` + +* `returns` **{Object}**: The last node, or undefiend + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +var qux = new Node({type: 'qux'}); +foo.push(bar); +foo.push(baz); +foo.push(qux); + +console.log(foo.last.type) // 'qux' +``` + +## Release history + +Changelog entries are classified using the following labels from [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog): + +* `added`: for new features +* `changed`: for changes in existing functionality +* `deprecated`: for once-stable features removed in upcoming releases +* `removed`: for deprecated features removed in this release +* `fixed`: for any bug fixes + +Custom labels used in this changelog: + +* `dependencies`: bumps dependencies +* `housekeeping`: code re-organization, minor edits, or other changes that don't fit in one of the other categories. + +### [2.0.0] - 2017-05-01 + +**Changed** + +* `.unshiftNode` was renamed to [.unshift](#unshift) +* `.pushNode` was renamed to [.push](#push) +* `.getNode` was renamed to [.find](#find) + +**Added** + +* [.isNode](#isNode) +* [.isEmpty](#isEmpty) +* [.pop](#pop) +* [.shift](#shift) +* [.remove](#remove) + +### [0.1.0] + +First release. + +## About + +### Related projects + +* [breakdance](https://www.npmjs.com/package/breakdance): Breakdance is a node.js library for converting HTML to markdown. Highly pluggable, flexible and easy… [more](http://breakdance.io) | [homepage](http://breakdance.io "Breakdance is a node.js library for converting HTML to markdown. Highly pluggable, flexible and easy to use. It's time for your markup to get down.") +* [snapdragon-capture](https://www.npmjs.com/package/snapdragon-capture): Snapdragon plugin that adds a capture method to the parser instance. | [homepage](https://github.com/jonschlinkert/snapdragon-capture "Snapdragon plugin that adds a capture method to the parser instance.") +* [snapdragon-cheerio](https://www.npmjs.com/package/snapdragon-cheerio): Snapdragon plugin for converting a cheerio AST to a snapdragon AST. | [homepage](https://github.com/jonschlinkert/snapdragon-cheerio "Snapdragon plugin for converting a cheerio AST to a snapdragon AST.") +* [snapdragon-util](https://www.npmjs.com/package/snapdragon-util): Utilities for the snapdragon parser/compiler. | [homepage](https://github.com/jonschlinkert/snapdragon-util "Utilities for the snapdragon parser/compiler.") +* [snapdragon](https://www.npmjs.com/package/snapdragon): Easy-to-use plugin system for creating powerful, fast and versatile parsers and compilers, with built-in source-map… [more](https://github.com/jonschlinkert/snapdragon) | [homepage](https://github.com/jonschlinkert/snapdragon "Easy-to-use plugin system for creating powerful, fast and versatile parsers and compilers, with built-in source-map support.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 25, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/snapdragon-node/index.js b/front/frontend/node_modules/snapdragon-node/index.js new file mode 100644 index 0000000..0f66ff5 --- /dev/null +++ b/front/frontend/node_modules/snapdragon-node/index.js @@ -0,0 +1,492 @@ +'use strict'; + +var isObject = require('isobject'); +var define = require('define-property'); +var utils = require('snapdragon-util'); +var ownNames; + +/** + * Create a new AST `Node` with the given `val` and `type`. + * + * ```js + * var node = new Node('*', 'Star'); + * var node = new Node({type: 'star', val: '*'}); + * ``` + * @name Node + * @param {String|Object} `val` Pass a matched substring, or an object to merge onto the node. + * @param {String} `type` The node type to use when `val` is a string. + * @return {Object} node instance + * @api public + */ + +function Node(val, type, parent) { + if (typeof type !== 'string') { + parent = type; + type = null; + } + + define(this, 'parent', parent); + define(this, 'isNode', true); + define(this, 'expect', null); + + if (typeof type !== 'string' && isObject(val)) { + lazyKeys(); + var keys = Object.keys(val); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (ownNames.indexOf(key) === -1) { + this[key] = val[key]; + } + } + } else { + this.type = type; + this.val = val; + } +} + +/** + * Returns true if the given value is a node. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({type: 'foo'}); + * console.log(Node.isNode(node)); //=> true + * console.log(Node.isNode({})); //=> false + * ``` + * @param {Object} `node` + * @returns {Boolean} + * @api public + */ + +Node.isNode = function(node) { + return utils.isNode(node); +}; + +/** + * Define a non-enumberable property on the node instance. + * Useful for adding properties that shouldn't be extended + * or visible during debugging. + * + * ```js + * var node = new Node(); + * node.define('foo', 'something non-enumerable'); + * ``` + * @param {String} `name` + * @param {any} `val` + * @return {Object} returns the node instance + * @api public + */ + +Node.prototype.define = function(name, val) { + define(this, name, val); + return this; +}; + +/** + * Returns true if `node.val` is an empty string, or `node.nodes` does + * not contain any non-empty text nodes. + * + * ```js + * var node = new Node({type: 'text'}); + * node.isEmpty(); //=> true + * node.val = 'foo'; + * node.isEmpty(); //=> false + * ``` + * @param {Function} `fn` (optional) Filter function that is called on `node` and/or child nodes. `isEmpty` will return false immediately when the filter function returns false on any nodes. + * @return {Boolean} + * @api public + */ + +Node.prototype.isEmpty = function(fn) { + return utils.isEmpty(this, fn); +}; + +/** + * Given node `foo` and node `bar`, push node `bar` onto `foo.nodes`, and + * set `foo` as `bar.parent`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * foo.push(bar); + * ``` + * @param {Object} `node` + * @return {Number} Returns the length of `node.nodes` + * @api public + */ + +Node.prototype.push = function(node) { + assert(Node.isNode(node), 'expected node to be an instance of Node'); + define(node, 'parent', this); + + this.nodes = this.nodes || []; + return this.nodes.push(node); +}; + +/** + * Given node `foo` and node `bar`, unshift node `bar` onto `foo.nodes`, and + * set `foo` as `bar.parent`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * foo.unshift(bar); + * ``` + * @param {Object} `node` + * @return {Number} Returns the length of `node.nodes` + * @api public + */ + +Node.prototype.unshift = function(node) { + assert(Node.isNode(node), 'expected node to be an instance of Node'); + define(node, 'parent', this); + + this.nodes = this.nodes || []; + return this.nodes.unshift(node); +}; + +/** + * Pop a node from `node.nodes`. + * + * ```js + * var node = new Node({type: 'foo'}); + * node.push(new Node({type: 'a'})); + * node.push(new Node({type: 'b'})); + * node.push(new Node({type: 'c'})); + * node.push(new Node({type: 'd'})); + * console.log(node.nodes.length); + * //=> 4 + * node.pop(); + * console.log(node.nodes.length); + * //=> 3 + * ``` + * @return {Number} Returns the popped `node` + * @api public + */ + +Node.prototype.pop = function() { + return this.nodes && this.nodes.pop(); +}; + +/** + * Shift a node from `node.nodes`. + * + * ```js + * var node = new Node({type: 'foo'}); + * node.push(new Node({type: 'a'})); + * node.push(new Node({type: 'b'})); + * node.push(new Node({type: 'c'})); + * node.push(new Node({type: 'd'})); + * console.log(node.nodes.length); + * //=> 4 + * node.shift(); + * console.log(node.nodes.length); + * //=> 3 + * ``` + * @return {Object} Returns the shifted `node` + * @api public + */ + +Node.prototype.shift = function() { + return this.nodes && this.nodes.shift(); +}; + +/** + * Remove `node` from `node.nodes`. + * + * ```js + * node.remove(childNode); + * ``` + * @param {Object} `node` + * @return {Object} Returns the removed node. + * @api public + */ + +Node.prototype.remove = function(node) { + assert(Node.isNode(node), 'expected node to be an instance of Node'); + this.nodes = this.nodes || []; + var idx = node.index; + if (idx !== -1) { + node.index = -1; + return this.nodes.splice(idx, 1); + } + return null; +}; + +/** + * Get the first child node from `node.nodes` that matches the given `type`. + * If `type` is a number, the child node at that index is returned. + * + * ```js + * var child = node.find(1); //<= index of the node to get + * var child = node.find('foo'); //<= node.type of a child node + * var child = node.find(/^(foo|bar)$/); //<= regex to match node.type + * var child = node.find(['foo', 'bar']); //<= array of node.type(s) + * ``` + * @param {String} `type` + * @return {Object} Returns a child node or undefined. + * @api public + */ + +Node.prototype.find = function(type) { + return utils.findNode(this.nodes, type); +}; + +/** + * Return true if the node is the given `type`. + * + * ```js + * var node = new Node({type: 'bar'}); + * cosole.log(node.isType('foo')); // false + * cosole.log(node.isType(/^(foo|bar)$/)); // true + * cosole.log(node.isType(['foo', 'bar'])); // true + * ``` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +Node.prototype.isType = function(type) { + return utils.isType(this, type); +}; + +/** + * Return true if the `node.nodes` has the given `type`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * foo.push(bar); + * + * cosole.log(foo.hasType('qux')); // false + * cosole.log(foo.hasType(/^(qux|bar)$/)); // true + * cosole.log(foo.hasType(['qux', 'bar'])); // true + * ``` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +Node.prototype.hasType = function(type) { + return utils.hasType(this, type); +}; + +/** + * Get the siblings array, or `null` if it doesn't exist. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * foo.push(bar); + * foo.push(baz); + * + * console.log(bar.siblings.length) // 2 + * console.log(baz.siblings.length) // 2 + * ``` + * @return {Array} + * @api public + */ + +Object.defineProperty(Node.prototype, 'siblings', { + set: function() { + throw new Error('node.siblings is a getter and cannot be defined'); + }, + get: function() { + return this.parent ? this.parent.nodes : null; + } +}); + +/** + * Get the node's current index from `node.parent.nodes`. + * This should always be correct, even when the parent adds nodes. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.unshift(qux); + * + * console.log(bar.index) // 1 + * console.log(baz.index) // 2 + * console.log(qux.index) // 0 + * ``` + * @return {Number} + * @api public + */ + +Object.defineProperty(Node.prototype, 'index', { + set: function(index) { + define(this, 'idx', index); + }, + get: function() { + if (!Array.isArray(this.siblings)) { + return -1; + } + var tok = this.idx !== -1 ? this.siblings[this.idx] : null; + if (tok !== this) { + this.idx = this.siblings.indexOf(this); + } + return this.idx; + } +}); + +/** + * Get the previous node from the siblings array or `null`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * foo.push(bar); + * foo.push(baz); + * + * console.log(baz.prev.type) // 'bar' + * ``` + * @return {Object} + * @api public + */ + +Object.defineProperty(Node.prototype, 'prev', { + set: function() { + throw new Error('node.prev is a getter and cannot be defined'); + }, + get: function() { + if (Array.isArray(this.siblings)) { + return this.siblings[this.index - 1] || this.parent.prev; + } + return null; + } +}); + +/** + * Get the siblings array, or `null` if it doesn't exist. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * foo.push(bar); + * foo.push(baz); + * + * console.log(bar.siblings.length) // 2 + * console.log(baz.siblings.length) // 2 + * ``` + * @return {Object} + * @api public + */ + +Object.defineProperty(Node.prototype, 'next', { + set: function() { + throw new Error('node.next is a getter and cannot be defined'); + }, + get: function() { + if (Array.isArray(this.siblings)) { + return this.siblings[this.index + 1] || this.parent.next; + } + return null; + } +}); + +/** + * Get the first node from `node.nodes`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.push(qux); + * + * console.log(foo.first.type) // 'bar' + * ``` + * @return {Object} The first node, or undefiend + * @api public + */ + +Object.defineProperty(Node.prototype, 'first', { + get: function() { + return this.nodes ? this.nodes[0] : null; + } +}); + +/** + * Get the last node from `node.nodes`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.push(qux); + * + * console.log(foo.last.type) // 'qux' + * ``` + * @return {Object} The last node, or undefiend + * @api public + */ + +Object.defineProperty(Node.prototype, 'last', { + get: function() { + return this.nodes ? utils.last(this.nodes) : null; + } +}); + +/** + * Get the last node from `node.nodes`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.push(qux); + * + * console.log(foo.last.type) // 'qux' + * ``` + * @return {Object} The last node, or undefiend + * @api public + */ + +Object.defineProperty(Node.prototype, 'scope', { + get: function() { + if (this.isScope !== true) { + return this.parent ? this.parent.scope : this; + } + return this; + } +}); + +/** + * Get own property names from Node prototype, but only the + * first time `Node` is instantiated + */ + +function lazyKeys() { + if (!ownNames) { + ownNames = Object.getOwnPropertyNames(Node.prototype); + } +} + +/** + * Simplified assertion. Throws an error is `val` is falsey. + */ + +function assert(val, message) { + if (!val) throw new Error(message); +} + +/** + * Expose `Node` + */ + +exports = module.exports = Node; diff --git a/front/frontend/node_modules/snapdragon-node/node_modules/define-property/LICENSE b/front/frontend/node_modules/snapdragon-node/node_modules/define-property/LICENSE new file mode 100644 index 0000000..ec85897 --- /dev/null +++ b/front/frontend/node_modules/snapdragon-node/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/snapdragon-node/node_modules/define-property/README.md b/front/frontend/node_modules/snapdragon-node/node_modules/define-property/README.md new file mode 100644 index 0000000..2f1af05 --- /dev/null +++ b/front/frontend/node_modules/snapdragon-node/node_modules/define-property/README.md @@ -0,0 +1,95 @@ +# define-property [![NPM version](https://img.shields.io/npm/v/define-property.svg?style=flat)](https://www.npmjs.com/package/define-property) [![NPM monthly downloads](https://img.shields.io/npm/dm/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![NPM total downloads](https://img.shields.io/npm/dt/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/define-property.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/define-property) + +> Define a non-enumerable property on an object. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save define-property +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add define-property +``` + +## Usage + +**Params** + +* `obj`: The object on which to define the property. +* `prop`: The name of the property to be defined or modified. +* `descriptor`: The descriptor for the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**get/set** + +```js +define(obj, 'foo', { + get: function() {}, + set: function() {} +}); +``` + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 20, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/snapdragon-node/node_modules/define-property/index.js b/front/frontend/node_modules/snapdragon-node/node_modules/define-property/index.js new file mode 100644 index 0000000..27c19eb --- /dev/null +++ b/front/frontend/node_modules/snapdragon-node/node_modules/define-property/index.js @@ -0,0 +1,31 @@ +/*! + * define-property + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isDescriptor = require('is-descriptor'); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; diff --git a/front/frontend/node_modules/snapdragon-node/node_modules/define-property/package.json b/front/frontend/node_modules/snapdragon-node/node_modules/define-property/package.json new file mode 100644 index 0000000..e0ab1ca --- /dev/null +++ b/front/frontend/node_modules/snapdragon-node/node_modules/define-property/package.json @@ -0,0 +1,62 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.2.0" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "extend-shallow", + "merge-deep", + "assign-deep", + "mixin-deep" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/snapdragon-node/package.json b/front/frontend/node_modules/snapdragon-node/package.json new file mode 100644 index 0000000..2ca8023 --- /dev/null +++ b/front/frontend/node_modules/snapdragon-node/package.json @@ -0,0 +1,76 @@ +{ + "name": "snapdragon-node", + "description": "Snapdragon utility for creating a new AST node in custom code, such as plugins.", + "version": "2.1.1", + "homepage": "https://github.com/jonschlinkert/snapdragon-node", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/snapdragon-node", + "bugs": { + "url": "https://github.com/jonschlinkert/snapdragon-node/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "devDependencies": { + "gulp": "^3.9.1", + "gulp-eslint": "^4.0.0", + "gulp-format-md": "^0.1.12", + "gulp-istanbul": "^1.1.2", + "gulp-mocha": "^3.0.1", + "mocha": "^3.4.2", + "snapdragon": "^0.11.0" + }, + "keywords": [ + "ast", + "compile", + "compiler", + "convert", + "node", + "parse", + "parser", + "plugin", + "render", + "snapdragon", + "snapdragonplugin", + "token", + "transform" + ], + "verb": { + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "breakdance", + "snapdragon", + "snapdragon-capture", + "snapdragon-cheerio", + "snapdragon-util" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/snapdragon-util/LICENSE b/front/frontend/node_modules/snapdragon-util/LICENSE new file mode 100644 index 0000000..9a1c856 --- /dev/null +++ b/front/frontend/node_modules/snapdragon-util/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/snapdragon-util/README.md b/front/frontend/node_modules/snapdragon-util/README.md new file mode 100644 index 0000000..b654e02 --- /dev/null +++ b/front/frontend/node_modules/snapdragon-util/README.md @@ -0,0 +1,807 @@ +# snapdragon-util [![NPM version](https://img.shields.io/npm/v/snapdragon-util.svg?style=flat)](https://www.npmjs.com/package/snapdragon-util) [![NPM monthly downloads](https://img.shields.io/npm/dm/snapdragon-util.svg?style=flat)](https://npmjs.org/package/snapdragon-util) [![NPM total downloads](https://img.shields.io/npm/dt/snapdragon-util.svg?style=flat)](https://npmjs.org/package/snapdragon-util) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/snapdragon-util.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/snapdragon-util) + +> Utilities for the snapdragon parser/compiler. + +
    +Table of Contents + +- [Install](#install) +- [Usage](#usage) +- [API](#api) +- [Release history](#release-history) + * [[3.0.0] - 2017-05-01](#300---2017-05-01) + * [[0.1.0]](#010) +- [About](#about) + +
    + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save snapdragon-util +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add snapdragon-util +``` + +## Usage + +```js +var util = require('snapdragon-util'); +``` + +## API + +### [.isNode](index.js#L21) + +Returns true if the given value is a node. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var node = new Node({type: 'foo'}); +console.log(utils.isNode(node)); //=> true +console.log(utils.isNode({})); //=> false +``` + +### [.noop](index.js#L37) + +Emit an empty string for the given `node`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{undefined}** + +**Example** + +```js +// do nothing for beginning-of-string +snapdragon.compiler.set('bos', utils.noop); +``` + +### [.identity](index.js#L53) + +Appdend `node.val` to `compiler.output`, exactly as it was created by the parser. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{undefined}** + +**Example** + +```js +snapdragon.compiler.set('text', utils.identity); +``` + +### [.append](index.js#L76) + +Previously named `.emit`, this method appends the given `val` to `compiler.output` for the given node. Useful when you know what value should be appended advance, regardless of the actual value of `node.val`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Function}**: Returns a compiler middleware function. + +**Example** + +```js +snapdragon.compiler + .set('i', function(node) { + this.mapVisit(node); + }) + .set('i.open', utils.append('')) + .set('i.close', utils.append('')) +``` + +### [.toNoop](index.js#L99) + +Used in compiler middleware, this onverts an AST node into an empty `text` node and deletes `node.nodes` if it exists. The advantage of this method is that, as opposed to completely removing the node, indices will not need to be re-calculated in sibling nodes, and nothing is appended to the output. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `nodes` **{Array}**: Optionally pass a new `nodes` value, to replace the existing `node.nodes` array. + +**Example** + +```js +utils.toNoop(node); +// convert `node.nodes` to the given value instead of deleting it +utils.toNoop(node, []); +``` + +### [.visit](index.js#L128) + +Visit `node` with the given `fn`. The built-in `.visit` method in snapdragon automatically calls registered compilers, this allows you to pass a visitor function. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `fn` **{Function}** +* `returns` **{Object}**: returns the node after recursively visiting all child nodes. + +**Example** + +```js +snapdragon.compiler.set('i', function(node) { + utils.visit(node, function(childNode) { + // do stuff with "childNode" + return childNode; + }); +}); +``` + +### [.mapVisit](index.js#L155) + +Map [visit](#visit) the given `fn` over `node.nodes`. This is called by [visit](#visit), use this method if you do not want `fn` to be called on the first node. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `options` **{Object}** +* `fn` **{Function}** +* `returns` **{Object}**: returns the node + +**Example** + +```js +snapdragon.compiler.set('i', function(node) { + utils.mapVisit(node, function(childNode) { + // do stuff with "childNode" + return childNode; + }); +}); +``` + +### [.addOpen](index.js#L194) + +Unshift an `*.open` node onto `node.nodes`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `Node` **{Function}**: (required) Node constructor function from [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node). +* `filter` **{Function}**: Optionaly specify a filter function to exclude the node. +* `returns` **{Object}**: Returns the created opening node. + +**Example** + +```js +var Node = require('snapdragon-node'); +snapdragon.parser.set('brace', function(node) { + var match = this.match(/^{/); + if (match) { + var parent = new Node({type: 'brace'}); + utils.addOpen(parent, Node); + console.log(parent.nodes[0]): + // { type: 'brace.open', val: '' }; + + // push the parent "brace" node onto the stack + this.push(parent); + + // return the parent node, so it's also added to the AST + return brace; + } +}); +``` + +### [.addClose](index.js#L244) + +Push a `*.close` node onto `node.nodes`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `Node` **{Function}**: (required) Node constructor function from [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node). +* `filter` **{Function}**: Optionaly specify a filter function to exclude the node. +* `returns` **{Object}**: Returns the created closing node. + +**Example** + +```js +var Node = require('snapdragon-node'); +snapdragon.parser.set('brace', function(node) { + var match = this.match(/^}/); + if (match) { + var parent = this.parent(); + if (parent.type !== 'brace') { + throw new Error('missing opening: ' + '}'); + } + + utils.addClose(parent, Node); + console.log(parent.nodes[parent.nodes.length - 1]): + // { type: 'brace.close', val: '' }; + + // no need to return a node, since the parent + // was already added to the AST + return; + } +}); +``` + +### [.wrapNodes](index.js#L274) + +Wraps the given `node` with `*.open` and `*.close` nodes. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `Node` **{Function}**: (required) Node constructor function from [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node). +* `filter` **{Function}**: Optionaly specify a filter function to exclude the node. +* `returns` **{Object}**: Returns the node + +### [.pushNode](index.js#L299) + +Push the given `node` onto `parent.nodes`, and set `parent` as `node.parent. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Object}**: Returns the child node + +**Example** + +```js +var parent = new Node({type: 'foo'}); +var node = new Node({type: 'bar'}); +utils.pushNode(parent, node); +console.log(parent.nodes[0].type) // 'bar' +console.log(node.parent.type) // 'foo' +``` + +### [.unshiftNode](index.js#L325) + +Unshift `node` onto `parent.nodes`, and set `parent` as `node.parent. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{undefined}** + +**Example** + +```js +var parent = new Node({type: 'foo'}); +var node = new Node({type: 'bar'}); +utils.unshiftNode(parent, node); +console.log(parent.nodes[0].type) // 'bar' +console.log(node.parent.type) // 'foo' +``` + +### [.popNode](index.js#L354) + +Pop the last `node` off of `parent.nodes`. The advantage of using this method is that it checks for `node.nodes` and works with any version of `snapdragon-node`. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Number|Undefined}**: Returns the length of `node.nodes` or undefined. + +**Example** + +```js +var parent = new Node({type: 'foo'}); +utils.pushNode(parent, new Node({type: 'foo'})); +utils.pushNode(parent, new Node({type: 'bar'})); +utils.pushNode(parent, new Node({type: 'baz'})); +console.log(parent.nodes.length); //=> 3 +utils.popNode(parent); +console.log(parent.nodes.length); //=> 2 +``` + +### [.shiftNode](index.js#L382) + +Shift the first `node` off of `parent.nodes`. The advantage of using this method is that it checks for `node.nodes` and works with any version of `snapdragon-node`. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Number|Undefined}**: Returns the length of `node.nodes` or undefined. + +**Example** + +```js +var parent = new Node({type: 'foo'}); +utils.pushNode(parent, new Node({type: 'foo'})); +utils.pushNode(parent, new Node({type: 'bar'})); +utils.pushNode(parent, new Node({type: 'baz'})); +console.log(parent.nodes.length); //=> 3 +utils.shiftNode(parent); +console.log(parent.nodes.length); //=> 2 +``` + +### [.removeNode](index.js#L409) + +Remove the specified `node` from `parent.nodes`. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Object|undefined}**: Returns the removed node, if successful, or undefined if it does not exist on `parent.nodes`. + +**Example** + +```js +var parent = new Node({type: 'abc'}); +var foo = new Node({type: 'foo'}); +utils.pushNode(parent, foo); +utils.pushNode(parent, new Node({type: 'bar'})); +utils.pushNode(parent, new Node({type: 'baz'})); +console.log(parent.nodes.length); //=> 3 +utils.removeNode(parent, foo); +console.log(parent.nodes.length); //=> 2 +``` + +### [.isType](index.js#L443) + +Returns true if `node.type` matches the given `type`. Throws a `TypeError` if `node` is not an instance of `Node`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var node = new Node({type: 'foo'}); +console.log(utils.isType(node, 'foo')); // false +console.log(utils.isType(node, 'bar')); // true +``` + +### [.hasType](index.js#L486) + +Returns true if the given `node` has the given `type` in `node.nodes`. Throws a `TypeError` if `node` is not an instance of `Node`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var node = new Node({ + type: 'foo', + nodes: [ + new Node({type: 'bar'}), + new Node({type: 'baz'}) + ] +}); +console.log(utils.hasType(node, 'xyz')); // false +console.log(utils.hasType(node, 'baz')); // true +``` + +### [.firstOfType](index.js#L519) + +Returns the first node from `node.nodes` of the given `type` + +**Params** + +* `nodes` **{Array}** +* `type` **{String}** +* `returns` **{Object|undefined}**: Returns the first matching node or undefined. + +**Example** + +```js +var node = new Node({ + type: 'foo', + nodes: [ + new Node({type: 'text', val: 'abc'}), + new Node({type: 'text', val: 'xyz'}) + ] +}); + +var textNode = utils.firstOfType(node.nodes, 'text'); +console.log(textNode.val); +//=> 'abc' +``` + +### [.findNode](index.js#L556) + +Returns the node at the specified index, or the first node of the given `type` from `node.nodes`. + +**Params** + +* `nodes` **{Array}** +* `type` **{String|Number}**: Node type or index. +* `returns` **{Object}**: Returns a node or undefined. + +**Example** + +```js +var node = new Node({ + type: 'foo', + nodes: [ + new Node({type: 'text', val: 'abc'}), + new Node({type: 'text', val: 'xyz'}) + ] +}); + +var nodeOne = utils.findNode(node.nodes, 'text'); +console.log(nodeOne.val); +//=> 'abc' + +var nodeTwo = utils.findNode(node.nodes, 1); +console.log(nodeTwo.val); +//=> 'xyz' +``` + +### [.isOpen](index.js#L584) + +Returns true if the given node is an "*.open" node. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({type: 'brace'}); +var open = new Node({type: 'brace.open'}); +var close = new Node({type: 'brace.close'}); + +console.log(utils.isOpen(brace)); // false +console.log(utils.isOpen(open)); // true +console.log(utils.isOpen(close)); // false +``` + +### [.isClose](index.js#L607) + +Returns true if the given node is a "*.close" node. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({type: 'brace'}); +var open = new Node({type: 'brace.open'}); +var close = new Node({type: 'brace.close'}); + +console.log(utils.isClose(brace)); // false +console.log(utils.isClose(open)); // false +console.log(utils.isClose(close)); // true +``` + +### [.hasOpen](index.js#L633) + +Returns true if `node.nodes` **has** an `.open` node + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({ + type: 'brace', + nodes: [] +}); + +var open = new Node({type: 'brace.open'}); +console.log(utils.hasOpen(brace)); // false + +brace.pushNode(open); +console.log(utils.hasOpen(brace)); // true +``` + +### [.hasClose](index.js#L663) + +Returns true if `node.nodes` **has** a `.close` node + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({ + type: 'brace', + nodes: [] +}); + +var close = new Node({type: 'brace.close'}); +console.log(utils.hasClose(brace)); // false + +brace.pushNode(close); +console.log(utils.hasClose(brace)); // true +``` + +### [.hasOpenAndClose](index.js#L697) + +Returns true if `node.nodes` has both `.open` and `.close` nodes + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({ + type: 'brace', + nodes: [] +}); + +var open = new Node({type: 'brace.open'}); +var close = new Node({type: 'brace.close'}); +console.log(utils.hasOpen(brace)); // false +console.log(utils.hasClose(brace)); // false + +brace.pushNode(open); +brace.pushNode(close); +console.log(utils.hasOpen(brace)); // true +console.log(utils.hasClose(brace)); // true +``` + +### [.addType](index.js#L719) + +Push the given `node` onto the `state.inside` array for the given type. This array is used as a specialized "stack" for only the given `node.type`. + +**Params** + +* `state` **{Object}**: The `compiler.state` object or custom state object. +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Array}**: Returns the `state.inside` stack for the given type. + +**Example** + +```js +var state = { inside: {}}; +var node = new Node({type: 'brace'}); +utils.addType(state, node); +console.log(state.inside); +//=> { brace: [{type: 'brace'}] } +``` + +### [.removeType](index.js#L759) + +Remove the given `node` from the `state.inside` array for the given type. This array is used as a specialized "stack" for only the given `node.type`. + +**Params** + +* `state` **{Object}**: The `compiler.state` object or custom state object. +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Array}**: Returns the `state.inside` stack for the given type. + +**Example** + +```js +var state = { inside: {}}; +var node = new Node({type: 'brace'}); +utils.addType(state, node); +console.log(state.inside); +//=> { brace: [{type: 'brace'}] } +utils.removeType(state, node); +//=> { brace: [] } +``` + +### [.isEmpty](index.js#L788) + +Returns true if `node.val` is an empty string, or `node.nodes` does not contain any non-empty text nodes. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `fn` **{Function}** +* `returns` **{Boolean}** + +**Example** + +```js +var node = new Node({type: 'text'}); +utils.isEmpty(node); //=> true +node.val = 'foo'; +utils.isEmpty(node); //=> false +``` + +### [.isInsideType](index.js#L833) + +Returns true if the `state.inside` stack for the given type exists and has one or more nodes on it. + +**Params** + +* `state` **{Object}** +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var state = { inside: {}}; +var node = new Node({type: 'brace'}); +console.log(utils.isInsideType(state, 'brace')); //=> false +utils.addType(state, node); +console.log(utils.isInsideType(state, 'brace')); //=> true +utils.removeType(state, node); +console.log(utils.isInsideType(state, 'brace')); //=> false +``` + +### [.isInside](index.js#L867) + +Returns true if `node` is either a child or grand-child of the given `type`, or `state.inside[type]` is a non-empty array. + +**Params** + +* `state` **{Object}**: Either the `compiler.state` object, if it exists, or a user-supplied state object. +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `type` **{String}**: The `node.type` to check for. +* `returns` **{Boolean}** + +**Example** + +```js +var state = { inside: {}}; +var node = new Node({type: 'brace'}); +var open = new Node({type: 'brace.open'}); +console.log(utils.isInside(state, open, 'brace')); //=> false +utils.pushNode(node, open); +console.log(utils.isInside(state, open, 'brace')); //=> true +``` + +### [.last](index.js#L915) + +Get the last `n` element from the given `array`. Used for getting +a node from `node.nodes.` + +**Params** + +* `array` **{Array}** +* `n` **{Number}** +* `returns` **{undefined}** + +### [.arrayify](index.js#L935) + +Cast the given `val` to an array. + +**Params** + +* `val` **{any}** +* `returns` **{Array}** + +**Example** + +```js +console.log(utils.arraify('')); +//=> [] +console.log(utils.arraify('foo')); +//=> ['foo'] +console.log(utils.arraify(['foo'])); +//=> ['foo'] +``` + +### [.stringify](index.js#L948) + +Convert the given `val` to a string by joining with `,`. Useful +for creating a cheerio/CSS/DOM-style selector from a list of strings. + +**Params** + +* `val` **{any}** +* `returns` **{Array}** + +### [.trim](index.js#L961) + +Ensure that the given value is a string and call `.trim()` on it, +or return an empty string. + +**Params** + +* `str` **{String}** +* `returns` **{String}** + +## Release history + +Changelog entries are classified using the following labels from [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog): + +* `added`: for new features +* `changed`: for changes in existing functionality +* `deprecated`: for once-stable features removed in upcoming releases +* `removed`: for deprecated features removed in this release +* `fixed`: for any bug fixes + +Custom labels used in this changelog: + +* `dependencies`: bumps dependencies +* `housekeeping`: code re-organization, minor edits, or other changes that don't fit in one of the other categories. + +### [3.0.0] - 2017-05-01 + +**Changed** + +* `.emit` was renamed to [.append](#append) +* `.addNode` was renamed to [.pushNode](#pushNode) +* `.getNode` was renamed to [.findNode](#findNode) +* `.isEmptyNodes` was renamed to [.isEmpty](#isEmpty): also now works with `node.nodes` and/or `node.val` + +**Added** + +* [.identity](#identity) +* [.removeNode](#removeNode) +* [.shiftNode](#shiftNode) +* [.popNode](#popNode) + +### [0.1.0] + +First release. + +## About + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 01, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/snapdragon-util/index.js b/front/frontend/node_modules/snapdragon-util/index.js new file mode 100644 index 0000000..68a030e --- /dev/null +++ b/front/frontend/node_modules/snapdragon-util/index.js @@ -0,0 +1,1019 @@ +'use strict'; + +var typeOf = require('kind-of'); +var utils = module.exports; + +/** + * Returns true if the given value is a node. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({type: 'foo'}); + * console.log(utils.isNode(node)); //=> true + * console.log(utils.isNode({})); //=> false + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {Boolean} + * @api public + */ + +utils.isNode = function(node) { + return typeOf(node) === 'object' && node.isNode === true; +}; + +/** + * Emit an empty string for the given `node`. + * + * ```js + * // do nothing for beginning-of-string + * snapdragon.compiler.set('bos', utils.noop); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {undefined} + * @api public + */ + +utils.noop = function(node) { + append(this, '', node); +}; + +/** + * Appdend `node.val` to `compiler.output`, exactly as it was created + * by the parser. + * + * ```js + * snapdragon.compiler.set('text', utils.identity); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {undefined} + * @api public + */ + +utils.identity = function(node) { + append(this, node.val, node); +}; + +/** + * Previously named `.emit`, this method appends the given `val` + * to `compiler.output` for the given node. Useful when you know + * what value should be appended advance, regardless of the actual + * value of `node.val`. + * + * ```js + * snapdragon.compiler + * .set('i', function(node) { + * this.mapVisit(node); + * }) + * .set('i.open', utils.append('')) + * .set('i.close', utils.append('')) + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {Function} Returns a compiler middleware function. + * @api public + */ + +utils.append = function(val) { + return function(node) { + append(this, val, node); + }; +}; + +/** + * Used in compiler middleware, this onverts an AST node into + * an empty `text` node and deletes `node.nodes` if it exists. + * The advantage of this method is that, as opposed to completely + * removing the node, indices will not need to be re-calculated + * in sibling nodes, and nothing is appended to the output. + * + * ```js + * utils.toNoop(node); + * // convert `node.nodes` to the given value instead of deleting it + * utils.toNoop(node, []); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Array} `nodes` Optionally pass a new `nodes` value, to replace the existing `node.nodes` array. + * @api public + */ + +utils.toNoop = function(node, nodes) { + if (nodes) { + node.nodes = nodes; + } else { + delete node.nodes; + node.type = 'text'; + node.val = ''; + } +}; + +/** + * Visit `node` with the given `fn`. The built-in `.visit` method in snapdragon + * automatically calls registered compilers, this allows you to pass a visitor + * function. + * + * ```js + * snapdragon.compiler.set('i', function(node) { + * utils.visit(node, function(childNode) { + * // do stuff with "childNode" + * return childNode; + * }); + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `fn` + * @return {Object} returns the node after recursively visiting all child nodes. + * @api public + */ + +utils.visit = function(node, fn) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(fn), 'expected a visitor function'); + fn(node); + return node.nodes ? utils.mapVisit(node, fn) : node; +}; + +/** + * Map [visit](#visit) the given `fn` over `node.nodes`. This is called by + * [visit](#visit), use this method if you do not want `fn` to be called on + * the first node. + * + * ```js + * snapdragon.compiler.set('i', function(node) { + * utils.mapVisit(node, function(childNode) { + * // do stuff with "childNode" + * return childNode; + * }); + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Object} `options` + * @param {Function} `fn` + * @return {Object} returns the node + * @api public + */ + +utils.mapVisit = function(node, fn) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isArray(node.nodes), 'expected node.nodes to be an array'); + assert(isFunction(fn), 'expected a visitor function'); + + for (var i = 0; i < node.nodes.length; i++) { + utils.visit(node.nodes[i], fn); + } + return node; +}; + +/** + * Unshift an `*.open` node onto `node.nodes`. + * + * ```js + * var Node = require('snapdragon-node'); + * snapdragon.parser.set('brace', function(node) { + * var match = this.match(/^{/); + * if (match) { + * var parent = new Node({type: 'brace'}); + * utils.addOpen(parent, Node); + * console.log(parent.nodes[0]): + * // { type: 'brace.open', val: '' }; + * + * // push the parent "brace" node onto the stack + * this.push(parent); + * + * // return the parent node, so it's also added to the AST + * return brace; + * } + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][]. + * @param {Function} `filter` Optionaly specify a filter function to exclude the node. + * @return {Object} Returns the created opening node. + * @api public + */ + +utils.addOpen = function(node, Node, val, filter) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(Node), 'expected Node to be a constructor function'); + + if (typeof val === 'function') { + filter = val; + val = ''; + } + + if (typeof filter === 'function' && !filter(node)) return; + var open = new Node({ type: node.type + '.open', val: val}); + var unshift = node.unshift || node.unshiftNode; + if (typeof unshift === 'function') { + unshift.call(node, open); + } else { + utils.unshiftNode(node, open); + } + return open; +}; + +/** + * Push a `*.close` node onto `node.nodes`. + * + * ```js + * var Node = require('snapdragon-node'); + * snapdragon.parser.set('brace', function(node) { + * var match = this.match(/^}/); + * if (match) { + * var parent = this.parent(); + * if (parent.type !== 'brace') { + * throw new Error('missing opening: ' + '}'); + * } + * + * utils.addClose(parent, Node); + * console.log(parent.nodes[parent.nodes.length - 1]): + * // { type: 'brace.close', val: '' }; + * + * // no need to return a node, since the parent + * // was already added to the AST + * return; + * } + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][]. + * @param {Function} `filter` Optionaly specify a filter function to exclude the node. + * @return {Object} Returns the created closing node. + * @api public + */ + +utils.addClose = function(node, Node, val, filter) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(Node), 'expected Node to be a constructor function'); + + if (typeof val === 'function') { + filter = val; + val = ''; + } + + if (typeof filter === 'function' && !filter(node)) return; + var close = new Node({ type: node.type + '.close', val: val}); + var push = node.push || node.pushNode; + if (typeof push === 'function') { + push.call(node, close); + } else { + utils.pushNode(node, close); + } + return close; +}; + +/** + * Wraps the given `node` with `*.open` and `*.close` nodes. + * + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][]. + * @param {Function} `filter` Optionaly specify a filter function to exclude the node. + * @return {Object} Returns the node + * @api public + */ + +utils.wrapNodes = function(node, Node, filter) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(Node), 'expected Node to be a constructor function'); + + utils.addOpen(node, Node, filter); + utils.addClose(node, Node, filter); + return node; +}; + +/** + * Push the given `node` onto `parent.nodes`, and set `parent` as `node.parent. + * + * ```js + * var parent = new Node({type: 'foo'}); + * var node = new Node({type: 'bar'}); + * utils.pushNode(parent, node); + * console.log(parent.nodes[0].type) // 'bar' + * console.log(node.parent.type) // 'foo' + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Object} Returns the child node + * @api public + */ + +utils.pushNode = function(parent, node) { + assert(utils.isNode(parent), 'expected parent node to be an instance of Node'); + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + node.define('parent', parent); + parent.nodes = parent.nodes || []; + parent.nodes.push(node); + return node; +}; + +/** + * Unshift `node` onto `parent.nodes`, and set `parent` as `node.parent. + * + * ```js + * var parent = new Node({type: 'foo'}); + * var node = new Node({type: 'bar'}); + * utils.unshiftNode(parent, node); + * console.log(parent.nodes[0].type) // 'bar' + * console.log(node.parent.type) // 'foo' + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {undefined} + * @api public + */ + +utils.unshiftNode = function(parent, node) { + assert(utils.isNode(parent), 'expected parent node to be an instance of Node'); + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + node.define('parent', parent); + parent.nodes = parent.nodes || []; + parent.nodes.unshift(node); +}; + +/** + * Pop the last `node` off of `parent.nodes`. The advantage of + * using this method is that it checks for `node.nodes` and works + * with any version of `snapdragon-node`. + * + * ```js + * var parent = new Node({type: 'foo'}); + * utils.pushNode(parent, new Node({type: 'foo'})); + * utils.pushNode(parent, new Node({type: 'bar'})); + * utils.pushNode(parent, new Node({type: 'baz'})); + * console.log(parent.nodes.length); //=> 3 + * utils.popNode(parent); + * console.log(parent.nodes.length); //=> 2 + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Number|Undefined} Returns the length of `node.nodes` or undefined. + * @api public + */ + +utils.popNode = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + if (typeof node.pop === 'function') { + return node.pop(); + } + return node.nodes && node.nodes.pop(); +}; + +/** + * Shift the first `node` off of `parent.nodes`. The advantage of + * using this method is that it checks for `node.nodes` and works + * with any version of `snapdragon-node`. + * + * ```js + * var parent = new Node({type: 'foo'}); + * utils.pushNode(parent, new Node({type: 'foo'})); + * utils.pushNode(parent, new Node({type: 'bar'})); + * utils.pushNode(parent, new Node({type: 'baz'})); + * console.log(parent.nodes.length); //=> 3 + * utils.shiftNode(parent); + * console.log(parent.nodes.length); //=> 2 + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Number|Undefined} Returns the length of `node.nodes` or undefined. + * @api public + */ + +utils.shiftNode = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + if (typeof node.shift === 'function') { + return node.shift(); + } + return node.nodes && node.nodes.shift(); +}; + +/** + * Remove the specified `node` from `parent.nodes`. + * + * ```js + * var parent = new Node({type: 'abc'}); + * var foo = new Node({type: 'foo'}); + * utils.pushNode(parent, foo); + * utils.pushNode(parent, new Node({type: 'bar'})); + * utils.pushNode(parent, new Node({type: 'baz'})); + * console.log(parent.nodes.length); //=> 3 + * utils.removeNode(parent, foo); + * console.log(parent.nodes.length); //=> 2 + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Object|undefined} Returns the removed node, if successful, or undefined if it does not exist on `parent.nodes`. + * @api public + */ + +utils.removeNode = function(parent, node) { + assert(utils.isNode(parent), 'expected parent.node to be an instance of Node'); + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + if (!parent.nodes) { + return null; + } + + if (typeof parent.remove === 'function') { + return parent.remove(node); + } + + var idx = parent.nodes.indexOf(node); + if (idx !== -1) { + return parent.nodes.splice(idx, 1); + } +}; + +/** + * Returns true if `node.type` matches the given `type`. Throws a + * `TypeError` if `node` is not an instance of `Node`. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({type: 'foo'}); + * console.log(utils.isType(node, 'foo')); // false + * console.log(utils.isType(node, 'bar')); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +utils.isType = function(node, type) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + switch (typeOf(type)) { + case 'array': + var types = type.slice(); + for (var i = 0; i < types.length; i++) { + if (utils.isType(node, types[i])) { + return true; + } + } + return false; + case 'string': + return node.type === type; + case 'regexp': + return type.test(node.type); + default: { + throw new TypeError('expected "type" to be an array, string or regexp'); + } + } +}; + +/** + * Returns true if the given `node` has the given `type` in `node.nodes`. + * Throws a `TypeError` if `node` is not an instance of `Node`. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({ + * type: 'foo', + * nodes: [ + * new Node({type: 'bar'}), + * new Node({type: 'baz'}) + * ] + * }); + * console.log(utils.hasType(node, 'xyz')); // false + * console.log(utils.hasType(node, 'baz')); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +utils.hasType = function(node, type) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + if (!Array.isArray(node.nodes)) return false; + for (var i = 0; i < node.nodes.length; i++) { + if (utils.isType(node.nodes[i], type)) { + return true; + } + } + return false; +}; + +/** + * Returns the first node from `node.nodes` of the given `type` + * + * ```js + * var node = new Node({ + * type: 'foo', + * nodes: [ + * new Node({type: 'text', val: 'abc'}), + * new Node({type: 'text', val: 'xyz'}) + * ] + * }); + * + * var textNode = utils.firstOfType(node.nodes, 'text'); + * console.log(textNode.val); + * //=> 'abc' + * ``` + * @param {Array} `nodes` + * @param {String} `type` + * @return {Object|undefined} Returns the first matching node or undefined. + * @api public + */ + +utils.firstOfType = function(nodes, type) { + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + if (utils.isType(node, type)) { + return node; + } + } +}; + +/** + * Returns the node at the specified index, or the first node of the + * given `type` from `node.nodes`. + * + * ```js + * var node = new Node({ + * type: 'foo', + * nodes: [ + * new Node({type: 'text', val: 'abc'}), + * new Node({type: 'text', val: 'xyz'}) + * ] + * }); + * + * var nodeOne = utils.findNode(node.nodes, 'text'); + * console.log(nodeOne.val); + * //=> 'abc' + * + * var nodeTwo = utils.findNode(node.nodes, 1); + * console.log(nodeTwo.val); + * //=> 'xyz' + * ``` + * + * @param {Array} `nodes` + * @param {String|Number} `type` Node type or index. + * @return {Object} Returns a node or undefined. + * @api public + */ + +utils.findNode = function(nodes, type) { + if (!Array.isArray(nodes)) { + return null; + } + if (typeof type === 'number') { + return nodes[type]; + } + return utils.firstOfType(nodes, type); +}; + +/** + * Returns true if the given node is an "*.open" node. + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({type: 'brace'}); + * var open = new Node({type: 'brace.open'}); + * var close = new Node({type: 'brace.close'}); + * + * console.log(utils.isOpen(brace)); // false + * console.log(utils.isOpen(open)); // true + * console.log(utils.isOpen(close)); // false + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.isOpen = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + return node.type.slice(-5) === '.open'; +}; + +/** + * Returns true if the given node is a "*.close" node. + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({type: 'brace'}); + * var open = new Node({type: 'brace.open'}); + * var close = new Node({type: 'brace.close'}); + * + * console.log(utils.isClose(brace)); // false + * console.log(utils.isClose(open)); // false + * console.log(utils.isClose(close)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.isClose = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + return node.type.slice(-6) === '.close'; +}; + +/** + * Returns true if `node.nodes` **has** an `.open` node + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({ + * type: 'brace', + * nodes: [] + * }); + * + * var open = new Node({type: 'brace.open'}); + * console.log(utils.hasOpen(brace)); // false + * + * brace.pushNode(open); + * console.log(utils.hasOpen(brace)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.hasOpen = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + var first = node.first || node.nodes ? node.nodes[0] : null; + if (utils.isNode(first)) { + return first.type === node.type + '.open'; + } + return false; +}; + +/** + * Returns true if `node.nodes` **has** a `.close` node + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({ + * type: 'brace', + * nodes: [] + * }); + * + * var close = new Node({type: 'brace.close'}); + * console.log(utils.hasClose(brace)); // false + * + * brace.pushNode(close); + * console.log(utils.hasClose(brace)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.hasClose = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + var last = node.last || node.nodes ? node.nodes[node.nodes.length - 1] : null; + if (utils.isNode(last)) { + return last.type === node.type + '.close'; + } + return false; +}; + +/** + * Returns true if `node.nodes` has both `.open` and `.close` nodes + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({ + * type: 'brace', + * nodes: [] + * }); + * + * var open = new Node({type: 'brace.open'}); + * var close = new Node({type: 'brace.close'}); + * console.log(utils.hasOpen(brace)); // false + * console.log(utils.hasClose(brace)); // false + * + * brace.pushNode(open); + * brace.pushNode(close); + * console.log(utils.hasOpen(brace)); // true + * console.log(utils.hasClose(brace)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.hasOpenAndClose = function(node) { + return utils.hasOpen(node) && utils.hasClose(node); +}; + +/** + * Push the given `node` onto the `state.inside` array for the + * given type. This array is used as a specialized "stack" for + * only the given `node.type`. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * utils.addType(state, node); + * console.log(state.inside); + * //=> { brace: [{type: 'brace'}] } + * ``` + * @param {Object} `state` The `compiler.state` object or custom state object. + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Array} Returns the `state.inside` stack for the given type. + * @api public + */ + +utils.addType = function(state, node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isObject(state), 'expected state to be an object'); + + var type = node.parent + ? node.parent.type + : node.type.replace(/\.open$/, ''); + + if (!state.hasOwnProperty('inside')) { + state.inside = {}; + } + if (!state.inside.hasOwnProperty(type)) { + state.inside[type] = []; + } + + var arr = state.inside[type]; + arr.push(node); + return arr; +}; + +/** + * Remove the given `node` from the `state.inside` array for the + * given type. This array is used as a specialized "stack" for + * only the given `node.type`. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * utils.addType(state, node); + * console.log(state.inside); + * //=> { brace: [{type: 'brace'}] } + * utils.removeType(state, node); + * //=> { brace: [] } + * ``` + * @param {Object} `state` The `compiler.state` object or custom state object. + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Array} Returns the `state.inside` stack for the given type. + * @api public + */ + +utils.removeType = function(state, node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isObject(state), 'expected state to be an object'); + + var type = node.parent + ? node.parent.type + : node.type.replace(/\.close$/, ''); + + if (state.inside.hasOwnProperty(type)) { + return state.inside[type].pop(); + } +}; + +/** + * Returns true if `node.val` is an empty string, or `node.nodes` does + * not contain any non-empty text nodes. + * + * ```js + * var node = new Node({type: 'text'}); + * utils.isEmpty(node); //=> true + * node.val = 'foo'; + * utils.isEmpty(node); //=> false + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `fn` + * @return {Boolean} + * @api public + */ + +utils.isEmpty = function(node, fn) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + if (!Array.isArray(node.nodes)) { + if (node.type !== 'text') { + return true; + } + if (typeof fn === 'function') { + return fn(node, node.parent); + } + return !utils.trim(node.val); + } + + for (var i = 0; i < node.nodes.length; i++) { + var child = node.nodes[i]; + if (utils.isOpen(child) || utils.isClose(child)) { + continue; + } + if (!utils.isEmpty(child, fn)) { + return false; + } + } + + return true; +}; + +/** + * Returns true if the `state.inside` stack for the given type exists + * and has one or more nodes on it. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * console.log(utils.isInsideType(state, 'brace')); //=> false + * utils.addType(state, node); + * console.log(utils.isInsideType(state, 'brace')); //=> true + * utils.removeType(state, node); + * console.log(utils.isInsideType(state, 'brace')); //=> false + * ``` + * @param {Object} `state` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +utils.isInsideType = function(state, type) { + assert(isObject(state), 'expected state to be an object'); + assert(isString(type), 'expected type to be a string'); + + if (!state.hasOwnProperty('inside')) { + return false; + } + + if (!state.inside.hasOwnProperty(type)) { + return false; + } + + return state.inside[type].length > 0; +}; + +/** + * Returns true if `node` is either a child or grand-child of the given `type`, + * or `state.inside[type]` is a non-empty array. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * var open = new Node({type: 'brace.open'}); + * console.log(utils.isInside(state, open, 'brace')); //=> false + * utils.pushNode(node, open); + * console.log(utils.isInside(state, open, 'brace')); //=> true + * ``` + * @param {Object} `state` Either the `compiler.state` object, if it exists, or a user-supplied state object. + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {String} `type` The `node.type` to check for. + * @return {Boolean} + * @api public + */ + +utils.isInside = function(state, node, type) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isObject(state), 'expected state to be an object'); + + if (Array.isArray(type)) { + for (var i = 0; i < type.length; i++) { + if (utils.isInside(state, node, type[i])) { + return true; + } + } + return false; + } + + var parent = node.parent; + if (typeof type === 'string') { + return (parent && parent.type === type) || utils.isInsideType(state, type); + } + + if (typeOf(type) === 'regexp') { + if (parent && parent.type && type.test(parent.type)) { + return true; + } + + var keys = Object.keys(state.inside); + var len = keys.length; + var idx = -1; + while (++idx < len) { + var key = keys[idx]; + var val = state.inside[key]; + + if (Array.isArray(val) && val.length !== 0 && type.test(key)) { + return true; + } + } + } + return false; +}; + +/** + * Get the last `n` element from the given `array`. Used for getting + * a node from `node.nodes.` + * + * @param {Array} `array` + * @param {Number} `n` + * @return {undefined} + * @api public + */ + +utils.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; + +/** + * Cast the given `val` to an array. + * + * ```js + * console.log(utils.arrayify('')); + * //=> [] + * console.log(utils.arrayify('foo')); + * //=> ['foo'] + * console.log(utils.arrayify(['foo'])); + * //=> ['foo'] + * ``` + * @param {any} `val` + * @return {Array} + * @api public + */ + +utils.arrayify = function(val) { + if (typeof val === 'string' && val !== '') { + return [val]; + } + if (!Array.isArray(val)) { + return []; + } + return val; +}; + +/** + * Convert the given `val` to a string by joining with `,`. Useful + * for creating a cheerio/CSS/DOM-style selector from a list of strings. + * + * @param {any} `val` + * @return {Array} + * @api public + */ + +utils.stringify = function(val) { + return utils.arrayify(val).join(','); +}; + +/** + * Ensure that the given value is a string and call `.trim()` on it, + * or return an empty string. + * + * @param {String} `str` + * @return {String} + * @api public + */ + +utils.trim = function(str) { + return typeof str === 'string' ? str.trim() : ''; +}; + +/** + * Return true if val is an object + */ + +function isObject(val) { + return typeOf(val) === 'object'; +} + +/** + * Return true if val is a string + */ + +function isString(val) { + return typeof val === 'string'; +} + +/** + * Return true if val is a function + */ + +function isFunction(val) { + return typeof val === 'function'; +} + +/** + * Return true if val is an array + */ + +function isArray(val) { + return Array.isArray(val); +} + +/** + * Shim to ensure the `.append` methods work with any version of snapdragon + */ + +function append(compiler, val, node) { + if (typeof compiler.append !== 'function') { + return compiler.emit(val, node); + } + return compiler.append(val, node); +} + +/** + * Simplified assertion. Throws an error is `val` is falsey. + */ + +function assert(val, message) { + if (!val) throw new Error(message); +} diff --git a/front/frontend/node_modules/snapdragon-util/package.json b/front/frontend/node_modules/snapdragon-util/package.json new file mode 100644 index 0000000..434c4f5 --- /dev/null +++ b/front/frontend/node_modules/snapdragon-util/package.json @@ -0,0 +1,65 @@ +{ + "name": "snapdragon-util", + "description": "Utilities for the snapdragon parser/compiler.", + "version": "3.0.1", + "homepage": "https://github.com/jonschlinkert/snapdragon-util", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/snapdragon-util", + "bugs": { + "url": "https://github.com/jonschlinkert/snapdragon-util/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.2.0" + }, + "devDependencies": { + "define-property": "^1.0.0", + "gulp": "^3.9.1", + "gulp-eslint": "^3.0.1", + "gulp-format-md": "^0.1.12", + "gulp-istanbul": "^1.1.1", + "gulp-mocha": "^3.0.0", + "isobject": "^3.0.0", + "mocha": "^3.3.0", + "snapdragon": "^0.11.0", + "snapdragon-node": "^1.0.6" + }, + "keywords": [ + "capture", + "compile", + "compiler", + "convert", + "match", + "parse", + "parser", + "plugin", + "render", + "snapdragon", + "snapdragonplugin", + "transform", + "util" + ], + "verb": { + "toc": "collapsible", + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/snapdragon/LICENSE b/front/frontend/node_modules/snapdragon/LICENSE new file mode 100644 index 0000000..1e49edf --- /dev/null +++ b/front/frontend/node_modules/snapdragon/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/snapdragon/README.md b/front/frontend/node_modules/snapdragon/README.md new file mode 100644 index 0000000..4006e10 --- /dev/null +++ b/front/frontend/node_modules/snapdragon/README.md @@ -0,0 +1,321 @@ +# snapdragon [![NPM version](https://img.shields.io/npm/v/snapdragon.svg?style=flat)](https://www.npmjs.com/package/snapdragon) [![NPM downloads](https://img.shields.io/npm/dm/snapdragon.svg?style=flat)](https://npmjs.org/package/snapdragon) [![Build Status](https://img.shields.io/travis/jonschlinkert/snapdragon.svg?style=flat)](https://travis-ci.org/jonschlinkert/snapdragon) + +> Fast, pluggable and easy-to-use parser-renderer factory. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save snapdragon +``` + +Created by [jonschlinkert](https://github.com/jonschlinkert) and [doowb](https://github.com/doowb). + +**Features** + +* Bootstrap your own parser, get sourcemap support for free +* All parsing and compiling is handled by simple, reusable middleware functions +* Inspired by the parsers in [pug](http://jade-lang.com) and [css](https://github.com/reworkcss/css). + +## History + +### v0.5.0 + +**Breaking changes** + +Substantial breaking changes were made in v0.5.0! Most of these changes are part of a larger refactor that will be finished in 0.6.0, including the introduction of a `Lexer` class. + +* Renderer was renamed to `Compiler` +* the `.render` method was renamed to `.compile` +* Many other smaller changes. A more detailed overview will be provided in 0.6.0. If you don't have to time review code, I recommend you wait for the 0.6.0 release. + +## Usage examples + +```js +var Snapdragon = require('snapdragon'); +var snapdragon = new Snapdragon(); +``` + +**Parse** + +```js +var ast = snapdragon.parser('some string', options) + // parser middleware that can be called by other middleware + .set('foo', function () {}) + // parser middleware, runs immediately in the order defined + .use(bar()) + .use(baz()) +``` + +**Render** + +```js +// pass the `ast` from the parse method +var res = snapdragon.compiler(ast) + // compiler middleware, called when the name of the middleware + // matches the `node.type` (defined in a parser middleware) + .set('bar', function () {}) + .set('baz', function () {}) + .compile() +``` + +See the [examples](./examples/). + +## Getting started + +**Parsers** + +Parsers are middleware functions used for parsing a string into an ast node. + +```js +var ast = snapdragon.parser(str, options) + .use(function() { + var pos = this.position(); + var m = this.match(/^\./); + if (!m) return; + return pos({ + // `type` specifies the compiler to use + type: 'dot', + val: m[0] + }); + }) +``` + +**AST node** + +When the parser finds a match, `pos()` is called, pushing a token for that node onto the ast that looks something like: + +```js +{ type: 'dot', + val: '.', + position: + { start: { lineno: 1, column: 1 }, + end: { lineno: 1, column: 2 } }} +``` + +**Renderers** + +Renderers are _named_ middleware functions that visit over an array of ast nodes to compile a string. + +```js +var res = snapdragon.compiler(ast) + .set('dot', function (node) { + console.log(node.val) + //=> '.' + return this.emit(node.val); + }) +``` + +**Source maps** + +If you want source map support, make sure to emit the position as well. + +```js +var res = snapdragon.compiler(ast) + .set('dot', function (node) { + return this.emit(node.val, node.position); + }) +``` + +## Docs + +### Parser middleware + +A parser middleware is a function that returns an abject called a `token`. This token is pushed onto the AST as a node. + +**Example token** + +```js +{ type: 'dot', + val: '.', + position: + { start: { lineno: 1, column: 1 }, + end: { lineno: 1, column: 2 } }} +``` + +**Example parser middleware** + +Match a single `.` in a string: + +1. Get the starting position by calling `this.position()` +2. pass a regex for matching a single dot to the `.match` method +3. if **no match** is found, return `undefined` +4. if a **match** is found, `pos()` is called, which returns a token with: + - `type`: the name of the [compiler] to use + - `val`: The actual value captured by the regex. In this case, a `.`. Note that you can capture and return whatever will be needed by the corresponding [compiler]. + - The ending position: automatically calculated by adding the length of the first capture group to the starting position. + +## Renderer middleware + +Renderers are run when the name of the compiler middleware matches the `type` defined on an ast `node` (which is defined in a parser). + +**Example** + +Exercise: Parse a dot, then compile it as an escaped dot. + +```js +var ast = snapdragon.parser('.') + .use(function () { + var pos = this.position(); + var m = this.match(/^\./); + if (!m) return; + return pos({ + // define the `type` of compiler to use + type: 'dot', + val: m[0] + }) + }) + +var result = snapdragon.compiler(ast) + .set('dot', function (node) { + return this.emit('\\' + node.val); + }) + .compile() + +console.log(result.output); +//=> '\.' +``` + +## API + +### [Parser](lib/parser.js#L19) + +Create a new `Parser` with the given `input` and `options`. + +**Params** + +* `input` **{String}** +* `options` **{Object}** + +### [.define](lib/parser.js#L103) + +Define a non-enumberable property on the `Parser` instance. + +**Example** + +```js +parser.define('foo', 'bar'); +``` + +**Params** + +* `key` **{String}**: propery name +* `val` **{any}**: property value +* `returns` **{Object}**: Returns the Parser instance for chaining. + +Set parser `name` with the given `fn` + +**Params** + +* `name` **{String}** +* `fn` **{Function}** + +Get parser `name` + +**Params** + +* `name` **{String}** + +Push a `token` onto the `type` stack. + +**Params** + +* `type` **{String}** +* `returns` **{Object}** `token` + +Pop a token off of the `type` stack + +**Params** + +* `type` **{String}** +* `returns` **{Object}**: Returns a token + +Return true if inside a `stack` node. Types are `braces`, `parens` or `brackets`. + +**Params** + +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +parser.isType(node, 'brace'); +``` + +**Params** + +* `node` **{Object}** +* `type` **{String}** +* `returns` **{Boolean}** + +### [.define](lib/compiler.js#L71) + +Define a non-enumberable property on the `Compiler` instance. + +**Example** + +```js +compiler.define('foo', 'bar'); +``` + +**Params** + +* `key` **{String}**: propery name +* `val` **{any}**: property value +* `returns` **{Object}**: Returns the Compiler instance for chaining. + +## About + +### Related projects + +* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) | [homepage](https://github.com/jonschlinkert/braces "Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification.") +* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") +* [extglob](https://www.npmjs.com/package/extglob): Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to… [more](https://github.com/jonschlinkert/extglob) | [homepage](https://github.com/jonschlinkert/extglob "Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to glob patterns.") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
    | +| --- | --- | +| 106 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [doowb](https://github.com/doowb) | + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/snapdragon/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 10, 2016._ \ No newline at end of file diff --git a/front/frontend/node_modules/snapdragon/index.js b/front/frontend/node_modules/snapdragon/index.js new file mode 100644 index 0000000..235b464 --- /dev/null +++ b/front/frontend/node_modules/snapdragon/index.js @@ -0,0 +1,174 @@ +'use strict'; + +var Base = require('base'); +var define = require('define-property'); +var Compiler = require('./lib/compiler'); +var Parser = require('./lib/parser'); +var utils = require('./lib/utils'); +var regexCache = {}; +var cache = {}; + +/** + * Create a new instance of `Snapdragon` with the given `options`. + * + * ```js + * var snapdragon = new Snapdragon(); + * ``` + * + * @param {Object} `options` + * @api public + */ + +function Snapdragon(options) { + Base.call(this, null, options); + this.options = utils.extend({source: 'string'}, this.options); + this.compiler = new Compiler(this.options); + this.parser = new Parser(this.options); + + Object.defineProperty(this, 'compilers', { + get: function() { + return this.compiler.compilers; + } + }); + + Object.defineProperty(this, 'parsers', { + get: function() { + return this.parser.parsers; + } + }); + + Object.defineProperty(this, 'regex', { + get: function() { + return this.parser.regex; + } + }); +} + +/** + * Inherit Base + */ + +Base.extend(Snapdragon); + +/** + * Add a parser to `snapdragon.parsers` for capturing the given `type` using + * the specified regex or parser function. A function is useful if you need + * to customize how the token is created and/or have access to the parser + * instance to check options, etc. + * + * ```js + * snapdragon + * .capture('slash', /^\//) + * .capture('dot', function() { + * var pos = this.position(); + * var m = this.match(/^\./); + * if (!m) return; + * return pos({ + * type: 'dot', + * val: m[0] + * }); + * }); + * ``` + * @param {String} `type` + * @param {RegExp|Function} `regex` + * @return {Object} Returns the parser instance for chaining + * @api public + */ + +Snapdragon.prototype.capture = function() { + return this.parser.capture.apply(this.parser, arguments); +}; + +/** + * Register a plugin `fn`. + * + * ```js + * var snapdragon = new Snapdgragon([options]); + * snapdragon.use(function() { + * console.log(this); //<= snapdragon instance + * console.log(this.parser); //<= parser instance + * console.log(this.compiler); //<= compiler instance + * }); + * ``` + * @param {Object} `fn` + * @api public + */ + +Snapdragon.prototype.use = function(fn) { + fn.call(this, this); + return this; +}; + +/** + * Parse the given `str`. + * + * ```js + * var snapdragon = new Snapdgragon([options]); + * // register parsers + * snapdragon.parser.use(function() {}); + * + * // parse + * var ast = snapdragon.parse('foo/bar'); + * console.log(ast); + * ``` + * @param {String} `str` + * @param {Object} `options` Set `options.sourcemap` to true to enable source maps. + * @return {Object} Returns an AST. + * @api public + */ + +Snapdragon.prototype.parse = function(str, options) { + this.options = utils.extend({}, this.options, options); + var parsed = this.parser.parse(str, this.options); + + // add non-enumerable parser reference + define(parsed, 'parser', this.parser); + return parsed; +}; + +/** + * Compile the given `AST`. + * + * ```js + * var snapdragon = new Snapdgragon([options]); + * // register plugins + * snapdragon.use(function() {}); + * // register parser plugins + * snapdragon.parser.use(function() {}); + * // register compiler plugins + * snapdragon.compiler.use(function() {}); + * + * // parse + * var ast = snapdragon.parse('foo/bar'); + * + * // compile + * var res = snapdragon.compile(ast); + * console.log(res.output); + * ``` + * @param {Object} `ast` + * @param {Object} `options` + * @return {Object} Returns an object with an `output` property with the rendered string. + * @api public + */ + +Snapdragon.prototype.compile = function(ast, options) { + this.options = utils.extend({}, this.options, options); + var compiled = this.compiler.compile(ast, this.options); + + // add non-enumerable compiler reference + define(compiled, 'compiler', this.compiler); + return compiled; +}; + +/** + * Expose `Snapdragon` + */ + +module.exports = Snapdragon; + +/** + * Expose `Parser` and `Compiler` + */ + +module.exports.Compiler = Compiler; +module.exports.Parser = Parser; diff --git a/front/frontend/node_modules/snapdragon/lib/compiler.js b/front/frontend/node_modules/snapdragon/lib/compiler.js new file mode 100644 index 0000000..0ce9d21 --- /dev/null +++ b/front/frontend/node_modules/snapdragon/lib/compiler.js @@ -0,0 +1,177 @@ +'use strict'; + +var use = require('use'); +var define = require('define-property'); +var debug = require('debug')('snapdragon:compiler'); +var utils = require('./utils'); + +/** + * Create a new `Compiler` with the given `options`. + * @param {Object} `options` + */ + +function Compiler(options, state) { + debug('initializing', __filename); + this.options = utils.extend({source: 'string'}, options); + this.state = state || {}; + this.compilers = {}; + this.output = ''; + this.set('eos', function(node) { + return this.emit(node.val, node); + }); + this.set('noop', function(node) { + return this.emit(node.val, node); + }); + this.set('bos', function(node) { + return this.emit(node.val, node); + }); + use(this); +} + +/** + * Prototype methods + */ + +Compiler.prototype = { + + /** + * Throw an error message with details including the cursor position. + * @param {String} `msg` Message to use in the Error. + */ + + error: function(msg, node) { + var pos = node.position || {start: {column: 0}}; + var message = this.options.source + ' column:' + pos.start.column + ': ' + msg; + + var err = new Error(message); + err.reason = msg; + err.column = pos.start.column; + err.source = this.pattern; + + if (this.options.silent) { + this.errors.push(err); + } else { + throw err; + } + }, + + /** + * Define a non-enumberable property on the `Compiler` instance. + * + * ```js + * compiler.define('foo', 'bar'); + * ``` + * @name .define + * @param {String} `key` propery name + * @param {any} `val` property value + * @return {Object} Returns the Compiler instance for chaining. + * @api public + */ + + define: function(key, val) { + define(this, key, val); + return this; + }, + + /** + * Emit `node.val` + */ + + emit: function(str, node) { + this.output += str; + return str; + }, + + /** + * Add a compiler `fn` with the given `name` + */ + + set: function(name, fn) { + this.compilers[name] = fn; + return this; + }, + + /** + * Get compiler `name`. + */ + + get: function(name) { + return this.compilers[name]; + }, + + /** + * Get the previous AST node. + */ + + prev: function(n) { + return this.ast.nodes[this.idx - (n || 1)] || { type: 'bos', val: '' }; + }, + + /** + * Get the next AST node. + */ + + next: function(n) { + return this.ast.nodes[this.idx + (n || 1)] || { type: 'eos', val: '' }; + }, + + /** + * Visit `node`. + */ + + visit: function(node, nodes, i) { + var fn = this.compilers[node.type]; + this.idx = i; + + if (typeof fn !== 'function') { + throw this.error('compiler "' + node.type + '" is not registered', node); + } + return fn.call(this, node, nodes, i); + }, + + /** + * Map visit over array of `nodes`. + */ + + mapVisit: function(nodes) { + if (!Array.isArray(nodes)) { + throw new TypeError('expected an array'); + } + var len = nodes.length; + var idx = -1; + while (++idx < len) { + this.visit(nodes[idx], nodes, idx); + } + return this; + }, + + /** + * Compile `ast`. + */ + + compile: function(ast, options) { + var opts = utils.extend({}, this.options, options); + this.ast = ast; + this.parsingErrors = this.ast.errors; + this.output = ''; + + // source map support + if (opts.sourcemap) { + var sourcemaps = require('./source-maps'); + sourcemaps(this); + this.mapVisit(this.ast.nodes); + this.applySourceMaps(); + this.map = opts.sourcemap === 'generator' ? this.map : this.map.toJSON(); + return this; + } + + this.mapVisit(this.ast.nodes); + return this; + } +}; + +/** + * Expose `Compiler` + */ + +module.exports = Compiler; diff --git a/front/frontend/node_modules/snapdragon/lib/parser.js b/front/frontend/node_modules/snapdragon/lib/parser.js new file mode 100644 index 0000000..a5a9b31 --- /dev/null +++ b/front/frontend/node_modules/snapdragon/lib/parser.js @@ -0,0 +1,533 @@ +'use strict'; + +var use = require('use'); +var util = require('util'); +var Cache = require('map-cache'); +var define = require('define-property'); +var debug = require('debug')('snapdragon:parser'); +var Position = require('./position'); +var utils = require('./utils'); + +/** + * Create a new `Parser` with the given `input` and `options`. + * @param {String} `input` + * @param {Object} `options` + * @api public + */ + +function Parser(options) { + debug('initializing', __filename); + this.options = utils.extend({source: 'string'}, options); + this.init(this.options); + use(this); +} + +/** + * Prototype methods + */ + +Parser.prototype = { + constructor: Parser, + + init: function(options) { + this.orig = ''; + this.input = ''; + this.parsed = ''; + + this.column = 1; + this.line = 1; + + this.regex = new Cache(); + this.errors = this.errors || []; + this.parsers = this.parsers || {}; + this.types = this.types || []; + this.sets = this.sets || {}; + this.fns = this.fns || []; + this.currentType = 'root'; + + var pos = this.position(); + this.bos = pos({type: 'bos', val: ''}); + + this.ast = { + type: 'root', + errors: this.errors, + nodes: [this.bos] + }; + + define(this.bos, 'parent', this.ast); + this.nodes = [this.ast]; + + this.count = 0; + this.setCount = 0; + this.stack = []; + }, + + /** + * Throw a formatted error with the cursor column and `msg`. + * @param {String} `msg` Message to use in the Error. + */ + + error: function(msg, node) { + var pos = node.position || {start: {column: 0, line: 0}}; + var line = pos.start.line; + var column = pos.start.column; + var source = this.options.source; + + var message = source + ' : ' + msg; + var err = new Error(message); + err.source = source; + err.reason = msg; + err.pos = pos; + + if (this.options.silent) { + this.errors.push(err); + } else { + throw err; + } + }, + + /** + * Define a non-enumberable property on the `Parser` instance. + * + * ```js + * parser.define('foo', 'bar'); + * ``` + * @name .define + * @param {String} `key` propery name + * @param {any} `val` property value + * @return {Object} Returns the Parser instance for chaining. + * @api public + */ + + define: function(key, val) { + define(this, key, val); + return this; + }, + + /** + * Mark position and patch `node.position`. + */ + + position: function() { + var start = { line: this.line, column: this.column }; + var self = this; + + return function(node) { + define(node, 'position', new Position(start, self)); + return node; + }; + }, + + /** + * Set parser `name` with the given `fn` + * @param {String} `name` + * @param {Function} `fn` + * @api public + */ + + set: function(type, fn) { + if (this.types.indexOf(type) === -1) { + this.types.push(type); + } + this.parsers[type] = fn.bind(this); + return this; + }, + + /** + * Get parser `name` + * @param {String} `name` + * @api public + */ + + get: function(name) { + return this.parsers[name]; + }, + + /** + * Push a `token` onto the `type` stack. + * + * @param {String} `type` + * @return {Object} `token` + * @api public + */ + + push: function(type, token) { + this.sets[type] = this.sets[type] || []; + this.count++; + this.stack.push(token); + return this.sets[type].push(token); + }, + + /** + * Pop a token off of the `type` stack + * @param {String} `type` + * @returns {Object} Returns a token + * @api public + */ + + pop: function(type) { + this.sets[type] = this.sets[type] || []; + this.count--; + this.stack.pop(); + return this.sets[type].pop(); + }, + + /** + * Return true if inside a `stack` node. Types are `braces`, `parens` or `brackets`. + * + * @param {String} `type` + * @return {Boolean} + * @api public + */ + + isInside: function(type) { + this.sets[type] = this.sets[type] || []; + return this.sets[type].length > 0; + }, + + /** + * Return true if `node` is the given `type`. + * + * ```js + * parser.isType(node, 'brace'); + * ``` + * @param {Object} `node` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + + isType: function(node, type) { + return node && node.type === type; + }, + + /** + * Get the previous AST node + * @return {Object} + */ + + prev: function(n) { + return this.stack.length > 0 + ? utils.last(this.stack, n) + : utils.last(this.nodes, n); + }, + + /** + * Update line and column based on `str`. + */ + + consume: function(len) { + this.input = this.input.substr(len); + }, + + /** + * Update column based on `str`. + */ + + updatePosition: function(str, len) { + var lines = str.match(/\n/g); + if (lines) this.line += lines.length; + var i = str.lastIndexOf('\n'); + this.column = ~i ? len - i : this.column + len; + this.parsed += str; + this.consume(len); + }, + + /** + * Match `regex`, return captures, and update the cursor position by `match[0]` length. + * @param {RegExp} `regex` + * @return {Object} + */ + + match: function(regex) { + var m = regex.exec(this.input); + if (m) { + this.updatePosition(m[0], m[0].length); + return m; + } + }, + + /** + * Capture `type` with the given regex. + * @param {String} `type` + * @param {RegExp} `regex` + * @return {Function} + */ + + capture: function(type, regex) { + if (typeof regex === 'function') { + return this.set.apply(this, arguments); + } + + this.regex.set(type, regex); + this.set(type, function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(regex); + if (!m || !m[0]) return; + + var prev = this.prev(); + var node = pos({ + type: type, + val: m[0], + parsed: parsed, + rest: this.input + }); + + if (m[1]) { + node.inner = m[1]; + } + + define(node, 'inside', this.stack.length > 0); + define(node, 'parent', prev); + prev.nodes.push(node); + }.bind(this)); + return this; + }, + + /** + * Create a parser with open and close for parens, + * brackets or braces + */ + + capturePair: function(type, openRegex, closeRegex, fn) { + this.sets[type] = this.sets[type] || []; + + /** + * Open + */ + + this.set(type + '.open', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(openRegex); + if (!m || !m[0]) return; + + var val = m[0]; + this.setCount++; + this.specialChars = true; + var open = pos({ + type: type + '.open', + val: val, + rest: this.input + }); + + if (typeof m[1] !== 'undefined') { + open.inner = m[1]; + } + + var prev = this.prev(); + var node = pos({ + type: type, + nodes: [open] + }); + + define(node, 'rest', this.input); + define(node, 'parsed', parsed); + define(node, 'prefix', m[1]); + define(node, 'parent', prev); + define(open, 'parent', node); + + if (typeof fn === 'function') { + fn.call(this, open, node); + } + + this.push(type, node); + prev.nodes.push(node); + }); + + /** + * Close + */ + + this.set(type + '.close', function() { + var pos = this.position(); + var m = this.match(closeRegex); + if (!m || !m[0]) return; + + var parent = this.pop(type); + var node = pos({ + type: type + '.close', + rest: this.input, + suffix: m[1], + val: m[0] + }); + + if (!this.isType(parent, type)) { + if (this.options.strict) { + throw new Error('missing opening "' + type + '"'); + } + + this.setCount--; + node.escaped = true; + return node; + } + + if (node.suffix === '\\') { + parent.escaped = true; + node.escaped = true; + } + + parent.nodes.push(node); + define(node, 'parent', parent); + }); + + return this; + }, + + /** + * Capture end-of-string + */ + + eos: function() { + var pos = this.position(); + if (this.input) return; + var prev = this.prev(); + + while (prev.type !== 'root' && !prev.visited) { + if (this.options.strict === true) { + throw new SyntaxError('invalid syntax:' + util.inspect(prev, null, 2)); + } + + if (!hasDelims(prev)) { + prev.parent.escaped = true; + prev.escaped = true; + } + + visit(prev, function(node) { + if (!hasDelims(node.parent)) { + node.parent.escaped = true; + node.escaped = true; + } + }); + + prev = prev.parent; + } + + var tok = pos({ + type: 'eos', + val: this.append || '' + }); + + define(tok, 'parent', this.ast); + return tok; + }, + + /** + * Run parsers to advance the cursor position + */ + + next: function() { + var parsed = this.parsed; + var len = this.types.length; + var idx = -1; + var tok; + + while (++idx < len) { + if ((tok = this.parsers[this.types[idx]].call(this))) { + define(tok, 'rest', this.input); + define(tok, 'parsed', parsed); + this.last = tok; + return tok; + } + } + }, + + /** + * Parse the given string. + * @return {Array} + */ + + parse: function(input) { + if (typeof input !== 'string') { + throw new TypeError('expected a string'); + } + + this.init(this.options); + this.orig = input; + this.input = input; + var self = this; + + function parse() { + // check input before calling `.next()` + input = self.input; + + // get the next AST ndoe + var node = self.next(); + if (node) { + var prev = self.prev(); + if (prev) { + define(node, 'parent', prev); + if (prev.nodes) { + prev.nodes.push(node); + } + } + + if (self.sets.hasOwnProperty(prev.type)) { + self.currentType = prev.type; + } + } + + // if we got here but input is not changed, throw an error + if (self.input && input === self.input) { + throw new Error('no parsers registered for: "' + self.input.slice(0, 5) + '"'); + } + } + + while (this.input) parse(); + if (this.stack.length && this.options.strict) { + var node = this.stack.pop(); + throw this.error('missing opening ' + node.type + ': "' + this.orig + '"'); + } + + var eos = this.eos(); + var tok = this.prev(); + if (tok.type !== 'eos') { + this.ast.nodes.push(eos); + } + + return this.ast; + } +}; + +/** + * Visit `node` with the given `fn` + */ + +function visit(node, fn) { + if (!node.visited) { + define(node, 'visited', true); + return node.nodes ? mapVisit(node.nodes, fn) : fn(node); + } + return node; +} + +/** + * Map visit over array of `nodes`. + */ + +function mapVisit(nodes, fn) { + var len = nodes.length; + var idx = -1; + while (++idx < len) { + visit(nodes[idx], fn); + } +} + +function hasOpen(node) { + return node.nodes && node.nodes[0].type === (node.type + '.open'); +} + +function hasClose(node) { + return node.nodes && utils.last(node.nodes).type === (node.type + '.close'); +} + +function hasDelims(node) { + return hasOpen(node) && hasClose(node); +} + +/** + * Expose `Parser` + */ + +module.exports = Parser; diff --git a/front/frontend/node_modules/snapdragon/lib/position.js b/front/frontend/node_modules/snapdragon/lib/position.js new file mode 100644 index 0000000..c859696 --- /dev/null +++ b/front/frontend/node_modules/snapdragon/lib/position.js @@ -0,0 +1,14 @@ +'use strict'; + +var define = require('define-property'); + +/** + * Store position for a node + */ + +module.exports = function Position(start, parser) { + this.start = start; + this.end = { line: parser.line, column: parser.column }; + define(this, 'content', parser.orig); + define(this, 'source', parser.options.source); +}; diff --git a/front/frontend/node_modules/snapdragon/lib/source-maps.js b/front/frontend/node_modules/snapdragon/lib/source-maps.js new file mode 100644 index 0000000..d8e638b --- /dev/null +++ b/front/frontend/node_modules/snapdragon/lib/source-maps.js @@ -0,0 +1,145 @@ +'use strict'; + +var fs = require('fs'); +var path = require('path'); +var define = require('define-property'); +var utils = require('./utils'); + +/** + * Expose `mixin()`. + * This code is based on `source-maps-support.js` in reworkcss/css + * https://github.com/reworkcss/css/blob/master/lib/stringify/source-map-support.js + * Copyright (c) 2012 TJ Holowaychuk + */ + +module.exports = mixin; + +/** + * Mixin source map support into `compiler`. + * + * @param {Object} `compiler` + * @api public + */ + +function mixin(compiler) { + define(compiler, '_comment', compiler.comment); + compiler.map = new utils.SourceMap.SourceMapGenerator(); + compiler.position = { line: 1, column: 1 }; + compiler.content = {}; + compiler.files = {}; + + for (var key in exports) { + define(compiler, key, exports[key]); + } +} + +/** + * Update position. + * + * @param {String} str + */ + +exports.updatePosition = function(str) { + var lines = str.match(/\n/g); + if (lines) this.position.line += lines.length; + var i = str.lastIndexOf('\n'); + this.position.column = ~i ? str.length - i : this.position.column + str.length; +}; + +/** + * Emit `str` with `position`. + * + * @param {String} str + * @param {Object} [pos] + * @return {String} + */ + +exports.emit = function(str, node) { + var position = node.position || {}; + var source = position.source; + if (source) { + if (position.filepath) { + source = utils.unixify(position.filepath); + } + + this.map.addMapping({ + source: source, + generated: { + line: this.position.line, + column: Math.max(this.position.column - 1, 0) + }, + original: { + line: position.start.line, + column: position.start.column - 1 + } + }); + + if (position.content) { + this.addContent(source, position); + } + if (position.filepath) { + this.addFile(source, position); + } + + this.updatePosition(str); + this.output += str; + } + return str; +}; + +/** + * Adds a file to the source map output if it has not already been added + * @param {String} `file` + * @param {Object} `pos` + */ + +exports.addFile = function(file, position) { + if (typeof position.content !== 'string') return; + if (Object.prototype.hasOwnProperty.call(this.files, file)) return; + this.files[file] = position.content; +}; + +/** + * Adds a content source to the source map output if it has not already been added + * @param {String} `source` + * @param {Object} `position` + */ + +exports.addContent = function(source, position) { + if (typeof position.content !== 'string') return; + if (Object.prototype.hasOwnProperty.call(this.content, source)) return; + this.map.setSourceContent(source, position.content); +}; + +/** + * Applies any original source maps to the output and embeds the source file + * contents in the source map. + */ + +exports.applySourceMaps = function() { + Object.keys(this.files).forEach(function(file) { + var content = this.files[file]; + this.map.setSourceContent(file, content); + + if (this.options.inputSourcemaps === true) { + var originalMap = utils.sourceMapResolve.resolveSync(content, file, fs.readFileSync); + if (originalMap) { + var map = new utils.SourceMap.SourceMapConsumer(originalMap.map); + var relativeTo = originalMap.sourcesRelativeTo; + this.map.applySourceMap(map, file, utils.unixify(path.dirname(relativeTo))); + } + } + }, this); +}; + +/** + * Process comments, drops sourceMap comments. + * @param {Object} node + */ + +exports.comment = function(node) { + if (/^# sourceMappingURL=/.test(node.comment)) { + return this.emit('', node.position); + } + return this._comment(node); +}; diff --git a/front/frontend/node_modules/snapdragon/lib/utils.js b/front/frontend/node_modules/snapdragon/lib/utils.js new file mode 100644 index 0000000..33f07e1 --- /dev/null +++ b/front/frontend/node_modules/snapdragon/lib/utils.js @@ -0,0 +1,48 @@ +'use strict'; + +/** + * Module dependencies + */ + +exports.extend = require('extend-shallow'); +exports.SourceMap = require('source-map'); +exports.sourceMapResolve = require('source-map-resolve'); + +/** + * Convert backslash in the given string to forward slashes + */ + +exports.unixify = function(fp) { + return fp.split(/\\+/).join('/'); +}; + +/** + * Return true if `val` is a non-empty string + * + * @param {String} `str` + * @return {Boolean} + */ + +exports.isString = function(str) { + return str && typeof str === 'string'; +}; + +/** + * Cast `val` to an array + * @return {Array} + */ + +exports.arrayify = function(val) { + if (typeof val === 'string') return [val]; + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Get the last `n` element from the given `array` + * @param {Array} `array` + * @return {*} + */ + +exports.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; diff --git a/front/frontend/node_modules/snapdragon/node_modules/define-property/LICENSE b/front/frontend/node_modules/snapdragon/node_modules/define-property/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/snapdragon/node_modules/define-property/README.md b/front/frontend/node_modules/snapdragon/node_modules/define-property/README.md new file mode 100644 index 0000000..8cac698 --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/define-property/README.md @@ -0,0 +1,77 @@ +# define-property [![NPM version](https://badge.fury.io/js/define-property.svg)](http://badge.fury.io/js/define-property) + +> Define a non-enumerable property on an object. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i define-property --save +``` + +## Usage + +**Params** + +* `obj`: The object on which to define the property. +* `prop`: The name of the property to be defined or modified. +* `descriptor`: The descriptor for the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**get/set** + +```js +define(obj, 'foo', { + get: function() {}, + set: function() {} +}); +``` + +## Related projects + +* [delegate-object](https://www.npmjs.com/package/delegate-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/delegate-object) | [homepage](https://github.com/doowb/delegate-object) +* [forward-object](https://www.npmjs.com/package/forward-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/forward-object) | [homepage](https://github.com/doowb/forward-object) +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep) +* [mixin-object](https://www.npmjs.com/package/mixin-object): Mixin the own and inherited properties of other objects onto the first object. Pass an… [more](https://www.npmjs.com/package/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/define-property/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 31, 2015._ diff --git a/front/frontend/node_modules/snapdragon/node_modules/define-property/index.js b/front/frontend/node_modules/snapdragon/node_modules/define-property/index.js new file mode 100644 index 0000000..3e0e5e1 --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/define-property/index.js @@ -0,0 +1,31 @@ +/*! + * define-property + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isDescriptor = require('is-descriptor'); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; diff --git a/front/frontend/node_modules/snapdragon/node_modules/define-property/package.json b/front/frontend/node_modules/snapdragon/node_modules/define-property/package.json new file mode 100644 index 0000000..43561bf --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/define-property/package.json @@ -0,0 +1,51 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "0.2.5", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "^7.0.4" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "mixin-deep", + "mixin-object", + "delegate-object", + "forward-object" + ] + } + }, + "dependencies": { + "is-descriptor": "^0.1.0" + } +} diff --git a/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.editorconfig b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.editorconfig new file mode 100644 index 0000000..449f0da --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.eslintrc b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.eslintrc new file mode 100644 index 0000000..24e5090 --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.eslintrc @@ -0,0 +1,16 @@ +{ + "extends": "@ljharb", + + "rules": { + "func-style": "warn", + }, + + "overrides": [ + { + "files": "test/**/*.js", + "rules": { + "max-lines-per-function": "off", + }, + }, + ], +} diff --git a/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.gitattributes b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.gitattributes new file mode 100644 index 0000000..660957e --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.gitattributes @@ -0,0 +1,10 @@ +# Enforce Unix newlines +* text eol=lf + +# binaries +*.ai binary +*.psd binary +*.jpg binary +*.gif binary +*.png binary +*.jpeg binary diff --git a/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.github/FUNDING.yml b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000..37535da --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.nycrc b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/CHANGELOG.md b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/CHANGELOG.md new file mode 100644 index 0000000..4963353 --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/CHANGELOG.md @@ -0,0 +1,144 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.0](https://github.com/inspect-js/is-descriptor/compare/v3.0.0...v3.1.0) - 2023-05-01 + +### Commits + +- [eslint] cleanup [`1f4e8cd`](https://github.com/inspect-js/is-descriptor/commit/1f4e8cdb49b4b15666a782f3f05e6f4f0146b9ab) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`5993285`](https://github.com/inspect-js/is-descriptor/commit/5993285a122ef7bf5b91cba3b486f96a1f94f552) +- [readme] clean up docs, URLs, package.json, etc [`8807164`](https://github.com/inspect-js/is-descriptor/commit/88071644c15d543c7830e6ac00a5ed8531c82750) +- [Docs] remove verb [`0bc26a3`](https://github.com/inspect-js/is-descriptor/commit/0bc26a306f02241e6c5c506e95c53ca828031c05) +- [Tests] convert from mocha to tape [`1604d7f`](https://github.com/inspect-js/is-descriptor/commit/1604d7feebd776b0fb67163e3013cc6d5ab9fd6b) +- [New] increase support from node 6 down to node 0.4 [`7893404`](https://github.com/inspect-js/is-descriptor/commit/789340412f4028d46a3121466a25497716b94402) +- [Tests] add coverage [`1dcc45e`](https://github.com/inspect-js/is-descriptor/commit/1dcc45ed57aebc83ba0588c232663f4164a7d0a8) +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`d1edefe`](https://github.com/inspect-js/is-descriptor/commit/d1edefef56c7eeaab385b1704417b314f197034d) +- [meta] switch from `files` field to npmignore; add `exports` [`c64d3d3`](https://github.com/inspect-js/is-descriptor/commit/c64d3d356d459f2e73198841f93fb902895875b4) + +## [v3.0.0](https://github.com/inspect-js/is-descriptor/compare/v2.0.0...v3.0.0) - 2018-12-13 + +### Commits + +- refactor [`7f7e2c8`](https://github.com/inspect-js/is-descriptor/commit/7f7e2c865674526424f5cd1fb98f0ed7811a67f9) + +## [v2.0.0](https://github.com/inspect-js/is-descriptor/compare/v1.0.3...v2.0.0) - 2017-12-28 + +### Commits + +- run verb to generate readme [`7d97594`](https://github.com/inspect-js/is-descriptor/commit/7d97594666afaa825e0421883507cfec04ceef1d) +- upgrade is-accessor-descriptor [`2e2cb1e`](https://github.com/inspect-js/is-descriptor/commit/2e2cb1e723d2ca1d6b8580d384702700e26dda81) +- run update [`c04832a`](https://github.com/inspect-js/is-descriptor/commit/c04832a3a2bf48bef2ea0f5844652da7d6209242) + +## [v1.0.3](https://github.com/inspect-js/is-descriptor/compare/v1.0.2...v1.0.3) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v1.0.2](https://github.com/inspect-js/is-descriptor/compare/v1.0.1...v1.0.2) - 2017-12-28 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +## [v1.0.1](https://github.com/inspect-js/is-descriptor/compare/v1.0.0...v1.0.1) - 2017-07-22 + +### Commits + +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) + +## [v1.0.0](https://github.com/inspect-js/is-descriptor/compare/v0.1.7...v1.0.0) - 2017-02-25 + +## [v0.1.7](https://github.com/inspect-js/is-descriptor/compare/v0.1.6...v0.1.7) - 2023-10-26 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- v0.x line: v1 and v0 are the same, so, branch v0 from 1.x [`91be723`](https://github.com/inspect-js/is-descriptor/commit/91be72399c3066950d2414a6d2f091e1074625cd) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v0.1.6](https://github.com/inspect-js/is-descriptor/compare/v0.1.5...v0.1.6) - 2017-07-22 + +## [v0.1.5](https://github.com/inspect-js/is-descriptor/compare/v0.1.4...v0.1.5) - 2017-02-25 + +### Merged + +- Bump `lazy-cache`. [`#4`](https://github.com/inspect-js/is-descriptor/pull/4) + +### Commits + +- update docs, fix typos [`bc3cf69`](https://github.com/inspect-js/is-descriptor/commit/bc3cf6915686d4a964997ae7585bf65005bbf955) +- run update [`1956814`](https://github.com/inspect-js/is-descriptor/commit/1956814c67c2033caeaed469ad09e6392dd0799e) + +## [v0.1.4](https://github.com/inspect-js/is-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 + +### Commits + +- allow a key to be passed [`202062b`](https://github.com/inspect-js/is-descriptor/commit/202062b56735525e7def35c8453505778ce9de03) +- update docs [`890fe80`](https://github.com/inspect-js/is-descriptor/commit/890fe80100aa21cac1bee55d6fb4045ffb661ff7) + +## [v0.1.3](https://github.com/inspect-js/is-descriptor/compare/v0.1.2...v0.1.3) - 2015-12-20 + +### Commits + +- lint [`fa81701`](https://github.com/inspect-js/is-descriptor/commit/fa817018aabb6f18e7f09e452b80386775773d42) +- add gulp-format-md to verb config, build readme [`8e6c159`](https://github.com/inspect-js/is-descriptor/commit/8e6c159cfa23b357dbac8f977c3a9421172aafeb) +- update deps [`b7b8321`](https://github.com/inspect-js/is-descriptor/commit/b7b8321e194f4f25c5aa4ff382a0a8ffb6482cc1) + +## [v0.1.2](https://github.com/inspect-js/is-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- files prop [`3aaf1ce`](https://github.com/inspect-js/is-descriptor/commit/3aaf1ce8483bdee217e2f18b293937a09634a33b) + +## [v0.1.1](https://github.com/inspect-js/is-descriptor/compare/v0.1.0...v0.1.1) - 2015-10-04 + +### Merged + +- Update .verb.md [`#1`](https://github.com/inspect-js/is-descriptor/pull/1) + +### Commits + +- adds lazy-caching [`0219f1a`](https://github.com/inspect-js/is-descriptor/commit/0219f1aa95b9ce7c08e0a1e00fe506a572c6ac46) +- 0.1.1 readme [`924a5a7`](https://github.com/inspect-js/is-descriptor/commit/924a5a7a5d648d901b24b7287d9a5d232865f603) +- fix readme [`dd9c431`](https://github.com/inspect-js/is-descriptor/commit/dd9c4315dd61be73f42d07bc71ddb97414dfdbcf) + +## v0.1.0 - 2015-08-31 + +### Commits + +- first commit [`b5d8c39`](https://github.com/inspect-js/is-descriptor/commit/b5d8c39843c98588b67069325a4e6455beb8aef3) +- 0.1.0 readme [`aaffb92`](https://github.com/inspect-js/is-descriptor/commit/aaffb924062d7c588417d9a2184ff1129f8d294a) +- 0.1.0 docs [`eb0da6c`](https://github.com/inspect-js/is-descriptor/commit/eb0da6c548e59ff76f6a80a95ea0a750dab40591) +- use libs [`86ad32f`](https://github.com/inspect-js/is-descriptor/commit/86ad32fe5a07d2705b14bb3e237584c05d60d519) +- lint [`94fbcc9`](https://github.com/inspect-js/is-descriptor/commit/94fbcc9c2a3da1e9b888bad86b9576259d1d7940) diff --git a/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/LICENSE b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/README.md b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/README.md new file mode 100644 index 0000000..fd9ddcf --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/README.md @@ -0,0 +1,134 @@ +# is-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Usage + +```js +const isDescriptor = require('is-descriptor'); +const assert = require('assert'); + +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +``` + +You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument. + +```js +const obj = { foo: 'abc' }; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +assert.equal(isDescriptor(obj, 'foo'), true); +assert.equal(isDescriptor(obj, 'bar'), true); +``` + +## Examples + +### value type + +`false` when not an object + +```js +assert.equal(isDescriptor('a'), false); +assert.equal(isDescriptor(null), false); +assert.equal(isDescriptor([]), false); +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ value() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', get() {} }), false); +assert.equal(isDescriptor({ get() {}, value() {} }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', writable: 'foo' }), false); +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get() {} }), true); +assert.equal(isDescriptor({ set() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'baz' }), false); +assert.equal(isDescriptor({ get() {}, writable: true }), false); +assert.equal(isDescriptor({ get() {}, value: true }), false); +``` + +`false` when an accessor is not a function + +```js +assert.equal(isDescriptor({ get() {}, set: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +assert.equal(isDescriptor({ get: 'foo', bar: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set: 'baz' }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'foo' }), false); +assert.equal(isDescriptor({ set() {}, configurable: 'foo' }), false); +assert.equal(isDescriptor({ get() {}, configurable: 'foo' }), false); +``` + +### Related projects + +You might also be interested in these projects: + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. +* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-descriptor +[actions-url]: https://github.com/inspect-js/is-descriptor/actions diff --git a/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/index.js b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/index.js new file mode 100644 index 0000000..c9dd24d --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + return false; + } + + if ('get' in obj || 'set' in obj) { + return isAccessor(obj, key); + } + + return isData(obj, key); +}; diff --git a/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/package.json b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/package.json new file mode 100644 index 0000000..6d6ca8b --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/package.json @@ -0,0 +1,88 @@ +{ + "name": "is-descriptor", + "version": "0.1.7", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-descriptor.git" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-descriptor", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/test/index.js b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/test/index.js new file mode 100644 index 0000000..0b74a35 --- /dev/null +++ b/front/frontend/node_modules/snapdragon/node_modules/is-descriptor/test/index.js @@ -0,0 +1,116 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('is false when not an object:', function (st) { + st.notOk(isDescriptor('a')); + st.notOk(isDescriptor(null)); + st.notOk(isDescriptor([])); + + st.end(); + }); + + t.test('returns true if the property exists', function (st) { + var obj = { foo: null }; + + Object.defineProperty(obj, 'bar', { + value: 'xyz' + }); + + Object.defineProperty(obj, 'baz', { + get: function () { + return 'aaa'; + } + }); + + st.ok(isDescriptor(obj, 'foo')); + st.ok(isDescriptor(obj, 'bar')); + st.ok(isDescriptor(obj, 'baz')); + + st.end(); + }); + + t.test('data descriptor:', function (st) { + st.test('is false when the object has invalid properties:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', get: noop })); + s2t.notOk(isDescriptor({ get: noop, value: noop })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo' })); + s2t.ok(isDescriptor({ value: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', enumerable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', configurable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', writable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); + + t.test('accessor descriptor:', function (st) { + st.test('should be false when the object has invalid properties:', function (s2t) { + s2t.ok(!isDescriptor({ get: noop, writable: true })); + s2t.ok(!isDescriptor({ get: noop, value: true })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop, bar: 'baz' })); + + s2t.end(); + }); + + st.test('is false when an accessor is not a function:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: noop })); + s2t.notOk(isDescriptor({ get: 'foo', bar: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: 'baz' })); + + s2t.end(); + }); + + st.test('is false when "get" or "set" is not a function', function (s2t) { + s2t.notOk(isDescriptor({ set: 'foo' })); + s2t.notOk(isDescriptor({ get: 'foo' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop })); + s2t.ok(isDescriptor({ get: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: noop, enumerable: 'foo' })); + s2t.notOk(isDescriptor({ set: noop, configurable: 'foo' })); + s2t.notOk(isDescriptor({ get: noop, configurable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); +}); diff --git a/front/frontend/node_modules/snapdragon/package.json b/front/frontend/node_modules/snapdragon/package.json new file mode 100644 index 0000000..e4c4e73 --- /dev/null +++ b/front/frontend/node_modules/snapdragon/package.json @@ -0,0 +1,79 @@ +{ + "name": "snapdragon", + "description": "Fast, pluggable and easy-to-use parser-renderer factory.", + "version": "0.8.2", + "homepage": "https://github.com/jonschlinkert/snapdragon", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Edward Betts (http://edwardbetts.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/snapdragon", + "bugs": { + "url": "https://github.com/jonschlinkert/snapdragon/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "devDependencies": { + "gulp": "^3.9.1", + "gulp-eslint": "^3.0.1", + "gulp-format-md": "^0.1.10", + "gulp-istanbul": "^1.1.1", + "gulp-mocha": "^3.0.1", + "gulp-unused": "^0.2.0", + "mocha": "^3.0.2" + }, + "keywords": [ + "lexer", + "snapdragon" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "description": "These libraries use snapdragon:", + "list": [ + "braces", + "expand-brackets", + "extglob", + "micromatch" + ] + }, + "reflinks": [ + "css", + "pug", + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/source-map-resolve/LICENSE b/front/frontend/node_modules/source-map-resolve/LICENSE new file mode 100644 index 0000000..2ae9757 --- /dev/null +++ b/front/frontend/node_modules/source-map-resolve/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014, 2015, 2016, 2017, 2018, 2019 Simon Lydell +Copyright (c) 2019 ZHAO Jinxiang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/source-map-resolve/changelog.md b/front/frontend/node_modules/source-map-resolve/changelog.md new file mode 100644 index 0000000..7b3f94b --- /dev/null +++ b/front/frontend/node_modules/source-map-resolve/changelog.md @@ -0,0 +1,108 @@ +### Version 0.5.3 (2019-12-28) ### + +- Fixed: base64 encoded source maps now correctly decodes as utf-8. Previously, + non-ASCII characters could end up garbled. Thanks to ZHAO Jinxiang + (@xiaoxiangmoe)! (Note: This fix does not work in old evironments not + supporting both `TextDecoder` and `Uint8Array`.) +- Improved: Reduced size of the npm package. + +### Version 0.5.2 (2018-05-10) ### + +- Improved: Updated the version range of `atob` to disallow depending on `2.0.3` + which as a [security + vulnerability](https://snyk.io/test/npm/atob/2.0.3?severity=high&severity=medium&severity=low). + +### Version 0.5.1 (2017-10-21) ### + +- Fixed: URLs are now decoded before being passed to `read` in Node.js. This + allows reading files with spaces, for example. +- Fixed: Missing or empty `sources` fields (such as `sources: []`) in source + maps are now handled. Previously, such source maps would cause crashes or + callbacks never bing called. Now, an empty result is produced: + + ```js + sourcesResolved: [], + sourcesContent: [] + ``` + +### Version 0.5.0 (2016-02-28) ### + +- Improved: Errors now have a `sourceMapData` property that contain as much as + possible of the intended result of the function up until the error occurred. +- Changed: `resolveSources` and `resolve`, as well as their `*Sync` + alternatives, no longer fail when one single source fails to be fetched. + Instead, the `sourcesContent` array in the result object will contain error + objects for all failed sources, and strings otherwise. (Backwards-incompatible + change.) + +### Version 0.4.0 (2015-08-29) ### + +- Removed: The `ignoreSourceRoot` option of `resolveSources`. It has been + replaced with `sourceRoot: false`. (Backwards-incompatible change.) +- Added: The `sourceRoot` option of `resolveSources`. It not only allows to + ignore the source root, it also lets you replace it. +- Added: The `parseMapToJSON` method. +- Added: The `resolve` method now accepts `null, mapUrl, ...` as arguments, in + addition to the existing signature, which will read `mapUrl` instead of + looking for a sourceMappingURL in the code. + +### Version 0.3.1 (2014-08-16) ### + +- Improved: Updated the source-map-url dependency to 0.3.0. + + +### Version 0.3.0 (2014-07-02) ### + +- Removed: Argument checking. It’s not worth it. (Possibly + backwards-incompatible change.) +- Added: The `sourceRoot` property of source maps may now be ignored, which can + be useful when resolving sources outside of the browser. +- Added: It is now possible to resolve only the URLs of sources, without + reading them. + + +### Version 0.2.0 (2014-06-22) ### + +- Changed: The result of `resolveSources` is now an object, not an array. The + old result array is available in the `sourcesContent` property. + (Backwards-incompatible change.) +- Changed: `sources` has been renamed to `sourcesContent` in the result object + of `resolve`. (Backwards-incompatible change.) +- Added: `resolveSources` now also returns all sources fully resolved, in the + `sourcesResolved` property. +- Added: The result object of `resolve` now contains the `sourcesResolved` + property from `resolveSources`. + + +### Version 0.1.4 (2014-06-16) ### + +- Fixed: `sourcesContent` was mis-typed as `sourceContents`, which meant that + the `sourcesContent` property of source maps never was used when resolving + sources. + + +### Version 0.1.3 (2014-05-06) ### + +- Only documentation and meta-data changes. + + +### Version 0.1.2 (2014-03-23) ### + +- Improved: Source maps starting with `)]}'` are now parsed correctly. The spec + allows source maps to start with that character sequence to prevent XSSI + attacks. + + +### Version 0.1.1 (2014-03-06) ### + +- Improved: Make sourceRoot resolving more sensible. + + A source root such as `/scripts/subdir` is now treated as `/scripts/subdir/` + — that is, as a directory called “subdir”, not a file called “subdir”. + Pointing to a file as source root does not makes sense. + + + +### Version 0.1.0 (2014-03-03) ### + +- Initial release. diff --git a/front/frontend/node_modules/source-map-resolve/lib/decode-uri-component.js b/front/frontend/node_modules/source-map-resolve/lib/decode-uri-component.js new file mode 100644 index 0000000..0739c20 --- /dev/null +++ b/front/frontend/node_modules/source-map-resolve/lib/decode-uri-component.js @@ -0,0 +1,8 @@ +var decodeUriComponent = require("decode-uri-component") + +function customDecodeUriComponent(string) { + // `decodeUriComponent` turns `+` into ` `, but that's not wanted. + return decodeUriComponent(string.replace(/\+/g, "%2B")) +} + +module.exports = customDecodeUriComponent diff --git a/front/frontend/node_modules/source-map-resolve/lib/resolve-url.js b/front/frontend/node_modules/source-map-resolve/lib/resolve-url.js new file mode 100644 index 0000000..e3a86c4 --- /dev/null +++ b/front/frontend/node_modules/source-map-resolve/lib/resolve-url.js @@ -0,0 +1,9 @@ +var url = require("url") + +function resolveUrl(/* ...urls */) { + return Array.prototype.reduce.call(arguments, function(resolved, nextUrl) { + return url.resolve(resolved, nextUrl) + }) +} + +module.exports = resolveUrl diff --git a/front/frontend/node_modules/source-map-resolve/lib/source-map-resolve-node.js b/front/frontend/node_modules/source-map-resolve/lib/source-map-resolve-node.js new file mode 100644 index 0000000..31ec3b2 --- /dev/null +++ b/front/frontend/node_modules/source-map-resolve/lib/source-map-resolve-node.js @@ -0,0 +1,342 @@ +var sourceMappingURL = require("source-map-url") + +var resolveUrl = require("./resolve-url") +var decodeUriComponent = require("./decode-uri-component") +var urix = require("urix") +var atob = require("atob") + + + +function callbackAsync(callback, error, result) { + setImmediate(function() { callback(error, result) }) +} + +function parseMapToJSON(string, data) { + try { + return JSON.parse(string.replace(/^\)\]\}'/, "")) + } catch (error) { + error.sourceMapData = data + throw error + } +} + +function readSync(read, url, data) { + var readUrl = decodeUriComponent(url) + try { + return String(read(readUrl)) + } catch (error) { + error.sourceMapData = data + throw error + } +} + + + +function resolveSourceMap(code, codeUrl, read, callback) { + var mapData + try { + mapData = resolveSourceMapHelper(code, codeUrl) + } catch (error) { + return callbackAsync(callback, error) + } + if (!mapData || mapData.map) { + return callbackAsync(callback, null, mapData) + } + var readUrl = decodeUriComponent(mapData.url) + read(readUrl, function(error, result) { + if (error) { + error.sourceMapData = mapData + return callback(error) + } + mapData.map = String(result) + try { + mapData.map = parseMapToJSON(mapData.map, mapData) + } catch (error) { + return callback(error) + } + callback(null, mapData) + }) +} + +function resolveSourceMapSync(code, codeUrl, read) { + var mapData = resolveSourceMapHelper(code, codeUrl) + if (!mapData || mapData.map) { + return mapData + } + mapData.map = readSync(read, mapData.url, mapData) + mapData.map = parseMapToJSON(mapData.map, mapData) + return mapData +} + +var dataUriRegex = /^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/ + +/** + * The media type for JSON text is application/json. + * + * {@link https://tools.ietf.org/html/rfc8259#section-11 | IANA Considerations } + * + * `text/json` is non-standard media type + */ +var jsonMimeTypeRegex = /^(?:application|text)\/json$/ + +/** + * JSON text exchanged between systems that are not part of a closed ecosystem + * MUST be encoded using UTF-8. + * + * {@link https://tools.ietf.org/html/rfc8259#section-8.1 | Character Encoding} + */ +var jsonCharacterEncoding = "utf-8" + +function base64ToBuf(b64) { + var binStr = atob(b64) + var len = binStr.length + var arr = new Uint8Array(len) + for (var i = 0; i < len; i++) { + arr[i] = binStr.charCodeAt(i) + } + return arr +} + +function decodeBase64String(b64) { + if (typeof TextDecoder === "undefined" || typeof Uint8Array === "undefined") { + return atob(b64) + } + var buf = base64ToBuf(b64); + // Note: `decoder.decode` method will throw a `DOMException` with the + // `"EncodingError"` value when an coding error is found. + var decoder = new TextDecoder(jsonCharacterEncoding, {fatal: true}) + return decoder.decode(buf); +} + +function resolveSourceMapHelper(code, codeUrl) { + codeUrl = urix(codeUrl) + + var url = sourceMappingURL.getFrom(code) + if (!url) { + return null + } + + var dataUri = url.match(dataUriRegex) + if (dataUri) { + var mimeType = dataUri[1] || "text/plain" + var lastParameter = dataUri[2] || "" + var encoded = dataUri[3] || "" + var data = { + sourceMappingURL: url, + url: null, + sourcesRelativeTo: codeUrl, + map: encoded + } + if (!jsonMimeTypeRegex.test(mimeType)) { + var error = new Error("Unuseful data uri mime type: " + mimeType) + error.sourceMapData = data + throw error + } + try { + data.map = parseMapToJSON( + lastParameter === ";base64" ? decodeBase64String(encoded) : decodeURIComponent(encoded), + data + ) + } catch (error) { + error.sourceMapData = data + throw error + } + return data + } + + var mapUrl = resolveUrl(codeUrl, url) + return { + sourceMappingURL: url, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } +} + + + +function resolveSources(map, mapUrl, read, options, callback) { + if (typeof options === "function") { + callback = options + options = {} + } + var pending = map.sources ? map.sources.length : 0 + var result = { + sourcesResolved: [], + sourcesContent: [] + } + + if (pending === 0) { + callbackAsync(callback, null, result) + return + } + + var done = function() { + pending-- + if (pending === 0) { + callback(null, result) + } + } + + resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) { + result.sourcesResolved[index] = fullUrl + if (typeof sourceContent === "string") { + result.sourcesContent[index] = sourceContent + callbackAsync(done, null) + } else { + var readUrl = decodeUriComponent(fullUrl) + read(readUrl, function(error, source) { + result.sourcesContent[index] = error ? error : String(source) + done() + }) + } + }) +} + +function resolveSourcesSync(map, mapUrl, read, options) { + var result = { + sourcesResolved: [], + sourcesContent: [] + } + + if (!map.sources || map.sources.length === 0) { + return result + } + + resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) { + result.sourcesResolved[index] = fullUrl + if (read !== null) { + if (typeof sourceContent === "string") { + result.sourcesContent[index] = sourceContent + } else { + var readUrl = decodeUriComponent(fullUrl) + try { + result.sourcesContent[index] = String(read(readUrl)) + } catch (error) { + result.sourcesContent[index] = error + } + } + } + }) + + return result +} + +var endingSlash = /\/?$/ + +function resolveSourcesHelper(map, mapUrl, options, fn) { + options = options || {} + mapUrl = urix(mapUrl) + var fullUrl + var sourceContent + var sourceRoot + for (var index = 0, len = map.sources.length; index < len; index++) { + sourceRoot = null + if (typeof options.sourceRoot === "string") { + sourceRoot = options.sourceRoot + } else if (typeof map.sourceRoot === "string" && options.sourceRoot !== false) { + sourceRoot = map.sourceRoot + } + // If the sourceRoot is the empty string, it is equivalent to not setting + // the property at all. + if (sourceRoot === null || sourceRoot === '') { + fullUrl = resolveUrl(mapUrl, map.sources[index]) + } else { + // Make sure that the sourceRoot ends with a slash, so that `/scripts/subdir` becomes + // `/scripts/subdir/`, not `/scripts/`. Pointing to a file as source root + // does not make sense. + fullUrl = resolveUrl(mapUrl, sourceRoot.replace(endingSlash, "/"), map.sources[index]) + } + sourceContent = (map.sourcesContent || [])[index] + fn(fullUrl, sourceContent, index) + } +} + + + +function resolve(code, codeUrl, read, options, callback) { + if (typeof options === "function") { + callback = options + options = {} + } + if (code === null) { + var mapUrl = codeUrl + var data = { + sourceMappingURL: null, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + var readUrl = decodeUriComponent(mapUrl) + read(readUrl, function(error, result) { + if (error) { + error.sourceMapData = data + return callback(error) + } + data.map = String(result) + try { + data.map = parseMapToJSON(data.map, data) + } catch (error) { + return callback(error) + } + _resolveSources(data) + }) + } else { + resolveSourceMap(code, codeUrl, read, function(error, mapData) { + if (error) { + return callback(error) + } + if (!mapData) { + return callback(null, null) + } + _resolveSources(mapData) + }) + } + + function _resolveSources(mapData) { + resolveSources(mapData.map, mapData.sourcesRelativeTo, read, options, function(error, result) { + if (error) { + return callback(error) + } + mapData.sourcesResolved = result.sourcesResolved + mapData.sourcesContent = result.sourcesContent + callback(null, mapData) + }) + } +} + +function resolveSync(code, codeUrl, read, options) { + var mapData + if (code === null) { + var mapUrl = codeUrl + mapData = { + sourceMappingURL: null, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + mapData.map = readSync(read, mapUrl, mapData) + mapData.map = parseMapToJSON(mapData.map, mapData) + } else { + mapData = resolveSourceMapSync(code, codeUrl, read) + if (!mapData) { + return null + } + } + var result = resolveSourcesSync(mapData.map, mapData.sourcesRelativeTo, read, options) + mapData.sourcesResolved = result.sourcesResolved + mapData.sourcesContent = result.sourcesContent + return mapData +} + + + +module.exports = { + resolveSourceMap: resolveSourceMap, + resolveSourceMapSync: resolveSourceMapSync, + resolveSources: resolveSources, + resolveSourcesSync: resolveSourcesSync, + resolve: resolve, + resolveSync: resolveSync, + parseMapToJSON: parseMapToJSON +} diff --git a/front/frontend/node_modules/source-map-resolve/package.json b/front/frontend/node_modules/source-map-resolve/package.json new file mode 100644 index 0000000..78b6398 --- /dev/null +++ b/front/frontend/node_modules/source-map-resolve/package.json @@ -0,0 +1,47 @@ +{ + "name": "source-map-resolve", + "version": "0.5.3", + "author": "Simon Lydell", + "license": "MIT", + "description": "Resolve the source map and/or sources for a generated file.", + "keywords": [ + "source map", + "sourcemap", + "source", + "map", + "sourceMappingURL", + "resolve", + "resolver", + "locate", + "locator", + "find", + "finder" + ], + "repository": "lydell/source-map-resolve", + "main": "lib/source-map-resolve-node.js", + "browser": "source-map-resolve.js", + "files": [ + "lib", + "source-map-resolve.js" + ], + "scripts": { + "lint": "jshint lib/ test/", + "unit": "node test/source-map-resolve.js && node test/windows.js", + "test": "npm run lint && npm run unit", + "build": "node generate-source-map-resolve.js" + }, + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + }, + "devDependencies": { + "Base64": "1.1.0", + "jshint": "2.10.3", + "setimmediate": "1.0.5", + "simple-asyncify": "1.0.0", + "tape": "4.12.1" + } +} \ No newline at end of file diff --git a/front/frontend/node_modules/source-map-resolve/readme.md b/front/frontend/node_modules/source-map-resolve/readme.md new file mode 100644 index 0000000..5796ba1 --- /dev/null +++ b/front/frontend/node_modules/source-map-resolve/readme.md @@ -0,0 +1,231 @@ +Overview [![Build Status](https://travis-ci.org/lydell/source-map-resolve.svg?branch=master)](https://travis-ci.org/lydell/source-map-resolve) +======== + +Resolve the source map and/or sources for a generated file. + +```js +var sourceMapResolve = require("source-map-resolve") +var sourceMap = require("source-map") + +var code = [ + "!function(){...}();", + "/*# sourceMappingURL=foo.js.map */" +].join("\n") + +sourceMapResolve.resolveSourceMap(code, "/js/foo.js", fs.readFile, function(error, result) { + if (error) { + return notifyFailure(error) + } + result + // { + // map: {file: "foo.js", mappings: "...", sources: ["/coffee/foo.coffee"], names: []}, + // url: "/js/foo.js.map", + // sourcesRelativeTo: "/js/foo.js.map", + // sourceMappingURL: "foo.js.map" + // } + + sourceMapResolve.resolveSources(result.map, result.sourcesRelativeTo, fs.readFile, function(error, result) { + if (error) { + return notifyFailure(error) + } + result + // { + // sourcesResolved: ["/coffee/foo.coffee"], + // sourcesContent: [""] + // } + }) +}) + +sourceMapResolve.resolve(code, "/js/foo.js", fs.readFile, function(error, result) { + if (error) { + return notifyFailure(error) + } + result + // { + // map: {file: "foo.js", mappings: "...", sources: ["/coffee/foo.coffee"], names: []}, + // url: "/js/foo.js.map", + // sourcesRelativeTo: "/js/foo.js.map", + // sourceMappingURL: "foo.js.map", + // sourcesResolved: ["/coffee/foo.coffee"], + // sourcesContent: [""] + // } + result.map.sourcesContent = result.sourcesContent + var map = new sourceMap.sourceMapConsumer(result.map) + map.sourceContentFor("/coffee/foo.coffee") + // "" +}) +``` + + +Installation +============ + +- `npm install source-map-resolve` +- `bower install source-map-resolve` +- `component install lydell/source-map-resolve` + +Works with CommonJS, AMD and browser globals, through UMD. + +Note: This module requires `setImmediate` and `atob`. +Use polyfills if needed, such as: + +- +- + + +Usage +===== + +### `sourceMapResolve.resolveSourceMap(code, codeUrl, read, callback)` ### + +- `code` is a string of code that may or may not contain a sourceMappingURL + comment. Such a comment is used to resolve the source map. +- `codeUrl` is the url to the file containing `code`. If the sourceMappingURL + is relative, it is resolved against `codeUrl`. +- `read(url, callback)` is a function that reads `url` and responds using + `callback(error, content)`. In Node.js you might want to use `fs.readFile`, + while in the browser you might want to use an asynchronus `XMLHttpRequest`. +- `callback(error, result)` is a function that is invoked with either an error + or `null` and the result. + +The result is an object with the following properties: + +- `map`: The source map for `code`, as an object (not a string). +- `url`: The url to the source map. If the source map came from a data uri, + this property is `null`, since then there is no url to it. +- `sourcesRelativeTo`: The url that the sources of the source map are relative + to. Since the sources are relative to the source map, and the url to the + source map is provided as the `url` property, this property might seem + superfluos. However, remember that the `url` property can be `null` if the + source map came from a data uri. If so, the sources are relative to the file + containing the data uri—`codeUrl`. This property will be identical to the + `url` property or `codeUrl`, whichever is appropriate. This way you can + conveniently resolve the sources without having to think about where the + source map came from. +- `sourceMappingURL`: The url of the sourceMappingURL comment in `code`. + +If `code` contains no sourceMappingURL, the result is `null`. + +### `sourceMapResolve.resolveSources(map, mapUrl, read, [options], callback)` ### + +- `map` is a source map, as an object (not a string). +- `mapUrl` is the url to the file containing `map`. Relative sources in the + source map, if any, are resolved against `mapUrl`. +- `read(url, callback)` is a function that reads `url` and responds using + `callback(error, content)`. In Node.js you might want to use `fs.readFile`, + while in the browser you might want to use an asynchronus `XMLHttpRequest`. +- `options` is an optional object with any of the following properties: + - `sourceRoot`: Override the `sourceRoot` property of the source map, which + might only be relevant when resolving sources in the browser. This lets you + bypass it when using the module outside of a browser, if needed. Pass a + string to replace the `sourceRoot` property with, or `false` to ignore it. + Defaults to `undefined`. +- `callback(error, result)` is a function that is invoked with either an error + or `null` and the result. + +The result is an object with the following properties: + +- `sourcesResolved`: The same as `map.sources`, except all the sources are + fully resolved. +- `sourcesContent`: An array with the contents of all sources in `map.sources`, + in the same order as `map.sources`. If getting the contents of a source fails, + an error object is put into the array instead. + +### `sourceMapResolve.resolve(code, codeUrl, read, [options], callback)` ### + +The arguments are identical to `sourceMapResolve.resolveSourceMap`, except that +you may also provide the same `options` as in `sourceMapResolve.resolveSources`. + +This is a convenience method that first resolves the source map and then its +sources. You could also do this by first calling +`sourceMapResolve.resolveSourceMap` and then `sourceMapResolve.resolveSources`. + +The result is identical to `sourceMapResolve.resolveSourceMap`, with the +properties from `sourceMapResolve.resolveSources` merged into it. + +There is one extra feature available, though. If `code` is `null`, `codeUrl` is +treated as a url to the source map instead of to `code`, and will be read. This +is handy if you _sometimes_ get the source map url from the `SourceMap: ` +header (see the [Notes] section). In this case, the `sourceMappingURL` property +of the result is `null`. + + +[Notes]: #notes + +### `sourceMapResolve.*Sync()` ### + +There are also sync versions of the three previous functions. They are identical +to the async versions, except: + +- They expect a sync reading function. In Node.js you might want to use + `fs.readFileSync`, while in the browser you might want to use a synchronus + `XMLHttpRequest`. +- They throw errors and return the result instead of using a callback. + +`sourceMapResolve.resolveSourcesSync` also accepts `null` as the `read` +parameter. The result is the same as when passing a function as the `read +parameter`, except that the `sourcesContent` property of the result will be an +empty array. In other words, the sources aren’t read. You only get the +`sourcesResolved` property. (This only supported in the synchronus version, since +there is no point doing it asynchronusly.) + +### `sourceMapResolve.parseMapToJSON(string, [data])` ### + +The spec says that if a source map (as a string) starts with `)]}'`, it should +be stripped off. This is to prevent XSSI attacks. This function does that and +returns the result of `JSON.parse`ing what’s left. + +If this function throws `error`, `error.sourceMapData === data`. + +### Errors + +All errors passed to callbacks or thrown by this module have a `sourceMapData` +property that contain as much as possible of the intended result of the function +up until the error occurred. + +Note that while the `map` property of result objects always is an object, +`error.sourceMapData.map` will be a string if parsing that string fails. + + +Note +==== + +This module resolves the source map for a given generated file by looking for a +sourceMappingURL comment. The spec defines yet a way to provide the URL to the +source map: By sending the `SourceMap: ` header along with the generated +file. Since this module doesn’t retrive the generated code for you (instead +_you_ give the generated code to the module), it’s up to you to look for such a +header when you retrieve the file (should the need arise). + + +Development +=========== + +Tests +----- + +First off, run `npm install` to install testing modules and browser polyfills. + +`npm test` lints the code and runs the test suite in Node.js. + +x-package.json5 +--------------- + +package.json, component.json and bower.json are all generated from +x-package.json5 by using [`xpkg`]. Only edit x-package.json5, and remember to +run `xpkg` before commiting! + +[`xpkg`]: https://github.com/kof/node-xpkg + +Generating the browser version +------------------------------ + +source-map-resolve.js is generated from source-map-resolve-node.js and +source-map-resolve-template.js. Only edit the two latter files, _not_ +source-map-resolve.js! To generate it, run `npm run build`. + + +License +======= + +[MIT](LICENSE). diff --git a/front/frontend/node_modules/source-map-resolve/source-map-resolve.js b/front/frontend/node_modules/source-map-resolve/source-map-resolve.js new file mode 100644 index 0000000..282b126 --- /dev/null +++ b/front/frontend/node_modules/source-map-resolve/source-map-resolve.js @@ -0,0 +1,348 @@ +// Note: source-map-resolve.js is generated from source-map-resolve-node.js and +// source-map-resolve-template.js. Only edit the two latter files, _not_ +// source-map-resolve.js! + +void (function(root, factory) { + if (typeof define === "function" && define.amd) { + define(["source-map-url", "resolve-url"], factory) + } else if (typeof exports === "object") { + var sourceMappingURL = require("source-map-url") + var resolveUrl = require("resolve-url") + module.exports = factory(sourceMappingURL, resolveUrl) + } else { + root.sourceMapResolve = factory(root.sourceMappingURL, root.resolveUrl) + } +}(this, function(sourceMappingURL, resolveUrl) { + + function callbackAsync(callback, error, result) { + setImmediate(function() { callback(error, result) }) + } + + function parseMapToJSON(string, data) { + try { + return JSON.parse(string.replace(/^\)\]\}'/, "")) + } catch (error) { + error.sourceMapData = data + throw error + } + } + + function readSync(read, url, data) { + var readUrl = url + try { + return String(read(readUrl)) + } catch (error) { + error.sourceMapData = data + throw error + } + } + + + + function resolveSourceMap(code, codeUrl, read, callback) { + var mapData + try { + mapData = resolveSourceMapHelper(code, codeUrl) + } catch (error) { + return callbackAsync(callback, error) + } + if (!mapData || mapData.map) { + return callbackAsync(callback, null, mapData) + } + var readUrl = mapData.url + read(readUrl, function(error, result) { + if (error) { + error.sourceMapData = mapData + return callback(error) + } + mapData.map = String(result) + try { + mapData.map = parseMapToJSON(mapData.map, mapData) + } catch (error) { + return callback(error) + } + callback(null, mapData) + }) + } + + function resolveSourceMapSync(code, codeUrl, read) { + var mapData = resolveSourceMapHelper(code, codeUrl) + if (!mapData || mapData.map) { + return mapData + } + mapData.map = readSync(read, mapData.url, mapData) + mapData.map = parseMapToJSON(mapData.map, mapData) + return mapData + } + + var dataUriRegex = /^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/ + + /** + * The media type for JSON text is application/json. + * + * {@link https://tools.ietf.org/html/rfc8259#section-11 | IANA Considerations } + * + * `text/json` is non-standard media type + */ + var jsonMimeTypeRegex = /^(?:application|text)\/json$/ + + /** + * JSON text exchanged between systems that are not part of a closed ecosystem + * MUST be encoded using UTF-8. + * + * {@link https://tools.ietf.org/html/rfc8259#section-8.1 | Character Encoding} + */ + var jsonCharacterEncoding = "utf-8" + + function base64ToBuf(b64) { + var binStr = atob(b64) + var len = binStr.length + var arr = new Uint8Array(len) + for (var i = 0; i < len; i++) { + arr[i] = binStr.charCodeAt(i) + } + return arr + } + + function decodeBase64String(b64) { + if (typeof TextDecoder === "undefined" || typeof Uint8Array === "undefined") { + return atob(b64) + } + var buf = base64ToBuf(b64); + // Note: `decoder.decode` method will throw a `DOMException` with the + // `"EncodingError"` value when an coding error is found. + var decoder = new TextDecoder(jsonCharacterEncoding, {fatal: true}) + return decoder.decode(buf); + } + + function resolveSourceMapHelper(code, codeUrl) { + var url = sourceMappingURL.getFrom(code) + if (!url) { + return null + } + + var dataUri = url.match(dataUriRegex) + if (dataUri) { + var mimeType = dataUri[1] || "text/plain" + var lastParameter = dataUri[2] || "" + var encoded = dataUri[3] || "" + var data = { + sourceMappingURL: url, + url: null, + sourcesRelativeTo: codeUrl, + map: encoded + } + if (!jsonMimeTypeRegex.test(mimeType)) { + var error = new Error("Unuseful data uri mime type: " + mimeType) + error.sourceMapData = data + throw error + } + try { + data.map = parseMapToJSON( + lastParameter === ";base64" ? decodeBase64String(encoded) : decodeURIComponent(encoded), + data + ) + } catch (error) { + error.sourceMapData = data + throw error + } + return data + } + + var mapUrl = resolveUrl(codeUrl, url) + return { + sourceMappingURL: url, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + } + + + + function resolveSources(map, mapUrl, read, options, callback) { + if (typeof options === "function") { + callback = options + options = {} + } + var pending = map.sources ? map.sources.length : 0 + var result = { + sourcesResolved: [], + sourcesContent: [] + } + + if (pending === 0) { + callbackAsync(callback, null, result) + return + } + + var done = function() { + pending-- + if (pending === 0) { + callback(null, result) + } + } + + resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) { + result.sourcesResolved[index] = fullUrl + if (typeof sourceContent === "string") { + result.sourcesContent[index] = sourceContent + callbackAsync(done, null) + } else { + var readUrl = fullUrl + read(readUrl, function(error, source) { + result.sourcesContent[index] = error ? error : String(source) + done() + }) + } + }) + } + + function resolveSourcesSync(map, mapUrl, read, options) { + var result = { + sourcesResolved: [], + sourcesContent: [] + } + + if (!map.sources || map.sources.length === 0) { + return result + } + + resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) { + result.sourcesResolved[index] = fullUrl + if (read !== null) { + if (typeof sourceContent === "string") { + result.sourcesContent[index] = sourceContent + } else { + var readUrl = fullUrl + try { + result.sourcesContent[index] = String(read(readUrl)) + } catch (error) { + result.sourcesContent[index] = error + } + } + } + }) + + return result + } + + var endingSlash = /\/?$/ + + function resolveSourcesHelper(map, mapUrl, options, fn) { + options = options || {} + var fullUrl + var sourceContent + var sourceRoot + for (var index = 0, len = map.sources.length; index < len; index++) { + sourceRoot = null + if (typeof options.sourceRoot === "string") { + sourceRoot = options.sourceRoot + } else if (typeof map.sourceRoot === "string" && options.sourceRoot !== false) { + sourceRoot = map.sourceRoot + } + // If the sourceRoot is the empty string, it is equivalent to not setting + // the property at all. + if (sourceRoot === null || sourceRoot === '') { + fullUrl = resolveUrl(mapUrl, map.sources[index]) + } else { + // Make sure that the sourceRoot ends with a slash, so that `/scripts/subdir` becomes + // `/scripts/subdir/`, not `/scripts/`. Pointing to a file as source root + // does not make sense. + fullUrl = resolveUrl(mapUrl, sourceRoot.replace(endingSlash, "/"), map.sources[index]) + } + sourceContent = (map.sourcesContent || [])[index] + fn(fullUrl, sourceContent, index) + } + } + + + + function resolve(code, codeUrl, read, options, callback) { + if (typeof options === "function") { + callback = options + options = {} + } + if (code === null) { + var mapUrl = codeUrl + var data = { + sourceMappingURL: null, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + var readUrl = mapUrl + read(readUrl, function(error, result) { + if (error) { + error.sourceMapData = data + return callback(error) + } + data.map = String(result) + try { + data.map = parseMapToJSON(data.map, data) + } catch (error) { + return callback(error) + } + _resolveSources(data) + }) + } else { + resolveSourceMap(code, codeUrl, read, function(error, mapData) { + if (error) { + return callback(error) + } + if (!mapData) { + return callback(null, null) + } + _resolveSources(mapData) + }) + } + + function _resolveSources(mapData) { + resolveSources(mapData.map, mapData.sourcesRelativeTo, read, options, function(error, result) { + if (error) { + return callback(error) + } + mapData.sourcesResolved = result.sourcesResolved + mapData.sourcesContent = result.sourcesContent + callback(null, mapData) + }) + } + } + + function resolveSync(code, codeUrl, read, options) { + var mapData + if (code === null) { + var mapUrl = codeUrl + mapData = { + sourceMappingURL: null, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + mapData.map = readSync(read, mapUrl, mapData) + mapData.map = parseMapToJSON(mapData.map, mapData) + } else { + mapData = resolveSourceMapSync(code, codeUrl, read) + if (!mapData) { + return null + } + } + var result = resolveSourcesSync(mapData.map, mapData.sourcesRelativeTo, read, options) + mapData.sourcesResolved = result.sourcesResolved + mapData.sourcesContent = result.sourcesContent + return mapData + } + + + + return { + resolveSourceMap: resolveSourceMap, + resolveSourceMapSync: resolveSourceMapSync, + resolveSources: resolveSources, + resolveSourcesSync: resolveSourcesSync, + resolve: resolve, + resolveSync: resolveSync, + parseMapToJSON: parseMapToJSON + } + +})); diff --git a/front/frontend/node_modules/source-map-url/LICENSE b/front/frontend/node_modules/source-map-url/LICENSE new file mode 100644 index 0000000..10052a9 --- /dev/null +++ b/front/frontend/node_modules/source-map-url/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Lydell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/source-map-url/changelog.md b/front/frontend/node_modules/source-map-url/changelog.md new file mode 100644 index 0000000..61f1c7b --- /dev/null +++ b/front/frontend/node_modules/source-map-url/changelog.md @@ -0,0 +1,57 @@ +### Version 0.4.1 (2021-02-01) ### + +- Improved: The package is now about 50% smaller, by excluding unnecessary + files. Thanks to Piotr Kuczynski (@pkuczynski)! + +### Version 0.4.0 (2015-11-12) ### + +- Changed: sourceMappingURL comments used to be matched only when placed at + the end of the script. However, since several commonly used JavaScript + libraries do not follow this convention and all popular web browsers accept + non-trailing comments, this has been revised. + + So now non-trailing SourceMappingURL comments are matched as well. + + +### Version 0.3.0 (2014-08-16) ### + +- Changed: sourceMappingURL comments used to be matched only if they appeared + on their own line. However, the spec only says: + + > The generated code may include a line at the end of the source, with the following form: + > + > //# sourceMappingURL= + + So now they are matched also when they appear on the same line as code. + +- Removed: The `.set()` method. I couldn’t decide how it should work + considering the above change. Moreover, it was unnecessarily complex (and + would have gotten worse) for very little gain. It is much easier to run + `.remove()` if needed, and then simply `code += "\n//# sourceMappingURL=" + + url` (using the appropriate comment syntax and newline). KISS. + +- Changed: The `.insertBefore()` method now always inserts the string exactly + before the sourceMappingURL comment; not before the newline before the + comment (if any). Moreover, it does not ensure that the comment will be on a + new line anymore. This is up to the caller. KISS. + +- Changed: The `.remove()` method no longer removes the newline before the + sourceMappingURL (if any). + +- Changed: Renamed `.get()` to `.getFrom()`. +- Changed: Renamed `.remove()` to `.removeFrom()`. + +- Added: The `.existsIn()` method. + + +### Version 0.2.0 (2014-02-23) ### + +- Changed: A space is no longer inserted before the closing comment syntax. If + such a space is desired, it needs to be put in the closing comment syntax + itself (such as `["/*", " */"]` instead of `["/*", "*/"]`). (Backwards + incompatible change.) + + +### Version 0.1.0 (2014-02-22) ### + +- Initial release. diff --git a/front/frontend/node_modules/source-map-url/package.json b/front/frontend/node_modules/source-map-url/package.json new file mode 100644 index 0000000..6fd96d3 --- /dev/null +++ b/front/frontend/node_modules/source-map-url/package.json @@ -0,0 +1,39 @@ +{ + "name": "source-map-url", + "version": "0.4.1", + "author": "Simon Lydell", + "license": "MIT", + "description": "Tools for working with sourceMappingURL comments.", + "keywords": [ + "source map", + "sourceMappingURL", + "comment", + "annotation" + ], + "main": "source-map-url.js", + "repository": "lydell/source-map-url", + "scripts": { + "lint": "jshint source-map-url.js test/ ", + "unit": "mocha", + "test": "npm run lint && npm run unit" + }, + "devDependencies": { + "mocha": "~1.17.1", + "expect.js": "~0.3.1", + "jshint": "~2.4.3" + }, + "testling": { + "harness": "mocha", + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "chrome/latest", + "firefox/latest", + "opera/12", + "opera/latest", + "safari/5", + "iphone/6", + "android-browser/4" + ] + } +} diff --git a/front/frontend/node_modules/source-map-url/readme.md b/front/frontend/node_modules/source-map-url/readme.md new file mode 100644 index 0000000..216de5e --- /dev/null +++ b/front/frontend/node_modules/source-map-url/readme.md @@ -0,0 +1,97 @@ +Overview [![Build Status](https://travis-ci.org/lydell/source-map-url.png?branch=master)](https://travis-ci.org/lydell/source-map-url) +======== + +[![browser support](https://ci.testling.com/lydell/source-map-url.png)](https://ci.testling.com/lydell/source-map-url) + +Tools for working with sourceMappingURL comments. + +```js +var sourceMappingURL = require("source-map-url") + +var code = [ + "!function(){...}();", + "/*# sourceMappingURL=foo.js.map */" +].join("\n") + +sourceMappingURL.existsIn(code) +// true + +sourceMappingURL.getFrom(code) +// foo.js.map + +code = sourceMappingURL.insertBefore(code, "// License: MIT\n") +// !function(){...}(); +// // License: MIT +// /*# sourceMappingURL=foo.js.map */ + +code = sourceMappingURL.removeFrom(code) +// !function(){...}(); +// // License: MIT + +sourceMappingURL.existsIn(code) +// false + +sourceMappingURL.getFrom(code) +// null + +code += "//# sourceMappingURL=/other/file.js.map" +// !function(){...}(); +// // License: MIT +// //# sourceMappingURL=/other/file.js.map +``` + + +Installation +============ + +- `npm install source-map-url` +- `bower install source-map-url` +- `component install lydell/source-map-url` + +Works with CommonJS, AMD and browser globals, through UMD. + + +Usage +===== + +### `sourceMappingURL.getFrom(code)` ### + +Returns the url of the sourceMappingURL comment in `code`. Returns `null` if +there is no such comment. + +### `sourceMappingURL.existsIn(code)` ### + +Returns `true` if there is a sourceMappingURL comment in `code`, or `false` +otherwise. + +### `sourceMappingURL.removeFrom(code)` ### + +Removes the sourceMappingURL comment in `code`. Does nothing if there is no +such comment. Returns the updated `code`. + +### `sourceMappingURL.insertBefore(code, string)` ### + +Inserts `string` before the sourceMappingURL comment in `code`. Appends +`string` to `code` if there is no such comment. + +Lets you append something to a file without worrying about burying the +sourceMappingURL comment (by keeping it at the end of the file). + +### `sourceMappingURL.regex` ### + +The regex that is used to match sourceMappingURL comments. It matches both `//` +and `/**/` comments, thus supporting both JavaScript and CSS. + + +Tests +===== + +Start by running `npm test`, which lints the code and runs the test suite in Node.js. + +To run the tests in a browser, run `testling` (`npm install -g testling`) or `testling -u`. + + +License +======= + +[The X11 (“MIT”) License](LICENSE). diff --git a/front/frontend/node_modules/source-map-url/source-map-url.js b/front/frontend/node_modules/source-map-url/source-map-url.js new file mode 100644 index 0000000..1724cb7 --- /dev/null +++ b/front/frontend/node_modules/source-map-url/source-map-url.js @@ -0,0 +1,57 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +void (function(root, factory) { + if (typeof define === "function" && define.amd) { + define(factory) + } else if (typeof exports === "object") { + module.exports = factory() + } else { + root.sourceMappingURL = factory() + } +}(this, function() { + + var innerRegex = /[#@] sourceMappingURL=([^\s'"]*)/ + + var regex = RegExp( + "(?:" + + "/\\*" + + "(?:\\s*\r?\n(?://)?)?" + + "(?:" + innerRegex.source + ")" + + "\\s*" + + "\\*/" + + "|" + + "//(?:" + innerRegex.source + ")" + + ")" + + "\\s*" + ) + + return { + + regex: regex, + _innerRegex: innerRegex, + + getFrom: function(code) { + var match = code.match(regex) + return (match ? match[1] || match[2] || "" : null) + }, + + existsIn: function(code) { + return regex.test(code) + }, + + removeFrom: function(code) { + return code.replace(regex, "") + }, + + insertBefore: function(code, string) { + var match = code.match(regex) + if (match) { + return code.slice(0, match.index) + string + code.slice(match.index) + } else { + return code + string + } + } + } + +})); diff --git a/front/frontend/node_modules/source-map/CHANGELOG.md b/front/frontend/node_modules/source-map/CHANGELOG.md new file mode 100644 index 0000000..3a8c066 --- /dev/null +++ b/front/frontend/node_modules/source-map/CHANGELOG.md @@ -0,0 +1,301 @@ +# Change Log + +## 0.5.6 + +* Fix for regression when people were using numbers as names in source maps. See + #236. + +## 0.5.5 + +* Fix "regression" of unsupported, implementation behavior that half the world + happens to have come to depend on. See #235. + +* Fix regression involving function hoisting in SpiderMonkey. See #233. + +## 0.5.4 + +* Large performance improvements to source-map serialization. See #228 and #229. + +## 0.5.3 + +* Do not include unnecessary distribution files. See + commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86. + +## 0.5.2 + +* Include browser distributions of the library in package.json's `files`. See + issue #212. + +## 0.5.1 + +* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See + ff05274becc9e6e1295ed60f3ea090d31d843379. + +## 0.5.0 + +* Node 0.8 is no longer supported. + +* Use webpack instead of dryice for bundling. + +* Big speedups serializing source maps. See pull request #203. + +* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that + explicitly start with the source root. See issue #199. + +## 0.4.4 + +* Fix an issue where using a `SourceMapGenerator` after having created a + `SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See + issue #191. + +* Fix an issue with where `SourceMapGenerator` would mistakenly consider + different mappings as duplicates of each other and avoid generating them. See + issue #192. + +## 0.4.3 + +* A very large number of performance improvements, particularly when parsing + source maps. Collectively about 75% of time shaved off of the source map + parsing benchmark! + +* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy + searching in the presence of a column option. See issue #177. + +* Fix a bug with joining a source and its source root when the source is above + the root. See issue #182. + +* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to + determine when all sources' contents are inlined into the source map. See + issue #190. + +## 0.4.2 + +* Add an `.npmignore` file so that the benchmarks aren't pulled down by + dependent projects. Issue #169. + +* Add an optional `column` argument to + `SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines + with no mappings. Issues #172 and #173. + +## 0.4.1 + +* Fix accidentally defining a global variable. #170. + +## 0.4.0 + +* The default direction for fuzzy searching was changed back to its original + direction. See #164. + +* There is now a `bias` option you can supply to `SourceMapConsumer` to control + the fuzzy searching direction. See #167. + +* About an 8% speed up in parsing source maps. See #159. + +* Added a benchmark for parsing and generating source maps. + +## 0.3.0 + +* Change the default direction that searching for positions fuzzes when there is + not an exact match. See #154. + +* Support for environments using json2.js for JSON serialization. See #156. + +## 0.2.0 + +* Support for consuming "indexed" source maps which do not have any remote + sections. See pull request #127. This introduces a minor backwards + incompatibility if you are monkey patching `SourceMapConsumer.prototype` + methods. + +## 0.1.43 + +* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue + #148 for some discussion and issues #150, #151, and #152 for implementations. + +## 0.1.42 + +* Fix an issue where `SourceNode`s from different versions of the source-map + library couldn't be used in conjunction with each other. See issue #142. + +## 0.1.41 + +* Fix a bug with getting the source content of relative sources with a "./" + prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768). + +* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the + column span of each mapping. + +* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find + all generated positions associated with a given original source and line. + +## 0.1.40 + +* Performance improvements for parsing source maps in SourceMapConsumer. + +## 0.1.39 + +* Fix a bug where setting a source's contents to null before any source content + had been set before threw a TypeError. See issue #131. + +## 0.1.38 + +* Fix a bug where finding relative paths from an empty path were creating + absolute paths. See issue #129. + +## 0.1.37 + +* Fix a bug where if the source root was an empty string, relative source paths + would turn into absolute source paths. Issue #124. + +## 0.1.36 + +* Allow the `names` mapping property to be an empty string. Issue #121. + +## 0.1.35 + +* A third optional parameter was added to `SourceNode.fromStringWithSourceMap` + to specify a path that relative sources in the second parameter should be + relative to. Issue #105. + +* If no file property is given to a `SourceMapGenerator`, then the resulting + source map will no longer have a `null` file property. The property will + simply not exist. Issue #104. + +* Fixed a bug where consecutive newlines were ignored in `SourceNode`s. + Issue #116. + +## 0.1.34 + +* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. + +* Fix bug involving source contents and the + `SourceMapGenerator.prototype.applySourceMap`. Issue #100. + +## 0.1.33 + +* Fix some edge cases surrounding path joining and URL resolution. + +* Add a third parameter for relative path to + `SourceMapGenerator.prototype.applySourceMap`. + +* Fix issues with mappings and EOLs. + +## 0.1.32 + +* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns + (issue 92). + +* Fixed test runner to actually report number of failed tests as its process + exit code. + +* Fixed a typo when reporting bad mappings (issue 87). + +## 0.1.31 + +* Delay parsing the mappings in SourceMapConsumer until queried for a source + location. + +* Support Sass source maps (which at the time of writing deviate from the spec + in small ways) in SourceMapConsumer. + +## 0.1.30 + +* Do not join source root with a source, when the source is a data URI. + +* Extend the test runner to allow running single specific test files at a time. + +* Performance improvements in `SourceNode.prototype.walk` and + `SourceMapConsumer.prototype.eachMapping`. + +* Source map browser builds will now work inside Workers. + +* Better error messages when attempting to add an invalid mapping to a + `SourceMapGenerator`. + +## 0.1.29 + +* Allow duplicate entries in the `names` and `sources` arrays of source maps + (usually from TypeScript) we are parsing. Fixes github issue 72. + +## 0.1.28 + +* Skip duplicate mappings when creating source maps from SourceNode; github + issue 75. + +## 0.1.27 + +* Don't throw an error when the `file` property is missing in SourceMapConsumer, + we don't use it anyway. + +## 0.1.26 + +* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. + +## 0.1.25 + +* Make compatible with browserify + +## 0.1.24 + +* Fix issue with absolute paths and `file://` URIs. See + https://bugzilla.mozilla.org/show_bug.cgi?id=885597 + +## 0.1.23 + +* Fix issue with absolute paths and sourcesContent, github issue 64. + +## 0.1.22 + +* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. + +## 0.1.21 + +* Fixed handling of sources that start with a slash so that they are relative to + the source root's host. + +## 0.1.20 + +* Fixed github issue #43: absolute URLs aren't joined with the source root + anymore. + +## 0.1.19 + +* Using Travis CI to run tests. + +## 0.1.18 + +* Fixed a bug in the handling of sourceRoot. + +## 0.1.17 + +* Added SourceNode.fromStringWithSourceMap. + +## 0.1.16 + +* Added missing documentation. + +* Fixed the generating of empty mappings in SourceNode. + +## 0.1.15 + +* Added SourceMapGenerator.applySourceMap. + +## 0.1.14 + +* The sourceRoot is now handled consistently. + +## 0.1.13 + +* Added SourceMapGenerator.fromSourceMap. + +## 0.1.12 + +* SourceNode now generates empty mappings too. + +## 0.1.11 + +* Added name support to SourceNode. + +## 0.1.10 + +* Added sourcesContent support to the customer and generator. diff --git a/front/frontend/node_modules/source-map/LICENSE b/front/frontend/node_modules/source-map/LICENSE new file mode 100644 index 0000000..ed1b7cf --- /dev/null +++ b/front/frontend/node_modules/source-map/LICENSE @@ -0,0 +1,28 @@ + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/front/frontend/node_modules/source-map/README.md b/front/frontend/node_modules/source-map/README.md new file mode 100644 index 0000000..3281339 --- /dev/null +++ b/front/frontend/node_modules/source-map/README.md @@ -0,0 +1,729 @@ +# Source Map + +[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) + +[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map) + +This is a library to generate and consume the source map format +[described here][format]. + +[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit + +## Use with Node + + $ npm install source-map + +## Use on the Web + + + +-------------------------------------------------------------------------------- + + + + + +## Table of Contents + +- [Examples](#examples) + - [Consuming a source map](#consuming-a-source-map) + - [Generating a source map](#generating-a-source-map) + - [With SourceNode (high level API)](#with-sourcenode-high-level-api) + - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) +- [API](#api) + - [SourceMapConsumer](#sourcemapconsumer) + - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) + - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) + - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) + - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) + - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) + - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) + - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) + - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) + - [SourceMapGenerator](#sourcemapgenerator) + - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) + - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) + - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) + - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) + - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) + - [SourceNode](#sourcenode) + - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) + - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) + - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) + - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) + - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) + - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) + - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) + - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) + - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) + - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) + + + +## Examples + +### Consuming a source map + +```js +var rawSourceMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: 'http://example.com/www/js/', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' +}; + +var smc = new SourceMapConsumer(rawSourceMap); + +console.log(smc.sources); +// [ 'http://example.com/www/js/one.js', +// 'http://example.com/www/js/two.js' ] + +console.log(smc.originalPositionFor({ + line: 2, + column: 28 +})); +// { source: 'http://example.com/www/js/two.js', +// line: 2, +// column: 10, +// name: 'n' } + +console.log(smc.generatedPositionFor({ + source: 'http://example.com/www/js/two.js', + line: 2, + column: 10 +})); +// { line: 2, column: 28 } + +smc.eachMapping(function (m) { + // ... +}); +``` + +### Generating a source map + +In depth guide: +[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) + +#### With SourceNode (high level API) + +```js +function compile(ast) { + switch (ast.type) { + case 'BinaryExpression': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + [compile(ast.left), " + ", compile(ast.right)] + ); + case 'Literal': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + String(ast.value) + ); + // ... + default: + throw new Error("Bad AST"); + } +} + +var ast = parse("40 + 2", "add.js"); +console.log(compile(ast).toStringWithSourceMap({ + file: 'add.js' +})); +// { code: '40 + 2', +// map: [object SourceMapGenerator] } +``` + +#### With SourceMapGenerator (low level API) + +```js +var map = new SourceMapGenerator({ + file: "source-mapped.js" +}); + +map.addMapping({ + generated: { + line: 10, + column: 35 + }, + source: "foo.js", + original: { + line: 33, + column: 2 + }, + name: "christopher" +}); + +console.log(map.toString()); +// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' +``` + +## API + +Get a reference to the module: + +```js +// Node.js +var sourceMap = require('source-map'); + +// Browser builds +var sourceMap = window.sourceMap; + +// Inside Firefox +const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); +``` + +### SourceMapConsumer + +A SourceMapConsumer instance represents a parsed source map which we can query +for information about the original file positions by giving it a file position +in the generated source. + +#### new SourceMapConsumer(rawSourceMap) + +The only parameter is the raw source map (either as a string which can be +`JSON.parse`'d, or an object). According to the spec, source maps have the +following attributes: + +* `version`: Which version of the source map spec this map is following. + +* `sources`: An array of URLs to the original source files. + +* `names`: An array of identifiers which can be referenced by individual + mappings. + +* `sourceRoot`: Optional. The URL root from which all sources are relative. + +* `sourcesContent`: Optional. An array of contents of the original source files. + +* `mappings`: A string of base64 VLQs which contain the actual mappings. + +* `file`: Optional. The generated filename this source map is associated with. + +```js +var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); +``` + +#### SourceMapConsumer.prototype.computeColumnSpans() + +Compute the last column for each generated mapping. The last column is +inclusive. + +```js +// Before: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] + +consumer.computeColumnSpans(); + +// After: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1, +// lastColumn: 9 }, +// { line: 2, +// column: 10, +// lastColumn: 19 }, +// { line: 2, +// column: 20, +// lastColumn: Infinity } ] + +``` + +#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) + +Returns the original source, line, and column information for the generated +source's line and column positions provided. The only argument is an object with +the following properties: + +* `line`: The line number in the generated source. + +* `column`: The column number in the generated source. + +* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or + `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest + element that is smaller than or greater than the one we are searching for, + respectively, if the exact element cannot be found. Defaults to + `SourceMapConsumer.GREATEST_LOWER_BOUND`. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. + +* `column`: The column number in the original source, or null if this + information is not available. + +* `name`: The original identifier, or null if this information is not available. + +```js +consumer.originalPositionFor({ line: 2, column: 10 }) +// { source: 'foo.coffee', +// line: 2, +// column: 2, +// name: null } + +consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) +// { source: null, +// line: null, +// column: null, +// name: null } +``` + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +* `column`: The column number in the original source. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +```js +consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) +// { line: 1, +// column: 56 } +``` + +#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) + +Returns all generated line and column information for the original source, line, +and column provided. If no column is provided, returns all mappings +corresponding to a either the line we are searching for or the next closest line +that has any mappings. Otherwise, returns all mappings corresponding to the +given line and either the column we are searching for or the next closest column +that has any offsets. + +The only argument is an object with the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +* `column`: Optional. The column number in the original source. + +and an array of objects is returned, each with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +```js +consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] +``` + +#### SourceMapConsumer.prototype.hasContentsOfAllSources() + +Return true if we have the embedded source content for every source listed in +the source map, false otherwise. + +In other words, if this method returns `true`, then +`consumer.sourceContentFor(s)` will succeed for every source `s` in +`consumer.sources`. + +```js +// ... +if (consumer.hasContentsOfAllSources()) { + consumerReadyCallback(consumer); +} else { + fetchSources(consumer, consumerReadyCallback); +} +// ... +``` + +#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +If the source content for the given source is not found, then an error is +thrown. Optionally, pass `true` as the second param to have `null` returned +instead. + +```js +consumer.sources +// [ "my-cool-lib.clj" ] + +consumer.sourceContentFor("my-cool-lib.clj") +// "..." + +consumer.sourceContentFor("this is not in the source map"); +// Error: "this is not in the source map" is not in the source map + +consumer.sourceContentFor("this is not in the source map", true); +// null +``` + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +```js +consumer.eachMapping(function (m) { console.log(m); }) +// ... +// { source: 'illmatic.js', +// generatedLine: 1, +// generatedColumn: 0, +// originalLine: 1, +// originalColumn: 0, +// name: null } +// { source: 'illmatic.js', +// generatedLine: 2, +// generatedColumn: 0, +// originalLine: 2, +// originalColumn: 0, +// name: null } +// ... +``` +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +* `skipValidation`: Optional. When `true`, disables validation of mappings as + they are added. This can improve performance but should be used with + discretion, as a last resort. Even then, one should avoid using this flag when + running tests, if possible. + +```js +var generator = new sourceMap.SourceMapGenerator({ + file: "my-generated-javascript-file.js", + sourceRoot: "http://example.com/app/js/" +}); +``` + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) + +Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. + +* `sourceMapConsumer` The SourceMap. + +```js +var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); +``` + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +```js +generator.addMapping({ + source: "module-one.scm", + original: { line: 128, column: 0 }, + generated: { line: 3, column: 456 } +}) +``` + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +```js +generator.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimum of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +```js +generator.toString() +// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' +``` + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +```js +var node = new SourceNode(1, 2, "a.cpp", [ + new SourceNode(3, 4, "b.cpp", "extern int status;\n"), + new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), + new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), +]); +``` + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + +```js +var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); +var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), + consumer); +``` + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.add(" + "); +node.add(otherNode); +node.add([leftHandOperandNode, " + ", rightHandOperandNode]); +``` + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.prepend("/** Build Id: f783haef86324gf **/\n\n"); +``` + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +```js +node.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.walk(function (code, loc) { console.log("WALK:", code, loc); }) +// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } +// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } +// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } +// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } +``` + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +```js +var a = new SourceNode(1, 2, "a.js", "generated from a"); +a.setSourceContent("a.js", "original a"); +var b = new SourceNode(1, 2, "b.js", "generated from b"); +b.setSourceContent("b.js", "original b"); +var c = new SourceNode(1, 2, "c.js", "generated from c"); +c.setSourceContent("c.js", "original c"); + +var node = new SourceNode(null, null, null, [a, b, c]); +node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) +// WALK: a.js : original a +// WALK: b.js : original b +// WALK: c.js : original c +``` + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +```js +var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); +var operand = new SourceNode(3, 4, "a.rs", "="); +var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); + +var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); +var joinedNode = node.join(" "); +``` + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming white space from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +```js +// Trim trailing white space. +node.replaceRight(/\s*$/, ""); +``` + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toString() +// 'unodostresquatro' +``` + +#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toStringWithSourceMap({ file: "my-output-file.js" }) +// { code: 'unodostresquatro', +// map: [object SourceMapGenerator] } +``` diff --git a/front/frontend/node_modules/source-map/dist/source-map.debug.js b/front/frontend/node_modules/source-map/dist/source-map.debug.js new file mode 100644 index 0000000..b5ab638 --- /dev/null +++ b/front/frontend/node_modules/source-map/dist/source-map.debug.js @@ -0,0 +1,3091 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["sourceMap"] = factory(); + else + root["sourceMap"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; +/******/ +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; + exports.SourceNode = __webpack_require__(10).SourceNode; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = __webpack_require__(2); + var util = __webpack_require__(4); + var ArraySet = __webpack_require__(5).ArraySet; + var MappingList = __webpack_require__(6).MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = __webpack_require__(3); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var binarySearch = __webpack_require__(8); + var ArraySet = __webpack_require__(5).ArraySet; + var base64VLQ = __webpack_require__(2); + var quickSort = __webpack_require__(9).quickSort; + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + var util = __webpack_require__(4); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + + +/***/ }) +/******/ ]) +}); +; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBlNDczOGZjNzJhN2IyMzAzOTg4OSIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LXZscS5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LmpzIiwid2VicGFjazovLy8uL2xpYi91dGlsLmpzIiwid2VicGFjazovLy8uL2xpYi9hcnJheS1zZXQuanMiLCJ3ZWJwYWNrOi8vLy4vbGliL21hcHBpbmctbGlzdC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmluYXJ5LXNlYXJjaC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvcXVpY2stc29ydC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW5vZGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQztBQUNELE87QUNWQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx1QkFBZTtBQUNmO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOzs7Ozs7O0FDdENBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNQQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxVQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsTUFBSztBQUNMO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsMkNBQTBDLFNBQVM7QUFDbkQ7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOzs7Ozs7O0FDL1pBLGlCQUFnQixvQkFBb0I7QUFDcEM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDREQUEyRDtBQUMzRCxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHOztBQUVIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRzs7QUFFSDtBQUNBO0FBQ0E7Ozs7Ozs7QUMzSUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWdCO0FBQ2hCLGlCQUFnQjs7QUFFaEIsb0JBQW1CO0FBQ25CLHFCQUFvQjs7QUFFcEIsaUJBQWdCO0FBQ2hCLGlCQUFnQjs7QUFFaEIsaUJBQWdCO0FBQ2hCLGtCQUFpQjs7QUFFakI7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNsRUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0EsSUFBRztBQUNIO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsK0NBQThDLFFBQVE7QUFDdEQ7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLDRCQUEyQixRQUFRO0FBQ25DO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNoYUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdUNBQXNDLFNBQVM7QUFDL0M7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQ3hIQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWdCO0FBQ2hCOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUc7QUFDSDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQzlFQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSx1REFBc0Q7QUFDdEQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQSxvQkFBbUI7QUFDbkI7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFlBQVc7O0FBRVg7QUFDQTtBQUNBLFFBQU87QUFDUDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBVzs7QUFFWDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsNEJBQTJCLE1BQU07QUFDakM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx1REFBc0Q7QUFDdEQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7O0FBRUw7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBLHVEQUFzRCxZQUFZO0FBQ2xFO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBLEVBQUM7O0FBRUQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0Esb0NBQW1DO0FBQ25DO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwwQkFBeUIsY0FBYztBQUN2QztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esd0JBQXVCLHdDQUF3QztBQUMvRDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZ0RBQStDLG1CQUFtQixFQUFFO0FBQ3BFOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGtCQUFpQixvQkFBb0I7QUFDckM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDhCQUE2QixNQUFNO0FBQ25DO0FBQ0EsUUFBTztBQUNQO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdURBQXNEO0FBQ3REOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTtBQUNBLElBQUc7QUFDSDs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUMsc0JBQXFCLCtDQUErQztBQUNwRTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsUUFBTztBQUNQOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esb0JBQW1CLDJCQUEyQjtBQUM5Qzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxvQkFBbUIsMkJBQTJCO0FBQzlDOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUM7QUFDQTtBQUNBLHNCQUFxQiw0QkFBNEI7QUFDakQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBOzs7Ozs7O0FDempDQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7Ozs7OztBQzlHQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFlBQVcsTUFBTTtBQUNqQjtBQUNBLFlBQVcsT0FBTztBQUNsQjtBQUNBLFlBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLFNBQVM7QUFDcEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQixPQUFPO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLFNBQVM7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQ2pIQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLOztBQUVMOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxrQ0FBaUMsUUFBUTtBQUN6QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSw4Q0FBNkMsU0FBUztBQUN0RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBLHVDQUFzQztBQUN0QztBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnQkFBZSxXQUFXO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnREFBK0MsU0FBUztBQUN4RDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLDBDQUF5QyxTQUFTO0FBQ2xEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBVztBQUNYO0FBQ0E7QUFDQTtBQUNBLFlBQVc7QUFDWDtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQSw2Q0FBNEMsY0FBYztBQUMxRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsY0FBYTtBQUNiO0FBQ0E7QUFDQTtBQUNBLGNBQWE7QUFDYjtBQUNBLFlBQVc7QUFDWDtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBLElBQUc7O0FBRUgsV0FBVTtBQUNWOztBQUVBIiwiZmlsZSI6InNvdXJjZS1tYXAuZGVidWcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIoZnVuY3Rpb24gd2VicGFja1VuaXZlcnNhbE1vZHVsZURlZmluaXRpb24ocm9vdCwgZmFjdG9yeSkge1xuXHRpZih0eXBlb2YgZXhwb3J0cyA9PT0gJ29iamVjdCcgJiYgdHlwZW9mIG1vZHVsZSA9PT0gJ29iamVjdCcpXG5cdFx0bW9kdWxlLmV4cG9ydHMgPSBmYWN0b3J5KCk7XG5cdGVsc2UgaWYodHlwZW9mIGRlZmluZSA9PT0gJ2Z1bmN0aW9uJyAmJiBkZWZpbmUuYW1kKVxuXHRcdGRlZmluZShbXSwgZmFjdG9yeSk7XG5cdGVsc2UgaWYodHlwZW9mIGV4cG9ydHMgPT09ICdvYmplY3QnKVxuXHRcdGV4cG9ydHNbXCJzb3VyY2VNYXBcIl0gPSBmYWN0b3J5KCk7XG5cdGVsc2Vcblx0XHRyb290W1wic291cmNlTWFwXCJdID0gZmFjdG9yeSgpO1xufSkodGhpcywgZnVuY3Rpb24oKSB7XG5yZXR1cm4gXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHdlYnBhY2svdW5pdmVyc2FsTW9kdWxlRGVmaW5pdGlvbiIsIiBcdC8vIFRoZSBtb2R1bGUgY2FjaGVcbiBcdHZhciBpbnN0YWxsZWRNb2R1bGVzID0ge307XG5cbiBcdC8vIFRoZSByZXF1aXJlIGZ1bmN0aW9uXG4gXHRmdW5jdGlvbiBfX3dlYnBhY2tfcmVxdWlyZV9fKG1vZHVsZUlkKSB7XG5cbiBcdFx0Ly8gQ2hlY2sgaWYgbW9kdWxlIGlzIGluIGNhY2hlXG4gXHRcdGlmKGluc3RhbGxlZE1vZHVsZXNbbW9kdWxlSWRdKVxuIFx0XHRcdHJldHVybiBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXS5leHBvcnRzO1xuXG4gXHRcdC8vIENyZWF0ZSBhIG5ldyBtb2R1bGUgKGFuZCBwdXQgaXQgaW50byB0aGUgY2FjaGUpXG4gXHRcdHZhciBtb2R1bGUgPSBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXSA9IHtcbiBcdFx0XHRleHBvcnRzOiB7fSxcbiBcdFx0XHRpZDogbW9kdWxlSWQsXG4gXHRcdFx0bG9hZGVkOiBmYWxzZVxuIFx0XHR9O1xuXG4gXHRcdC8vIEV4ZWN1dGUgdGhlIG1vZHVsZSBmdW5jdGlvblxuIFx0XHRtb2R1bGVzW21vZHVsZUlkXS5jYWxsKG1vZHVsZS5leHBvcnRzLCBtb2R1bGUsIG1vZHVsZS5leHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKTtcblxuIFx0XHQvLyBGbGFnIHRoZSBtb2R1bGUgYXMgbG9hZGVkXG4gXHRcdG1vZHVsZS5sb2FkZWQgPSB0cnVlO1xuXG4gXHRcdC8vIFJldHVybiB0aGUgZXhwb3J0cyBvZiB0aGUgbW9kdWxlXG4gXHRcdHJldHVybiBtb2R1bGUuZXhwb3J0cztcbiBcdH1cblxuXG4gXHQvLyBleHBvc2UgdGhlIG1vZHVsZXMgb2JqZWN0IChfX3dlYnBhY2tfbW9kdWxlc19fKVxuIFx0X193ZWJwYWNrX3JlcXVpcmVfXy5tID0gbW9kdWxlcztcblxuIFx0Ly8gZXhwb3NlIHRoZSBtb2R1bGUgY2FjaGVcbiBcdF9fd2VicGFja19yZXF1aXJlX18uYyA9IGluc3RhbGxlZE1vZHVsZXM7XG5cbiBcdC8vIF9fd2VicGFja19wdWJsaWNfcGF0aF9fXG4gXHRfX3dlYnBhY2tfcmVxdWlyZV9fLnAgPSBcIlwiO1xuXG4gXHQvLyBMb2FkIGVudHJ5IG1vZHVsZSBhbmQgcmV0dXJuIGV4cG9ydHNcbiBcdHJldHVybiBfX3dlYnBhY2tfcmVxdWlyZV9fKDApO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHdlYnBhY2svYm9vdHN0cmFwIGU0NzM4ZmM3MmE3YjIzMDM5ODg5IiwiLypcbiAqIENvcHlyaWdodCAyMDA5LTIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFLnR4dCBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuZXhwb3J0cy5Tb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvcicpLlNvdXJjZU1hcEdlbmVyYXRvcjtcbmV4cG9ydHMuU291cmNlTWFwQ29uc3VtZXIgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWNvbnN1bWVyJykuU291cmNlTWFwQ29uc3VtZXI7XG5leHBvcnRzLlNvdXJjZU5vZGUgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2Utbm9kZScpLlNvdXJjZU5vZGU7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL3NvdXJjZS1tYXAuanNcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgYmFzZTY0VkxRID0gcmVxdWlyZSgnLi9iYXNlNjQtdmxxJyk7XG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBNYXBwaW5nTGlzdCA9IHJlcXVpcmUoJy4vbWFwcGluZy1saXN0JykuTWFwcGluZ0xpc3Q7XG5cbi8qKlxuICogQW4gaW5zdGFuY2Ugb2YgdGhlIFNvdXJjZU1hcEdlbmVyYXRvciByZXByZXNlbnRzIGEgc291cmNlIG1hcCB3aGljaCBpc1xuICogYmVpbmcgYnVpbHQgaW5jcmVtZW50YWxseS4gWW91IG1heSBwYXNzIGFuIG9iamVjdCB3aXRoIHRoZSBmb2xsb3dpbmdcbiAqIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGZpbGU6IFRoZSBmaWxlbmFtZSBvZiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBzb3VyY2VSb290OiBBIHJvb3QgZm9yIGFsbCByZWxhdGl2ZSBVUkxzIGluIHRoaXMgc291cmNlIG1hcC5cbiAqL1xuZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yKGFBcmdzKSB7XG4gIGlmICghYUFyZ3MpIHtcbiAgICBhQXJncyA9IHt9O1xuICB9XG4gIHRoaXMuX2ZpbGUgPSB1dGlsLmdldEFyZyhhQXJncywgJ2ZpbGUnLCBudWxsKTtcbiAgdGhpcy5fc291cmNlUm9vdCA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB0aGlzLl9za2lwVmFsaWRhdGlvbiA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc2tpcFZhbGlkYXRpb24nLCBmYWxzZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBuZXcgQXJyYXlTZXQoKTtcbiAgdGhpcy5fbmFtZXMgPSBuZXcgQXJyYXlTZXQoKTtcbiAgdGhpcy5fbWFwcGluZ3MgPSBuZXcgTWFwcGluZ0xpc3QoKTtcbiAgdGhpcy5fc291cmNlc0NvbnRlbnRzID0gbnVsbDtcbn1cblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogQ3JlYXRlcyBhIG5ldyBTb3VyY2VNYXBHZW5lcmF0b3IgYmFzZWQgb24gYSBTb3VyY2VNYXBDb25zdW1lclxuICpcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcC5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLmZyb21Tb3VyY2VNYXAgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwQ29uc3VtZXIpIHtcbiAgICB2YXIgc291cmNlUm9vdCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VSb290O1xuICAgIHZhciBnZW5lcmF0b3IgPSBuZXcgU291cmNlTWFwR2VuZXJhdG9yKHtcbiAgICAgIGZpbGU6IGFTb3VyY2VNYXBDb25zdW1lci5maWxlLFxuICAgICAgc291cmNlUm9vdDogc291cmNlUm9vdFxuICAgIH0pO1xuICAgIGFTb3VyY2VNYXBDb25zdW1lci5lYWNoTWFwcGluZyhmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIG5ld01hcHBpbmcgPSB7XG4gICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgIGxpbmU6IG1hcHBpbmcuZ2VuZXJhdGVkTGluZSxcbiAgICAgICAgICBjb2x1bW46IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uXG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIGlmIChtYXBwaW5nLnNvdXJjZSAhPSBudWxsKSB7XG4gICAgICAgIG5ld01hcHBpbmcuc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICAgIGlmIChzb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgICAgICBuZXdNYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbmV3TWFwcGluZy5zb3VyY2UpO1xuICAgICAgICB9XG5cbiAgICAgICAgbmV3TWFwcGluZy5vcmlnaW5hbCA9IHtcbiAgICAgICAgICBsaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBjb2x1bW46IG1hcHBpbmcub3JpZ2luYWxDb2x1bW5cbiAgICAgICAgfTtcblxuICAgICAgICBpZiAobWFwcGluZy5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICBuZXdNYXBwaW5nLm5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgZ2VuZXJhdG9yLmFkZE1hcHBpbmcobmV3TWFwcGluZyk7XG4gICAgfSk7XG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZXMuZm9yRWFjaChmdW5jdGlvbiAoc291cmNlRmlsZSkge1xuICAgICAgdmFyIGNvbnRlbnQgPSBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlQ29udGVudEZvcihzb3VyY2VGaWxlKTtcbiAgICAgIGlmIChjb250ZW50ICE9IG51bGwpIHtcbiAgICAgICAgZ2VuZXJhdG9yLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG4gICAgcmV0dXJuIGdlbmVyYXRvcjtcbiAgfTtcblxuLyoqXG4gKiBBZGQgYSBzaW5nbGUgbWFwcGluZyBmcm9tIG9yaWdpbmFsIHNvdXJjZSBsaW5lIGFuZCBjb2x1bW4gdG8gdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIGZvciB0aGlzIHNvdXJjZSBtYXAgYmVpbmcgY3JlYXRlZC4gVGhlIG1hcHBpbmdcbiAqIG9iamVjdCBzaG91bGQgaGF2ZSB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGdlbmVyYXRlZDogQW4gb2JqZWN0IHdpdGggdGhlIGdlbmVyYXRlZCBsaW5lIGFuZCBjb2x1bW4gcG9zaXRpb25zLlxuICogICAtIG9yaWdpbmFsOiBBbiBvYmplY3Qgd2l0aCB0aGUgb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucy5cbiAqICAgLSBzb3VyY2U6IFRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZSAocmVsYXRpdmUgdG8gdGhlIHNvdXJjZVJvb3QpLlxuICogICAtIG5hbWU6IEFuIG9wdGlvbmFsIG9yaWdpbmFsIHRva2VuIG5hbWUgZm9yIHRoaXMgbWFwcGluZy5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5hZGRNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX2FkZE1hcHBpbmcoYUFyZ3MpIHtcbiAgICB2YXIgZ2VuZXJhdGVkID0gdXRpbC5nZXRBcmcoYUFyZ3MsICdnZW5lcmF0ZWQnKTtcbiAgICB2YXIgb3JpZ2luYWwgPSB1dGlsLmdldEFyZyhhQXJncywgJ29yaWdpbmFsJywgbnVsbCk7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJywgbnVsbCk7XG4gICAgdmFyIG5hbWUgPSB1dGlsLmdldEFyZyhhQXJncywgJ25hbWUnLCBudWxsKTtcblxuICAgIGlmICghdGhpcy5fc2tpcFZhbGlkYXRpb24pIHtcbiAgICAgIHRoaXMuX3ZhbGlkYXRlTWFwcGluZyhnZW5lcmF0ZWQsIG9yaWdpbmFsLCBzb3VyY2UsIG5hbWUpO1xuICAgIH1cblxuICAgIGlmIChzb3VyY2UgIT0gbnVsbCkge1xuICAgICAgc291cmNlID0gU3RyaW5nKHNvdXJjZSk7XG4gICAgICBpZiAoIXRoaXMuX3NvdXJjZXMuaGFzKHNvdXJjZSkpIHtcbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAobmFtZSAhPSBudWxsKSB7XG4gICAgICBuYW1lID0gU3RyaW5nKG5hbWUpO1xuICAgICAgaWYgKCF0aGlzLl9uYW1lcy5oYXMobmFtZSkpIHtcbiAgICAgICAgdGhpcy5fbmFtZXMuYWRkKG5hbWUpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHRoaXMuX21hcHBpbmdzLmFkZCh7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogZ2VuZXJhdGVkLmNvbHVtbixcbiAgICAgIG9yaWdpbmFsTGluZTogb3JpZ2luYWwgIT0gbnVsbCAmJiBvcmlnaW5hbC5saW5lLFxuICAgICAgb3JpZ2luYWxDb2x1bW46IG9yaWdpbmFsICE9IG51bGwgJiYgb3JpZ2luYWwuY29sdW1uLFxuICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICBuYW1lOiBuYW1lXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogU2V0IHRoZSBzb3VyY2UgY29udGVudCBmb3IgYSBzb3VyY2UgZmlsZS5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5zZXRTb3VyY2VDb250ZW50ID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX3NldFNvdXJjZUNvbnRlbnQoYVNvdXJjZUZpbGUsIGFTb3VyY2VDb250ZW50KSB7XG4gICAgdmFyIHNvdXJjZSA9IGFTb3VyY2VGaWxlO1xuICAgIGlmICh0aGlzLl9zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIHNvdXJjZSA9IHV0aWwucmVsYXRpdmUodGhpcy5fc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG5cbiAgICBpZiAoYVNvdXJjZUNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgLy8gQWRkIHRoZSBzb3VyY2UgY29udGVudCB0byB0aGUgX3NvdXJjZXNDb250ZW50cyBtYXAuXG4gICAgICAvLyBDcmVhdGUgYSBuZXcgX3NvdXJjZXNDb250ZW50cyBtYXAgaWYgdGhlIHByb3BlcnR5IGlzIG51bGwuXG4gICAgICBpZiAoIXRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgICB0aGlzLl9zb3VyY2VzQ29udGVudHMgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICAgICAgfVxuICAgICAgdGhpcy5fc291cmNlc0NvbnRlbnRzW3V0aWwudG9TZXRTdHJpbmcoc291cmNlKV0gPSBhU291cmNlQ29udGVudDtcbiAgICB9IGVsc2UgaWYgKHRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgLy8gUmVtb3ZlIHRoZSBzb3VyY2UgZmlsZSBmcm9tIHRoZSBfc291cmNlc0NvbnRlbnRzIG1hcC5cbiAgICAgIC8vIElmIHRoZSBfc291cmNlc0NvbnRlbnRzIG1hcCBpcyBlbXB0eSwgc2V0IHRoZSBwcm9wZXJ0eSB0byBudWxsLlxuICAgICAgZGVsZXRlIHRoaXMuX3NvdXJjZXNDb250ZW50c1t1dGlsLnRvU2V0U3RyaW5nKHNvdXJjZSldO1xuICAgICAgaWYgKE9iamVjdC5rZXlzKHRoaXMuX3NvdXJjZXNDb250ZW50cykubGVuZ3RoID09PSAwKSB7XG4gICAgICAgIHRoaXMuX3NvdXJjZXNDb250ZW50cyA9IG51bGw7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIEFwcGxpZXMgdGhlIG1hcHBpbmdzIG9mIGEgc3ViLXNvdXJjZS1tYXAgZm9yIGEgc3BlY2lmaWMgc291cmNlIGZpbGUgdG8gdGhlXG4gKiBzb3VyY2UgbWFwIGJlaW5nIGdlbmVyYXRlZC4gRWFjaCBtYXBwaW5nIHRvIHRoZSBzdXBwbGllZCBzb3VyY2UgZmlsZSBpc1xuICogcmV3cml0dGVuIHVzaW5nIHRoZSBzdXBwbGllZCBzb3VyY2UgbWFwLiBOb3RlOiBUaGUgcmVzb2x1dGlvbiBmb3IgdGhlXG4gKiByZXN1bHRpbmcgbWFwcGluZ3MgaXMgdGhlIG1pbmltaXVtIG9mIHRoaXMgbWFwIGFuZCB0aGUgc3VwcGxpZWQgbWFwLlxuICpcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIHNvdXJjZSBtYXAgdG8gYmUgYXBwbGllZC5cbiAqIEBwYXJhbSBhU291cmNlRmlsZSBPcHRpb25hbC4gVGhlIGZpbGVuYW1lIG9mIHRoZSBzb3VyY2UgZmlsZS5cbiAqICAgICAgICBJZiBvbWl0dGVkLCBTb3VyY2VNYXBDb25zdW1lcidzIGZpbGUgcHJvcGVydHkgd2lsbCBiZSB1c2VkLlxuICogQHBhcmFtIGFTb3VyY2VNYXBQYXRoIE9wdGlvbmFsLiBUaGUgZGlybmFtZSBvZiB0aGUgcGF0aCB0byB0aGUgc291cmNlIG1hcFxuICogICAgICAgIHRvIGJlIGFwcGxpZWQuIElmIHJlbGF0aXZlLCBpdCBpcyByZWxhdGl2ZSB0byB0aGUgU291cmNlTWFwQ29uc3VtZXIuXG4gKiAgICAgICAgVGhpcyBwYXJhbWV0ZXIgaXMgbmVlZGVkIHdoZW4gdGhlIHR3byBzb3VyY2UgbWFwcyBhcmVuJ3QgaW4gdGhlIHNhbWVcbiAqICAgICAgICBkaXJlY3RvcnksIGFuZCB0aGUgc291cmNlIG1hcCB0byBiZSBhcHBsaWVkIGNvbnRhaW5zIHJlbGF0aXZlIHNvdXJjZVxuICogICAgICAgIHBhdGhzLiBJZiBzbywgdGhvc2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIG5lZWQgdG8gYmUgcmV3cml0dGVuXG4gKiAgICAgICAgcmVsYXRpdmUgdG8gdGhlIFNvdXJjZU1hcEdlbmVyYXRvci5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5hcHBseVNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9hcHBseVNvdXJjZU1hcChhU291cmNlTWFwQ29uc3VtZXIsIGFTb3VyY2VGaWxlLCBhU291cmNlTWFwUGF0aCkge1xuICAgIHZhciBzb3VyY2VGaWxlID0gYVNvdXJjZUZpbGU7XG4gICAgLy8gSWYgYVNvdXJjZUZpbGUgaXMgb21pdHRlZCwgd2Ugd2lsbCB1c2UgdGhlIGZpbGUgcHJvcGVydHkgb2YgdGhlIFNvdXJjZU1hcFxuICAgIGlmIChhU291cmNlRmlsZSA9PSBudWxsKSB7XG4gICAgICBpZiAoYVNvdXJjZU1hcENvbnN1bWVyLmZpbGUgPT0gbnVsbCkge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgJ1NvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuYXBwbHlTb3VyY2VNYXAgcmVxdWlyZXMgZWl0aGVyIGFuIGV4cGxpY2l0IHNvdXJjZSBmaWxlLCAnICtcbiAgICAgICAgICAnb3IgdGhlIHNvdXJjZSBtYXBcXCdzIFwiZmlsZVwiIHByb3BlcnR5LiBCb3RoIHdlcmUgb21pdHRlZC4nXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgICBzb3VyY2VGaWxlID0gYVNvdXJjZU1hcENvbnN1bWVyLmZpbGU7XG4gICAgfVxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5fc291cmNlUm9vdDtcbiAgICAvLyBNYWtlIFwic291cmNlRmlsZVwiIHJlbGF0aXZlIGlmIGFuIGFic29sdXRlIFVybCBpcyBwYXNzZWQuXG4gICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgc291cmNlRmlsZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlRmlsZSk7XG4gICAgfVxuICAgIC8vIEFwcGx5aW5nIHRoZSBTb3VyY2VNYXAgY2FuIGFkZCBhbmQgcmVtb3ZlIGl0ZW1zIGZyb20gdGhlIHNvdXJjZXMgYW5kXG4gICAgLy8gdGhlIG5hbWVzIGFycmF5LlxuICAgIHZhciBuZXdTb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gICAgdmFyIG5ld05hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgICAvLyBGaW5kIG1hcHBpbmdzIGZvciB0aGUgXCJzb3VyY2VGaWxlXCJcbiAgICB0aGlzLl9tYXBwaW5ncy51bnNvcnRlZEZvckVhY2goZnVuY3Rpb24gKG1hcHBpbmcpIHtcbiAgICAgIGlmIChtYXBwaW5nLnNvdXJjZSA9PT0gc291cmNlRmlsZSAmJiBtYXBwaW5nLm9yaWdpbmFsTGluZSAhPSBudWxsKSB7XG4gICAgICAgIC8vIENoZWNrIGlmIGl0IGNhbiBiZSBtYXBwZWQgYnkgdGhlIHNvdXJjZSBtYXAsIHRoZW4gdXBkYXRlIHRoZSBtYXBwaW5nLlxuICAgICAgICB2YXIgb3JpZ2luYWwgPSBhU291cmNlTWFwQ29uc3VtZXIub3JpZ2luYWxQb3NpdGlvbkZvcih7XG4gICAgICAgICAgbGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgICAgY29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgIH0pO1xuICAgICAgICBpZiAob3JpZ2luYWwuc291cmNlICE9IG51bGwpIHtcbiAgICAgICAgICAvLyBDb3B5IG1hcHBpbmdcbiAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IG9yaWdpbmFsLnNvdXJjZTtcbiAgICAgICAgICBpZiAoYVNvdXJjZU1hcFBhdGggIT0gbnVsbCkge1xuICAgICAgICAgICAgbWFwcGluZy5zb3VyY2UgPSB1dGlsLmpvaW4oYVNvdXJjZU1hcFBhdGgsIG1hcHBpbmcuc291cmNlKVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbWFwcGluZy5zb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsTGluZSA9IG9yaWdpbmFsLmxpbmU7XG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgICAgICBpZiAob3JpZ2luYWwubmFtZSAhPSBudWxsKSB7XG4gICAgICAgICAgICBtYXBwaW5nLm5hbWUgPSBvcmlnaW5hbC5uYW1lO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB2YXIgc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICBpZiAoc291cmNlICE9IG51bGwgJiYgIW5ld1NvdXJjZXMuaGFzKHNvdXJjZSkpIHtcbiAgICAgICAgbmV3U291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgIH1cblxuICAgICAgdmFyIG5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICBpZiAobmFtZSAhPSBudWxsICYmICFuZXdOYW1lcy5oYXMobmFtZSkpIHtcbiAgICAgICAgbmV3TmFtZXMuYWRkKG5hbWUpO1xuICAgICAgfVxuXG4gICAgfSwgdGhpcyk7XG4gICAgdGhpcy5fc291cmNlcyA9IG5ld1NvdXJjZXM7XG4gICAgdGhpcy5fbmFtZXMgPSBuZXdOYW1lcztcblxuICAgIC8vIENvcHkgc291cmNlc0NvbnRlbnRzIG9mIGFwcGxpZWQgbWFwLlxuICAgIGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VzLmZvckVhY2goZnVuY3Rpb24gKHNvdXJjZUZpbGUpIHtcbiAgICAgIHZhciBjb250ZW50ID0gYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZUNvbnRlbnRGb3Ioc291cmNlRmlsZSk7XG4gICAgICBpZiAoY29udGVudCAhPSBudWxsKSB7XG4gICAgICAgIGlmIChhU291cmNlTWFwUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhU291cmNlTWFwUGF0aCwgc291cmNlRmlsZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZUZpbGUgPSB1dGlsLnJlbGF0aXZlKHNvdXJjZVJvb3QsIHNvdXJjZUZpbGUpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBjb250ZW50KTtcbiAgICAgIH1cbiAgICB9LCB0aGlzKTtcbiAgfTtcblxuLyoqXG4gKiBBIG1hcHBpbmcgY2FuIGhhdmUgb25lIG9mIHRoZSB0aHJlZSBsZXZlbHMgb2YgZGF0YTpcbiAqXG4gKiAgIDEuIEp1c3QgdGhlIGdlbmVyYXRlZCBwb3NpdGlvbi5cbiAqICAgMi4gVGhlIEdlbmVyYXRlZCBwb3NpdGlvbiwgb3JpZ2luYWwgcG9zaXRpb24sIGFuZCBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIDMuIEdlbmVyYXRlZCBhbmQgb3JpZ2luYWwgcG9zaXRpb24sIG9yaWdpbmFsIHNvdXJjZSwgYXMgd2VsbCBhcyBhIG5hbWVcbiAqICAgICAgdG9rZW4uXG4gKlxuICogVG8gbWFpbnRhaW4gY29uc2lzdGVuY3ksIHdlIHZhbGlkYXRlIHRoYXQgYW55IG5ldyBtYXBwaW5nIGJlaW5nIGFkZGVkIGZhbGxzXG4gKiBpbiB0byBvbmUgb2YgdGhlc2UgY2F0ZWdvcmllcy5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fdmFsaWRhdGVNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX3ZhbGlkYXRlTWFwcGluZyhhR2VuZXJhdGVkLCBhT3JpZ2luYWwsIGFTb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYU5hbWUpIHtcbiAgICAvLyBXaGVuIGFPcmlnaW5hbCBpcyB0cnV0aHkgYnV0IGhhcyBlbXB0eSB2YWx1ZXMgZm9yIC5saW5lIGFuZCAuY29sdW1uLFxuICAgIC8vIGl0IGlzIG1vc3QgbGlrZWx5IGEgcHJvZ3JhbW1lciBlcnJvci4gSW4gdGhpcyBjYXNlIHdlIHRocm93IGEgdmVyeVxuICAgIC8vIHNwZWNpZmljIGVycm9yIG1lc3NhZ2UgdG8gdHJ5IHRvIGd1aWRlIHRoZW0gdGhlIHJpZ2h0IHdheS5cbiAgICAvLyBGb3IgZXhhbXBsZTogaHR0cHM6Ly9naXRodWIuY29tL1BvbHltZXIvcG9seW1lci1idW5kbGVyL3B1bGwvNTE5XG4gICAgaWYgKGFPcmlnaW5hbCAmJiB0eXBlb2YgYU9yaWdpbmFsLmxpbmUgIT09ICdudW1iZXInICYmIHR5cGVvZiBhT3JpZ2luYWwuY29sdW1uICE9PSAnbnVtYmVyJykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAnb3JpZ2luYWwubGluZSBhbmQgb3JpZ2luYWwuY29sdW1uIGFyZSBub3QgbnVtYmVycyAtLSB5b3UgcHJvYmFibHkgbWVhbnQgdG8gb21pdCAnICtcbiAgICAgICAgICAgICd0aGUgb3JpZ2luYWwgbWFwcGluZyBlbnRpcmVseSBhbmQgb25seSBtYXAgdGhlIGdlbmVyYXRlZCBwb3NpdGlvbi4gSWYgc28sIHBhc3MgJyArXG4gICAgICAgICAgICAnbnVsbCBmb3IgdGhlIG9yaWdpbmFsIG1hcHBpbmcgaW5zdGVhZCBvZiBhbiBvYmplY3Qgd2l0aCBlbXB0eSBvciBudWxsIHZhbHVlcy4nXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgaWYgKGFHZW5lcmF0ZWQgJiYgJ2xpbmUnIGluIGFHZW5lcmF0ZWQgJiYgJ2NvbHVtbicgaW4gYUdlbmVyYXRlZFxuICAgICAgICAmJiBhR2VuZXJhdGVkLmxpbmUgPiAwICYmIGFHZW5lcmF0ZWQuY29sdW1uID49IDBcbiAgICAgICAgJiYgIWFPcmlnaW5hbCAmJiAhYVNvdXJjZSAmJiAhYU5hbWUpIHtcbiAgICAgIC8vIENhc2UgMS5cbiAgICAgIHJldHVybjtcbiAgICB9XG4gICAgZWxzZSBpZiAoYUdlbmVyYXRlZCAmJiAnbGluZScgaW4gYUdlbmVyYXRlZCAmJiAnY29sdW1uJyBpbiBhR2VuZXJhdGVkXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsICYmICdsaW5lJyBpbiBhT3JpZ2luYWwgJiYgJ2NvbHVtbicgaW4gYU9yaWdpbmFsXG4gICAgICAgICAgICAgJiYgYUdlbmVyYXRlZC5saW5lID4gMCAmJiBhR2VuZXJhdGVkLmNvbHVtbiA+PSAwXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsLmxpbmUgPiAwICYmIGFPcmlnaW5hbC5jb2x1bW4gPj0gMFxuICAgICAgICAgICAgICYmIGFTb3VyY2UpIHtcbiAgICAgIC8vIENhc2VzIDIgYW5kIDMuXG4gICAgICByZXR1cm47XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdJbnZhbGlkIG1hcHBpbmc6ICcgKyBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgIGdlbmVyYXRlZDogYUdlbmVyYXRlZCxcbiAgICAgICAgc291cmNlOiBhU291cmNlLFxuICAgICAgICBvcmlnaW5hbDogYU9yaWdpbmFsLFxuICAgICAgICBuYW1lOiBhTmFtZVxuICAgICAgfSkpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBTZXJpYWxpemUgdGhlIGFjY3VtdWxhdGVkIG1hcHBpbmdzIGluIHRvIHRoZSBzdHJlYW0gb2YgYmFzZSA2NCBWTFFzXG4gKiBzcGVjaWZpZWQgYnkgdGhlIHNvdXJjZSBtYXAgZm9ybWF0LlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLl9zZXJpYWxpemVNYXBwaW5ncyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9zZXJpYWxpemVNYXBwaW5ncygpIHtcbiAgICB2YXIgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbExpbmUgPSAwO1xuICAgIHZhciBwcmV2aW91c05hbWUgPSAwO1xuICAgIHZhciBwcmV2aW91c1NvdXJjZSA9IDA7XG4gICAgdmFyIHJlc3VsdCA9ICcnO1xuICAgIHZhciBuZXh0O1xuICAgIHZhciBtYXBwaW5nO1xuICAgIHZhciBuYW1lSWR4O1xuICAgIHZhciBzb3VyY2VJZHg7XG5cbiAgICB2YXIgbWFwcGluZ3MgPSB0aGlzLl9tYXBwaW5ncy50b0FycmF5KCk7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IG1hcHBpbmdzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBtYXBwaW5nID0gbWFwcGluZ3NbaV07XG4gICAgICBuZXh0ID0gJydcblxuICAgICAgaWYgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgICAgICAgd2hpbGUgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbmV4dCArPSAnOyc7XG4gICAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBpZiAoaSA+IDApIHtcbiAgICAgICAgICBpZiAoIXV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQobWFwcGluZywgbWFwcGluZ3NbaSAtIDFdKSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5leHQgKz0gJywnO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c0dlbmVyYXRlZENvbHVtbik7XG4gICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2VJZHggPSB0aGlzLl9zb3VyY2VzLmluZGV4T2YobWFwcGluZy5zb3VyY2UpO1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICBwcmV2aW91c1NvdXJjZSA9IHNvdXJjZUlkeDtcblxuICAgICAgICAvLyBsaW5lcyBhcmUgc3RvcmVkIDAtYmFzZWQgaW4gU291cmNlTWFwIHNwZWMgdmVyc2lvbiAzXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsTGluZSAtIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c09yaWdpbmFsTGluZSk7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmUgLSAxO1xuXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbENvbHVtbik7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIGlmIChtYXBwaW5nLm5hbWUgIT0gbnVsbCkge1xuICAgICAgICAgIG5hbWVJZHggPSB0aGlzLl9uYW1lcy5pbmRleE9mKG1hcHBpbmcubmFtZSk7XG4gICAgICAgICAgbmV4dCArPSBiYXNlNjRWTFEuZW5jb2RlKG5hbWVJZHggLSBwcmV2aW91c05hbWUpO1xuICAgICAgICAgIHByZXZpb3VzTmFtZSA9IG5hbWVJZHg7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmVzdWx0ICs9IG5leHQ7XG4gICAgfVxuXG4gICAgcmV0dXJuIHJlc3VsdDtcbiAgfTtcblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9nZW5lcmF0ZVNvdXJjZXNDb250ZW50KGFTb3VyY2VzLCBhU291cmNlUm9vdCkge1xuICAgIHJldHVybiBhU291cmNlcy5tYXAoZnVuY3Rpb24gKHNvdXJjZSkge1xuICAgICAgaWYgKCF0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICBpZiAoYVNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKGFTb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgfVxuICAgICAgdmFyIGtleSA9IHV0aWwudG9TZXRTdHJpbmcoc291cmNlKTtcbiAgICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwodGhpcy5fc291cmNlc0NvbnRlbnRzLCBrZXkpXG4gICAgICAgID8gdGhpcy5fc291cmNlc0NvbnRlbnRzW2tleV1cbiAgICAgICAgOiBudWxsO1xuICAgIH0sIHRoaXMpO1xuICB9O1xuXG4vKipcbiAqIEV4dGVybmFsaXplIHRoZSBzb3VyY2UgbWFwLlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLnRvSlNPTiA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl90b0pTT04oKSB7XG4gICAgdmFyIG1hcCA9IHtcbiAgICAgIHZlcnNpb246IHRoaXMuX3ZlcnNpb24sXG4gICAgICBzb3VyY2VzOiB0aGlzLl9zb3VyY2VzLnRvQXJyYXkoKSxcbiAgICAgIG5hbWVzOiB0aGlzLl9uYW1lcy50b0FycmF5KCksXG4gICAgICBtYXBwaW5nczogdGhpcy5fc2VyaWFsaXplTWFwcGluZ3MoKVxuICAgIH07XG4gICAgaWYgKHRoaXMuX2ZpbGUgIT0gbnVsbCkge1xuICAgICAgbWFwLmZpbGUgPSB0aGlzLl9maWxlO1xuICAgIH1cbiAgICBpZiAodGhpcy5fc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBtYXAuc291cmNlUm9vdCA9IHRoaXMuX3NvdXJjZVJvb3Q7XG4gICAgfVxuICAgIGlmICh0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgIG1hcC5zb3VyY2VzQ29udGVudCA9IHRoaXMuX2dlbmVyYXRlU291cmNlc0NvbnRlbnQobWFwLnNvdXJjZXMsIG1hcC5zb3VyY2VSb290KTtcbiAgICB9XG5cbiAgICByZXR1cm4gbWFwO1xuICB9O1xuXG4vKipcbiAqIFJlbmRlciB0aGUgc291cmNlIG1hcCBiZWluZyBnZW5lcmF0ZWQgdG8gYSBzdHJpbmcuXG4gKi9cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUudG9TdHJpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfdG9TdHJpbmcoKSB7XG4gICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHRoaXMudG9KU09OKCkpO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcEdlbmVyYXRvciA9IFNvdXJjZU1hcEdlbmVyYXRvcjtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL3NvdXJjZS1tYXAtZ2VuZXJhdG9yLmpzXG4vLyBtb2R1bGUgaWQgPSAxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKlxuICogQmFzZWQgb24gdGhlIEJhc2UgNjQgVkxRIGltcGxlbWVudGF0aW9uIGluIENsb3N1cmUgQ29tcGlsZXI6XG4gKiBodHRwczovL2NvZGUuZ29vZ2xlLmNvbS9wL2Nsb3N1cmUtY29tcGlsZXIvc291cmNlL2Jyb3dzZS90cnVuay9zcmMvY29tL2dvb2dsZS9kZWJ1Z2dpbmcvc291cmNlbWFwL0Jhc2U2NFZMUS5qYXZhXG4gKlxuICogQ29weXJpZ2h0IDIwMTEgVGhlIENsb3N1cmUgQ29tcGlsZXIgQXV0aG9ycy4gQWxsIHJpZ2h0cyByZXNlcnZlZC5cbiAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dFxuICogbW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zIGFyZVxuICogbWV0OlxuICpcbiAqICAqIFJlZGlzdHJpYnV0aW9ucyBvZiBzb3VyY2UgY29kZSBtdXN0IHJldGFpbiB0aGUgYWJvdmUgY29weXJpZ2h0XG4gKiAgICBub3RpY2UsIHRoaXMgbGlzdCBvZiBjb25kaXRpb25zIGFuZCB0aGUgZm9sbG93aW5nIGRpc2NsYWltZXIuXG4gKiAgKiBSZWRpc3RyaWJ1dGlvbnMgaW4gYmluYXJ5IGZvcm0gbXVzdCByZXByb2R1Y2UgdGhlIGFib3ZlXG4gKiAgICBjb3B5cmlnaHQgbm90aWNlLCB0aGlzIGxpc3Qgb2YgY29uZGl0aW9ucyBhbmQgdGhlIGZvbGxvd2luZ1xuICogICAgZGlzY2xhaW1lciBpbiB0aGUgZG9jdW1lbnRhdGlvbiBhbmQvb3Igb3RoZXIgbWF0ZXJpYWxzIHByb3ZpZGVkXG4gKiAgICB3aXRoIHRoZSBkaXN0cmlidXRpb24uXG4gKiAgKiBOZWl0aGVyIHRoZSBuYW1lIG9mIEdvb2dsZSBJbmMuIG5vciB0aGUgbmFtZXMgb2YgaXRzXG4gKiAgICBjb250cmlidXRvcnMgbWF5IGJlIHVzZWQgdG8gZW5kb3JzZSBvciBwcm9tb3RlIHByb2R1Y3RzIGRlcml2ZWRcbiAqICAgIGZyb20gdGhpcyBzb2Z0d2FyZSB3aXRob3V0IHNwZWNpZmljIHByaW9yIHdyaXR0ZW4gcGVybWlzc2lvbi5cbiAqXG4gKiBUSElTIFNPRlRXQVJFIElTIFBST1ZJREVEIEJZIFRIRSBDT1BZUklHSFQgSE9MREVSUyBBTkQgQ09OVFJJQlVUT1JTXG4gKiBcIkFTIElTXCIgQU5EIEFOWSBFWFBSRVNTIE9SIElNUExJRUQgV0FSUkFOVElFUywgSU5DTFVESU5HLCBCVVQgTk9UXG4gKiBMSU1JVEVEIFRPLCBUSEUgSU1QTElFRCBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSBBTkQgRklUTkVTUyBGT1JcbiAqIEEgUEFSVElDVUxBUiBQVVJQT1NFIEFSRSBESVNDTEFJTUVELiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUgQ09QWVJJR0hUXG4gKiBPV05FUiBPUiBDT05UUklCVVRPUlMgQkUgTElBQkxFIEZPUiBBTlkgRElSRUNULCBJTkRJUkVDVCwgSU5DSURFTlRBTCxcbiAqIFNQRUNJQUwsIEVYRU1QTEFSWSwgT1IgQ09OU0VRVUVOVElBTCBEQU1BR0VTIChJTkNMVURJTkcsIEJVVCBOT1RcbiAqIExJTUlURUQgVE8sIFBST0NVUkVNRU5UIE9GIFNVQlNUSVRVVEUgR09PRFMgT1IgU0VSVklDRVM7IExPU1MgT0YgVVNFLFxuICogREFUQSwgT1IgUFJPRklUUzsgT1IgQlVTSU5FU1MgSU5URVJSVVBUSU9OKSBIT1dFVkVSIENBVVNFRCBBTkQgT04gQU5ZXG4gKiBUSEVPUlkgT0YgTElBQklMSVRZLCBXSEVUSEVSIElOIENPTlRSQUNULCBTVFJJQ1QgTElBQklMSVRZLCBPUiBUT1JUXG4gKiAoSU5DTFVESU5HIE5FR0xJR0VOQ0UgT1IgT1RIRVJXSVNFKSBBUklTSU5HIElOIEFOWSBXQVkgT1VUIE9GIFRIRSBVU0VcbiAqIE9GIFRISVMgU09GVFdBUkUsIEVWRU4gSUYgQURWSVNFRCBPRiBUSEUgUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0UuXG4gKi9cblxudmFyIGJhc2U2NCA9IHJlcXVpcmUoJy4vYmFzZTY0Jyk7XG5cbi8vIEEgc2luZ2xlIGJhc2UgNjQgZGlnaXQgY2FuIGNvbnRhaW4gNiBiaXRzIG9mIGRhdGEuIEZvciB0aGUgYmFzZSA2NCB2YXJpYWJsZVxuLy8gbGVuZ3RoIHF1YW50aXRpZXMgd2UgdXNlIGluIHRoZSBzb3VyY2UgbWFwIHNwZWMsIHRoZSBmaXJzdCBiaXQgaXMgdGhlIHNpZ24sXG4vLyB0aGUgbmV4dCBmb3VyIGJpdHMgYXJlIHRoZSBhY3R1YWwgdmFsdWUsIGFuZCB0aGUgNnRoIGJpdCBpcyB0aGVcbi8vIGNvbnRpbnVhdGlvbiBiaXQuIFRoZSBjb250aW51YXRpb24gYml0IHRlbGxzIHVzIHdoZXRoZXIgdGhlcmUgYXJlIG1vcmVcbi8vIGRpZ2l0cyBpbiB0aGlzIHZhbHVlIGZvbGxvd2luZyB0aGlzIGRpZ2l0LlxuLy9cbi8vICAgQ29udGludWF0aW9uXG4vLyAgIHwgICAgU2lnblxuLy8gICB8ICAgIHxcbi8vICAgViAgICBWXG4vLyAgIDEwMTAxMVxuXG52YXIgVkxRX0JBU0VfU0hJRlQgPSA1O1xuXG4vLyBiaW5hcnk6IDEwMDAwMFxudmFyIFZMUV9CQVNFID0gMSA8PCBWTFFfQkFTRV9TSElGVDtcblxuLy8gYmluYXJ5OiAwMTExMTFcbnZhciBWTFFfQkFTRV9NQVNLID0gVkxRX0JBU0UgLSAxO1xuXG4vLyBiaW5hcnk6IDEwMDAwMFxudmFyIFZMUV9DT05USU5VQVRJT05fQklUID0gVkxRX0JBU0U7XG5cbi8qKlxuICogQ29udmVydHMgZnJvbSBhIHR3by1jb21wbGVtZW50IHZhbHVlIHRvIGEgdmFsdWUgd2hlcmUgdGhlIHNpZ24gYml0IGlzXG4gKiBwbGFjZWQgaW4gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdC4gIEZvciBleGFtcGxlLCBhcyBkZWNpbWFsczpcbiAqICAgMSBiZWNvbWVzIDIgKDEwIGJpbmFyeSksIC0xIGJlY29tZXMgMyAoMTEgYmluYXJ5KVxuICogICAyIGJlY29tZXMgNCAoMTAwIGJpbmFyeSksIC0yIGJlY29tZXMgNSAoMTAxIGJpbmFyeSlcbiAqL1xuZnVuY3Rpb24gdG9WTFFTaWduZWQoYVZhbHVlKSB7XG4gIHJldHVybiBhVmFsdWUgPCAwXG4gICAgPyAoKC1hVmFsdWUpIDw8IDEpICsgMVxuICAgIDogKGFWYWx1ZSA8PCAxKSArIDA7XG59XG5cbi8qKlxuICogQ29udmVydHMgdG8gYSB0d28tY29tcGxlbWVudCB2YWx1ZSBmcm9tIGEgdmFsdWUgd2hlcmUgdGhlIHNpZ24gYml0IGlzXG4gKiBwbGFjZWQgaW4gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdC4gIEZvciBleGFtcGxlLCBhcyBkZWNpbWFsczpcbiAqICAgMiAoMTAgYmluYXJ5KSBiZWNvbWVzIDEsIDMgKDExIGJpbmFyeSkgYmVjb21lcyAtMVxuICogICA0ICgxMDAgYmluYXJ5KSBiZWNvbWVzIDIsIDUgKDEwMSBiaW5hcnkpIGJlY29tZXMgLTJcbiAqL1xuZnVuY3Rpb24gZnJvbVZMUVNpZ25lZChhVmFsdWUpIHtcbiAgdmFyIGlzTmVnYXRpdmUgPSAoYVZhbHVlICYgMSkgPT09IDE7XG4gIHZhciBzaGlmdGVkID0gYVZhbHVlID4+IDE7XG4gIHJldHVybiBpc05lZ2F0aXZlXG4gICAgPyAtc2hpZnRlZFxuICAgIDogc2hpZnRlZDtcbn1cblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBiYXNlIDY0IFZMUSBlbmNvZGVkIHZhbHVlLlxuICovXG5leHBvcnRzLmVuY29kZSA9IGZ1bmN0aW9uIGJhc2U2NFZMUV9lbmNvZGUoYVZhbHVlKSB7XG4gIHZhciBlbmNvZGVkID0gXCJcIjtcbiAgdmFyIGRpZ2l0O1xuXG4gIHZhciB2bHEgPSB0b1ZMUVNpZ25lZChhVmFsdWUpO1xuXG4gIGRvIHtcbiAgICBkaWdpdCA9IHZscSAmIFZMUV9CQVNFX01BU0s7XG4gICAgdmxxID4+Pj0gVkxRX0JBU0VfU0hJRlQ7XG4gICAgaWYgKHZscSA+IDApIHtcbiAgICAgIC8vIFRoZXJlIGFyZSBzdGlsbCBtb3JlIGRpZ2l0cyBpbiB0aGlzIHZhbHVlLCBzbyB3ZSBtdXN0IG1ha2Ugc3VyZSB0aGVcbiAgICAgIC8vIGNvbnRpbnVhdGlvbiBiaXQgaXMgbWFya2VkLlxuICAgICAgZGlnaXQgfD0gVkxRX0NPTlRJTlVBVElPTl9CSVQ7XG4gICAgfVxuICAgIGVuY29kZWQgKz0gYmFzZTY0LmVuY29kZShkaWdpdCk7XG4gIH0gd2hpbGUgKHZscSA+IDApO1xuXG4gIHJldHVybiBlbmNvZGVkO1xufTtcblxuLyoqXG4gKiBEZWNvZGVzIHRoZSBuZXh0IGJhc2UgNjQgVkxRIHZhbHVlIGZyb20gdGhlIGdpdmVuIHN0cmluZyBhbmQgcmV0dXJucyB0aGVcbiAqIHZhbHVlIGFuZCB0aGUgcmVzdCBvZiB0aGUgc3RyaW5nIHZpYSB0aGUgb3V0IHBhcmFtZXRlci5cbiAqL1xuZXhwb3J0cy5kZWNvZGUgPSBmdW5jdGlvbiBiYXNlNjRWTFFfZGVjb2RlKGFTdHIsIGFJbmRleCwgYU91dFBhcmFtKSB7XG4gIHZhciBzdHJMZW4gPSBhU3RyLmxlbmd0aDtcbiAgdmFyIHJlc3VsdCA9IDA7XG4gIHZhciBzaGlmdCA9IDA7XG4gIHZhciBjb250aW51YXRpb24sIGRpZ2l0O1xuXG4gIGRvIHtcbiAgICBpZiAoYUluZGV4ID49IHN0ckxlbikge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRXhwZWN0ZWQgbW9yZSBkaWdpdHMgaW4gYmFzZSA2NCBWTFEgdmFsdWUuXCIpO1xuICAgIH1cblxuICAgIGRpZ2l0ID0gYmFzZTY0LmRlY29kZShhU3RyLmNoYXJDb2RlQXQoYUluZGV4KyspKTtcbiAgICBpZiAoZGlnaXQgPT09IC0xKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoXCJJbnZhbGlkIGJhc2U2NCBkaWdpdDogXCIgKyBhU3RyLmNoYXJBdChhSW5kZXggLSAxKSk7XG4gICAgfVxuXG4gICAgY29udGludWF0aW9uID0gISEoZGlnaXQgJiBWTFFfQ09OVElOVUFUSU9OX0JJVCk7XG4gICAgZGlnaXQgJj0gVkxRX0JBU0VfTUFTSztcbiAgICByZXN1bHQgPSByZXN1bHQgKyAoZGlnaXQgPDwgc2hpZnQpO1xuICAgIHNoaWZ0ICs9IFZMUV9CQVNFX1NISUZUO1xuICB9IHdoaWxlIChjb250aW51YXRpb24pO1xuXG4gIGFPdXRQYXJhbS52YWx1ZSA9IGZyb21WTFFTaWduZWQocmVzdWx0KTtcbiAgYU91dFBhcmFtLnJlc3QgPSBhSW5kZXg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmFzZTY0LXZscS5qc1xuLy8gbW9kdWxlIGlkID0gMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBpbnRUb0NoYXJNYXAgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLycuc3BsaXQoJycpO1xuXG4vKipcbiAqIEVuY29kZSBhbiBpbnRlZ2VyIGluIHRoZSByYW5nZSBvZiAwIHRvIDYzIHRvIGEgc2luZ2xlIGJhc2UgNjQgZGlnaXQuXG4gKi9cbmV4cG9ydHMuZW5jb2RlID0gZnVuY3Rpb24gKG51bWJlcikge1xuICBpZiAoMCA8PSBudW1iZXIgJiYgbnVtYmVyIDwgaW50VG9DaGFyTWFwLmxlbmd0aCkge1xuICAgIHJldHVybiBpbnRUb0NoYXJNYXBbbnVtYmVyXTtcbiAgfVxuICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiTXVzdCBiZSBiZXR3ZWVuIDAgYW5kIDYzOiBcIiArIG51bWJlcik7XG59O1xuXG4vKipcbiAqIERlY29kZSBhIHNpbmdsZSBiYXNlIDY0IGNoYXJhY3RlciBjb2RlIGRpZ2l0IHRvIGFuIGludGVnZXIuIFJldHVybnMgLTEgb25cbiAqIGZhaWx1cmUuXG4gKi9cbmV4cG9ydHMuZGVjb2RlID0gZnVuY3Rpb24gKGNoYXJDb2RlKSB7XG4gIHZhciBiaWdBID0gNjU7ICAgICAvLyAnQSdcbiAgdmFyIGJpZ1ogPSA5MDsgICAgIC8vICdaJ1xuXG4gIHZhciBsaXR0bGVBID0gOTc7ICAvLyAnYSdcbiAgdmFyIGxpdHRsZVogPSAxMjI7IC8vICd6J1xuXG4gIHZhciB6ZXJvID0gNDg7ICAgICAvLyAnMCdcbiAgdmFyIG5pbmUgPSA1NzsgICAgIC8vICc5J1xuXG4gIHZhciBwbHVzID0gNDM7ICAgICAvLyAnKydcbiAgdmFyIHNsYXNoID0gNDc7ICAgIC8vICcvJ1xuXG4gIHZhciBsaXR0bGVPZmZzZXQgPSAyNjtcbiAgdmFyIG51bWJlck9mZnNldCA9IDUyO1xuXG4gIC8vIDAgLSAyNTogQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpcbiAgaWYgKGJpZ0EgPD0gY2hhckNvZGUgJiYgY2hhckNvZGUgPD0gYmlnWikge1xuICAgIHJldHVybiAoY2hhckNvZGUgLSBiaWdBKTtcbiAgfVxuXG4gIC8vIDI2IC0gNTE6IGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6XG4gIGlmIChsaXR0bGVBIDw9IGNoYXJDb2RlICYmIGNoYXJDb2RlIDw9IGxpdHRsZVopIHtcbiAgICByZXR1cm4gKGNoYXJDb2RlIC0gbGl0dGxlQSArIGxpdHRsZU9mZnNldCk7XG4gIH1cblxuICAvLyA1MiAtIDYxOiAwMTIzNDU2Nzg5XG4gIGlmICh6ZXJvIDw9IGNoYXJDb2RlICYmIGNoYXJDb2RlIDw9IG5pbmUpIHtcbiAgICByZXR1cm4gKGNoYXJDb2RlIC0gemVybyArIG51bWJlck9mZnNldCk7XG4gIH1cblxuICAvLyA2MjogK1xuICBpZiAoY2hhckNvZGUgPT0gcGx1cykge1xuICAgIHJldHVybiA2MjtcbiAgfVxuXG4gIC8vIDYzOiAvXG4gIGlmIChjaGFyQ29kZSA9PSBzbGFzaCkge1xuICAgIHJldHVybiA2MztcbiAgfVxuXG4gIC8vIEludmFsaWQgYmFzZTY0IGRpZ2l0LlxuICByZXR1cm4gLTE7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmFzZTY0LmpzXG4vLyBtb2R1bGUgaWQgPSAzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKi9cblxuLyoqXG4gKiBUaGlzIGlzIGEgaGVscGVyIGZ1bmN0aW9uIGZvciBnZXR0aW5nIHZhbHVlcyBmcm9tIHBhcmFtZXRlci9vcHRpb25zXG4gKiBvYmplY3RzLlxuICpcbiAqIEBwYXJhbSBhcmdzIFRoZSBvYmplY3Qgd2UgYXJlIGV4dHJhY3RpbmcgdmFsdWVzIGZyb21cbiAqIEBwYXJhbSBuYW1lIFRoZSBuYW1lIG9mIHRoZSBwcm9wZXJ0eSB3ZSBhcmUgZ2V0dGluZy5cbiAqIEBwYXJhbSBkZWZhdWx0VmFsdWUgQW4gb3B0aW9uYWwgdmFsdWUgdG8gcmV0dXJuIGlmIHRoZSBwcm9wZXJ0eSBpcyBtaXNzaW5nXG4gKiBmcm9tIHRoZSBvYmplY3QuIElmIHRoaXMgaXMgbm90IHNwZWNpZmllZCBhbmQgdGhlIHByb3BlcnR5IGlzIG1pc3NpbmcsIGFuXG4gKiBlcnJvciB3aWxsIGJlIHRocm93bi5cbiAqL1xuZnVuY3Rpb24gZ2V0QXJnKGFBcmdzLCBhTmFtZSwgYURlZmF1bHRWYWx1ZSkge1xuICBpZiAoYU5hbWUgaW4gYUFyZ3MpIHtcbiAgICByZXR1cm4gYUFyZ3NbYU5hbWVdO1xuICB9IGVsc2UgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDMpIHtcbiAgICByZXR1cm4gYURlZmF1bHRWYWx1ZTtcbiAgfSBlbHNlIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFOYW1lICsgJ1wiIGlzIGEgcmVxdWlyZWQgYXJndW1lbnQuJyk7XG4gIH1cbn1cbmV4cG9ydHMuZ2V0QXJnID0gZ2V0QXJnO1xuXG52YXIgdXJsUmVnZXhwID0gL14oPzooW1xcdytcXC0uXSspOik/XFwvXFwvKD86KFxcdys6XFx3KylAKT8oW1xcdy5dKikoPzo6KFxcZCspKT8oXFxTKikkLztcbnZhciBkYXRhVXJsUmVnZXhwID0gL15kYXRhOi4rXFwsLiskLztcblxuZnVuY3Rpb24gdXJsUGFyc2UoYVVybCkge1xuICB2YXIgbWF0Y2ggPSBhVXJsLm1hdGNoKHVybFJlZ2V4cCk7XG4gIGlmICghbWF0Y2gpIHtcbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuICByZXR1cm4ge1xuICAgIHNjaGVtZTogbWF0Y2hbMV0sXG4gICAgYXV0aDogbWF0Y2hbMl0sXG4gICAgaG9zdDogbWF0Y2hbM10sXG4gICAgcG9ydDogbWF0Y2hbNF0sXG4gICAgcGF0aDogbWF0Y2hbNV1cbiAgfTtcbn1cbmV4cG9ydHMudXJsUGFyc2UgPSB1cmxQYXJzZTtcblxuZnVuY3Rpb24gdXJsR2VuZXJhdGUoYVBhcnNlZFVybCkge1xuICB2YXIgdXJsID0gJyc7XG4gIGlmIChhUGFyc2VkVXJsLnNjaGVtZSkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLnNjaGVtZSArICc6JztcbiAgfVxuICB1cmwgKz0gJy8vJztcbiAgaWYgKGFQYXJzZWRVcmwuYXV0aCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmF1dGggKyAnQCc7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwuaG9zdCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmhvc3Q7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwucG9ydCkge1xuICAgIHVybCArPSBcIjpcIiArIGFQYXJzZWRVcmwucG9ydFxuICB9XG4gIGlmIChhUGFyc2VkVXJsLnBhdGgpIHtcbiAgICB1cmwgKz0gYVBhcnNlZFVybC5wYXRoO1xuICB9XG4gIHJldHVybiB1cmw7XG59XG5leHBvcnRzLnVybEdlbmVyYXRlID0gdXJsR2VuZXJhdGU7XG5cbi8qKlxuICogTm9ybWFsaXplcyBhIHBhdGgsIG9yIHRoZSBwYXRoIHBvcnRpb24gb2YgYSBVUkw6XG4gKlxuICogLSBSZXBsYWNlcyBjb25zZWN1dGl2ZSBzbGFzaGVzIHdpdGggb25lIHNsYXNoLlxuICogLSBSZW1vdmVzIHVubmVjZXNzYXJ5ICcuJyBwYXJ0cy5cbiAqIC0gUmVtb3ZlcyB1bm5lY2Vzc2FyeSAnPGRpcj4vLi4nIHBhcnRzLlxuICpcbiAqIEJhc2VkIG9uIGNvZGUgaW4gdGhlIE5vZGUuanMgJ3BhdGgnIGNvcmUgbW9kdWxlLlxuICpcbiAqIEBwYXJhbSBhUGF0aCBUaGUgcGF0aCBvciB1cmwgdG8gbm9ybWFsaXplLlxuICovXG5mdW5jdGlvbiBub3JtYWxpemUoYVBhdGgpIHtcbiAgdmFyIHBhdGggPSBhUGF0aDtcbiAgdmFyIHVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgaWYgKHVybCkge1xuICAgIGlmICghdXJsLnBhdGgpIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG4gICAgcGF0aCA9IHVybC5wYXRoO1xuICB9XG4gIHZhciBpc0Fic29sdXRlID0gZXhwb3J0cy5pc0Fic29sdXRlKHBhdGgpO1xuXG4gIHZhciBwYXJ0cyA9IHBhdGguc3BsaXQoL1xcLysvKTtcbiAgZm9yICh2YXIgcGFydCwgdXAgPSAwLCBpID0gcGFydHMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICBwYXJ0ID0gcGFydHNbaV07XG4gICAgaWYgKHBhcnQgPT09ICcuJykge1xuICAgICAgcGFydHMuc3BsaWNlKGksIDEpO1xuICAgIH0gZWxzZSBpZiAocGFydCA9PT0gJy4uJykge1xuICAgICAgdXArKztcbiAgICB9IGVsc2UgaWYgKHVwID4gMCkge1xuICAgICAgaWYgKHBhcnQgPT09ICcnKSB7XG4gICAgICAgIC8vIFRoZSBmaXJzdCBwYXJ0IGlzIGJsYW5rIGlmIHRoZSBwYXRoIGlzIGFic29sdXRlLiBUcnlpbmcgdG8gZ29cbiAgICAgICAgLy8gYWJvdmUgdGhlIHJvb3QgaXMgYSBuby1vcC4gVGhlcmVmb3JlIHdlIGNhbiByZW1vdmUgYWxsICcuLicgcGFydHNcbiAgICAgICAgLy8gZGlyZWN0bHkgYWZ0ZXIgdGhlIHJvb3QuXG4gICAgICAgIHBhcnRzLnNwbGljZShpICsgMSwgdXApO1xuICAgICAgICB1cCA9IDA7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwYXJ0cy5zcGxpY2UoaSwgMik7XG4gICAgICAgIHVwLS07XG4gICAgICB9XG4gICAgfVxuICB9XG4gIHBhdGggPSBwYXJ0cy5qb2luKCcvJyk7XG5cbiAgaWYgKHBhdGggPT09ICcnKSB7XG4gICAgcGF0aCA9IGlzQWJzb2x1dGUgPyAnLycgOiAnLic7XG4gIH1cblxuICBpZiAodXJsKSB7XG4gICAgdXJsLnBhdGggPSBwYXRoO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZSh1cmwpO1xuICB9XG4gIHJldHVybiBwYXRoO1xufVxuZXhwb3J0cy5ub3JtYWxpemUgPSBub3JtYWxpemU7XG5cbi8qKlxuICogSm9pbnMgdHdvIHBhdGhzL1VSTHMuXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBqb2luZWQgd2l0aCB0aGUgcm9vdC5cbiAqXG4gKiAtIElmIGFQYXRoIGlzIGEgVVJMIG9yIGEgZGF0YSBVUkksIGFQYXRoIGlzIHJldHVybmVkLCB1bmxlc3MgYVBhdGggaXMgYVxuICogICBzY2hlbWUtcmVsYXRpdmUgVVJMOiBUaGVuIHRoZSBzY2hlbWUgb2YgYVJvb3QsIGlmIGFueSwgaXMgcHJlcGVuZGVkXG4gKiAgIGZpcnN0LlxuICogLSBPdGhlcndpc2UgYVBhdGggaXMgYSBwYXRoLiBJZiBhUm9vdCBpcyBhIFVSTCwgdGhlbiBpdHMgcGF0aCBwb3J0aW9uXG4gKiAgIGlzIHVwZGF0ZWQgd2l0aCB0aGUgcmVzdWx0IGFuZCBhUm9vdCBpcyByZXR1cm5lZC4gT3RoZXJ3aXNlIHRoZSByZXN1bHRcbiAqICAgaXMgcmV0dXJuZWQuXG4gKiAgIC0gSWYgYVBhdGggaXMgYWJzb2x1dGUsIHRoZSByZXN1bHQgaXMgYVBhdGguXG4gKiAgIC0gT3RoZXJ3aXNlIHRoZSB0d28gcGF0aHMgYXJlIGpvaW5lZCB3aXRoIGEgc2xhc2guXG4gKiAtIEpvaW5pbmcgZm9yIGV4YW1wbGUgJ2h0dHA6Ly8nIGFuZCAnd3d3LmV4YW1wbGUuY29tJyBpcyBhbHNvIHN1cHBvcnRlZC5cbiAqL1xuZnVuY3Rpb24gam9pbihhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuICBpZiAoYVBhdGggPT09IFwiXCIpIHtcbiAgICBhUGF0aCA9IFwiLlwiO1xuICB9XG4gIHZhciBhUGF0aFVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgdmFyIGFSb290VXJsID0gdXJsUGFyc2UoYVJvb3QpO1xuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdCA9IGFSb290VXJsLnBhdGggfHwgJy8nO1xuICB9XG5cbiAgLy8gYGpvaW4oZm9vLCAnLy93d3cuZXhhbXBsZS5vcmcnKWBcbiAgaWYgKGFQYXRoVXJsICYmICFhUGF0aFVybC5zY2hlbWUpIHtcbiAgICBpZiAoYVJvb3RVcmwpIHtcbiAgICAgIGFQYXRoVXJsLnNjaGVtZSA9IGFSb290VXJsLnNjaGVtZTtcbiAgICB9XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFQYXRoVXJsKTtcbiAgfVxuXG4gIGlmIChhUGF0aFVybCB8fCBhUGF0aC5tYXRjaChkYXRhVXJsUmVnZXhwKSkge1xuICAgIHJldHVybiBhUGF0aDtcbiAgfVxuXG4gIC8vIGBqb2luKCdodHRwOi8vJywgJ3d3dy5leGFtcGxlLmNvbScpYFxuICBpZiAoYVJvb3RVcmwgJiYgIWFSb290VXJsLmhvc3QgJiYgIWFSb290VXJsLnBhdGgpIHtcbiAgICBhUm9vdFVybC5ob3N0ID0gYVBhdGg7XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFSb290VXJsKTtcbiAgfVxuXG4gIHZhciBqb2luZWQgPSBhUGF0aC5jaGFyQXQoMCkgPT09ICcvJ1xuICAgID8gYVBhdGhcbiAgICA6IG5vcm1hbGl6ZShhUm9vdC5yZXBsYWNlKC9cXC8rJC8sICcnKSArICcvJyArIGFQYXRoKTtcblxuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdFVybC5wYXRoID0gam9pbmVkO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZShhUm9vdFVybCk7XG4gIH1cbiAgcmV0dXJuIGpvaW5lZDtcbn1cbmV4cG9ydHMuam9pbiA9IGpvaW47XG5cbmV4cG9ydHMuaXNBYnNvbHV0ZSA9IGZ1bmN0aW9uIChhUGF0aCkge1xuICByZXR1cm4gYVBhdGguY2hhckF0KDApID09PSAnLycgfHwgISFhUGF0aC5tYXRjaCh1cmxSZWdleHApO1xufTtcblxuLyoqXG4gKiBNYWtlIGEgcGF0aCByZWxhdGl2ZSB0byBhIFVSTCBvciBhbm90aGVyIHBhdGguXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBtYWRlIHJlbGF0aXZlIHRvIGFSb290LlxuICovXG5mdW5jdGlvbiByZWxhdGl2ZShhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuXG4gIGFSb290ID0gYVJvb3QucmVwbGFjZSgvXFwvJC8sICcnKTtcblxuICAvLyBJdCBpcyBwb3NzaWJsZSBmb3IgdGhlIHBhdGggdG8gYmUgYWJvdmUgdGhlIHJvb3QuIEluIHRoaXMgY2FzZSwgc2ltcGx5XG4gIC8vIGNoZWNraW5nIHdoZXRoZXIgdGhlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlIHBhdGggd29uJ3Qgd29yay4gSW5zdGVhZCwgd2VcbiAgLy8gbmVlZCB0byByZW1vdmUgY29tcG9uZW50cyBmcm9tIHRoZSByb290IG9uZSBieSBvbmUsIHVudGlsIGVpdGhlciB3ZSBmaW5kXG4gIC8vIGEgcHJlZml4IHRoYXQgZml0cywgb3Igd2UgcnVuIG91dCBvZiBjb21wb25lbnRzIHRvIHJlbW92ZS5cbiAgdmFyIGxldmVsID0gMDtcbiAgd2hpbGUgKGFQYXRoLmluZGV4T2YoYVJvb3QgKyAnLycpICE9PSAwKSB7XG4gICAgdmFyIGluZGV4ID0gYVJvb3QubGFzdEluZGV4T2YoXCIvXCIpO1xuICAgIGlmIChpbmRleCA8IDApIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG5cbiAgICAvLyBJZiB0aGUgb25seSBwYXJ0IG9mIHRoZSByb290IHRoYXQgaXMgbGVmdCBpcyB0aGUgc2NoZW1lIChpLmUuIGh0dHA6Ly8sXG4gICAgLy8gZmlsZTovLy8sIGV0Yy4pLCBvbmUgb3IgbW9yZSBzbGFzaGVzICgvKSwgb3Igc2ltcGx5IG5vdGhpbmcgYXQgYWxsLCB3ZVxuICAgIC8vIGhhdmUgZXhoYXVzdGVkIGFsbCBjb21wb25lbnRzLCBzbyB0aGUgcGF0aCBpcyBub3QgcmVsYXRpdmUgdG8gdGhlIHJvb3QuXG4gICAgYVJvb3QgPSBhUm9vdC5zbGljZSgwLCBpbmRleCk7XG4gICAgaWYgKGFSb290Lm1hdGNoKC9eKFteXFwvXSs6XFwvKT9cXC8qJC8pKSB7XG4gICAgICByZXR1cm4gYVBhdGg7XG4gICAgfVxuXG4gICAgKytsZXZlbDtcbiAgfVxuXG4gIC8vIE1ha2Ugc3VyZSB3ZSBhZGQgYSBcIi4uL1wiIGZvciBlYWNoIGNvbXBvbmVudCB3ZSByZW1vdmVkIGZyb20gdGhlIHJvb3QuXG4gIHJldHVybiBBcnJheShsZXZlbCArIDEpLmpvaW4oXCIuLi9cIikgKyBhUGF0aC5zdWJzdHIoYVJvb3QubGVuZ3RoICsgMSk7XG59XG5leHBvcnRzLnJlbGF0aXZlID0gcmVsYXRpdmU7XG5cbnZhciBzdXBwb3J0c051bGxQcm90byA9IChmdW5jdGlvbiAoKSB7XG4gIHZhciBvYmogPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICByZXR1cm4gISgnX19wcm90b19fJyBpbiBvYmopO1xufSgpKTtcblxuZnVuY3Rpb24gaWRlbnRpdHkgKHMpIHtcbiAgcmV0dXJuIHM7XG59XG5cbi8qKlxuICogQmVjYXVzZSBiZWhhdmlvciBnb2VzIHdhY2t5IHdoZW4geW91IHNldCBgX19wcm90b19fYCBvbiBvYmplY3RzLCB3ZVxuICogaGF2ZSB0byBwcmVmaXggYWxsIHRoZSBzdHJpbmdzIGluIG91ciBzZXQgd2l0aCBhbiBhcmJpdHJhcnkgY2hhcmFjdGVyLlxuICpcbiAqIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL3B1bGwvMzEgYW5kXG4gKiBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8zMFxuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5mdW5jdGlvbiB0b1NldFN0cmluZyhhU3RyKSB7XG4gIGlmIChpc1Byb3RvU3RyaW5nKGFTdHIpKSB7XG4gICAgcmV0dXJuICckJyArIGFTdHI7XG4gIH1cblxuICByZXR1cm4gYVN0cjtcbn1cbmV4cG9ydHMudG9TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogdG9TZXRTdHJpbmc7XG5cbmZ1bmN0aW9uIGZyb21TZXRTdHJpbmcoYVN0cikge1xuICBpZiAoaXNQcm90b1N0cmluZyhhU3RyKSkge1xuICAgIHJldHVybiBhU3RyLnNsaWNlKDEpO1xuICB9XG5cbiAgcmV0dXJuIGFTdHI7XG59XG5leHBvcnRzLmZyb21TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogZnJvbVNldFN0cmluZztcblxuZnVuY3Rpb24gaXNQcm90b1N0cmluZyhzKSB7XG4gIGlmICghcykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHZhciBsZW5ndGggPSBzLmxlbmd0aDtcblxuICBpZiAobGVuZ3RoIDwgOSAvKiBcIl9fcHJvdG9fX1wiLmxlbmd0aCAqLykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIGlmIChzLmNoYXJDb2RlQXQobGVuZ3RoIC0gMSkgIT09IDk1ICAvKiAnXycgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSAyKSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDMpICE9PSAxMTEgLyogJ28nICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNCkgIT09IDExNiAvKiAndCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA1KSAhPT0gMTExIC8qICdvJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDYpICE9PSAxMTQgLyogJ3InICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNykgIT09IDExMiAvKiAncCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA4KSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDkpICE9PSA5NSAgLyogJ18nICovKSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG5cbiAgZm9yICh2YXIgaSA9IGxlbmd0aCAtIDEwOyBpID49IDA7IGktLSkge1xuICAgIGlmIChzLmNoYXJDb2RlQXQoaSkgIT09IDM2IC8qICckJyAqLykge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2hlcmUgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKlxuICogT3B0aW9uYWxseSBwYXNzIGluIGB0cnVlYCBhcyBgb25seUNvbXBhcmVHZW5lcmF0ZWRgIHRvIGNvbnNpZGVyIHR3b1xuICogbWFwcGluZ3Mgd2l0aCB0aGUgc2FtZSBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4sIGJ1dCBkaWZmZXJlbnQgZ2VuZXJhdGVkXG4gKiBsaW5lIGFuZCBjb2x1bW4gdGhlIHNhbWUuIFVzZWZ1bCB3aGVuIHNlYXJjaGluZyBmb3IgYSBtYXBwaW5nIHdpdGggYVxuICogc3R1YmJlZCBvdXQgbWFwcGluZy5cbiAqL1xuZnVuY3Rpb24gY29tcGFyZUJ5T3JpZ2luYWxQb3NpdGlvbnMobWFwcGluZ0EsIG1hcHBpbmdCLCBvbmx5Q29tcGFyZU9yaWdpbmFsKSB7XG4gIHZhciBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDAgfHwgb25seUNvbXBhcmVPcmlnaW5hbCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5nZW5lcmF0ZWRDb2x1bW4gLSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyA9IGNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zO1xuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2l0aCBkZWZsYXRlZCBzb3VyY2UgYW5kIG5hbWUgaW5kaWNlcyB3aGVyZVxuICogdGhlIGdlbmVyYXRlZCBwb3NpdGlvbnMgYXJlIGNvbXBhcmVkLlxuICpcbiAqIE9wdGlvbmFsbHkgcGFzcyBpbiBgdHJ1ZWAgYXMgYG9ubHlDb21wYXJlR2VuZXJhdGVkYCB0byBjb25zaWRlciB0d29cbiAqIG1hcHBpbmdzIHdpdGggdGhlIHNhbWUgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiwgYnV0IGRpZmZlcmVudFxuICogc291cmNlL25hbWUvb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHRoZSBzYW1lLiBVc2VmdWwgd2hlbiBzZWFyY2hpbmcgZm9yIGFcbiAqIG1hcHBpbmcgd2l0aCBhIHN0dWJiZWQgb3V0IG1hcHBpbmcuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQiwgb25seUNvbXBhcmVHZW5lcmF0ZWQpIHtcbiAgdmFyIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZExpbmUgLSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbiAtIG1hcHBpbmdCLmdlbmVyYXRlZENvbHVtbjtcbiAgaWYgKGNtcCAhPT0gMCB8fCBvbmx5Q29tcGFyZUdlbmVyYXRlZCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCA9IGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkO1xuXG5mdW5jdGlvbiBzdHJjbXAoYVN0cjEsIGFTdHIyKSB7XG4gIGlmIChhU3RyMSA9PT0gYVN0cjIpIHtcbiAgICByZXR1cm4gMDtcbiAgfVxuXG4gIGlmIChhU3RyMSA+IGFTdHIyKSB7XG4gICAgcmV0dXJuIDE7XG4gIH1cblxuICByZXR1cm4gLTE7XG59XG5cbi8qKlxuICogQ29tcGFyYXRvciBiZXR3ZWVuIHR3byBtYXBwaW5ncyB3aXRoIGluZmxhdGVkIHNvdXJjZSBhbmQgbmFtZSBzdHJpbmdzIHdoZXJlXG4gKiB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0luZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQikge1xuICB2YXIgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkQ29sdW1uIC0gbWFwcGluZ0IuZ2VuZXJhdGVkQ29sdW1uO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IHN0cmNtcChtYXBwaW5nQS5zb3VyY2UsIG1hcHBpbmdCLnNvdXJjZSk7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIHN0cmNtcChtYXBwaW5nQS5uYW1lLCBtYXBwaW5nQi5uYW1lKTtcbn1cbmV4cG9ydHMuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQgPSBjb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL3V0aWwuanNcbi8vIG1vZHVsZSBpZCA9IDRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGhhcyA9IE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHk7XG52YXIgaGFzTmF0aXZlTWFwID0gdHlwZW9mIE1hcCAhPT0gXCJ1bmRlZmluZWRcIjtcblxuLyoqXG4gKiBBIGRhdGEgc3RydWN0dXJlIHdoaWNoIGlzIGEgY29tYmluYXRpb24gb2YgYW4gYXJyYXkgYW5kIGEgc2V0LiBBZGRpbmcgYSBuZXdcbiAqIG1lbWJlciBpcyBPKDEpLCB0ZXN0aW5nIGZvciBtZW1iZXJzaGlwIGlzIE8oMSksIGFuZCBmaW5kaW5nIHRoZSBpbmRleCBvZiBhblxuICogZWxlbWVudCBpcyBPKDEpLiBSZW1vdmluZyBlbGVtZW50cyBmcm9tIHRoZSBzZXQgaXMgbm90IHN1cHBvcnRlZC4gT25seVxuICogc3RyaW5ncyBhcmUgc3VwcG9ydGVkIGZvciBtZW1iZXJzaGlwLlxuICovXG5mdW5jdGlvbiBBcnJheVNldCgpIHtcbiAgdGhpcy5fYXJyYXkgPSBbXTtcbiAgdGhpcy5fc2V0ID0gaGFzTmF0aXZlTWFwID8gbmV3IE1hcCgpIDogT2JqZWN0LmNyZWF0ZShudWxsKTtcbn1cblxuLyoqXG4gKiBTdGF0aWMgbWV0aG9kIGZvciBjcmVhdGluZyBBcnJheVNldCBpbnN0YW5jZXMgZnJvbSBhbiBleGlzdGluZyBhcnJheS5cbiAqL1xuQXJyYXlTZXQuZnJvbUFycmF5ID0gZnVuY3Rpb24gQXJyYXlTZXRfZnJvbUFycmF5KGFBcnJheSwgYUFsbG93RHVwbGljYXRlcykge1xuICB2YXIgc2V0ID0gbmV3IEFycmF5U2V0KCk7XG4gIGZvciAodmFyIGkgPSAwLCBsZW4gPSBhQXJyYXkubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICBzZXQuYWRkKGFBcnJheVtpXSwgYUFsbG93RHVwbGljYXRlcyk7XG4gIH1cbiAgcmV0dXJuIHNldDtcbn07XG5cbi8qKlxuICogUmV0dXJuIGhvdyBtYW55IHVuaXF1ZSBpdGVtcyBhcmUgaW4gdGhpcyBBcnJheVNldC4gSWYgZHVwbGljYXRlcyBoYXZlIGJlZW5cbiAqIGFkZGVkLCB0aGFuIHRob3NlIGRvIG5vdCBjb3VudCB0b3dhcmRzIHRoZSBzaXplLlxuICpcbiAqIEByZXR1cm5zIE51bWJlclxuICovXG5BcnJheVNldC5wcm90b3R5cGUuc2l6ZSA9IGZ1bmN0aW9uIEFycmF5U2V0X3NpemUoKSB7XG4gIHJldHVybiBoYXNOYXRpdmVNYXAgPyB0aGlzLl9zZXQuc2l6ZSA6IE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKHRoaXMuX3NldCkubGVuZ3RoO1xufTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHN0cmluZyB0byB0aGlzIHNldC5cbiAqXG4gKiBAcGFyYW0gU3RyaW5nIGFTdHJcbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIEFycmF5U2V0X2FkZChhU3RyLCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gIHZhciBzU3RyID0gaGFzTmF0aXZlTWFwID8gYVN0ciA6IHV0aWwudG9TZXRTdHJpbmcoYVN0cik7XG4gIHZhciBpc0R1cGxpY2F0ZSA9IGhhc05hdGl2ZU1hcCA/IHRoaXMuaGFzKGFTdHIpIDogaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKTtcbiAgdmFyIGlkeCA9IHRoaXMuX2FycmF5Lmxlbmd0aDtcbiAgaWYgKCFpc0R1cGxpY2F0ZSB8fCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhU3RyKTtcbiAgfVxuICBpZiAoIWlzRHVwbGljYXRlKSB7XG4gICAgaWYgKGhhc05hdGl2ZU1hcCkge1xuICAgICAgdGhpcy5fc2V0LnNldChhU3RyLCBpZHgpO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLl9zZXRbc1N0cl0gPSBpZHg7XG4gICAgfVxuICB9XG59O1xuXG4vKipcbiAqIElzIHRoZSBnaXZlbiBzdHJpbmcgYSBtZW1iZXIgb2YgdGhpcyBzZXQ/XG4gKlxuICogQHBhcmFtIFN0cmluZyBhU3RyXG4gKi9cbkFycmF5U2V0LnByb3RvdHlwZS5oYXMgPSBmdW5jdGlvbiBBcnJheVNldF9oYXMoYVN0cikge1xuICBpZiAoaGFzTmF0aXZlTWFwKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NldC5oYXMoYVN0cik7XG4gIH0gZWxzZSB7XG4gICAgdmFyIHNTdHIgPSB1dGlsLnRvU2V0U3RyaW5nKGFTdHIpO1xuICAgIHJldHVybiBoYXMuY2FsbCh0aGlzLl9zZXQsIHNTdHIpO1xuICB9XG59O1xuXG4vKipcbiAqIFdoYXQgaXMgdGhlIGluZGV4IG9mIHRoZSBnaXZlbiBzdHJpbmcgaW4gdGhlIGFycmF5P1xuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5BcnJheVNldC5wcm90b3R5cGUuaW5kZXhPZiA9IGZ1bmN0aW9uIEFycmF5U2V0X2luZGV4T2YoYVN0cikge1xuICBpZiAoaGFzTmF0aXZlTWFwKSB7XG4gICAgdmFyIGlkeCA9IHRoaXMuX3NldC5nZXQoYVN0cik7XG4gICAgaWYgKGlkeCA+PSAwKSB7XG4gICAgICAgIHJldHVybiBpZHg7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIHZhciBzU3RyID0gdXRpbC50b1NldFN0cmluZyhhU3RyKTtcbiAgICBpZiAoaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKSkge1xuICAgICAgcmV0dXJuIHRoaXMuX3NldFtzU3RyXTtcbiAgICB9XG4gIH1cblxuICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFTdHIgKyAnXCIgaXMgbm90IGluIHRoZSBzZXQuJyk7XG59O1xuXG4vKipcbiAqIFdoYXQgaXMgdGhlIGVsZW1lbnQgYXQgdGhlIGdpdmVuIGluZGV4P1xuICpcbiAqIEBwYXJhbSBOdW1iZXIgYUlkeFxuICovXG5BcnJheVNldC5wcm90b3R5cGUuYXQgPSBmdW5jdGlvbiBBcnJheVNldF9hdChhSWR4KSB7XG4gIGlmIChhSWR4ID49IDAgJiYgYUlkeCA8IHRoaXMuX2FycmF5Lmxlbmd0aCkge1xuICAgIHJldHVybiB0aGlzLl9hcnJheVthSWR4XTtcbiAgfVxuICB0aHJvdyBuZXcgRXJyb3IoJ05vIGVsZW1lbnQgaW5kZXhlZCBieSAnICsgYUlkeCk7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIGFycmF5IHJlcHJlc2VudGF0aW9uIG9mIHRoaXMgc2V0ICh3aGljaCBoYXMgdGhlIHByb3BlciBpbmRpY2VzXG4gKiBpbmRpY2F0ZWQgYnkgaW5kZXhPZikuIE5vdGUgdGhhdCB0aGlzIGlzIGEgY29weSBvZiB0aGUgaW50ZXJuYWwgYXJyYXkgdXNlZFxuICogZm9yIHN0b3JpbmcgdGhlIG1lbWJlcnMgc28gdGhhdCBubyBvbmUgY2FuIG1lc3Mgd2l0aCBpbnRlcm5hbCBzdGF0ZS5cbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLnRvQXJyYXkgPSBmdW5jdGlvbiBBcnJheVNldF90b0FycmF5KCkge1xuICByZXR1cm4gdGhpcy5fYXJyYXkuc2xpY2UoKTtcbn07XG5cbmV4cG9ydHMuQXJyYXlTZXQgPSBBcnJheVNldDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL2FycmF5LXNldC5qc1xuLy8gbW9kdWxlIGlkID0gNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTQgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciB1dGlsID0gcmVxdWlyZSgnLi91dGlsJyk7XG5cbi8qKlxuICogRGV0ZXJtaW5lIHdoZXRoZXIgbWFwcGluZ0IgaXMgYWZ0ZXIgbWFwcGluZ0Egd2l0aCByZXNwZWN0IHRvIGdlbmVyYXRlZFxuICogcG9zaXRpb24uXG4gKi9cbmZ1bmN0aW9uIGdlbmVyYXRlZFBvc2l0aW9uQWZ0ZXIobWFwcGluZ0EsIG1hcHBpbmdCKSB7XG4gIC8vIE9wdGltaXplZCBmb3IgbW9zdCBjb21tb24gY2FzZVxuICB2YXIgbGluZUEgPSBtYXBwaW5nQS5nZW5lcmF0ZWRMaW5lO1xuICB2YXIgbGluZUIgPSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICB2YXIgY29sdW1uQSA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbjtcbiAgdmFyIGNvbHVtbkIgPSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIHJldHVybiBsaW5lQiA+IGxpbmVBIHx8IGxpbmVCID09IGxpbmVBICYmIGNvbHVtbkIgPj0gY29sdW1uQSB8fFxuICAgICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZChtYXBwaW5nQSwgbWFwcGluZ0IpIDw9IDA7XG59XG5cbi8qKlxuICogQSBkYXRhIHN0cnVjdHVyZSB0byBwcm92aWRlIGEgc29ydGVkIHZpZXcgb2YgYWNjdW11bGF0ZWQgbWFwcGluZ3MgaW4gYVxuICogcGVyZm9ybWFuY2UgY29uc2Npb3VzIG1hbm5lci4gSXQgdHJhZGVzIGEgbmVnbGliYWJsZSBvdmVyaGVhZCBpbiBnZW5lcmFsXG4gKiBjYXNlIGZvciBhIGxhcmdlIHNwZWVkdXAgaW4gY2FzZSBvZiBtYXBwaW5ncyBiZWluZyBhZGRlZCBpbiBvcmRlci5cbiAqL1xuZnVuY3Rpb24gTWFwcGluZ0xpc3QoKSB7XG4gIHRoaXMuX2FycmF5ID0gW107XG4gIHRoaXMuX3NvcnRlZCA9IHRydWU7XG4gIC8vIFNlcnZlcyBhcyBpbmZpbXVtXG4gIHRoaXMuX2xhc3QgPSB7Z2VuZXJhdGVkTGluZTogLTEsIGdlbmVyYXRlZENvbHVtbjogMH07XG59XG5cbi8qKlxuICogSXRlcmF0ZSB0aHJvdWdoIGludGVybmFsIGl0ZW1zLiBUaGlzIG1ldGhvZCB0YWtlcyB0aGUgc2FtZSBhcmd1bWVudHMgdGhhdFxuICogYEFycmF5LnByb3RvdHlwZS5mb3JFYWNoYCB0YWtlcy5cbiAqXG4gKiBOT1RFOiBUaGUgb3JkZXIgb2YgdGhlIG1hcHBpbmdzIGlzIE5PVCBndWFyYW50ZWVkLlxuICovXG5NYXBwaW5nTGlzdC5wcm90b3R5cGUudW5zb3J0ZWRGb3JFYWNoID1cbiAgZnVuY3Rpb24gTWFwcGluZ0xpc3RfZm9yRWFjaChhQ2FsbGJhY2ssIGFUaGlzQXJnKSB7XG4gICAgdGhpcy5fYXJyYXkuZm9yRWFjaChhQ2FsbGJhY2ssIGFUaGlzQXJnKTtcbiAgfTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHNvdXJjZSBtYXBwaW5nLlxuICpcbiAqIEBwYXJhbSBPYmplY3QgYU1hcHBpbmdcbiAqL1xuTWFwcGluZ0xpc3QucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIE1hcHBpbmdMaXN0X2FkZChhTWFwcGluZykge1xuICBpZiAoZ2VuZXJhdGVkUG9zaXRpb25BZnRlcih0aGlzLl9sYXN0LCBhTWFwcGluZykpIHtcbiAgICB0aGlzLl9sYXN0ID0gYU1hcHBpbmc7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhTWFwcGluZyk7XG4gIH0gZWxzZSB7XG4gICAgdGhpcy5fc29ydGVkID0gZmFsc2U7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhTWFwcGluZyk7XG4gIH1cbn07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgZmxhdCwgc29ydGVkIGFycmF5IG9mIG1hcHBpbmdzLiBUaGUgbWFwcGluZ3MgYXJlIHNvcnRlZCBieVxuICogZ2VuZXJhdGVkIHBvc2l0aW9uLlxuICpcbiAqIFdBUk5JTkc6IFRoaXMgbWV0aG9kIHJldHVybnMgaW50ZXJuYWwgZGF0YSB3aXRob3V0IGNvcHlpbmcsIGZvclxuICogcGVyZm9ybWFuY2UuIFRoZSByZXR1cm4gdmFsdWUgbXVzdCBOT1QgYmUgbXV0YXRlZCwgYW5kIHNob3VsZCBiZSB0cmVhdGVkIGFzXG4gKiBhbiBpbW11dGFibGUgYm9ycm93LiBJZiB5b3Ugd2FudCB0byB0YWtlIG93bmVyc2hpcCwgeW91IG11c3QgbWFrZSB5b3VyIG93blxuICogY29weS5cbiAqL1xuTWFwcGluZ0xpc3QucHJvdG90eXBlLnRvQXJyYXkgPSBmdW5jdGlvbiBNYXBwaW5nTGlzdF90b0FycmF5KCkge1xuICBpZiAoIXRoaXMuX3NvcnRlZCkge1xuICAgIHRoaXMuX2FycmF5LnNvcnQodXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZCk7XG4gICAgdGhpcy5fc29ydGVkID0gdHJ1ZTtcbiAgfVxuICByZXR1cm4gdGhpcy5fYXJyYXk7XG59O1xuXG5leHBvcnRzLk1hcHBpbmdMaXN0ID0gTWFwcGluZ0xpc3Q7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL2xpYi9tYXBwaW5nLWxpc3QuanNcbi8vIG1vZHVsZSBpZCA9IDZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGJpbmFyeVNlYXJjaCA9IHJlcXVpcmUoJy4vYmluYXJ5LXNlYXJjaCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBiYXNlNjRWTFEgPSByZXF1aXJlKCcuL2Jhc2U2NC12bHEnKTtcbnZhciBxdWlja1NvcnQgPSByZXF1aXJlKCcuL3F1aWNrLXNvcnQnKS5xdWlja1NvcnQ7XG5cbmZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyKGFTb3VyY2VNYXApIHtcbiAgdmFyIHNvdXJjZU1hcCA9IGFTb3VyY2VNYXA7XG4gIGlmICh0eXBlb2YgYVNvdXJjZU1hcCA9PT0gJ3N0cmluZycpIHtcbiAgICBzb3VyY2VNYXAgPSBKU09OLnBhcnNlKGFTb3VyY2VNYXAucmVwbGFjZSgvXlxcKVxcXVxcfScvLCAnJykpO1xuICB9XG5cbiAgcmV0dXJuIHNvdXJjZU1hcC5zZWN0aW9ucyAhPSBudWxsXG4gICAgPyBuZXcgSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcClcbiAgICA6IG5ldyBCYXNpY1NvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcCk7XG59XG5cblNvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAgPSBmdW5jdGlvbihhU291cmNlTWFwKSB7XG4gIHJldHVybiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAoYVNvdXJjZU1hcCk7XG59XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3ZlcnNpb24gPSAzO1xuXG4vLyBgX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kIGBfX29yaWdpbmFsTWFwcGluZ3NgIGFyZSBhcnJheXMgdGhhdCBob2xkIHRoZVxuLy8gcGFyc2VkIG1hcHBpbmcgY29vcmRpbmF0ZXMgZnJvbSB0aGUgc291cmNlIG1hcCdzIFwibWFwcGluZ3NcIiBhdHRyaWJ1dGUuIFRoZXlcbi8vIGFyZSBsYXppbHkgaW5zdGFudGlhdGVkLCBhY2Nlc3NlZCB2aWEgdGhlIGBfZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuLy8gYF9vcmlnaW5hbE1hcHBpbmdzYCBnZXR0ZXJzIHJlc3BlY3RpdmVseSwgYW5kIHdlIG9ubHkgcGFyc2UgdGhlIG1hcHBpbmdzXG4vLyBhbmQgY3JlYXRlIHRoZXNlIGFycmF5cyBvbmNlIHF1ZXJpZWQgZm9yIGEgc291cmNlIGxvY2F0aW9uLiBXZSBqdW1wIHRocm91Z2hcbi8vIHRoZXNlIGhvb3BzIGJlY2F1c2UgdGhlcmUgY2FuIGJlIG1hbnkgdGhvdXNhbmRzIG9mIG1hcHBpbmdzLCBhbmQgcGFyc2luZ1xuLy8gdGhlbSBpcyBleHBlbnNpdmUsIHNvIHdlIG9ubHkgd2FudCB0byBkbyBpdCBpZiB3ZSBtdXN0LlxuLy9cbi8vIEVhY2ggb2JqZWN0IGluIHRoZSBhcnJheXMgaXMgb2YgdGhlIGZvcm06XG4vL1xuLy8gICAgIHtcbi8vICAgICAgIGdlbmVyYXRlZExpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBnZW5lcmF0ZWRDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgY29kZSxcbi8vICAgICAgIHNvdXJjZTogVGhlIHBhdGggdG8gdGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlIHRoYXQgZ2VuZXJhdGVkIHRoaXNcbi8vICAgICAgICAgICAgICAgY2h1bmsgb2YgY29kZSxcbi8vICAgICAgIG9yaWdpbmFsTGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICBjb3JyZXNwb25kcyB0byB0aGlzIGNodW5rIG9mIGdlbmVyYXRlZCBjb2RlLFxuLy8gICAgICAgb3JpZ2luYWxDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICAgIGNvcnJlc3BvbmRzIHRvIHRoaXMgY2h1bmsgb2YgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBuYW1lOiBUaGUgbmFtZSBvZiB0aGUgb3JpZ2luYWwgc3ltYm9sIHdoaWNoIGdlbmVyYXRlZCB0aGlzIGNodW5rIG9mXG4vLyAgICAgICAgICAgICBjb2RlLlxuLy8gICAgIH1cbi8vXG4vLyBBbGwgcHJvcGVydGllcyBleGNlcHQgZm9yIGBnZW5lcmF0ZWRMaW5lYCBhbmQgYGdlbmVyYXRlZENvbHVtbmAgY2FuIGJlXG4vLyBgbnVsbGAuXG4vL1xuLy8gYF9nZW5lcmF0ZWRNYXBwaW5nc2AgaXMgb3JkZXJlZCBieSB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucy5cbi8vXG4vLyBgX29yaWdpbmFsTWFwcGluZ3NgIGlzIG9yZGVyZWQgYnkgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucy5cblxuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19nZW5lcmF0ZWRNYXBwaW5ncycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgaWYgKCF0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MpIHtcbiAgICAgIHRoaXMuX3BhcnNlTWFwcGluZ3ModGhpcy5fbWFwcGluZ3MsIHRoaXMuc291cmNlUm9vdCk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fX29yaWdpbmFsTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19vcmlnaW5hbE1hcHBpbmdzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICBpZiAoIXRoaXMuX19vcmlnaW5hbE1hcHBpbmdzKSB7XG4gICAgICB0aGlzLl9wYXJzZU1hcHBpbmdzKHRoaXMuX21hcHBpbmdzLCB0aGlzLnNvdXJjZVJvb3QpO1xuICAgIH1cblxuICAgIHJldHVybiB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fY2hhcklzTWFwcGluZ1NlcGFyYXRvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NoYXJJc01hcHBpbmdTZXBhcmF0b3IoYVN0ciwgaW5kZXgpIHtcbiAgICB2YXIgYyA9IGFTdHIuY2hhckF0KGluZGV4KTtcbiAgICByZXR1cm4gYyA9PT0gXCI7XCIgfHwgYyA9PT0gXCIsXCI7XG4gIH07XG5cbi8qKlxuICogUGFyc2UgdGhlIG1hcHBpbmdzIGluIGEgc3RyaW5nIGluIHRvIGEgZGF0YSBzdHJ1Y3R1cmUgd2hpY2ggd2UgY2FuIGVhc2lseVxuICogcXVlcnkgKHRoZSBvcmRlcmVkIGFycmF5cyBpbiB0aGUgYHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kXG4gKiBgdGhpcy5fX29yaWdpbmFsTWFwcGluZ3NgIHByb3BlcnRpZXMpLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiU3ViY2xhc3NlcyBtdXN0IGltcGxlbWVudCBfcGFyc2VNYXBwaW5nc1wiKTtcbiAgfTtcblxuU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSID0gMTtcblNvdXJjZU1hcENvbnN1bWVyLk9SSUdJTkFMX09SREVSID0gMjtcblxuU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQgPSAyO1xuXG4vKipcbiAqIEl0ZXJhdGUgb3ZlciBlYWNoIG1hcHBpbmcgYmV0d2VlbiBhbiBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4gYW5kIGFcbiAqIGdlbmVyYXRlZCBsaW5lL2NvbHVtbiBpbiB0aGlzIHNvdXJjZSBtYXAuXG4gKlxuICogQHBhcmFtIEZ1bmN0aW9uIGFDYWxsYmFja1xuICogICAgICAgIFRoZSBmdW5jdGlvbiB0aGF0IGlzIGNhbGxlZCB3aXRoIGVhY2ggbWFwcGluZy5cbiAqIEBwYXJhbSBPYmplY3QgYUNvbnRleHRcbiAqICAgICAgICBPcHRpb25hbC4gSWYgc3BlY2lmaWVkLCB0aGlzIG9iamVjdCB3aWxsIGJlIHRoZSB2YWx1ZSBvZiBgdGhpc2AgZXZlcnlcbiAqICAgICAgICB0aW1lIHRoYXQgYGFDYWxsYmFja2AgaXMgY2FsbGVkLlxuICogQHBhcmFtIGFPcmRlclxuICogICAgICAgIEVpdGhlciBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYCBvclxuICogICAgICAgIGBTb3VyY2VNYXBDb25zdW1lci5PUklHSU5BTF9PUkRFUmAuIFNwZWNpZmllcyB3aGV0aGVyIHlvdSB3YW50IHRvXG4gKiAgICAgICAgaXRlcmF0ZSBvdmVyIHRoZSBtYXBwaW5ncyBzb3J0ZWQgYnkgdGhlIGdlbmVyYXRlZCBmaWxlJ3MgbGluZS9jb2x1bW5cbiAqICAgICAgICBvcmRlciBvciB0aGUgb3JpZ2luYWwncyBzb3VyY2UvbGluZS9jb2x1bW4gb3JkZXIsIHJlc3BlY3RpdmVseS4gRGVmYXVsdHMgdG9cbiAqICAgICAgICBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYC5cbiAqL1xuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmVhY2hNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZWFjaE1hcHBpbmcoYUNhbGxiYWNrLCBhQ29udGV4dCwgYU9yZGVyKSB7XG4gICAgdmFyIGNvbnRleHQgPSBhQ29udGV4dCB8fCBudWxsO1xuICAgIHZhciBvcmRlciA9IGFPcmRlciB8fCBTb3VyY2VNYXBDb25zdW1lci5HRU5FUkFURURfT1JERVI7XG5cbiAgICB2YXIgbWFwcGluZ3M7XG4gICAgc3dpdGNoIChvcmRlcikge1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSOlxuICAgICAgbWFwcGluZ3MgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGJyZWFrO1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuT1JJR0lOQUxfT1JERVI6XG4gICAgICBtYXBwaW5ncyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3M7XG4gICAgICBicmVhaztcbiAgICBkZWZhdWx0OlxuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiVW5rbm93biBvcmRlciBvZiBpdGVyYXRpb24uXCIpO1xuICAgIH1cblxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5zb3VyY2VSb290O1xuICAgIG1hcHBpbmdzLm1hcChmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIHNvdXJjZSA9IG1hcHBpbmcuc291cmNlID09PSBudWxsID8gbnVsbCA6IHRoaXMuX3NvdXJjZXMuYXQobWFwcGluZy5zb3VyY2UpO1xuICAgICAgaWYgKHNvdXJjZSAhPSBudWxsICYmIHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4oc291cmNlUm9vdCwgc291cmNlKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgICBnZW5lcmF0ZWRMaW5lOiBtYXBwaW5nLmdlbmVyYXRlZExpbmUsXG4gICAgICAgIGdlbmVyYXRlZENvbHVtbjogbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4sXG4gICAgICAgIG9yaWdpbmFsTGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgIG9yaWdpbmFsQ29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uLFxuICAgICAgICBuYW1lOiBtYXBwaW5nLm5hbWUgPT09IG51bGwgPyBudWxsIDogdGhpcy5fbmFtZXMuYXQobWFwcGluZy5uYW1lKVxuICAgICAgfTtcbiAgICB9LCB0aGlzKS5mb3JFYWNoKGFDYWxsYmFjaywgY29udGV4dCk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyBhbGwgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIG9yaWdpbmFsIHNvdXJjZSxcbiAqIGxpbmUsIGFuZCBjb2x1bW4gcHJvdmlkZWQuIElmIG5vIGNvbHVtbiBpcyBwcm92aWRlZCwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gYSBlaXRoZXIgdGhlIGxpbmUgd2UgYXJlIHNlYXJjaGluZyBmb3Igb3IgdGhlIG5leHRcbiAqIGNsb3Nlc3QgbGluZSB0aGF0IGhhcyBhbnkgbWFwcGluZ3MuIE90aGVyd2lzZSwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gdGhlIGdpdmVuIGxpbmUgYW5kIGVpdGhlciB0aGUgY29sdW1uIHdlIGFyZSBzZWFyY2hpbmcgZm9yXG4gKiBvciB0aGUgbmV4dCBjbG9zZXN0IGNvbHVtbiB0aGF0IGhhcyBhbnkgb2Zmc2V0cy5cbiAqXG4gKiBUaGUgb25seSBhcmd1bWVudCBpcyBhbiBvYmplY3Qgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBPcHRpb25hbC4gdGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZS5cbiAqXG4gKiBhbmQgYW4gYXJyYXkgb2Ygb2JqZWN0cyBpcyByZXR1cm5lZCwgZWFjaCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UsIG9yIG51bGwuXG4gKi9cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IoYUFyZ3MpIHtcbiAgICB2YXIgbGluZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnbGluZScpO1xuXG4gICAgLy8gV2hlbiB0aGVyZSBpcyBubyBleGFjdCBtYXRjaCwgQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX2ZpbmRNYXBwaW5nXG4gICAgLy8gcmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIGNsb3Nlc3QgbWFwcGluZyBsZXNzIHRoYW4gdGhlIG5lZWRsZS4gQnlcbiAgICAvLyBzZXR0aW5nIG5lZWRsZS5vcmlnaW5hbENvbHVtbiB0byAwLCB3ZSB0aHVzIGZpbmQgdGhlIGxhc3QgbWFwcGluZyBmb3JcbiAgICAvLyB0aGUgZ2l2ZW4gbGluZSwgcHJvdmlkZWQgc3VjaCBhIG1hcHBpbmcgZXhpc3RzLlxuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBzb3VyY2U6IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyksXG4gICAgICBvcmlnaW5hbExpbmU6IGxpbmUsXG4gICAgICBvcmlnaW5hbENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nLCAwKVxuICAgIH07XG5cbiAgICBpZiAodGhpcy5zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIG5lZWRsZS5zb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgbmVlZGxlLnNvdXJjZSk7XG4gICAgfVxuICAgIGlmICghdGhpcy5fc291cmNlcy5oYXMobmVlZGxlLnNvdXJjZSkpIHtcbiAgICAgIHJldHVybiBbXTtcbiAgICB9XG4gICAgbmVlZGxlLnNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihuZWVkbGUuc291cmNlKTtcblxuICAgIHZhciBtYXBwaW5ncyA9IFtdO1xuXG4gICAgdmFyIGluZGV4ID0gdGhpcy5fZmluZE1hcHBpbmcobmVlZGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX29yaWdpbmFsTWFwcGluZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvcmlnaW5hbExpbmVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQpO1xuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAoYUFyZ3MuY29sdW1uID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgdmFyIG9yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2UgZm91bmQuIFNpbmNlXG4gICAgICAgIC8vIG1hcHBpbmdzIGFyZSBzb3J0ZWQsIHRoaXMgaXMgZ3VhcmFudGVlZCB0byBmaW5kIGFsbCBtYXBwaW5ncyBmb3JcbiAgICAgICAgLy8gdGhlIGxpbmUgd2UgZm91bmQuXG4gICAgICAgIHdoaWxlIChtYXBwaW5nICYmIG1hcHBpbmcub3JpZ2luYWxMaW5lID09PSBvcmlnaW5hbExpbmUpIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgb3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2Ugd2VyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICAvLyBTaW5jZSBtYXBwaW5ncyBhcmUgc29ydGVkLCB0aGlzIGlzIGd1YXJhbnRlZWQgdG8gZmluZCBhbGwgbWFwcGluZ3MgZm9yXG4gICAgICAgIC8vIHRoZSBsaW5lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICB3aGlsZSAobWFwcGluZyAmJlxuICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09IGxpbmUgJiZcbiAgICAgICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxDb2x1bW4gPT0gb3JpZ2luYWxDb2x1bW4pIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIG1hcHBpbmdzO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcENvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluc3RhbmNlIHJlcHJlc2VudHMgYSBwYXJzZWQgc291cmNlIG1hcCB3aGljaCB3ZSBjYW5cbiAqIHF1ZXJ5IGZvciBpbmZvcm1hdGlvbiBhYm91dCB0aGUgb3JpZ2luYWwgZmlsZSBwb3NpdGlvbnMgYnkgZ2l2aW5nIGl0IGEgZmlsZVxuICogcG9zaXRpb24gaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKlxuICogVGhlIG9ubHkgcGFyYW1ldGVyIGlzIHRoZSByYXcgc291cmNlIG1hcCAoZWl0aGVyIGFzIGEgSlNPTiBzdHJpbmcsIG9yXG4gKiBhbHJlYWR5IHBhcnNlZCB0byBhbiBvYmplY3QpLiBBY2NvcmRpbmcgdG8gdGhlIHNwZWMsIHNvdXJjZSBtYXBzIGhhdmUgdGhlXG4gKiBmb2xsb3dpbmcgYXR0cmlidXRlczpcbiAqXG4gKiAgIC0gdmVyc2lvbjogV2hpY2ggdmVyc2lvbiBvZiB0aGUgc291cmNlIG1hcCBzcGVjIHRoaXMgbWFwIGlzIGZvbGxvd2luZy5cbiAqICAgLSBzb3VyY2VzOiBBbiBhcnJheSBvZiBVUkxzIHRvIHRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZXMuXG4gKiAgIC0gbmFtZXM6IEFuIGFycmF5IG9mIGlkZW50aWZpZXJzIHdoaWNoIGNhbiBiZSByZWZlcnJlbmNlZCBieSBpbmRpdmlkdWFsIG1hcHBpbmdzLlxuICogICAtIHNvdXJjZVJvb3Q6IE9wdGlvbmFsLiBUaGUgVVJMIHJvb3QgZnJvbSB3aGljaCBhbGwgc291cmNlcyBhcmUgcmVsYXRpdmUuXG4gKiAgIC0gc291cmNlc0NvbnRlbnQ6IE9wdGlvbmFsLiBBbiBhcnJheSBvZiBjb250ZW50cyBvZiB0aGUgb3JpZ2luYWwgc291cmNlIGZpbGVzLlxuICogICAtIG1hcHBpbmdzOiBBIHN0cmluZyBvZiBiYXNlNjQgVkxRcyB3aGljaCBjb250YWluIHRoZSBhY3R1YWwgbWFwcGluZ3MuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICpcbiAqIEhlcmUgaXMgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF06XG4gKlxuICogICAgIHtcbiAqICAgICAgIHZlcnNpb24gOiAzLFxuICogICAgICAgZmlsZTogXCJvdXQuanNcIixcbiAqICAgICAgIHNvdXJjZVJvb3QgOiBcIlwiLFxuICogICAgICAgc291cmNlczogW1wiZm9vLmpzXCIsIFwiYmFyLmpzXCJdLFxuICogICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICBtYXBwaW5nczogXCJBQSxBQjs7QUJDREU7XCJcbiAqICAgICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQ/cGxpPTEjXG4gKi9cbmZ1bmN0aW9uIEJhc2ljU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNvdXJjZXMgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzJyk7XG4gIC8vIFNhc3MgMy4zIGxlYXZlcyBvdXQgdGhlICduYW1lcycgYXJyYXksIHNvIHdlIGRldmlhdGUgZnJvbSB0aGUgc3BlYyAod2hpY2hcbiAgLy8gcmVxdWlyZXMgdGhlIGFycmF5KSB0byBwbGF5IG5pY2UgaGVyZS5cbiAgdmFyIG5hbWVzID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnbmFtZXMnLCBbXSk7XG4gIHZhciBzb3VyY2VSb290ID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB2YXIgc291cmNlc0NvbnRlbnQgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzQ29udGVudCcsIG51bGwpO1xuICB2YXIgbWFwcGluZ3MgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdtYXBwaW5ncycpO1xuICB2YXIgZmlsZSA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ2ZpbGUnLCBudWxsKTtcblxuICAvLyBPbmNlIGFnYWluLCBTYXNzIGRldmlhdGVzIGZyb20gdGhlIHNwZWMgYW5kIHN1cHBsaWVzIHRoZSB2ZXJzaW9uIGFzIGFcbiAgLy8gc3RyaW5nIHJhdGhlciB0aGFuIGEgbnVtYmVyLCBzbyB3ZSB1c2UgbG9vc2UgZXF1YWxpdHkgY2hlY2tpbmcgaGVyZS5cbiAgaWYgKHZlcnNpb24gIT0gdGhpcy5fdmVyc2lvbikge1xuICAgIHRocm93IG5ldyBFcnJvcignVW5zdXBwb3J0ZWQgdmVyc2lvbjogJyArIHZlcnNpb24pO1xuICB9XG5cbiAgc291cmNlcyA9IHNvdXJjZXNcbiAgICAubWFwKFN0cmluZylcbiAgICAvLyBTb21lIHNvdXJjZSBtYXBzIHByb2R1Y2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIGxpa2UgXCIuL2Zvby5qc1wiIGluc3RlYWQgb2ZcbiAgICAvLyBcImZvby5qc1wiLiAgTm9ybWFsaXplIHRoZXNlIGZpcnN0IHNvIHRoYXQgZnV0dXJlIGNvbXBhcmlzb25zIHdpbGwgc3VjY2VlZC5cbiAgICAvLyBTZWUgYnVnemlsLmxhLzEwOTA3NjguXG4gICAgLm1hcCh1dGlsLm5vcm1hbGl6ZSlcbiAgICAvLyBBbHdheXMgZW5zdXJlIHRoYXQgYWJzb2x1dGUgc291cmNlcyBhcmUgaW50ZXJuYWxseSBzdG9yZWQgcmVsYXRpdmUgdG9cbiAgICAvLyB0aGUgc291cmNlIHJvb3QsIGlmIHRoZSBzb3VyY2Ugcm9vdCBpcyBhYnNvbHV0ZS4gTm90IGRvaW5nIHRoaXMgd291bGRcbiAgICAvLyBiZSBwYXJ0aWN1bGFybHkgcHJvYmxlbWF0aWMgd2hlbiB0aGUgc291cmNlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlXG4gICAgLy8gc291cmNlICh2YWxpZCwgYnV0IHdoeT8/KS4gU2VlIGdpdGh1YiBpc3N1ZSAjMTk5IGFuZCBidWd6aWwubGEvMTE4ODk4Mi5cbiAgICAubWFwKGZ1bmN0aW9uIChzb3VyY2UpIHtcbiAgICAgIHJldHVybiBzb3VyY2VSb290ICYmIHV0aWwuaXNBYnNvbHV0ZShzb3VyY2VSb290KSAmJiB1dGlsLmlzQWJzb2x1dGUoc291cmNlKVxuICAgICAgICA/IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlKVxuICAgICAgICA6IHNvdXJjZTtcbiAgICB9KTtcblxuICAvLyBQYXNzIGB0cnVlYCBiZWxvdyB0byBhbGxvdyBkdXBsaWNhdGUgbmFtZXMgYW5kIHNvdXJjZXMuIFdoaWxlIHNvdXJjZSBtYXBzXG4gIC8vIGFyZSBpbnRlbmRlZCB0byBiZSBjb21wcmVzc2VkIGFuZCBkZWR1cGxpY2F0ZWQsIHRoZSBUeXBlU2NyaXB0IGNvbXBpbGVyXG4gIC8vIHNvbWV0aW1lcyBnZW5lcmF0ZXMgc291cmNlIG1hcHMgd2l0aCBkdXBsaWNhdGVzIGluIHRoZW0uIFNlZSBHaXRodWIgaXNzdWVcbiAgLy8gIzcyIGFuZCBidWd6aWwubGEvODg5NDkyLlxuICB0aGlzLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShuYW1lcy5tYXAoU3RyaW5nKSwgdHJ1ZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBBcnJheVNldC5mcm9tQXJyYXkoc291cmNlcywgdHJ1ZSk7XG5cbiAgdGhpcy5zb3VyY2VSb290ID0gc291cmNlUm9vdDtcbiAgdGhpcy5zb3VyY2VzQ29udGVudCA9IHNvdXJjZXNDb250ZW50O1xuICB0aGlzLl9tYXBwaW5ncyA9IG1hcHBpbmdzO1xuICB0aGlzLmZpbGUgPSBmaWxlO1xufVxuXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlKTtcbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQ3JlYXRlIGEgQmFzaWNTb3VyY2VNYXBDb25zdW1lciBmcm9tIGEgU291cmNlTWFwR2VuZXJhdG9yLlxuICpcbiAqIEBwYXJhbSBTb3VyY2VNYXBHZW5lcmF0b3IgYVNvdXJjZU1hcFxuICogICAgICAgIFRoZSBzb3VyY2UgbWFwIHRoYXQgd2lsbCBiZSBjb25zdW1lZC5cbiAqIEByZXR1cm5zIEJhc2ljU291cmNlTWFwQ29uc3VtZXJcbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5mcm9tU291cmNlTWFwID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwKSB7XG4gICAgdmFyIHNtYyA9IE9iamVjdC5jcmVhdGUoQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuXG4gICAgdmFyIG5hbWVzID0gc21jLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShhU291cmNlTWFwLl9uYW1lcy50b0FycmF5KCksIHRydWUpO1xuICAgIHZhciBzb3VyY2VzID0gc21jLl9zb3VyY2VzID0gQXJyYXlTZXQuZnJvbUFycmF5KGFTb3VyY2VNYXAuX3NvdXJjZXMudG9BcnJheSgpLCB0cnVlKTtcbiAgICBzbWMuc291cmNlUm9vdCA9IGFTb3VyY2VNYXAuX3NvdXJjZVJvb3Q7XG4gICAgc21jLnNvdXJjZXNDb250ZW50ID0gYVNvdXJjZU1hcC5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudChzbWMuX3NvdXJjZXMudG9BcnJheSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc21jLnNvdXJjZVJvb3QpO1xuICAgIHNtYy5maWxlID0gYVNvdXJjZU1hcC5fZmlsZTtcblxuICAgIC8vIEJlY2F1c2Ugd2UgYXJlIG1vZGlmeWluZyB0aGUgZW50cmllcyAoYnkgY29udmVydGluZyBzdHJpbmcgc291cmNlcyBhbmRcbiAgICAvLyBuYW1lcyB0byBpbmRpY2VzIGludG8gdGhlIHNvdXJjZXMgYW5kIG5hbWVzIEFycmF5U2V0cyksIHdlIGhhdmUgdG8gbWFrZVxuICAgIC8vIGEgY29weSBvZiB0aGUgZW50cnkgb3IgZWxzZSBiYWQgdGhpbmdzIGhhcHBlbi4gU2hhcmVkIG11dGFibGUgc3RhdGVcbiAgICAvLyBzdHJpa2VzIGFnYWluISBTZWUgZ2l0aHViIGlzc3VlICMxOTEuXG5cbiAgICB2YXIgZ2VuZXJhdGVkTWFwcGluZ3MgPSBhU291cmNlTWFwLl9tYXBwaW5ncy50b0FycmF5KCkuc2xpY2UoKTtcbiAgICB2YXIgZGVzdEdlbmVyYXRlZE1hcHBpbmdzID0gc21jLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBbXTtcbiAgICB2YXIgZGVzdE9yaWdpbmFsTWFwcGluZ3MgPSBzbWMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG5cbiAgICBmb3IgKHZhciBpID0gMCwgbGVuZ3RoID0gZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgIHZhciBzcmNNYXBwaW5nID0gZ2VuZXJhdGVkTWFwcGluZ3NbaV07XG4gICAgICB2YXIgZGVzdE1hcHBpbmcgPSBuZXcgTWFwcGluZztcbiAgICAgIGRlc3RNYXBwaW5nLmdlbmVyYXRlZExpbmUgPSBzcmNNYXBwaW5nLmdlbmVyYXRlZExpbmU7XG4gICAgICBkZXN0TWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gPSBzcmNNYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgaWYgKHNyY01hcHBpbmcuc291cmNlKSB7XG4gICAgICAgIGRlc3RNYXBwaW5nLnNvdXJjZSA9IHNvdXJjZXMuaW5kZXhPZihzcmNNYXBwaW5nLnNvdXJjZSk7XG4gICAgICAgIGRlc3RNYXBwaW5nLm9yaWdpbmFsTGluZSA9IHNyY01hcHBpbmcub3JpZ2luYWxMaW5lO1xuICAgICAgICBkZXN0TWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IHNyY01hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgaWYgKHNyY01hcHBpbmcubmFtZSkge1xuICAgICAgICAgIGRlc3RNYXBwaW5nLm5hbWUgPSBuYW1lcy5pbmRleE9mKHNyY01hcHBpbmcubmFtZSk7XG4gICAgICAgIH1cblxuICAgICAgICBkZXN0T3JpZ2luYWxNYXBwaW5ncy5wdXNoKGRlc3RNYXBwaW5nKTtcbiAgICAgIH1cblxuICAgICAgZGVzdEdlbmVyYXRlZE1hcHBpbmdzLnB1c2goZGVzdE1hcHBpbmcpO1xuICAgIH1cblxuICAgIHF1aWNrU29ydChzbWMuX19vcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcblxuICAgIHJldHVybiBzbWM7XG4gIH07XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLCAnc291cmNlcycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NvdXJjZXMudG9BcnJheSgpLm1hcChmdW5jdGlvbiAocykge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlUm9vdCAhPSBudWxsID8gdXRpbC5qb2luKHRoaXMuc291cmNlUm9vdCwgcykgOiBzO1xuICAgIH0sIHRoaXMpO1xuICB9XG59KTtcblxuLyoqXG4gKiBQcm92aWRlIHRoZSBKSVQgd2l0aCBhIG5pY2Ugc2hhcGUgLyBoaWRkZW4gY2xhc3MuXG4gKi9cbmZ1bmN0aW9uIE1hcHBpbmcoKSB7XG4gIHRoaXMuZ2VuZXJhdGVkTGluZSA9IDA7XG4gIHRoaXMuZ2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgdGhpcy5zb3VyY2UgPSBudWxsO1xuICB0aGlzLm9yaWdpbmFsTGluZSA9IG51bGw7XG4gIHRoaXMub3JpZ2luYWxDb2x1bW4gPSBudWxsO1xuICB0aGlzLm5hbWUgPSBudWxsO1xufVxuXG4vKipcbiAqIFBhcnNlIHRoZSBtYXBwaW5ncyBpbiBhIHN0cmluZyBpbiB0byBhIGRhdGEgc3RydWN0dXJlIHdoaWNoIHdlIGNhbiBlYXNpbHlcbiAqIHF1ZXJ5ICh0aGUgb3JkZXJlZCBhcnJheXMgaW4gdGhlIGB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuICogYHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzYCBwcm9wZXJ0aWVzKS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdmFyIGdlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzU291cmNlID0gMDtcbiAgICB2YXIgcHJldmlvdXNOYW1lID0gMDtcbiAgICB2YXIgbGVuZ3RoID0gYVN0ci5sZW5ndGg7XG4gICAgdmFyIGluZGV4ID0gMDtcbiAgICB2YXIgY2FjaGVkU2VnbWVudHMgPSB7fTtcbiAgICB2YXIgdGVtcCA9IHt9O1xuICAgIHZhciBvcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgdmFyIGdlbmVyYXRlZE1hcHBpbmdzID0gW107XG4gICAgdmFyIG1hcHBpbmcsIHN0ciwgc2VnbWVudCwgZW5kLCB2YWx1ZTtcblxuICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgaWYgKGFTdHIuY2hhckF0KGluZGV4KSA9PT0gJzsnKSB7XG4gICAgICAgIGdlbmVyYXRlZExpbmUrKztcbiAgICAgICAgaW5kZXgrKztcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgICAgfVxuICAgICAgZWxzZSBpZiAoYVN0ci5jaGFyQXQoaW5kZXgpID09PSAnLCcpIHtcbiAgICAgICAgaW5kZXgrKztcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBtYXBwaW5nID0gbmV3IE1hcHBpbmcoKTtcbiAgICAgICAgbWFwcGluZy5nZW5lcmF0ZWRMaW5lID0gZ2VuZXJhdGVkTGluZTtcblxuICAgICAgICAvLyBCZWNhdXNlIGVhY2ggb2Zmc2V0IGlzIGVuY29kZWQgcmVsYXRpdmUgdG8gdGhlIHByZXZpb3VzIG9uZSxcbiAgICAgICAgLy8gbWFueSBzZWdtZW50cyBvZnRlbiBoYXZlIHRoZSBzYW1lIGVuY29kaW5nLiBXZSBjYW4gZXhwbG9pdCB0aGlzXG4gICAgICAgIC8vIGZhY3QgYnkgY2FjaGluZyB0aGUgcGFyc2VkIHZhcmlhYmxlIGxlbmd0aCBmaWVsZHMgb2YgZWFjaCBzZWdtZW50LFxuICAgICAgICAvLyBhbGxvd2luZyB1cyB0byBhdm9pZCBhIHNlY29uZCBwYXJzZSBpZiB3ZSBlbmNvdW50ZXIgdGhlIHNhbWVcbiAgICAgICAgLy8gc2VnbWVudCBhZ2Fpbi5cbiAgICAgICAgZm9yIChlbmQgPSBpbmRleDsgZW5kIDwgbGVuZ3RoOyBlbmQrKykge1xuICAgICAgICAgIGlmICh0aGlzLl9jaGFySXNNYXBwaW5nU2VwYXJhdG9yKGFTdHIsIGVuZCkpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdHIgPSBhU3RyLnNsaWNlKGluZGV4LCBlbmQpO1xuXG4gICAgICAgIHNlZ21lbnQgPSBjYWNoZWRTZWdtZW50c1tzdHJdO1xuICAgICAgICBpZiAoc2VnbWVudCkge1xuICAgICAgICAgIGluZGV4ICs9IHN0ci5sZW5ndGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2VnbWVudCA9IFtdO1xuICAgICAgICAgIHdoaWxlIChpbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgYmFzZTY0VkxRLmRlY29kZShhU3RyLCBpbmRleCwgdGVtcCk7XG4gICAgICAgICAgICB2YWx1ZSA9IHRlbXAudmFsdWU7XG4gICAgICAgICAgICBpbmRleCA9IHRlbXAucmVzdDtcbiAgICAgICAgICAgIHNlZ21lbnQucHVzaCh2YWx1ZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlLCBidXQgbm8gbGluZSBhbmQgY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlIGFuZCBsaW5lLCBidXQgbm8gY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FjaGVkU2VnbWVudHNbc3RyXSA9IHNlZ21lbnQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBHZW5lcmF0ZWQgY29sdW1uLlxuICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gcHJldmlvdXNTb3VyY2UgKyBzZWdtZW50WzFdO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlICs9IHNlZ21lbnRbMV07XG5cbiAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxMaW5lID0gcHJldmlvdXNPcmlnaW5hbExpbmUgKyBzZWdtZW50WzJdO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG4gICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgKz0gMTtcblxuICAgICAgICAgIC8vIE9yaWdpbmFsIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiA0KSB7XG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gcHJldmlvdXNOYW1lICsgc2VnbWVudFs0XTtcbiAgICAgICAgICAgIHByZXZpb3VzTmFtZSArPSBzZWdtZW50WzRdO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGdlbmVyYXRlZE1hcHBpbmdzLnB1c2gobWFwcGluZyk7XG4gICAgICAgIGlmICh0eXBlb2YgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgb3JpZ2luYWxNYXBwaW5ncy5wdXNoKG1hcHBpbmcpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcXVpY2tTb3J0KGdlbmVyYXRlZE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKTtcbiAgICB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBnZW5lcmF0ZWRNYXBwaW5ncztcblxuICAgIHF1aWNrU29ydChvcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcbiAgICB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncyA9IG9yaWdpbmFsTWFwcGluZ3M7XG4gIH07XG5cbi8qKlxuICogRmluZCB0aGUgbWFwcGluZyB0aGF0IGJlc3QgbWF0Y2hlcyB0aGUgaHlwb3RoZXRpY2FsIFwibmVlZGxlXCIgbWFwcGluZyB0aGF0XG4gKiB3ZSBhcmUgc2VhcmNoaW5nIGZvciBpbiB0aGUgZ2l2ZW4gXCJoYXlzdGFja1wiIG9mIG1hcHBpbmdzLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fZmluZE1hcHBpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9maW5kTWFwcGluZyhhTmVlZGxlLCBhTWFwcGluZ3MsIGFMaW5lTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUNvbHVtbk5hbWUsIGFDb21wYXJhdG9yLCBhQmlhcykge1xuICAgIC8vIFRvIHJldHVybiB0aGUgcG9zaXRpb24gd2UgYXJlIHNlYXJjaGluZyBmb3IsIHdlIG11c3QgZmlyc3QgZmluZCB0aGVcbiAgICAvLyBtYXBwaW5nIGZvciB0aGUgZ2l2ZW4gcG9zaXRpb24gYW5kIHRoZW4gcmV0dXJuIHRoZSBvcHBvc2l0ZSBwb3NpdGlvbiBpdFxuICAgIC8vIHBvaW50cyB0by4gQmVjYXVzZSB0aGUgbWFwcGluZ3MgYXJlIHNvcnRlZCwgd2UgY2FuIHVzZSBiaW5hcnkgc2VhcmNoIHRvXG4gICAgLy8gZmluZCB0aGUgYmVzdCBtYXBwaW5nLlxuXG4gICAgaWYgKGFOZWVkbGVbYUxpbmVOYW1lXSA8PSAwKSB7XG4gICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdMaW5lIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDEsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthTGluZU5hbWVdKTtcbiAgICB9XG4gICAgaWYgKGFOZWVkbGVbYUNvbHVtbk5hbWVdIDwgMCkge1xuICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQ29sdW1uIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDAsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthQ29sdW1uTmFtZV0pO1xuICAgIH1cblxuICAgIHJldHVybiBiaW5hcnlTZWFyY2guc2VhcmNoKGFOZWVkbGUsIGFNYXBwaW5ncywgYUNvbXBhcmF0b3IsIGFCaWFzKTtcbiAgfTtcblxuLyoqXG4gKiBDb21wdXRlIHRoZSBsYXN0IGNvbHVtbiBmb3IgZWFjaCBnZW5lcmF0ZWQgbWFwcGluZy4gVGhlIGxhc3QgY29sdW1uIGlzXG4gKiBpbmNsdXNpdmUuXG4gKi9cbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbXB1dGVDb2x1bW5TcGFucyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NvbXB1dGVDb2x1bW5TcGFucygpIHtcbiAgICBmb3IgKHZhciBpbmRleCA9IDA7IGluZGV4IDwgdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyArK2luZGV4KSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzW2luZGV4XTtcblxuICAgICAgLy8gTWFwcGluZ3MgZG8gbm90IGNvbnRhaW4gYSBmaWVsZCBmb3IgdGhlIGxhc3QgZ2VuZXJhdGVkIGNvbHVtbnQuIFdlXG4gICAgICAvLyBjYW4gY29tZSB1cCB3aXRoIGFuIG9wdGltaXN0aWMgZXN0aW1hdGUsIGhvd2V2ZXIsIGJ5IGFzc3VtaW5nIHRoYXRcbiAgICAgIC8vIG1hcHBpbmdzIGFyZSBjb250aWd1b3VzIChpLmUuIGdpdmVuIHR3byBjb25zZWN1dGl2ZSBtYXBwaW5ncywgdGhlXG4gICAgICAvLyBmaXJzdCBtYXBwaW5nIGVuZHMgd2hlcmUgdGhlIHNlY29uZCBvbmUgc3RhcnRzKS5cbiAgICAgIGlmIChpbmRleCArIDEgPCB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncy5sZW5ndGgpIHtcbiAgICAgICAgdmFyIG5leHRNYXBwaW5nID0gdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3NbaW5kZXggKyAxXTtcblxuICAgICAgICBpZiAobWFwcGluZy5nZW5lcmF0ZWRMaW5lID09PSBuZXh0TWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gbmV4dE1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC0gMTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBUaGUgbGFzdCBtYXBwaW5nIGZvciBlYWNoIGxpbmUgc3BhbnMgdGhlIGVudGlyZSBsaW5lLlxuICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gSW5maW5pdHk7XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIG9yaWdpbmFsIHNvdXJjZSwgbGluZSwgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucyBwcm92aWRlZC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgYW4gb2JqZWN0XG4gKiB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKiAgIC0gYmlhczogRWl0aGVyICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICogICAgIERlZmF1bHRzIHRvICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcuXG4gKlxuICogYW5kIGFuIG9iamVjdCBpcyByZXR1cm5lZCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gc291cmNlOiBUaGUgb3JpZ2luYWwgc291cmNlIGZpbGUsIG9yIG51bGwuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UsIG9yIG51bGwuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIG5hbWU6IFRoZSBvcmlnaW5hbCBpZGVudGlmaWVyLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfb3JpZ2luYWxQb3NpdGlvbkZvcihhQXJncykge1xuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nKVxuICAgIH07XG5cbiAgICB2YXIgaW5kZXggPSB0aGlzLl9maW5kTWFwcGluZyhcbiAgICAgIG5lZWRsZSxcbiAgICAgIHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzLFxuICAgICAgXCJnZW5lcmF0ZWRMaW5lXCIsXG4gICAgICBcImdlbmVyYXRlZENvbHVtblwiLFxuICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCxcbiAgICAgIHV0aWwuZ2V0QXJnKGFBcmdzLCAnYmlhcycsIFNvdXJjZU1hcENvbnN1bWVyLkdSRUFURVNUX0xPV0VSX0JPVU5EKVxuICAgICk7XG5cbiAgICBpZiAoaW5kZXggPj0gMCkge1xuICAgICAgdmFyIG1hcHBpbmcgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5nc1tpbmRleF07XG5cbiAgICAgIGlmIChtYXBwaW5nLmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHZhciBzb3VyY2UgPSB1dGlsLmdldEFyZyhtYXBwaW5nLCAnc291cmNlJywgbnVsbCk7XG4gICAgICAgIGlmIChzb3VyY2UgIT09IG51bGwpIHtcbiAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmF0KHNvdXJjZSk7XG4gICAgICAgICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4odGhpcy5zb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZSA9IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICduYW1lJywgbnVsbCk7XG4gICAgICAgIGlmIChuYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgbmFtZSA9IHRoaXMuX25hbWVzLmF0KG5hbWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgbGluZTogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsQ29sdW1uJywgbnVsbCksXG4gICAgICAgICAgbmFtZTogbmFtZVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBzb3VyY2U6IG51bGwsXG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgbmFtZTogbnVsbFxuICAgIH07XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuaGFzQ29udGVudHNPZkFsbFNvdXJjZXMgPVxuICBmdW5jdGlvbiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyX2hhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCkge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudC5sZW5ndGggPj0gdGhpcy5fc291cmNlcy5zaXplKCkgJiZcbiAgICAgICF0aGlzLnNvdXJjZXNDb250ZW50LnNvbWUoZnVuY3Rpb24gKHNjKSB7IHJldHVybiBzYyA9PSBudWxsOyB9KTtcbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UgY29udGVudC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgdGhlIHVybCBvZiB0aGVcbiAqIG9yaWdpbmFsIHNvdXJjZSBmaWxlLiBSZXR1cm5zIG51bGwgaWYgbm8gb3JpZ2luYWwgc291cmNlIGNvbnRlbnQgaXNcbiAqIGF2YWlsYWJsZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX3NvdXJjZUNvbnRlbnRGb3IoYVNvdXJjZSwgbnVsbE9uTWlzc2luZykge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBhU291cmNlID0gdXRpbC5yZWxhdGl2ZSh0aGlzLnNvdXJjZVJvb3QsIGFTb3VyY2UpO1xuICAgIH1cblxuICAgIGlmICh0aGlzLl9zb3VyY2VzLmhhcyhhU291cmNlKSkge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlc0NvbnRlbnRbdGhpcy5fc291cmNlcy5pbmRleE9mKGFTb3VyY2UpXTtcbiAgICB9XG5cbiAgICB2YXIgdXJsO1xuICAgIGlmICh0aGlzLnNvdXJjZVJvb3QgIT0gbnVsbFxuICAgICAgICAmJiAodXJsID0gdXRpbC51cmxQYXJzZSh0aGlzLnNvdXJjZVJvb3QpKSkge1xuICAgICAgLy8gWFhYOiBmaWxlOi8vIFVSSXMgYW5kIGFic29sdXRlIHBhdGhzIGxlYWQgdG8gdW5leHBlY3RlZCBiZWhhdmlvciBmb3JcbiAgICAgIC8vIG1hbnkgdXNlcnMuIFdlIGNhbiBoZWxwIHRoZW0gb3V0IHdoZW4gdGhleSBleHBlY3QgZmlsZTovLyBVUklzIHRvXG4gICAgICAvLyBiZWhhdmUgbGlrZSBpdCB3b3VsZCBpZiB0aGV5IHdlcmUgcnVubmluZyBhIGxvY2FsIEhUVFAgc2VydmVyLiBTZWVcbiAgICAgIC8vIGh0dHBzOi8vYnVnemlsbGEubW96aWxsYS5vcmcvc2hvd19idWcuY2dpP2lkPTg4NTU5Ny5cbiAgICAgIHZhciBmaWxlVXJpQWJzUGF0aCA9IGFTb3VyY2UucmVwbGFjZSgvXmZpbGU6XFwvXFwvLywgXCJcIik7XG4gICAgICBpZiAodXJsLnNjaGVtZSA9PSBcImZpbGVcIlxuICAgICAgICAgICYmIHRoaXMuX3NvdXJjZXMuaGFzKGZpbGVVcmlBYnNQYXRoKSkge1xuICAgICAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudFt0aGlzLl9zb3VyY2VzLmluZGV4T2YoZmlsZVVyaUFic1BhdGgpXVxuICAgICAgfVxuXG4gICAgICBpZiAoKCF1cmwucGF0aCB8fCB1cmwucGF0aCA9PSBcIi9cIilcbiAgICAgICAgICAmJiB0aGlzLl9zb3VyY2VzLmhhcyhcIi9cIiArIGFTb3VyY2UpKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnNvdXJjZXNDb250ZW50W3RoaXMuX3NvdXJjZXMuaW5kZXhPZihcIi9cIiArIGFTb3VyY2UpXTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBUaGlzIGZ1bmN0aW9uIGlzIHVzZWQgcmVjdXJzaXZlbHkgZnJvbVxuICAgIC8vIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvci4gSW4gdGhhdCBjYXNlLCB3ZVxuICAgIC8vIGRvbid0IHdhbnQgdG8gdGhyb3cgaWYgd2UgY2FuJ3QgZmluZCB0aGUgc291cmNlIC0gd2UganVzdCB3YW50IHRvXG4gICAgLy8gcmV0dXJuIG51bGwsIHNvIHdlIHByb3ZpZGUgYSBmbGFnIHRvIGV4aXQgZ3JhY2VmdWxseS5cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICogICAtIGJpYXM6IEVpdGhlciAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnIG9yXG4gKiAgICAgJ1NvdXJjZU1hcENvbnN1bWVyLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5nZW5lcmF0ZWRQb3NpdGlvbkZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyk7XG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG4gICAgaWYgKCF0aGlzLl9zb3VyY2VzLmhhcyhzb3VyY2UpKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBsaW5lOiBudWxsLFxuICAgICAgICBjb2x1bW46IG51bGwsXG4gICAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICAgIH07XG4gICAgfVxuICAgIHNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihzb3VyY2UpO1xuXG4gICAgdmFyIG5lZWRsZSA9IHtcbiAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgb3JpZ2luYWxMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIG9yaWdpbmFsQ29sdW1uOiB1dGlsLmdldEFyZyhhQXJncywgJ2NvbHVtbicpXG4gICAgfTtcblxuICAgIHZhciBpbmRleCA9IHRoaXMuX2ZpbmRNYXBwaW5nKFxuICAgICAgbmVlZGxlLFxuICAgICAgdGhpcy5fb3JpZ2luYWxNYXBwaW5ncyxcbiAgICAgIFwib3JpZ2luYWxMaW5lXCIsXG4gICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zLFxuICAgICAgdXRpbC5nZXRBcmcoYUFyZ3MsICdiaWFzJywgU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQpXG4gICAgKTtcblxuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgPT09IG5lZWRsZS5zb3VyY2UpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBsaW5lOiB1dGlsLmdldEFyZyhtYXBwaW5nLCAnZ2VuZXJhdGVkTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ2dlbmVyYXRlZENvbHVtbicsIG51bGwpLFxuICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgbGluZTogbnVsbCxcbiAgICAgIGNvbHVtbjogbnVsbCxcbiAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICB9O1xuICB9O1xuXG5leHBvcnRzLkJhc2ljU291cmNlTWFwQ29uc3VtZXIgPSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIEFuIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lciBpbnN0YW5jZSByZXByZXNlbnRzIGEgcGFyc2VkIHNvdXJjZSBtYXAgd2hpY2hcbiAqIHdlIGNhbiBxdWVyeSBmb3IgaW5mb3JtYXRpb24uIEl0IGRpZmZlcnMgZnJvbSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluXG4gKiB0aGF0IGl0IHRha2VzIFwiaW5kZXhlZFwiIHNvdXJjZSBtYXBzIChpLmUuIG9uZXMgd2l0aCBhIFwic2VjdGlvbnNcIiBmaWVsZCkgYXNcbiAqIGlucHV0LlxuICpcbiAqIFRoZSBvbmx5IHBhcmFtZXRlciBpcyBhIHJhdyBzb3VyY2UgbWFwIChlaXRoZXIgYXMgYSBKU09OIHN0cmluZywgb3IgYWxyZWFkeVxuICogcGFyc2VkIHRvIGFuIG9iamVjdCkuIEFjY29yZGluZyB0byB0aGUgc3BlYyBmb3IgaW5kZXhlZCBzb3VyY2UgbWFwcywgdGhleVxuICogaGF2ZSB0aGUgZm9sbG93aW5nIGF0dHJpYnV0ZXM6XG4gKlxuICogICAtIHZlcnNpb246IFdoaWNoIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXAgc3BlYyB0aGlzIG1hcCBpcyBmb2xsb3dpbmcuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICogICAtIHNlY3Rpb25zOiBBIGxpc3Qgb2Ygc2VjdGlvbiBkZWZpbml0aW9ucy5cbiAqXG4gKiBFYWNoIHZhbHVlIHVuZGVyIHRoZSBcInNlY3Rpb25zXCIgZmllbGQgaGFzIHR3byBmaWVsZHM6XG4gKiAgIC0gb2Zmc2V0OiBUaGUgb2Zmc2V0IGludG8gdGhlIG9yaWdpbmFsIHNwZWNpZmllZCBhdCB3aGljaCB0aGlzIHNlY3Rpb25cbiAqICAgICAgIGJlZ2lucyB0byBhcHBseSwgZGVmaW5lZCBhcyBhbiBvYmplY3Qgd2l0aCBhIFwibGluZVwiIGFuZCBcImNvbHVtblwiXG4gKiAgICAgICBmaWVsZC5cbiAqICAgLSBtYXA6IEEgc291cmNlIG1hcCBkZWZpbml0aW9uLiBUaGlzIHNvdXJjZSBtYXAgY291bGQgYWxzbyBiZSBpbmRleGVkLFxuICogICAgICAgYnV0IGRvZXNuJ3QgaGF2ZSB0byBiZS5cbiAqXG4gKiBJbnN0ZWFkIG9mIHRoZSBcIm1hcFwiIGZpZWxkLCBpdCdzIGFsc28gcG9zc2libGUgdG8gaGF2ZSBhIFwidXJsXCIgZmllbGRcbiAqIHNwZWNpZnlpbmcgYSBVUkwgdG8gcmV0cmlldmUgYSBzb3VyY2UgbWFwIGZyb20sIGJ1dCB0aGF0J3MgY3VycmVudGx5XG4gKiB1bnN1cHBvcnRlZC5cbiAqXG4gKiBIZXJlJ3MgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF0sIGJ1dFxuICogbW9kaWZpZWQgdG8gb21pdCBhIHNlY3Rpb24gd2hpY2ggdXNlcyB0aGUgXCJ1cmxcIiBmaWVsZC5cbiAqXG4gKiAge1xuICogICAgdmVyc2lvbiA6IDMsXG4gKiAgICBmaWxlOiBcImFwcC5qc1wiLFxuICogICAgc2VjdGlvbnM6IFt7XG4gKiAgICAgIG9mZnNldDoge2xpbmU6MTAwLCBjb2x1bW46MTB9LFxuICogICAgICBtYXA6IHtcbiAqICAgICAgICB2ZXJzaW9uIDogMyxcbiAqICAgICAgICBmaWxlOiBcInNlY3Rpb24uanNcIixcbiAqICAgICAgICBzb3VyY2VzOiBbXCJmb28uanNcIiwgXCJiYXIuanNcIl0sXG4gKiAgICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICAgbWFwcGluZ3M6IFwiQUFBQSxFOztBQkNERTtcIlxuICogICAgICB9XG4gKiAgICB9XSxcbiAqICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQjaGVhZGluZz1oLjUzNWVzM3hlcHJndFxuICovXG5mdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNlY3Rpb25zID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc2VjdGlvbnMnKTtcblxuICBpZiAodmVyc2lvbiAhPSB0aGlzLl92ZXJzaW9uKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdVbnN1cHBvcnRlZCB2ZXJzaW9uOiAnICsgdmVyc2lvbik7XG4gIH1cblxuICB0aGlzLl9zb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gIHRoaXMuX25hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgdmFyIGxhc3RPZmZzZXQgPSB7XG4gICAgbGluZTogLTEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHRoaXMuX3NlY3Rpb25zID0gc2VjdGlvbnMubWFwKGZ1bmN0aW9uIChzKSB7XG4gICAgaWYgKHMudXJsKSB7XG4gICAgICAvLyBUaGUgdXJsIGZpZWxkIHdpbGwgcmVxdWlyZSBzdXBwb3J0IGZvciBhc3luY2hyb25pY2l0eS5cbiAgICAgIC8vIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8xNlxuICAgICAgdGhyb3cgbmV3IEVycm9yKCdTdXBwb3J0IGZvciB1cmwgZmllbGQgaW4gc2VjdGlvbnMgbm90IGltcGxlbWVudGVkLicpO1xuICAgIH1cbiAgICB2YXIgb2Zmc2V0ID0gdXRpbC5nZXRBcmcocywgJ29mZnNldCcpO1xuICAgIHZhciBvZmZzZXRMaW5lID0gdXRpbC5nZXRBcmcob2Zmc2V0LCAnbGluZScpO1xuICAgIHZhciBvZmZzZXRDb2x1bW4gPSB1dGlsLmdldEFyZyhvZmZzZXQsICdjb2x1bW4nKTtcblxuICAgIGlmIChvZmZzZXRMaW5lIDwgbGFzdE9mZnNldC5saW5lIHx8XG4gICAgICAgIChvZmZzZXRMaW5lID09PSBsYXN0T2Zmc2V0LmxpbmUgJiYgb2Zmc2V0Q29sdW1uIDwgbGFzdE9mZnNldC5jb2x1bW4pKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ1NlY3Rpb24gb2Zmc2V0cyBtdXN0IGJlIG9yZGVyZWQgYW5kIG5vbi1vdmVybGFwcGluZy4nKTtcbiAgICB9XG4gICAgbGFzdE9mZnNldCA9IG9mZnNldDtcblxuICAgIHJldHVybiB7XG4gICAgICBnZW5lcmF0ZWRPZmZzZXQ6IHtcbiAgICAgICAgLy8gVGhlIG9mZnNldCBmaWVsZHMgYXJlIDAtYmFzZWQsIGJ1dCB3ZSB1c2UgMS1iYXNlZCBpbmRpY2VzIHdoZW5cbiAgICAgICAgLy8gZW5jb2RpbmcvZGVjb2RpbmcgZnJvbSBWTFEuXG4gICAgICAgIGdlbmVyYXRlZExpbmU6IG9mZnNldExpbmUgKyAxLFxuICAgICAgICBnZW5lcmF0ZWRDb2x1bW46IG9mZnNldENvbHVtbiArIDFcbiAgICAgIH0sXG4gICAgICBjb25zdW1lcjogbmV3IFNvdXJjZU1hcENvbnN1bWVyKHV0aWwuZ2V0QXJnKHMsICdtYXAnKSlcbiAgICB9XG4gIH0pO1xufVxuXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IFNvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIFRoZSB2ZXJzaW9uIG9mIHRoZSBzb3VyY2UgbWFwcGluZyBzcGVjIHRoYXQgd2UgYXJlIGNvbnN1bWluZy5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUsICdzb3VyY2VzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgc291cmNlcyA9IFtdO1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5fc2VjdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlcy5sZW5ndGg7IGorKykge1xuICAgICAgICBzb3VyY2VzLnB1c2godGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlc1tqXSk7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBzb3VyY2VzO1xuICB9XG59KTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UsIGxpbmUsIGFuZCBjb2x1bW4gaW5mb3JtYXRpb24gZm9yIHRoZSBnZW5lcmF0ZWRcbiAqIHNvdXJjZSdzIGxpbmUgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdFxuICogd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlLCBvciBudWxsLlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBuYW1lOiBUaGUgb3JpZ2luYWwgaWRlbnRpZmllciwgb3IgbnVsbC5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX29yaWdpbmFsUG9zaXRpb25Gb3IoYUFyZ3MpIHtcbiAgICB2YXIgbmVlZGxlID0ge1xuICAgICAgZ2VuZXJhdGVkTGluZTogdXRpbC5nZXRBcmcoYUFyZ3MsICdsaW5lJyksXG4gICAgICBnZW5lcmF0ZWRDb2x1bW46IHV0aWwuZ2V0QXJnKGFBcmdzLCAnY29sdW1uJylcbiAgICB9O1xuXG4gICAgLy8gRmluZCB0aGUgc2VjdGlvbiBjb250YWluaW5nIHRoZSBnZW5lcmF0ZWQgcG9zaXRpb24gd2UncmUgdHJ5aW5nIHRvIG1hcFxuICAgIC8vIHRvIGFuIG9yaWdpbmFsIHBvc2l0aW9uLlxuICAgIHZhciBzZWN0aW9uSW5kZXggPSBiaW5hcnlTZWFyY2guc2VhcmNoKG5lZWRsZSwgdGhpcy5fc2VjdGlvbnMsXG4gICAgICBmdW5jdGlvbihuZWVkbGUsIHNlY3Rpb24pIHtcbiAgICAgICAgdmFyIGNtcCA9IG5lZWRsZS5nZW5lcmF0ZWRMaW5lIC0gc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZTtcbiAgICAgICAgaWYgKGNtcCkge1xuICAgICAgICAgIHJldHVybiBjbXA7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gKG5lZWRsZS5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgIHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbik7XG4gICAgICB9KTtcbiAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW3NlY3Rpb25JbmRleF07XG5cbiAgICBpZiAoIXNlY3Rpb24pIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogbnVsbCxcbiAgICAgICAgbGluZTogbnVsbCxcbiAgICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgICBuYW1lOiBudWxsXG4gICAgICB9O1xuICAgIH1cblxuICAgIHJldHVybiBzZWN0aW9uLmNvbnN1bWVyLm9yaWdpbmFsUG9zaXRpb25Gb3Ioe1xuICAgICAgbGluZTogbmVlZGxlLmdlbmVyYXRlZExpbmUgLVxuICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgY29sdW1uOiBuZWVkbGUuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgKHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgIDogMCksXG4gICAgICBiaWFzOiBhQXJncy5iaWFzXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5oYXNDb250ZW50c09mQWxsU291cmNlcyA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9oYXNDb250ZW50c09mQWxsU291cmNlcygpIHtcbiAgICByZXR1cm4gdGhpcy5fc2VjdGlvbnMuZXZlcnkoZnVuY3Rpb24gKHMpIHtcbiAgICAgIHJldHVybiBzLmNvbnN1bWVyLmhhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCk7XG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgb3JpZ2luYWwgc291cmNlIGNvbnRlbnQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIHRoZSB1cmwgb2YgdGhlXG4gKiBvcmlnaW5hbCBzb3VyY2UgZmlsZS4gUmV0dXJucyBudWxsIGlmIG5vIG9yaWdpbmFsIHNvdXJjZSBjb250ZW50IGlzXG4gKiBhdmFpbGFibGUuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9zb3VyY2VDb250ZW50Rm9yKGFTb3VyY2UsIG51bGxPbk1pc3NpbmcpIHtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX3NlY3Rpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW2ldO1xuXG4gICAgICB2YXIgY29udGVudCA9IHNlY3Rpb24uY29uc3VtZXIuc291cmNlQ29udGVudEZvcihhU291cmNlLCB0cnVlKTtcbiAgICAgIGlmIChjb250ZW50KSB7XG4gICAgICAgIHJldHVybiBjb250ZW50O1xuICAgICAgfVxuICAgIH1cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmdlbmVyYXRlZFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcblxuICAgICAgLy8gT25seSBjb25zaWRlciB0aGlzIHNlY3Rpb24gaWYgdGhlIHJlcXVlc3RlZCBzb3VyY2UgaXMgaW4gdGhlIGxpc3Qgb2ZcbiAgICAgIC8vIHNvdXJjZXMgb2YgdGhlIGNvbnN1bWVyLlxuICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlcy5pbmRleE9mKHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJykpID09PSAtMSkge1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cbiAgICAgIHZhciBnZW5lcmF0ZWRQb3NpdGlvbiA9IHNlY3Rpb24uY29uc3VtZXIuZ2VuZXJhdGVkUG9zaXRpb25Gb3IoYUFyZ3MpO1xuICAgICAgaWYgKGdlbmVyYXRlZFBvc2l0aW9uKSB7XG4gICAgICAgIHZhciByZXQgPSB7XG4gICAgICAgICAgbGluZTogZ2VuZXJhdGVkUG9zaXRpb24ubGluZSArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkUG9zaXRpb24uY29sdW1uICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lID09PSBnZW5lcmF0ZWRQb3NpdGlvbi5saW5lXG4gICAgICAgICAgICAgPyBzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRDb2x1bW4gLSAxXG4gICAgICAgICAgICAgOiAwKVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsXG4gICAgfTtcbiAgfTtcblxuLyoqXG4gKiBQYXJzZSB0aGUgbWFwcGluZ3MgaW4gYSBzdHJpbmcgaW4gdG8gYSBkYXRhIHN0cnVjdHVyZSB3aGljaCB3ZSBjYW4gZWFzaWx5XG4gKiBxdWVyeSAodGhlIG9yZGVyZWQgYXJyYXlzIGluIHRoZSBgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzYCBhbmRcbiAqIGB0aGlzLl9fb3JpZ2luYWxNYXBwaW5nc2AgcHJvcGVydGllcykuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXJfcGFyc2VNYXBwaW5ncyhhU3RyLCBhU291cmNlUm9vdCkge1xuICAgIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncyA9IFtdO1xuICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcbiAgICAgIHZhciBzZWN0aW9uTWFwcGluZ3MgPSBzZWN0aW9uLmNvbnN1bWVyLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgc2VjdGlvbk1hcHBpbmdzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgIHZhciBtYXBwaW5nID0gc2VjdGlvbk1hcHBpbmdzW2pdO1xuXG4gICAgICAgIHZhciBzb3VyY2UgPSBzZWN0aW9uLmNvbnN1bWVyLl9zb3VyY2VzLmF0KG1hcHBpbmcuc291cmNlKTtcbiAgICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlUm9vdCAhPT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZSA9IHV0aWwuam9pbihzZWN0aW9uLmNvbnN1bWVyLnNvdXJjZVJvb3QsIHNvdXJjZSk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgICAgc291cmNlID0gdGhpcy5fc291cmNlcy5pbmRleE9mKHNvdXJjZSk7XG5cbiAgICAgICAgdmFyIG5hbWUgPSBzZWN0aW9uLmNvbnN1bWVyLl9uYW1lcy5hdChtYXBwaW5nLm5hbWUpO1xuICAgICAgICB0aGlzLl9uYW1lcy5hZGQobmFtZSk7XG4gICAgICAgIG5hbWUgPSB0aGlzLl9uYW1lcy5pbmRleE9mKG5hbWUpO1xuXG4gICAgICAgIC8vIFRoZSBtYXBwaW5ncyBjb21pbmcgZnJvbSB0aGUgY29uc3VtZXIgZm9yIHRoZSBzZWN0aW9uIGhhdmVcbiAgICAgICAgLy8gZ2VuZXJhdGVkIHBvc2l0aW9ucyByZWxhdGl2ZSB0byB0aGUgc3RhcnQgb2YgdGhlIHNlY3Rpb24sIHNvIHdlXG4gICAgICAgIC8vIG5lZWQgdG8gb2Zmc2V0IHRoZW0gdG8gYmUgcmVsYXRpdmUgdG8gdGhlIHN0YXJ0IG9mIHRoZSBjb25jYXRlbmF0ZWRcbiAgICAgICAgLy8gZ2VuZXJhdGVkIGZpbGUuXG4gICAgICAgIHZhciBhZGp1c3RlZE1hcHBpbmcgPSB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgZ2VuZXJhdGVkTGluZTogbWFwcGluZy5nZW5lcmF0ZWRMaW5lICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lIC0gMSksXG4gICAgICAgICAgZ2VuZXJhdGVkQ29sdW1uOiBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSA9PT0gbWFwcGluZy5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgICAgIDogMCksXG4gICAgICAgICAgb3JpZ2luYWxMaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBvcmlnaW5hbENvbHVtbjogbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICBuYW1lOiBuYW1lXG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgaWYgKHR5cGVvZiBhZGp1c3RlZE1hcHBpbmcub3JpZ2luYWxMaW5lID09PSAnbnVtYmVyJykge1xuICAgICAgICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHF1aWNrU29ydCh0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MsIHV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zRGVmbGF0ZWQpO1xuICAgIHF1aWNrU29ydCh0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncywgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyk7XG4gIH07XG5cbmV4cG9ydHMuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyID0gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qc1xuLy8gbW9kdWxlIGlkID0gN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbmV4cG9ydHMuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCA9IDI7XG5cbi8qKlxuICogUmVjdXJzaXZlIGltcGxlbWVudGF0aW9uIG9mIGJpbmFyeSBzZWFyY2guXG4gKlxuICogQHBhcmFtIGFMb3cgSW5kaWNlcyBoZXJlIGFuZCBsb3dlciBkbyBub3QgY29udGFpbiB0aGUgbmVlZGxlLlxuICogQHBhcmFtIGFIaWdoIEluZGljZXMgaGVyZSBhbmQgaGlnaGVyIGRvIG5vdCBjb250YWluIHRoZSBuZWVkbGUuXG4gKiBAcGFyYW0gYU5lZWRsZSBUaGUgZWxlbWVudCBiZWluZyBzZWFyY2hlZCBmb3IuXG4gKiBAcGFyYW0gYUhheXN0YWNrIFRoZSBub24tZW1wdHkgYXJyYXkgYmVpbmcgc2VhcmNoZWQuXG4gKiBAcGFyYW0gYUNvbXBhcmUgRnVuY3Rpb24gd2hpY2ggdGFrZXMgdHdvIGVsZW1lbnRzIGFuZCByZXR1cm5zIC0xLCAwLCBvciAxLlxuICogQHBhcmFtIGFCaWFzIEVpdGhlciAnYmluYXJ5U2VhcmNoLkdSRUFURVNUX0xPV0VSX0JPVU5EJyBvclxuICogICAgICdiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICovXG5mdW5jdGlvbiByZWN1cnNpdmVTZWFyY2goYUxvdywgYUhpZ2gsIGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKSB7XG4gIC8vIFRoaXMgZnVuY3Rpb24gdGVybWluYXRlcyB3aGVuIG9uZSBvZiB0aGUgZm9sbG93aW5nIGlzIHRydWU6XG4gIC8vXG4gIC8vICAgMS4gV2UgZmluZCB0aGUgZXhhY3QgZWxlbWVudCB3ZSBhcmUgbG9va2luZyBmb3IuXG4gIC8vXG4gIC8vICAgMi4gV2UgZGlkIG5vdCBmaW5kIHRoZSBleGFjdCBlbGVtZW50LCBidXQgd2UgY2FuIHJldHVybiB0aGUgaW5kZXggb2ZcbiAgLy8gICAgICB0aGUgbmV4dC1jbG9zZXN0IGVsZW1lbnQuXG4gIC8vXG4gIC8vICAgMy4gV2UgZGlkIG5vdCBmaW5kIHRoZSBleGFjdCBlbGVtZW50LCBhbmQgdGhlcmUgaXMgbm8gbmV4dC1jbG9zZXN0XG4gIC8vICAgICAgZWxlbWVudCB0aGFuIHRoZSBvbmUgd2UgYXJlIHNlYXJjaGluZyBmb3IsIHNvIHdlIHJldHVybiAtMS5cbiAgdmFyIG1pZCA9IE1hdGguZmxvb3IoKGFIaWdoIC0gYUxvdykgLyAyKSArIGFMb3c7XG4gIHZhciBjbXAgPSBhQ29tcGFyZShhTmVlZGxlLCBhSGF5c3RhY2tbbWlkXSwgdHJ1ZSk7XG4gIGlmIChjbXAgPT09IDApIHtcbiAgICAvLyBGb3VuZCB0aGUgZWxlbWVudCB3ZSBhcmUgbG9va2luZyBmb3IuXG4gICAgcmV0dXJuIG1pZDtcbiAgfVxuICBlbHNlIGlmIChjbXAgPiAwKSB7XG4gICAgLy8gT3VyIG5lZWRsZSBpcyBncmVhdGVyIHRoYW4gYUhheXN0YWNrW21pZF0uXG4gICAgaWYgKGFIaWdoIC0gbWlkID4gMSkge1xuICAgICAgLy8gVGhlIGVsZW1lbnQgaXMgaW4gdGhlIHVwcGVyIGhhbGYuXG4gICAgICByZXR1cm4gcmVjdXJzaXZlU2VhcmNoKG1pZCwgYUhpZ2gsIGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKTtcbiAgICB9XG5cbiAgICAvLyBUaGUgZXhhY3QgbmVlZGxlIGVsZW1lbnQgd2FzIG5vdCBmb3VuZCBpbiB0aGlzIGhheXN0YWNrLiBEZXRlcm1pbmUgaWZcbiAgICAvLyB3ZSBhcmUgaW4gdGVybWluYXRpb24gY2FzZSAoMykgb3IgKDIpIGFuZCByZXR1cm4gdGhlIGFwcHJvcHJpYXRlIHRoaW5nLlxuICAgIGlmIChhQmlhcyA9PSBleHBvcnRzLkxFQVNUX1VQUEVSX0JPVU5EKSB7XG4gICAgICByZXR1cm4gYUhpZ2ggPCBhSGF5c3RhY2subGVuZ3RoID8gYUhpZ2ggOiAtMTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIG1pZDtcbiAgICB9XG4gIH1cbiAgZWxzZSB7XG4gICAgLy8gT3VyIG5lZWRsZSBpcyBsZXNzIHRoYW4gYUhheXN0YWNrW21pZF0uXG4gICAgaWYgKG1pZCAtIGFMb3cgPiAxKSB7XG4gICAgICAvLyBUaGUgZWxlbWVudCBpcyBpbiB0aGUgbG93ZXIgaGFsZi5cbiAgICAgIHJldHVybiByZWN1cnNpdmVTZWFyY2goYUxvdywgbWlkLCBhTmVlZGxlLCBhSGF5c3RhY2ssIGFDb21wYXJlLCBhQmlhcyk7XG4gICAgfVxuXG4gICAgLy8gd2UgYXJlIGluIHRlcm1pbmF0aW9uIGNhc2UgKDMpIG9yICgyKSBhbmQgcmV0dXJuIHRoZSBhcHByb3ByaWF0ZSB0aGluZy5cbiAgICBpZiAoYUJpYXMgPT0gZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCkge1xuICAgICAgcmV0dXJuIG1pZDtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGFMb3cgPCAwID8gLTEgOiBhTG93O1xuICAgIH1cbiAgfVxufVxuXG4vKipcbiAqIFRoaXMgaXMgYW4gaW1wbGVtZW50YXRpb24gb2YgYmluYXJ5IHNlYXJjaCB3aGljaCB3aWxsIGFsd2F5cyB0cnkgYW5kIHJldHVyblxuICogdGhlIGluZGV4IG9mIHRoZSBjbG9zZXN0IGVsZW1lbnQgaWYgdGhlcmUgaXMgbm8gZXhhY3QgaGl0LiBUaGlzIGlzIGJlY2F1c2VcbiAqIG1hcHBpbmdzIGJldHdlZW4gb3JpZ2luYWwgYW5kIGdlbmVyYXRlZCBsaW5lL2NvbCBwYWlycyBhcmUgc2luZ2xlIHBvaW50cyxcbiAqIGFuZCB0aGVyZSBpcyBhbiBpbXBsaWNpdCByZWdpb24gYmV0d2VlbiBlYWNoIG9mIHRoZW0sIHNvIGEgbWlzcyBqdXN0IG1lYW5zXG4gKiB0aGF0IHlvdSBhcmVuJ3Qgb24gdGhlIHZlcnkgc3RhcnQgb2YgYSByZWdpb24uXG4gKlxuICogQHBhcmFtIGFOZWVkbGUgVGhlIGVsZW1lbnQgeW91IGFyZSBsb29raW5nIGZvci5cbiAqIEBwYXJhbSBhSGF5c3RhY2sgVGhlIGFycmF5IHRoYXQgaXMgYmVpbmcgc2VhcmNoZWQuXG4gKiBAcGFyYW0gYUNvbXBhcmUgQSBmdW5jdGlvbiB3aGljaCB0YWtlcyB0aGUgbmVlZGxlIGFuZCBhbiBlbGVtZW50IGluIHRoZVxuICogICAgIGFycmF5IGFuZCByZXR1cm5zIC0xLCAwLCBvciAxIGRlcGVuZGluZyBvbiB3aGV0aGVyIHRoZSBuZWVkbGUgaXMgbGVzc1xuICogICAgIHRoYW4sIGVxdWFsIHRvLCBvciBncmVhdGVyIHRoYW4gdGhlIGVsZW1lbnQsIHJlc3BlY3RpdmVseS5cbiAqIEBwYXJhbSBhQmlhcyBFaXRoZXIgJ2JpbmFyeVNlYXJjaC5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnYmluYXJ5U2VhcmNoLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnYmluYXJ5U2VhcmNoLkdSRUFURVNUX0xPV0VSX0JPVU5EJy5cbiAqL1xuZXhwb3J0cy5zZWFyY2ggPSBmdW5jdGlvbiBzZWFyY2goYU5lZWRsZSwgYUhheXN0YWNrLCBhQ29tcGFyZSwgYUJpYXMpIHtcbiAgaWYgKGFIYXlzdGFjay5sZW5ndGggPT09IDApIHtcbiAgICByZXR1cm4gLTE7XG4gIH1cblxuICB2YXIgaW5kZXggPSByZWN1cnNpdmVTZWFyY2goLTEsIGFIYXlzdGFjay5sZW5ndGgsIGFOZWVkbGUsIGFIYXlzdGFjayxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFDb21wYXJlLCBhQmlhcyB8fCBleHBvcnRzLkdSRUFURVNUX0xPV0VSX0JPVU5EKTtcbiAgaWYgKGluZGV4IDwgMCkge1xuICAgIHJldHVybiAtMTtcbiAgfVxuXG4gIC8vIFdlIGhhdmUgZm91bmQgZWl0aGVyIHRoZSBleGFjdCBlbGVtZW50LCBvciB0aGUgbmV4dC1jbG9zZXN0IGVsZW1lbnQgdGhhblxuICAvLyB0aGUgb25lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLiBIb3dldmVyLCB0aGVyZSBtYXkgYmUgbW9yZSB0aGFuIG9uZSBzdWNoXG4gIC8vIGVsZW1lbnQuIE1ha2Ugc3VyZSB3ZSBhbHdheXMgcmV0dXJuIHRoZSBzbWFsbGVzdCBvZiB0aGVzZS5cbiAgd2hpbGUgKGluZGV4IC0gMSA+PSAwKSB7XG4gICAgaWYgKGFDb21wYXJlKGFIYXlzdGFja1tpbmRleF0sIGFIYXlzdGFja1tpbmRleCAtIDFdLCB0cnVlKSAhPT0gMCkge1xuICAgICAgYnJlYWs7XG4gICAgfVxuICAgIC0taW5kZXg7XG4gIH1cblxuICByZXR1cm4gaW5kZXg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmluYXJ5LXNlYXJjaC5qc1xuLy8gbW9kdWxlIGlkID0gOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbi8vIEl0IHR1cm5zIG91dCB0aGF0IHNvbWUgKG1vc3Q/KSBKYXZhU2NyaXB0IGVuZ2luZXMgZG9uJ3Qgc2VsZi1ob3N0XG4vLyBgQXJyYXkucHJvdG90eXBlLnNvcnRgLiBUaGlzIG1ha2VzIHNlbnNlIGJlY2F1c2UgQysrIHdpbGwgbGlrZWx5IHJlbWFpblxuLy8gZmFzdGVyIHRoYW4gSlMgd2hlbiBkb2luZyByYXcgQ1BVLWludGVuc2l2ZSBzb3J0aW5nLiBIb3dldmVyLCB3aGVuIHVzaW5nIGFcbi8vIGN1c3RvbSBjb21wYXJhdG9yIGZ1bmN0aW9uLCBjYWxsaW5nIGJhY2sgYW5kIGZvcnRoIGJldHdlZW4gdGhlIFZNJ3MgQysrIGFuZFxuLy8gSklUJ2QgSlMgaXMgcmF0aGVyIHNsb3cgKmFuZCogbG9zZXMgSklUIHR5cGUgaW5mb3JtYXRpb24sIHJlc3VsdGluZyBpblxuLy8gd29yc2UgZ2VuZXJhdGVkIGNvZGUgZm9yIHRoZSBjb21wYXJhdG9yIGZ1bmN0aW9uIHRoYW4gd291bGQgYmUgb3B0aW1hbC4gSW5cbi8vIGZhY3QsIHdoZW4gc29ydGluZyB3aXRoIGEgY29tcGFyYXRvciwgdGhlc2UgY29zdHMgb3V0d2VpZ2ggdGhlIGJlbmVmaXRzIG9mXG4vLyBzb3J0aW5nIGluIEMrKy4gQnkgdXNpbmcgb3VyIG93biBKUy1pbXBsZW1lbnRlZCBRdWljayBTb3J0IChiZWxvdyksIHdlIGdldFxuLy8gYSB+MzUwMG1zIG1lYW4gc3BlZWQtdXAgaW4gYGJlbmNoL2JlbmNoLmh0bWxgLlxuXG4vKipcbiAqIFN3YXAgdGhlIGVsZW1lbnRzIGluZGV4ZWQgYnkgYHhgIGFuZCBgeWAgaW4gdGhlIGFycmF5IGBhcnlgLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIFRoZSBhcnJheS5cbiAqIEBwYXJhbSB7TnVtYmVyfSB4XG4gKiAgICAgICAgVGhlIGluZGV4IG9mIHRoZSBmaXJzdCBpdGVtLlxuICogQHBhcmFtIHtOdW1iZXJ9IHlcbiAqICAgICAgICBUaGUgaW5kZXggb2YgdGhlIHNlY29uZCBpdGVtLlxuICovXG5mdW5jdGlvbiBzd2FwKGFyeSwgeCwgeSkge1xuICB2YXIgdGVtcCA9IGFyeVt4XTtcbiAgYXJ5W3hdID0gYXJ5W3ldO1xuICBhcnlbeV0gPSB0ZW1wO1xufVxuXG4vKipcbiAqIFJldHVybnMgYSByYW5kb20gaW50ZWdlciB3aXRoaW4gdGhlIHJhbmdlIGBsb3cgLi4gaGlnaGAgaW5jbHVzaXZlLlxuICpcbiAqIEBwYXJhbSB7TnVtYmVyfSBsb3dcbiAqICAgICAgICBUaGUgbG93ZXIgYm91bmQgb24gdGhlIHJhbmdlLlxuICogQHBhcmFtIHtOdW1iZXJ9IGhpZ2hcbiAqICAgICAgICBUaGUgdXBwZXIgYm91bmQgb24gdGhlIHJhbmdlLlxuICovXG5mdW5jdGlvbiByYW5kb21JbnRJblJhbmdlKGxvdywgaGlnaCkge1xuICByZXR1cm4gTWF0aC5yb3VuZChsb3cgKyAoTWF0aC5yYW5kb20oKSAqIChoaWdoIC0gbG93KSkpO1xufVxuXG4vKipcbiAqIFRoZSBRdWljayBTb3J0IGFsZ29yaXRobS5cbiAqXG4gKiBAcGFyYW0ge0FycmF5fSBhcnlcbiAqICAgICAgICBBbiBhcnJheSB0byBzb3J0LlxuICogQHBhcmFtIHtmdW5jdGlvbn0gY29tcGFyYXRvclxuICogICAgICAgIEZ1bmN0aW9uIHRvIHVzZSB0byBjb21wYXJlIHR3byBpdGVtcy5cbiAqIEBwYXJhbSB7TnVtYmVyfSBwXG4gKiAgICAgICAgU3RhcnQgaW5kZXggb2YgdGhlIGFycmF5XG4gKiBAcGFyYW0ge051bWJlcn0gclxuICogICAgICAgIEVuZCBpbmRleCBvZiB0aGUgYXJyYXlcbiAqL1xuZnVuY3Rpb24gZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBwLCByKSB7XG4gIC8vIElmIG91ciBsb3dlciBib3VuZCBpcyBsZXNzIHRoYW4gb3VyIHVwcGVyIGJvdW5kLCB3ZSAoMSkgcGFydGl0aW9uIHRoZVxuICAvLyBhcnJheSBpbnRvIHR3byBwaWVjZXMgYW5kICgyKSByZWN1cnNlIG9uIGVhY2ggaGFsZi4gSWYgaXQgaXMgbm90LCB0aGlzIGlzXG4gIC8vIHRoZSBlbXB0eSBhcnJheSBhbmQgb3VyIGJhc2UgY2FzZS5cblxuICBpZiAocCA8IHIpIHtcbiAgICAvLyAoMSkgUGFydGl0aW9uaW5nLlxuICAgIC8vXG4gICAgLy8gVGhlIHBhcnRpdGlvbmluZyBjaG9vc2VzIGEgcGl2b3QgYmV0d2VlbiBgcGAgYW5kIGByYCBhbmQgbW92ZXMgYWxsXG4gICAgLy8gZWxlbWVudHMgdGhhdCBhcmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIHRoZSBwaXZvdCB0byB0aGUgYmVmb3JlIGl0LCBhbmRcbiAgICAvLyBhbGwgdGhlIGVsZW1lbnRzIHRoYXQgYXJlIGdyZWF0ZXIgdGhhbiBpdCBhZnRlciBpdC4gVGhlIGVmZmVjdCBpcyB0aGF0XG4gICAgLy8gb25jZSBwYXJ0aXRpb24gaXMgZG9uZSwgdGhlIHBpdm90IGlzIGluIHRoZSBleGFjdCBwbGFjZSBpdCB3aWxsIGJlIHdoZW5cbiAgICAvLyB0aGUgYXJyYXkgaXMgcHV0IGluIHNvcnRlZCBvcmRlciwgYW5kIGl0IHdpbGwgbm90IG5lZWQgdG8gYmUgbW92ZWRcbiAgICAvLyBhZ2Fpbi4gVGhpcyBydW5zIGluIE8obikgdGltZS5cblxuICAgIC8vIEFsd2F5cyBjaG9vc2UgYSByYW5kb20gcGl2b3Qgc28gdGhhdCBhbiBpbnB1dCBhcnJheSB3aGljaCBpcyByZXZlcnNlXG4gICAgLy8gc29ydGVkIGRvZXMgbm90IGNhdXNlIE8obl4yKSBydW5uaW5nIHRpbWUuXG4gICAgdmFyIHBpdm90SW5kZXggPSByYW5kb21JbnRJblJhbmdlKHAsIHIpO1xuICAgIHZhciBpID0gcCAtIDE7XG5cbiAgICBzd2FwKGFyeSwgcGl2b3RJbmRleCwgcik7XG4gICAgdmFyIHBpdm90ID0gYXJ5W3JdO1xuXG4gICAgLy8gSW1tZWRpYXRlbHkgYWZ0ZXIgYGpgIGlzIGluY3JlbWVudGVkIGluIHRoaXMgbG9vcCwgdGhlIGZvbGxvd2luZyBob2xkXG4gICAgLy8gdHJ1ZTpcbiAgICAvL1xuICAgIC8vICAgKiBFdmVyeSBlbGVtZW50IGluIGBhcnlbcCAuLiBpXWAgaXMgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIHRoZSBwaXZvdC5cbiAgICAvL1xuICAgIC8vICAgKiBFdmVyeSBlbGVtZW50IGluIGBhcnlbaSsxIC4uIGotMV1gIGlzIGdyZWF0ZXIgdGhhbiB0aGUgcGl2b3QuXG4gICAgZm9yICh2YXIgaiA9IHA7IGogPCByOyBqKyspIHtcbiAgICAgIGlmIChjb21wYXJhdG9yKGFyeVtqXSwgcGl2b3QpIDw9IDApIHtcbiAgICAgICAgaSArPSAxO1xuICAgICAgICBzd2FwKGFyeSwgaSwgaik7XG4gICAgICB9XG4gICAgfVxuXG4gICAgc3dhcChhcnksIGkgKyAxLCBqKTtcbiAgICB2YXIgcSA9IGkgKyAxO1xuXG4gICAgLy8gKDIpIFJlY3Vyc2Ugb24gZWFjaCBoYWxmLlxuXG4gICAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBwLCBxIC0gMSk7XG4gICAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBxICsgMSwgcik7XG4gIH1cbn1cblxuLyoqXG4gKiBTb3J0IHRoZSBnaXZlbiBhcnJheSBpbi1wbGFjZSB3aXRoIHRoZSBnaXZlbiBjb21wYXJhdG9yIGZ1bmN0aW9uLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIEFuIGFycmF5IHRvIHNvcnQuXG4gKiBAcGFyYW0ge2Z1bmN0aW9ufSBjb21wYXJhdG9yXG4gKiAgICAgICAgRnVuY3Rpb24gdG8gdXNlIHRvIGNvbXBhcmUgdHdvIGl0ZW1zLlxuICovXG5leHBvcnRzLnF1aWNrU29ydCA9IGZ1bmN0aW9uIChhcnksIGNvbXBhcmF0b3IpIHtcbiAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCAwLCBhcnkubGVuZ3RoIC0gMSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvcXVpY2stc29ydC5qc1xuLy8gbW9kdWxlIGlkID0gOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBTb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL3NvdXJjZS1tYXAtZ2VuZXJhdG9yJykuU291cmNlTWFwR2VuZXJhdG9yO1xudmFyIHV0aWwgPSByZXF1aXJlKCcuL3V0aWwnKTtcblxuLy8gTWF0Y2hlcyBhIFdpbmRvd3Mtc3R5bGUgYFxcclxcbmAgbmV3bGluZSBvciBhIGBcXG5gIG5ld2xpbmUgdXNlZCBieSBhbGwgb3RoZXJcbi8vIG9wZXJhdGluZyBzeXN0ZW1zIHRoZXNlIGRheXMgKGNhcHR1cmluZyB0aGUgcmVzdWx0KS5cbnZhciBSRUdFWF9ORVdMSU5FID0gLyhcXHI/XFxuKS87XG5cbi8vIE5ld2xpbmUgY2hhcmFjdGVyIGNvZGUgZm9yIGNoYXJDb2RlQXQoKSBjb21wYXJpc29uc1xudmFyIE5FV0xJTkVfQ09ERSA9IDEwO1xuXG4vLyBQcml2YXRlIHN5bWJvbCBmb3IgaWRlbnRpZnlpbmcgYFNvdXJjZU5vZGVgcyB3aGVuIG11bHRpcGxlIHZlcnNpb25zIG9mXG4vLyB0aGUgc291cmNlLW1hcCBsaWJyYXJ5IGFyZSBsb2FkZWQuIFRoaXMgTVVTVCBOT1QgQ0hBTkdFIGFjcm9zc1xuLy8gdmVyc2lvbnMhXG52YXIgaXNTb3VyY2VOb2RlID0gXCIkJCRpc1NvdXJjZU5vZGUkJCRcIjtcblxuLyoqXG4gKiBTb3VyY2VOb2RlcyBwcm92aWRlIGEgd2F5IHRvIGFic3RyYWN0IG92ZXIgaW50ZXJwb2xhdGluZy9jb25jYXRlbmF0aW5nXG4gKiBzbmlwcGV0cyBvZiBnZW5lcmF0ZWQgSmF2YVNjcmlwdCBzb3VyY2UgY29kZSB3aGlsZSBtYWludGFpbmluZyB0aGUgbGluZSBhbmRcbiAqIGNvbHVtbiBpbmZvcm1hdGlvbiBhc3NvY2lhdGVkIHdpdGggdGhlIG9yaWdpbmFsIHNvdXJjZSBjb2RlLlxuICpcbiAqIEBwYXJhbSBhTGluZSBUaGUgb3JpZ2luYWwgbGluZSBudW1iZXIuXG4gKiBAcGFyYW0gYUNvbHVtbiBUaGUgb3JpZ2luYWwgY29sdW1uIG51bWJlci5cbiAqIEBwYXJhbSBhU291cmNlIFRoZSBvcmlnaW5hbCBzb3VyY2UncyBmaWxlbmFtZS5cbiAqIEBwYXJhbSBhQ2h1bmtzIE9wdGlvbmFsLiBBbiBhcnJheSBvZiBzdHJpbmdzIHdoaWNoIGFyZSBzbmlwcGV0cyBvZlxuICogICAgICAgIGdlbmVyYXRlZCBKUywgb3Igb3RoZXIgU291cmNlTm9kZXMuXG4gKiBAcGFyYW0gYU5hbWUgVGhlIG9yaWdpbmFsIGlkZW50aWZpZXIuXG4gKi9cbmZ1bmN0aW9uIFNvdXJjZU5vZGUoYUxpbmUsIGFDb2x1bW4sIGFTb3VyY2UsIGFDaHVua3MsIGFOYW1lKSB7XG4gIHRoaXMuY2hpbGRyZW4gPSBbXTtcbiAgdGhpcy5zb3VyY2VDb250ZW50cyA9IHt9O1xuICB0aGlzLmxpbmUgPSBhTGluZSA9PSBudWxsID8gbnVsbCA6IGFMaW5lO1xuICB0aGlzLmNvbHVtbiA9IGFDb2x1bW4gPT0gbnVsbCA/IG51bGwgOiBhQ29sdW1uO1xuICB0aGlzLnNvdXJjZSA9IGFTb3VyY2UgPT0gbnVsbCA/IG51bGwgOiBhU291cmNlO1xuICB0aGlzLm5hbWUgPSBhTmFtZSA9PSBudWxsID8gbnVsbCA6IGFOYW1lO1xuICB0aGlzW2lzU291cmNlTm9kZV0gPSB0cnVlO1xuICBpZiAoYUNodW5rcyAhPSBudWxsKSB0aGlzLmFkZChhQ2h1bmtzKTtcbn1cblxuLyoqXG4gKiBDcmVhdGVzIGEgU291cmNlTm9kZSBmcm9tIGdlbmVyYXRlZCBjb2RlIGFuZCBhIFNvdXJjZU1hcENvbnN1bWVyLlxuICpcbiAqIEBwYXJhbSBhR2VuZXJhdGVkQ29kZSBUaGUgZ2VuZXJhdGVkIGNvZGVcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcCBmb3IgdGhlIGdlbmVyYXRlZCBjb2RlXG4gKiBAcGFyYW0gYVJlbGF0aXZlUGF0aCBPcHRpb25hbC4gVGhlIHBhdGggdGhhdCByZWxhdGl2ZSBzb3VyY2VzIGluIHRoZVxuICogICAgICAgIFNvdXJjZU1hcENvbnN1bWVyIHNob3VsZCBiZSByZWxhdGl2ZSB0by5cbiAqL1xuU291cmNlTm9kZS5mcm9tU3RyaW5nV2l0aFNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU5vZGVfZnJvbVN0cmluZ1dpdGhTb3VyY2VNYXAoYUdlbmVyYXRlZENvZGUsIGFTb3VyY2VNYXBDb25zdW1lciwgYVJlbGF0aXZlUGF0aCkge1xuICAgIC8vIFRoZSBTb3VyY2VOb2RlIHdlIHdhbnQgdG8gZmlsbCB3aXRoIHRoZSBnZW5lcmF0ZWQgY29kZVxuICAgIC8vIGFuZCB0aGUgU291cmNlTWFwXG4gICAgdmFyIG5vZGUgPSBuZXcgU291cmNlTm9kZSgpO1xuXG4gICAgLy8gQWxsIGV2ZW4gaW5kaWNlcyBvZiB0aGlzIGFycmF5IGFyZSBvbmUgbGluZSBvZiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4gICAgLy8gd2hpbGUgYWxsIG9kZCBpbmRpY2VzIGFyZSB0aGUgbmV3bGluZXMgYmV0d2VlbiB0d28gYWRqYWNlbnQgbGluZXNcbiAgICAvLyAoc2luY2UgYFJFR0VYX05FV0xJTkVgIGNhcHR1cmVzIGl0cyBtYXRjaCkuXG4gICAgLy8gUHJvY2Vzc2VkIGZyYWdtZW50cyBhcmUgYWNjZXNzZWQgYnkgY2FsbGluZyBgc2hpZnROZXh0TGluZWAuXG4gICAgdmFyIHJlbWFpbmluZ0xpbmVzID0gYUdlbmVyYXRlZENvZGUuc3BsaXQoUkVHRVhfTkVXTElORSk7XG4gICAgdmFyIHJlbWFpbmluZ0xpbmVzSW5kZXggPSAwO1xuICAgIHZhciBzaGlmdE5leHRMaW5lID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXIgbGluZUNvbnRlbnRzID0gZ2V0TmV4dExpbmUoKTtcbiAgICAgIC8vIFRoZSBsYXN0IGxpbmUgb2YgYSBmaWxlIG1pZ2h0IG5vdCBoYXZlIGEgbmV3bGluZS5cbiAgICAgIHZhciBuZXdMaW5lID0gZ2V0TmV4dExpbmUoKSB8fCBcIlwiO1xuICAgICAgcmV0dXJuIGxpbmVDb250ZW50cyArIG5ld0xpbmU7XG5cbiAgICAgIGZ1bmN0aW9uIGdldE5leHRMaW5lKCkge1xuICAgICAgICByZXR1cm4gcmVtYWluaW5nTGluZXNJbmRleCA8IHJlbWFpbmluZ0xpbmVzLmxlbmd0aCA/XG4gICAgICAgICAgICByZW1haW5pbmdMaW5lc1tyZW1haW5pbmdMaW5lc0luZGV4KytdIDogdW5kZWZpbmVkO1xuICAgICAgfVxuICAgIH07XG5cbiAgICAvLyBXZSBuZWVkIHRvIHJlbWVtYmVyIHRoZSBwb3NpdGlvbiBvZiBcInJlbWFpbmluZ0xpbmVzXCJcbiAgICB2YXIgbGFzdEdlbmVyYXRlZExpbmUgPSAxLCBsYXN0R2VuZXJhdGVkQ29sdW1uID0gMDtcblxuICAgIC8vIFRoZSBnZW5lcmF0ZSBTb3VyY2VOb2RlcyB3ZSBuZWVkIGEgY29kZSByYW5nZS5cbiAgICAvLyBUbyBleHRyYWN0IGl0IGN1cnJlbnQgYW5kIGxhc3QgbWFwcGluZyBpcyB1c2VkLlxuICAgIC8vIEhlcmUgd2Ugc3RvcmUgdGhlIGxhc3QgbWFwcGluZy5cbiAgICB2YXIgbGFzdE1hcHBpbmcgPSBudWxsO1xuXG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLmVhY2hNYXBwaW5nKGZ1bmN0aW9uIChtYXBwaW5nKSB7XG4gICAgICBpZiAobGFzdE1hcHBpbmcgIT09IG51bGwpIHtcbiAgICAgICAgLy8gV2UgYWRkIHRoZSBjb2RlIGZyb20gXCJsYXN0TWFwcGluZ1wiIHRvIFwibWFwcGluZ1wiOlxuICAgICAgICAvLyBGaXJzdCBjaGVjayBpZiB0aGVyZSBpcyBhIG5ldyBsaW5lIGluIGJldHdlZW4uXG4gICAgICAgIGlmIChsYXN0R2VuZXJhdGVkTGluZSA8IG1hcHBpbmcuZ2VuZXJhdGVkTGluZSkge1xuICAgICAgICAgIC8vIEFzc29jaWF0ZSBmaXJzdCBsaW5lIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBzaGlmdE5leHRMaW5lKCkpO1xuICAgICAgICAgIGxhc3RHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgICAgbGFzdEdlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgICAgICAgLy8gVGhlIHJlbWFpbmluZyBjb2RlIGlzIGFkZGVkIHdpdGhvdXQgbWFwcGluZ1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIFRoZXJlIGlzIG5vIG5ldyBsaW5lIGluIGJldHdlZW4uXG4gICAgICAgICAgLy8gQXNzb2NpYXRlIHRoZSBjb2RlIGJldHdlZW4gXCJsYXN0R2VuZXJhdGVkQ29sdW1uXCIgYW5kXG4gICAgICAgICAgLy8gXCJtYXBwaW5nLmdlbmVyYXRlZENvbHVtblwiIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgICAgdmFyIG5leHRMaW5lID0gcmVtYWluaW5nTGluZXNbcmVtYWluaW5nTGluZXNJbmRleF07XG4gICAgICAgICAgdmFyIGNvZGUgPSBuZXh0TGluZS5zdWJzdHIoMCwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RHZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICAgIHJlbWFpbmluZ0xpbmVzW3JlbWFpbmluZ0xpbmVzSW5kZXhdID0gbmV4dExpbmUuc3Vic3RyKG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uKTtcbiAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW47XG4gICAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBjb2RlKTtcbiAgICAgICAgICAvLyBObyBtb3JlIHJlbWFpbmluZyBjb2RlLCBjb250aW51ZVxuICAgICAgICAgIGxhc3RNYXBwaW5nID0gbWFwcGluZztcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIC8vIFdlIGFkZCB0aGUgZ2VuZXJhdGVkIGNvZGUgdW50aWwgdGhlIGZpcnN0IG1hcHBpbmdcbiAgICAgIC8vIHRvIHRoZSBTb3VyY2VOb2RlIHdpdGhvdXQgYW55IG1hcHBpbmcuXG4gICAgICAvLyBFYWNoIGxpbmUgaXMgYWRkZWQgYXMgc2VwYXJhdGUgc3RyaW5nLlxuICAgICAgd2hpbGUgKGxhc3RHZW5lcmF0ZWRMaW5lIDwgbWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIG5vZGUuYWRkKHNoaWZ0TmV4dExpbmUoKSk7XG4gICAgICAgIGxhc3RHZW5lcmF0ZWRMaW5lKys7XG4gICAgICB9XG4gICAgICBpZiAobGFzdEdlbmVyYXRlZENvbHVtbiA8IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uKSB7XG4gICAgICAgIHZhciBuZXh0TGluZSA9IHJlbWFpbmluZ0xpbmVzW3JlbWFpbmluZ0xpbmVzSW5kZXhdO1xuICAgICAgICBub2RlLmFkZChuZXh0TGluZS5zdWJzdHIoMCwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pKTtcbiAgICAgICAgcmVtYWluaW5nTGluZXNbcmVtYWluaW5nTGluZXNJbmRleF0gPSBuZXh0TGluZS5zdWJzdHIobWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW47XG4gICAgICB9XG4gICAgICBsYXN0TWFwcGluZyA9IG1hcHBpbmc7XG4gICAgfSwgdGhpcyk7XG4gICAgLy8gV2UgaGF2ZSBwcm9jZXNzZWQgYWxsIG1hcHBpbmdzLlxuICAgIGlmIChyZW1haW5pbmdMaW5lc0luZGV4IDwgcmVtYWluaW5nTGluZXMubGVuZ3RoKSB7XG4gICAgICBpZiAobGFzdE1hcHBpbmcpIHtcbiAgICAgICAgLy8gQXNzb2NpYXRlIHRoZSByZW1haW5pbmcgY29kZSBpbiB0aGUgY3VycmVudCBsaW5lIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgIGFkZE1hcHBpbmdXaXRoQ29kZShsYXN0TWFwcGluZywgc2hpZnROZXh0TGluZSgpKTtcbiAgICAgIH1cbiAgICAgIC8vIGFuZCBhZGQgdGhlIHJlbWFpbmluZyBsaW5lcyB3aXRob3V0IGFueSBtYXBwaW5nXG4gICAgICBub2RlLmFkZChyZW1haW5pbmdMaW5lcy5zcGxpY2UocmVtYWluaW5nTGluZXNJbmRleCkuam9pbihcIlwiKSk7XG4gICAgfVxuXG4gICAgLy8gQ29weSBzb3VyY2VzQ29udGVudCBpbnRvIFNvdXJjZU5vZGVcbiAgICBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlcy5mb3JFYWNoKGZ1bmN0aW9uIChzb3VyY2VGaWxlKSB7XG4gICAgICB2YXIgY29udGVudCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VDb250ZW50Rm9yKHNvdXJjZUZpbGUpO1xuICAgICAgaWYgKGNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgICBpZiAoYVJlbGF0aXZlUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBzb3VyY2VGaWxlKTtcbiAgICAgICAgfVxuICAgICAgICBub2RlLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbm9kZTtcblxuICAgIGZ1bmN0aW9uIGFkZE1hcHBpbmdXaXRoQ29kZShtYXBwaW5nLCBjb2RlKSB7XG4gICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gU291cmNlTm9kZV9hZGQoYUNodW5rKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGFDaHVuaykpIHtcbiAgICBhQ2h1bmsuZm9yRWFjaChmdW5jdGlvbiAoY2h1bmspIHtcbiAgICAgIHRoaXMuYWRkKGNodW5rKTtcbiAgICB9LCB0aGlzKTtcbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgaWYgKGFDaHVuaykge1xuICAgICAgdGhpcy5jaGlsZHJlbi5wdXNoKGFDaHVuayk7XG4gICAgfVxuICB9XG4gIGVsc2Uge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICBcIkV4cGVjdGVkIGEgU291cmNlTm9kZSwgc3RyaW5nLCBvciBhbiBhcnJheSBvZiBTb3VyY2VOb2RlcyBhbmQgc3RyaW5ncy4gR290IFwiICsgYUNodW5rXG4gICAgKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoZSBiZWdpbm5pbmcgb2YgdGhpcyBzb3VyY2Ugbm9kZS5cbiAqXG4gKiBAcGFyYW0gYUNodW5rIEEgc3RyaW5nIHNuaXBwZXQgb2YgZ2VuZXJhdGVkIEpTIGNvZGUsIGFub3RoZXIgaW5zdGFuY2Ugb2ZcbiAqICAgICAgICBTb3VyY2VOb2RlLCBvciBhbiBhcnJheSB3aGVyZSBlYWNoIG1lbWJlciBpcyBvbmUgb2YgdGhvc2UgdGhpbmdzLlxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5wcmVwZW5kID0gZnVuY3Rpb24gU291cmNlTm9kZV9wcmVwZW5kKGFDaHVuaykge1xuICBpZiAoQXJyYXkuaXNBcnJheShhQ2h1bmspKSB7XG4gICAgZm9yICh2YXIgaSA9IGFDaHVuay5sZW5ndGgtMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgIHRoaXMucHJlcGVuZChhQ2h1bmtbaV0pO1xuICAgIH1cbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgdGhpcy5jaGlsZHJlbi51bnNoaWZ0KGFDaHVuayk7XG4gIH1cbiAgZWxzZSB7XG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgIFwiRXhwZWN0ZWQgYSBTb3VyY2VOb2RlLCBzdHJpbmcsIG9yIGFuIGFycmF5IG9mIFNvdXJjZU5vZGVzIGFuZCBzdHJpbmdzLiBHb3QgXCIgKyBhQ2h1bmtcbiAgICApO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBXYWxrIG92ZXIgdGhlIHRyZWUgb2YgSlMgc25pcHBldHMgaW4gdGhpcyBub2RlIGFuZCBpdHMgY2hpbGRyZW4uIFRoZVxuICogd2Fsa2luZyBmdW5jdGlvbiBpcyBjYWxsZWQgb25jZSBmb3IgZWFjaCBzbmlwcGV0IG9mIEpTIGFuZCBpcyBwYXNzZWQgdGhhdFxuICogc25pcHBldCBhbmQgdGhlIGl0cyBvcmlnaW5hbCBhc3NvY2lhdGVkIHNvdXJjZSdzIGxpbmUvY29sdW1uIGxvY2F0aW9uLlxuICpcbiAqIEBwYXJhbSBhRm4gVGhlIHRyYXZlcnNhbCBmdW5jdGlvbi5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUud2FsayA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfd2FsayhhRm4pIHtcbiAgdmFyIGNodW5rO1xuICBmb3IgKHZhciBpID0gMCwgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgIGNodW5rID0gdGhpcy5jaGlsZHJlbltpXTtcbiAgICBpZiAoY2h1bmtbaXNTb3VyY2VOb2RlXSkge1xuICAgICAgY2h1bmsud2FsayhhRm4pO1xuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgIGlmIChjaHVuayAhPT0gJycpIHtcbiAgICAgICAgYUZuKGNodW5rLCB7IHNvdXJjZTogdGhpcy5zb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICBsaW5lOiB0aGlzLmxpbmUsXG4gICAgICAgICAgICAgICAgICAgICBjb2x1bW46IHRoaXMuY29sdW1uLFxuICAgICAgICAgICAgICAgICAgICAgbmFtZTogdGhpcy5uYW1lIH0pO1xuICAgICAgfVxuICAgIH1cbiAgfVxufTtcblxuLyoqXG4gKiBMaWtlIGBTdHJpbmcucHJvdG90eXBlLmpvaW5gIGV4Y2VwdCBmb3IgU291cmNlTm9kZXMuIEluc2VydHMgYGFTdHJgIGJldHdlZW5cbiAqIGVhY2ggb2YgYHRoaXMuY2hpbGRyZW5gLlxuICpcbiAqIEBwYXJhbSBhU2VwIFRoZSBzZXBhcmF0b3IuXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLmpvaW4gPSBmdW5jdGlvbiBTb3VyY2VOb2RlX2pvaW4oYVNlcCkge1xuICB2YXIgbmV3Q2hpbGRyZW47XG4gIHZhciBpO1xuICB2YXIgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7XG4gIGlmIChsZW4gPiAwKSB7XG4gICAgbmV3Q2hpbGRyZW4gPSBbXTtcbiAgICBmb3IgKGkgPSAwOyBpIDwgbGVuLTE7IGkrKykge1xuICAgICAgbmV3Q2hpbGRyZW4ucHVzaCh0aGlzLmNoaWxkcmVuW2ldKTtcbiAgICAgIG5ld0NoaWxkcmVuLnB1c2goYVNlcCk7XG4gICAgfVxuICAgIG5ld0NoaWxkcmVuLnB1c2godGhpcy5jaGlsZHJlbltpXSk7XG4gICAgdGhpcy5jaGlsZHJlbiA9IG5ld0NoaWxkcmVuO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBDYWxsIFN0cmluZy5wcm90b3R5cGUucmVwbGFjZSBvbiB0aGUgdmVyeSByaWdodC1tb3N0IHNvdXJjZSBzbmlwcGV0LiBVc2VmdWxcbiAqIGZvciB0cmltbWluZyB3aGl0ZXNwYWNlIGZyb20gdGhlIGVuZCBvZiBhIHNvdXJjZSBub2RlLCBldGMuXG4gKlxuICogQHBhcmFtIGFQYXR0ZXJuIFRoZSBwYXR0ZXJuIHRvIHJlcGxhY2UuXG4gKiBAcGFyYW0gYVJlcGxhY2VtZW50IFRoZSB0aGluZyB0byByZXBsYWNlIHRoZSBwYXR0ZXJuIHdpdGguXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLnJlcGxhY2VSaWdodCA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfcmVwbGFjZVJpZ2h0KGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpIHtcbiAgdmFyIGxhc3RDaGlsZCA9IHRoaXMuY2hpbGRyZW5bdGhpcy5jaGlsZHJlbi5sZW5ndGggLSAxXTtcbiAgaWYgKGxhc3RDaGlsZFtpc1NvdXJjZU5vZGVdKSB7XG4gICAgbGFzdENoaWxkLnJlcGxhY2VSaWdodChhUGF0dGVybiwgYVJlcGxhY2VtZW50KTtcbiAgfVxuICBlbHNlIGlmICh0eXBlb2YgbGFzdENoaWxkID09PSAnc3RyaW5nJykge1xuICAgIHRoaXMuY2hpbGRyZW5bdGhpcy5jaGlsZHJlbi5sZW5ndGggLSAxXSA9IGxhc3RDaGlsZC5yZXBsYWNlKGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpO1xuICB9XG4gIGVsc2Uge1xuICAgIHRoaXMuY2hpbGRyZW4ucHVzaCgnJy5yZXBsYWNlKGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogU2V0IHRoZSBzb3VyY2UgY29udGVudCBmb3IgYSBzb3VyY2UgZmlsZS4gVGhpcyB3aWxsIGJlIGFkZGVkIHRvIHRoZSBTb3VyY2VNYXBHZW5lcmF0b3JcbiAqIGluIHRoZSBzb3VyY2VzQ29udGVudCBmaWVsZC5cbiAqXG4gKiBAcGFyYW0gYVNvdXJjZUZpbGUgVGhlIGZpbGVuYW1lIG9mIHRoZSBzb3VyY2UgZmlsZVxuICogQHBhcmFtIGFTb3VyY2VDb250ZW50IFRoZSBjb250ZW50IG9mIHRoZSBzb3VyY2UgZmlsZVxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5zZXRTb3VyY2VDb250ZW50ID1cbiAgZnVuY3Rpb24gU291cmNlTm9kZV9zZXRTb3VyY2VDb250ZW50KGFTb3VyY2VGaWxlLCBhU291cmNlQ29udGVudCkge1xuICAgIHRoaXMuc291cmNlQ29udGVudHNbdXRpbC50b1NldFN0cmluZyhhU291cmNlRmlsZSldID0gYVNvdXJjZUNvbnRlbnQ7XG4gIH07XG5cbi8qKlxuICogV2FsayBvdmVyIHRoZSB0cmVlIG9mIFNvdXJjZU5vZGVzLiBUaGUgd2Fsa2luZyBmdW5jdGlvbiBpcyBjYWxsZWQgZm9yIGVhY2hcbiAqIHNvdXJjZSBmaWxlIGNvbnRlbnQgYW5kIGlzIHBhc3NlZCB0aGUgZmlsZW5hbWUgYW5kIHNvdXJjZSBjb250ZW50LlxuICpcbiAqIEBwYXJhbSBhRm4gVGhlIHRyYXZlcnNhbCBmdW5jdGlvbi5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUud2Fsa1NvdXJjZUNvbnRlbnRzID1cbiAgZnVuY3Rpb24gU291cmNlTm9kZV93YWxrU291cmNlQ29udGVudHMoYUZuKSB7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IHRoaXMuY2hpbGRyZW4ubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgIGlmICh0aGlzLmNoaWxkcmVuW2ldW2lzU291cmNlTm9kZV0pIHtcbiAgICAgICAgdGhpcy5jaGlsZHJlbltpXS53YWxrU291cmNlQ29udGVudHMoYUZuKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICB2YXIgc291cmNlcyA9IE9iamVjdC5rZXlzKHRoaXMuc291cmNlQ29udGVudHMpO1xuICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBzb3VyY2VzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBhRm4odXRpbC5mcm9tU2V0U3RyaW5nKHNvdXJjZXNbaV0pLCB0aGlzLnNvdXJjZUNvbnRlbnRzW3NvdXJjZXNbaV1dKTtcbiAgICB9XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRoZSBzdHJpbmcgcmVwcmVzZW50YXRpb24gb2YgdGhpcyBzb3VyY2Ugbm9kZS4gV2Fsa3Mgb3ZlciB0aGUgdHJlZVxuICogYW5kIGNvbmNhdGVuYXRlcyBhbGwgdGhlIHZhcmlvdXMgc25pcHBldHMgdG9nZXRoZXIgdG8gb25lIHN0cmluZy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiBTb3VyY2VOb2RlX3RvU3RyaW5nKCkge1xuICB2YXIgc3RyID0gXCJcIjtcbiAgdGhpcy53YWxrKGZ1bmN0aW9uIChjaHVuaykge1xuICAgIHN0ciArPSBjaHVuaztcbiAgfSk7XG4gIHJldHVybiBzdHI7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIHN0cmluZyByZXByZXNlbnRhdGlvbiBvZiB0aGlzIHNvdXJjZSBub2RlIGFsb25nIHdpdGggYSBzb3VyY2VcbiAqIG1hcC5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUudG9TdHJpbmdXaXRoU291cmNlTWFwID0gZnVuY3Rpb24gU291cmNlTm9kZV90b1N0cmluZ1dpdGhTb3VyY2VNYXAoYUFyZ3MpIHtcbiAgdmFyIGdlbmVyYXRlZCA9IHtcbiAgICBjb2RlOiBcIlwiLFxuICAgIGxpbmU6IDEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHZhciBtYXAgPSBuZXcgU291cmNlTWFwR2VuZXJhdG9yKGFBcmdzKTtcbiAgdmFyIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgdmFyIGxhc3RPcmlnaW5hbFNvdXJjZSA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxMaW5lID0gbnVsbDtcbiAgdmFyIGxhc3RPcmlnaW5hbENvbHVtbiA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxOYW1lID0gbnVsbDtcbiAgdGhpcy53YWxrKGZ1bmN0aW9uIChjaHVuaywgb3JpZ2luYWwpIHtcbiAgICBnZW5lcmF0ZWQuY29kZSArPSBjaHVuaztcbiAgICBpZiAob3JpZ2luYWwuc291cmNlICE9PSBudWxsXG4gICAgICAgICYmIG9yaWdpbmFsLmxpbmUgIT09IG51bGxcbiAgICAgICAgJiYgb3JpZ2luYWwuY29sdW1uICE9PSBudWxsKSB7XG4gICAgICBpZihsYXN0T3JpZ2luYWxTb3VyY2UgIT09IG9yaWdpbmFsLnNvdXJjZVxuICAgICAgICAgfHwgbGFzdE9yaWdpbmFsTGluZSAhPT0gb3JpZ2luYWwubGluZVxuICAgICAgICAgfHwgbGFzdE9yaWdpbmFsQ29sdW1uICE9PSBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgIHx8IGxhc3RPcmlnaW5hbE5hbWUgIT09IG9yaWdpbmFsLm5hbWUpIHtcbiAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgIHNvdXJjZTogb3JpZ2luYWwuc291cmNlLFxuICAgICAgICAgIG9yaWdpbmFsOiB7XG4gICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgY29sdW1uOiBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgICB9LFxuICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgbGluZTogZ2VuZXJhdGVkLmxpbmUsXG4gICAgICAgICAgICBjb2x1bW46IGdlbmVyYXRlZC5jb2x1bW5cbiAgICAgICAgICB9LFxuICAgICAgICAgIG5hbWU6IG9yaWdpbmFsLm5hbWVcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBvcmlnaW5hbC5zb3VyY2U7XG4gICAgICBsYXN0T3JpZ2luYWxMaW5lID0gb3JpZ2luYWwubGluZTtcbiAgICAgIGxhc3RPcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgIGxhc3RPcmlnaW5hbE5hbWUgPSBvcmlnaW5hbC5uYW1lO1xuICAgICAgc291cmNlTWFwcGluZ0FjdGl2ZSA9IHRydWU7XG4gICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICBtYXAuYWRkTWFwcGluZyh7XG4gICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgIGxpbmU6IGdlbmVyYXRlZC5saW5lLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkLmNvbHVtblxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGxhc3RPcmlnaW5hbFNvdXJjZSA9IG51bGw7XG4gICAgICBzb3VyY2VNYXBwaW5nQWN0aXZlID0gZmFsc2U7XG4gICAgfVxuICAgIGZvciAodmFyIGlkeCA9IDAsIGxlbmd0aCA9IGNodW5rLmxlbmd0aDsgaWR4IDwgbGVuZ3RoOyBpZHgrKykge1xuICAgICAgaWYgKGNodW5rLmNoYXJDb2RlQXQoaWR4KSA9PT0gTkVXTElORV9DT0RFKSB7XG4gICAgICAgIGdlbmVyYXRlZC5saW5lKys7XG4gICAgICAgIGdlbmVyYXRlZC5jb2x1bW4gPSAwO1xuICAgICAgICAvLyBNYXBwaW5ncyBlbmQgYXQgZW9sXG4gICAgICAgIGlmIChpZHggKyAxID09PSBsZW5ndGgpIHtcbiAgICAgICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/front/frontend/node_modules/source-map/dist/source-map.js b/front/frontend/node_modules/source-map/dist/source-map.js new file mode 100644 index 0000000..4e630e2 --- /dev/null +++ b/front/frontend/node_modules/source-map/dist/source-map.js @@ -0,0 +1,3090 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["sourceMap"] = factory(); + else + root["sourceMap"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; + exports.SourceNode = __webpack_require__(10).SourceNode; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = __webpack_require__(2); + var util = __webpack_require__(4); + var ArraySet = __webpack_require__(5).ArraySet; + var MappingList = __webpack_require__(6).MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = __webpack_require__(3); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var binarySearch = __webpack_require__(8); + var ArraySet = __webpack_require__(5).ArraySet; + var base64VLQ = __webpack_require__(2); + var quickSort = __webpack_require__(9).quickSort; + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + var util = __webpack_require__(4); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + + +/***/ }) +/******/ ]) +}); +; \ No newline at end of file diff --git a/front/frontend/node_modules/source-map/dist/source-map.min.js b/front/frontend/node_modules/source-map/dist/source-map.min.js new file mode 100644 index 0000000..f2a46bd --- /dev/null +++ b/front/frontend/node_modules/source-map/dist/source-map.min.js @@ -0,0 +1,2 @@ +!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(_))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=e.source-n.source;return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:e.name-n.name))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=e.source-n.source,0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:e.name-n.name))))}function f(e,n){return e===n?0:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}n.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,_=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(m)},n.relative=a;var v=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=v?u:l,n.fromSetString=v?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&er||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),t=a.getArg(n,"sources"),o=a.getArg(n,"names",[]),i=a.getArg(n,"sourceRoot",null),s=a.getArg(n,"sourcesContent",null),u=a.getArg(n,"mappings"),c=a.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);t=t.map(String).map(a.normalize).map(function(e){return i&&a.isAbsolute(i)&&a.isAbsolute(e)?a.relative(i,e):e}),this._names=l.fromArray(o.map(String),!0),this._sources=l.fromArray(t,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=u,this.file=c}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),o=a.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=a.getArg(e,"offset"),r=a.getArg(n,"line"),o=a.getArg(n,"column");if(r=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.fromSourceMap=function(e){var n=Object.create(o.prototype),r=n._names=l.fromArray(e._names.toArray(),!0),t=n._sources=l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=s.length;p1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),S.push(r),"number"==typeof r.originalLine&&A.push(r)}g(S,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,g(A,a.compareByOriginalPositions),this.__originalMappings=A},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=a.join(this.sourceRoot,i)));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=a.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r0){for(n=[],r=0;r 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap)\n\t : new BasicSourceMapConsumer(sourceMap);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t if (source != null && sourceRoot != null) {\n\t source = util.join(sourceRoot, source);\n\t }\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: Optional. the column number in the original source.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t if (this.sourceRoot != null) {\n\t needle.source = util.relative(this.sourceRoot, needle.source);\n\t }\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\t needle.source = this._sources.indexOf(needle.source);\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The only parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t if (this.sourceRoot != null) {\n\t source = util.join(this.sourceRoot, source);\n\t }\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t if (this.sourceRoot != null) {\n\t aSource = util.relative(this.sourceRoot, aSource);\n\t }\n\t\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t if (this.sourceRoot != null) {\n\t source = util.relative(this.sourceRoot, source);\n\t }\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t source = this._sources.indexOf(source);\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The only parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util.join(section.consumer.sourceRoot, source);\n\t }\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 42c329f865e32e011afb","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/front/frontend/node_modules/source-map/lib/array-set.js b/front/frontend/node_modules/source-map/lib/array-set.js new file mode 100644 index 0000000..fbd5c81 --- /dev/null +++ b/front/frontend/node_modules/source-map/lib/array-set.js @@ -0,0 +1,121 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; + +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ +function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} + +/** + * Static method for creating ArraySet instances from an existing array. + */ +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; + +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ +ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; + +/** + * Add the given string to this set. + * + * @param String aStr + */ +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; + +/** + * Is the given string a member of this set? + * + * @param String aStr + */ +ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } +}; + +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; + +/** + * What is the element at the given index? + * + * @param Number aIdx + */ +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; + +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; diff --git a/front/frontend/node_modules/source-map/lib/base64-vlq.js b/front/frontend/node_modules/source-map/lib/base64-vlq.js new file mode 100644 index 0000000..612b404 --- /dev/null +++ b/front/frontend/node_modules/source-map/lib/base64-vlq.js @@ -0,0 +1,140 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var base64 = require('./base64'); + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT = 5; + +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; diff --git a/front/frontend/node_modules/source-map/lib/base64.js b/front/frontend/node_modules/source-map/lib/base64.js new file mode 100644 index 0000000..8aa86b3 --- /dev/null +++ b/front/frontend/node_modules/source-map/lib/base64.js @@ -0,0 +1,67 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; + +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ +exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; +}; diff --git a/front/frontend/node_modules/source-map/lib/binary-search.js b/front/frontend/node_modules/source-map/lib/binary-search.js new file mode 100644 index 0000000..010ac94 --- /dev/null +++ b/front/frontend/node_modules/source-map/lib/binary-search.js @@ -0,0 +1,111 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; + +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} + +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; +}; diff --git a/front/frontend/node_modules/source-map/lib/mapping-list.js b/front/frontend/node_modules/source-map/lib/mapping-list.js new file mode 100644 index 0000000..06d1274 --- /dev/null +++ b/front/frontend/node_modules/source-map/lib/mapping-list.js @@ -0,0 +1,79 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); + +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ +function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; +} + +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ +MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + +/** + * Add the given source mapping. + * + * @param Object aMapping + */ +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; + +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; + +exports.MappingList = MappingList; diff --git a/front/frontend/node_modules/source-map/lib/quick-sort.js b/front/frontend/node_modules/source-map/lib/quick-sort.js new file mode 100644 index 0000000..6a7caad --- /dev/null +++ b/front/frontend/node_modules/source-map/lib/quick-sort.js @@ -0,0 +1,114 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ +function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); +} + +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ +exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); +}; diff --git a/front/frontend/node_modules/source-map/lib/source-map-consumer.js b/front/frontend/node_modules/source-map/lib/source-map-consumer.js new file mode 100644 index 0000000..6abcc28 --- /dev/null +++ b/front/frontend/node_modules/source-map/lib/source-map-consumer.js @@ -0,0 +1,1082 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var binarySearch = require('./binary-search'); +var ArraySet = require('./array-set').ArraySet; +var base64VLQ = require('./base64-vlq'); +var quickSort = require('./quick-sort').quickSort; + +function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); +} + +SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); +} + +/** + * The version of the source mapping spec that we are consuming. + */ +SourceMapConsumer.prototype._version = 3; + +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); + +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; + +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; + +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ +SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ +SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + +exports.SourceMapConsumer = SourceMapConsumer; + +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ +function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ +BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + +/** + * The version of the source mapping spec that we are consuming. + */ +BasicSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } +}); + +/** + * Provide the JIT with a nice shape / hidden class. + */ +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ +BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ +BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ +BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ +BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ +function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + +/** + * The version of the source mapping spec that we are consuming. + */ +IndexedSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ +IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ +IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/front/frontend/node_modules/source-map/lib/source-map-generator.js b/front/frontend/node_modules/source-map/lib/source-map-generator.js new file mode 100644 index 0000000..aff1e7f --- /dev/null +++ b/front/frontend/node_modules/source-map/lib/source-map-generator.js @@ -0,0 +1,416 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var base64VLQ = require('./base64-vlq'); +var util = require('./util'); +var ArraySet = require('./array-set').ArraySet; +var MappingList = require('./mapping-list').MappingList; + +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; + +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ +SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ +SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + +/** + * Set the source content for a source file. + */ +SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ +SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ +SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ +SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + +SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + +/** + * Externalize the source map. + */ +SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + +/** + * Render the source map being generated to a string. + */ +SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + +exports.SourceMapGenerator = SourceMapGenerator; diff --git a/front/frontend/node_modules/source-map/lib/source-node.js b/front/frontend/node_modules/source-map/lib/source-node.js new file mode 100644 index 0000000..d196a53 --- /dev/null +++ b/front/frontend/node_modules/source-map/lib/source-node.js @@ -0,0 +1,413 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; +var util = require('./util'); + +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE = /(\r?\n)/; + +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE = 10; + +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode = "$$$isSourceNode$$$"; + +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} + +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ +SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } +}; + +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; + +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; + +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ +SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +/** + * Returns the string representation of this source node along with a source + * map. + */ +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; +}; + +exports.SourceNode = SourceNode; diff --git a/front/frontend/node_modules/source-map/lib/util.js b/front/frontend/node_modules/source-map/lib/util.js new file mode 100644 index 0000000..44e0e45 --- /dev/null +++ b/front/frontend/node_modules/source-map/lib/util.js @@ -0,0 +1,417 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} +exports.getArg = getArg; + +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; +} +exports.urlGenerate = urlGenerate; + +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ +function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; +} +exports.normalize = normalize; + +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; +} +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); +}; + +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} +exports.relative = relative; + +var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}()); + +function identity (s) { + return s; +} + +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; +} + +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; +} +exports.compareByOriginalPositions = compareByOriginalPositions; + +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; +} +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} + +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; diff --git a/front/frontend/node_modules/source-map/package.json b/front/frontend/node_modules/source-map/package.json new file mode 100644 index 0000000..048e3ae --- /dev/null +++ b/front/frontend/node_modules/source-map/package.json @@ -0,0 +1,72 @@ +{ + "name": "source-map", + "description": "Generates and consumes source maps", + "version": "0.5.7", + "homepage": "https://github.com/mozilla/source-map", + "author": "Nick Fitzgerald ", + "contributors": [ + "Tobias Koppers ", + "Duncan Beevers ", + "Stephen Crane ", + "Ryan Seddon ", + "Miles Elam ", + "Mihai Bazon ", + "Michael Ficarra ", + "Todd Wolfson ", + "Alexander Solovyov ", + "Felix Gnass ", + "Conrad Irwin ", + "usrbincc ", + "David Glasser ", + "Chase Douglas ", + "Evan Wallace ", + "Heather Arthur ", + "Hugh Kennedy ", + "David Glasser ", + "Simon Lydell ", + "Jmeas Smith ", + "Michael Z Goddard ", + "azu ", + "John Gozde ", + "Adam Kirkton ", + "Chris Montgomery ", + "J. Ryan Stinnett ", + "Jack Herrington ", + "Chris Truter ", + "Daniel Espeset ", + "Jamie Wong ", + "Eddy Bruël ", + "Hawken Rives ", + "Gilad Peleg ", + "djchie ", + "Gary Ye ", + "Nicolas Lalevée " + ], + "repository": { + "type": "git", + "url": "http://github.com/mozilla/source-map.git" + }, + "main": "./source-map.js", + "files": [ + "source-map.js", + "lib/", + "dist/source-map.debug.js", + "dist/source-map.js", + "dist/source-map.min.js", + "dist/source-map.min.js.map" + ], + "engines": { + "node": ">=0.10.0" + }, + "license": "BSD-3-Clause", + "scripts": { + "test": "npm run build && node test/run-tests.js", + "build": "webpack --color", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "devDependencies": { + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "typings": "source-map" +} diff --git a/front/frontend/node_modules/source-map/source-map.js b/front/frontend/node_modules/source-map/source-map.js new file mode 100644 index 0000000..bc88fe8 --- /dev/null +++ b/front/frontend/node_modules/source-map/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/front/frontend/node_modules/split-string/LICENSE b/front/frontend/node_modules/split-string/LICENSE new file mode 100644 index 0000000..e33d14b --- /dev/null +++ b/front/frontend/node_modules/split-string/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/split-string/README.md b/front/frontend/node_modules/split-string/README.md new file mode 100644 index 0000000..d622e44 --- /dev/null +++ b/front/frontend/node_modules/split-string/README.md @@ -0,0 +1,321 @@ +# split-string [![NPM version](https://img.shields.io/npm/v/split-string.svg?style=flat)](https://www.npmjs.com/package/split-string) [![NPM monthly downloads](https://img.shields.io/npm/dm/split-string.svg?style=flat)](https://npmjs.org/package/split-string) [![NPM total downloads](https://img.shields.io/npm/dt/split-string.svg?style=flat)](https://npmjs.org/package/split-string) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/split-string.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/split-string) + +> Split a string on a character except when the character is escaped. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save split-string +``` + + + +
    +Why use this? + +
    + +Although it's easy to split on a string: + +```js +console.log('a.b.c'.split('.')); +//=> ['a', 'b', 'c'] +``` + +It's more challenging to split a string whilst respecting escaped or quoted characters. + +**Bad** + +```js +console.log('a\\.b.c'.split('.')); +//=> ['a\\', 'b', 'c'] + +console.log('"a.b.c".d'.split('.')); +//=> ['"a', 'b', 'c"', 'd'] +``` + +**Good** + +```js +var split = require('split-string'); +console.log(split('a\\.b.c')); +//=> ['a.b', 'c'] + +console.log(split('"a.b.c".d')); +//=> ['a.b.c', 'd'] +``` + +See the [options](#options) to learn how to choose the separator or retain quotes or escaping. + +
    + +
    + +## Usage + +```js +var split = require('split-string'); + +split('a.b.c'); +//=> ['a', 'b', 'c'] + +// respects escaped characters +split('a.b.c\\.d'); +//=> ['a', 'b', 'c.d'] + +// respects double-quoted strings +split('a."b.c.d".e'); +//=> ['a', 'b.c.d', 'e'] +``` + +**Brackets** + +Also respects brackets [unless disabled](#optionsbrackets): + +```js +split('a (b c d) e', ' '); +//=> ['a', '(b c d)', 'e'] +``` + +## Options + +### options.brackets + +**Type**: `object|boolean` + +**Default**: `undefined` + +**Description** + +If enabled, split-string will not split inside brackets. The following brackets types are supported when `options.brackets` is `true`, + +```js +{ + '<': '>', + '(': ')', + '[': ']', + '{': '}' +} +``` + +Or, if object of brackets must be passed, each property on the object must be a bracket type, where the property key is the opening delimiter and property value is the closing delimiter. + +**Examples** + +```js +// no bracket support by default +split('a.{b.c}'); +//=> [ 'a', '{b', 'c}' ] + +// support all basic bracket types: "<>{}[]()" +split('a.{b.c}', {brackets: true}); +//=> [ 'a', '{b.c}' ] + +// also supports nested brackets +split('a.{b.{c.d}.e}.f', {brackets: true}); +//=> [ 'a', '{b.{c.d}.e}', 'f' ] + +// support only the specified brackets +split('[a.b].(c.d)', {brackets: {'[': ']'}}); +//=> [ '[a.b]', '(c', 'd)' ] +``` + +### options.sep + +**Type**: `string` + +**Default**: `.` + +The separator/character to split on. + +**Example** + +```js +split('a.b,c', {sep: ','}); +//=> ['a.b', 'c'] + +// you can also pass the separator as string as the last argument +split('a.b,c', ','); +//=> ['a.b', 'c'] +``` + +### options.keepEscaping + +**Type**: `boolean` + +**Default**: `undefined` + +Keep backslashes in the result. + +**Example** + +```js +split('a.b\\.c'); +//=> ['a', 'b.c'] + +split('a.b.\\c', {keepEscaping: true}); +//=> ['a', 'b\.c'] +``` + +### options.keepQuotes + +**Type**: `boolean` + +**Default**: `undefined` + +Keep single- or double-quotes in the result. + +**Example** + +```js +split('a."b.c.d".e'); +//=> ['a', 'b.c.d', 'e'] + +split('a."b.c.d".e', {keepQuotes: true}); +//=> ['a', '"b.c.d"', 'e'] + +split('a.\'b.c.d\'.e', {keepQuotes: true}); +//=> ['a', '\'b.c.d\'', 'e'] +``` + +### options.keepDoubleQuotes + +**Type**: `boolean` + +**Default**: `undefined` + +Keep double-quotes in the result. + +**Example** + +```js +split('a."b.c.d".e'); +//=> ['a', 'b.c.d', 'e'] + +split('a."b.c.d".e', {keepDoubleQuotes: true}); +//=> ['a', '"b.c.d"', 'e'] +``` + +### options.keepSingleQuotes + +**Type**: `boolean` + +**Default**: `undefined` + +Keep single-quotes in the result. + +**Example** + +```js +split('a.\'b.c.d\'.e'); +//=> ['a', 'b.c.d', 'e'] + +split('a.\'b.c.d\'.e', {keepSingleQuotes: true}); +//=> ['a', '\'b.c.d\'', 'e'] +``` + +## Customizer + +**Type**: `function` + +**Default**: `undefined` + +Pass a function as the last argument to customize how tokens are added to the array. + +**Example** + +```js +var arr = split('a.b', function(tok) { + if (tok.arr[tok.arr.length - 1] === 'a') { + tok.split = false; + } +}); +console.log(arr); +//=> ['a.b'] +``` + +**Properties** + +The `tok` object has the following properties: + +* `tok.val` (string) The current value about to be pushed onto the result array +* `tok.idx` (number) the current index in the string +* `tok.str` (string) the entire string +* `tok.arr` (array) the result array + +## Release history + +### v3.0.0 - 2017-06-17 + +**Added** + +* adds support for brackets + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [deromanize](https://www.npmjs.com/package/deromanize): Convert roman numerals to arabic numbers (useful for books, outlines, documentation, slide decks, etc) | [homepage](https://github.com/jonschlinkert/deromanize "Convert roman numerals to arabic numbers (useful for books, outlines, documentation, slide decks, etc)") +* [randomatic](https://www.npmjs.com/package/randomatic): Generate randomized strings of a specified length using simple character sequences. The original generate-password. | [homepage](https://github.com/jonschlinkert/randomatic "Generate randomized strings of a specified length using simple character sequences. The original generate-password.") +* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.") +* [romanize](https://www.npmjs.com/package/romanize): Convert numbers to roman numerals (useful for books, outlines, documentation, slide decks, etc) | [homepage](https://github.com/jonschlinkert/romanize "Convert numbers to roman numerals (useful for books, outlines, documentation, slide decks, etc)") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 28 | [jonschlinkert](https://github.com/jonschlinkert) | +| 9 | [doowb](https://github.com/doowb) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/split-string/index.js b/front/frontend/node_modules/split-string/index.js new file mode 100644 index 0000000..7bc0ea9 --- /dev/null +++ b/front/frontend/node_modules/split-string/index.js @@ -0,0 +1,171 @@ +/*! + * split-string + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var extend = require('extend-shallow'); + +module.exports = function(str, options, fn) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + if (typeof options === 'function') { + fn = options; + options = null; + } + + // allow separator to be defined as a string + if (typeof options === 'string') { + options = { sep: options }; + } + + var opts = extend({sep: '.'}, options); + var quotes = opts.quotes || ['"', "'", '`']; + var brackets; + + if (opts.brackets === true) { + brackets = { + '<': '>', + '(': ')', + '[': ']', + '{': '}' + }; + } else if (opts.brackets) { + brackets = opts.brackets; + } + + var tokens = []; + var stack = []; + var arr = ['']; + var sep = opts.sep; + var len = str.length; + var idx = -1; + var closeIdx; + + function expected() { + if (brackets && stack.length) { + return brackets[stack[stack.length - 1]]; + } + } + + while (++idx < len) { + var ch = str[idx]; + var next = str[idx + 1]; + var tok = { val: ch, idx: idx, arr: arr, str: str }; + tokens.push(tok); + + if (ch === '\\') { + tok.val = keepEscaping(opts, str, idx) === true ? (ch + next) : next; + tok.escaped = true; + if (typeof fn === 'function') { + fn(tok); + } + arr[arr.length - 1] += tok.val; + idx++; + continue; + } + + if (brackets && brackets[ch]) { + stack.push(ch); + var e = expected(); + var i = idx + 1; + + if (str.indexOf(e, i + 1) !== -1) { + while (stack.length && i < len) { + var s = str[++i]; + if (s === '\\') { + s++; + continue; + } + + if (quotes.indexOf(s) !== -1) { + i = getClosingQuote(str, s, i + 1); + continue; + } + + e = expected(); + if (stack.length && str.indexOf(e, i + 1) === -1) { + break; + } + + if (brackets[s]) { + stack.push(s); + continue; + } + + if (e === s) { + stack.pop(); + } + } + } + + closeIdx = i; + if (closeIdx === -1) { + arr[arr.length - 1] += ch; + continue; + } + + ch = str.slice(idx, closeIdx + 1); + tok.val = ch; + tok.idx = idx = closeIdx; + } + + if (quotes.indexOf(ch) !== -1) { + closeIdx = getClosingQuote(str, ch, idx + 1); + if (closeIdx === -1) { + arr[arr.length - 1] += ch; + continue; + } + + if (keepQuotes(ch, opts) === true) { + ch = str.slice(idx, closeIdx + 1); + } else { + ch = str.slice(idx + 1, closeIdx); + } + + tok.val = ch; + tok.idx = idx = closeIdx; + } + + if (typeof fn === 'function') { + fn(tok, tokens); + ch = tok.val; + idx = tok.idx; + } + + if (tok.val === sep && tok.split !== false) { + arr.push(''); + continue; + } + + arr[arr.length - 1] += tok.val; + } + + return arr; +}; + +function getClosingQuote(str, ch, i, brackets) { + var idx = str.indexOf(ch, i); + if (str.charAt(idx - 1) === '\\') { + return getClosingQuote(str, ch, idx + 1); + } + return idx; +} + +function keepQuotes(ch, opts) { + if (opts.keepDoubleQuotes === true && ch === '"') return true; + if (opts.keepSingleQuotes === true && ch === "'") return true; + return opts.keepQuotes; +} + +function keepEscaping(opts, str, idx) { + if (typeof opts.keepEscaping === 'function') { + return opts.keepEscaping(str, idx); + } + return opts.keepEscaping === true || str[idx + 1] === '\\'; +} diff --git a/front/frontend/node_modules/split-string/node_modules/extend-shallow/LICENSE b/front/frontend/node_modules/split-string/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/front/frontend/node_modules/split-string/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/split-string/node_modules/extend-shallow/README.md b/front/frontend/node_modules/split-string/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/front/frontend/node_modules/split-string/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/split-string/node_modules/extend-shallow/index.js b/front/frontend/node_modules/split-string/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/front/frontend/node_modules/split-string/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/front/frontend/node_modules/split-string/node_modules/extend-shallow/package.json b/front/frontend/node_modules/split-string/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e5e9105 --- /dev/null +++ b/front/frontend/node_modules/split-string/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/split-string/node_modules/is-extendable/LICENSE b/front/frontend/node_modules/split-string/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/front/frontend/node_modules/split-string/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/front/frontend/node_modules/split-string/node_modules/is-extendable/README.md b/front/frontend/node_modules/split-string/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/front/frontend/node_modules/split-string/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/split-string/node_modules/is-extendable/index.d.ts b/front/frontend/node_modules/split-string/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/front/frontend/node_modules/split-string/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/front/frontend/node_modules/split-string/node_modules/is-extendable/index.js b/front/frontend/node_modules/split-string/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/front/frontend/node_modules/split-string/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/front/frontend/node_modules/split-string/node_modules/is-extendable/package.json b/front/frontend/node_modules/split-string/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/front/frontend/node_modules/split-string/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/split-string/package.json b/front/frontend/node_modules/split-string/package.json new file mode 100644 index 0000000..8f490a2 --- /dev/null +++ b/front/frontend/node_modules/split-string/package.json @@ -0,0 +1,65 @@ +{ + "name": "split-string", + "description": "Split a string on a character except when the character is escaped.", + "version": "3.1.0", + "homepage": "https://github.com/jonschlinkert/split-string", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/split-string", + "bugs": { + "url": "https://github.com/jonschlinkert/split-string/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "character", + "escape", + "split", + "string" + ], + "verb": { + "toc": false, + "layout": "default", + "titles": [ + ".", + "install", + "Why use this?" + ], + "related": { + "list": [ + "deromanize", + "randomatic", + "repeat-string", + "romanize" + ] + }, + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/split/.npmignore b/front/frontend/node_modules/split/.npmignore new file mode 100644 index 0000000..13abef4 --- /dev/null +++ b/front/frontend/node_modules/split/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/front/frontend/node_modules/split/.travis.yml b/front/frontend/node_modules/split/.travis.yml new file mode 100644 index 0000000..dad2273 --- /dev/null +++ b/front/frontend/node_modules/split/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - "0.10" diff --git a/front/frontend/node_modules/split/LICENCE b/front/frontend/node_modules/split/LICENCE new file mode 100644 index 0000000..171dd97 --- /dev/null +++ b/front/frontend/node_modules/split/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/front/frontend/node_modules/split/examples/pretty.js b/front/frontend/node_modules/split/examples/pretty.js new file mode 100644 index 0000000..2e89131 --- /dev/null +++ b/front/frontend/node_modules/split/examples/pretty.js @@ -0,0 +1,26 @@ + +var inspect = require('util').inspect +var es = require('event-stream') //load event-stream +var split = require('../') + +if(!module.parent) { + es.pipe( //pipe joins streams together + process.openStdin(), //open stdin + split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + var j + try { + j = JSON.parse(data) //try to parse input into json + } catch (err) { + return callback(null, data) //if it fails just pass it anyway + } + callback(null, inspect(j)) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) + } + +// run this +// +// curl -sS registry.npmjs.org/event-stream | node pretty.js +// diff --git a/front/frontend/node_modules/split/index.js b/front/frontend/node_modules/split/index.js new file mode 100644 index 0000000..d856433 --- /dev/null +++ b/front/frontend/node_modules/split/index.js @@ -0,0 +1,63 @@ +//filter will reemit the data if cb(err,pass) pass is truthy + +// reduce is more tricky +// maybe we want to group the reductions or emit progress updates occasionally +// the most basic reduce just emits one 'data' event after it has recieved 'end' + + +var through = require('through') +var Decoder = require('string_decoder').StringDecoder + +module.exports = split + +//TODO pass in a function to map across the lines. + +function split (matcher, mapper, options) { + var decoder = new Decoder() + var soFar = '' + var maxLength = options && options.maxLength; + if('function' === typeof matcher) + mapper = matcher, matcher = null + if (!matcher) + matcher = /\r?\n/ + + function emit(stream, piece) { + if(mapper) { + try { + piece = mapper(piece) + } + catch (err) { + return stream.emit('error', err) + } + if('undefined' !== typeof piece) + stream.queue(piece) + } + else + stream.queue(piece) + } + + function next (stream, buffer) { + var pieces = ((soFar != null ? soFar : '') + buffer).split(matcher) + soFar = pieces.pop() + + if (maxLength && soFar.length > maxLength) + stream.emit('error', new Error('maximum buffer reached')) + + for (var i = 0; i < pieces.length; i++) { + var piece = pieces[i] + emit(stream, piece) + } + } + + return through(function (b) { + next(this, decoder.write(b)) + }, + function () { + if(decoder.end) + next(this, decoder.end()) + if(soFar != null) + emit(this, soFar) + this.queue(null) + }) +} + diff --git a/front/frontend/node_modules/split/package.json b/front/frontend/node_modules/split/package.json new file mode 100644 index 0000000..00b35ca --- /dev/null +++ b/front/frontend/node_modules/split/package.json @@ -0,0 +1,30 @@ +{ + "name": "split", + "version": "0.3.3", + "license": "MIT", + "description": "split a Text Stream into a Line Stream", + "homepage": "http://github.com/dominictarr/split", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/split.git" + }, + "dependencies": { + "through": "2" + }, + "devDependencies": { + "asynct": "*", + "event-stream": "~3.0.2", + "it-is": "1", + "stream-spec": "~0.2", + "ubelt": "~2.9", + "string-to-stream": "~1.0.0" + }, + "scripts": { + "test": "asynct test/" + }, + "author": "Dominic Tarr (http://bit.ly/dominictarr)", + "optionalDependencies": {}, + "engines": { + "node": "*" + } +} diff --git a/front/frontend/node_modules/split/readme.markdown b/front/frontend/node_modules/split/readme.markdown new file mode 100644 index 0000000..13854ae --- /dev/null +++ b/front/frontend/node_modules/split/readme.markdown @@ -0,0 +1,66 @@ +# Split (matcher) + +[![build status](https://secure.travis-ci.org/dominictarr/split.png)](http://travis-ci.org/dominictarr/split) + +Break up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp` + +Example, read every line in a file ... + +``` js + fs.createReadStream(file) + .pipe(split()) + .on('data', function (line) { + //each chunk now is a seperate line! + }) + +``` + +`split` takes the same arguments as `string.split` except it defaults to '/\r?\n/' instead of ',', and the optional `limit` paremeter is ignored. +[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split) + +`split` takes an optional options object on it's third argument. + +``` js + split(matcher, mapper, options) +``` + +Valid options: + +* maxLength - The maximum buffer length without seeing a newline or `matcher`, + if a single line exceeds this, the split stream will emit an error. + +``` js + split(JSON.parse, null, { maxLength: 2}) +``` + +## keep matched splitter + +As with `Array#split`, if you split by a regular expression with a matching group, +the matches will be retained in the collection. + +``` +stdin +.pipe(split(/(\r?\n)/)) +... //lines + separators. +``` + + +# NDJ - Newline Delimited Json + +`split` accepts a function which transforms each line. + +``` js +fs.createReadStream(file) + .pipe(split(JSON.parse)) + .on('data', function (obj) { + //each chunk now is a a js object + }) + .on('error', function (err) { + //syntax errors will land here + //note, this ends the stream. + }) +``` + +# License + +MIT diff --git a/front/frontend/node_modules/split/test/options.asynct.js b/front/frontend/node_modules/split/test/options.asynct.js new file mode 100644 index 0000000..6d34d87 --- /dev/null +++ b/front/frontend/node_modules/split/test/options.asynct.js @@ -0,0 +1,23 @@ +var it = require('it-is').style('colour') + , split = require('..') + +exports ['maximum buffer limit'] = function (test) { + var s = split(JSON.parse, null, { + maxLength: 2 + }) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + s.write('{"a":1}\n{"') + s.write('{ "') + it(caughtError).equal(true) + + s.end() + test.done() +} diff --git a/front/frontend/node_modules/split/test/partitioned_unicode.js b/front/frontend/node_modules/split/test/partitioned_unicode.js new file mode 100644 index 0000000..aff3d5d --- /dev/null +++ b/front/frontend/node_modules/split/test/partitioned_unicode.js @@ -0,0 +1,34 @@ +var it = require('it-is').style('colour') + , split = require('..') + +exports ['split data with partitioned unicode character'] = function (test) { + var s = split(/,/g) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + var x = 'テスト試験今日とても,よい天気で' + unicodeData = new Buffer(x); + + // partition of 日 + piece1 = unicodeData.slice(0, 20); + piece2 = unicodeData.slice(20, unicodeData.length); + + s.write(piece1); + s.write(piece2); + + s.end() + + it(caughtError).equal(false) + + it(rows).deepEqual(['テスト試験今日とても', 'よい天気で']); + + it(rows).deepEqual(x.split(',')) + + test.done() +} diff --git a/front/frontend/node_modules/split/test/split.asynct.js b/front/frontend/node_modules/split/test/split.asynct.js new file mode 100644 index 0000000..e5df026 --- /dev/null +++ b/front/frontend/node_modules/split/test/split.asynct.js @@ -0,0 +1,137 @@ +var es = require('event-stream') + , it = require('it-is').style('colour') + , d = require('ubelt') + , split = require('..') + , join = require('path').join + , fs = require('fs') + , Stream = require('stream').Stream + , Readable = require('stream').Readable + , spec = require('stream-spec') + , through = require('through') + , stringStream = require('string-to-stream') + +exports ['split() works like String#split'] = function (test) { + var readme = join(__filename) + , expected = fs.readFileSync(readme, 'utf-8').split('\n') + , cs = split() + , actual = [] + , ended = false + , x = spec(cs).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).like(v) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + }) + } + a.writable = true + + fs.createReadStream(readme, {flags: 'r'}).pipe(cs) + cs.pipe(a) + +} + +exports ['split() takes mapper function'] = function (test) { + var readme = join(__filename) + , expected = fs.readFileSync(readme, 'utf-8').split('\n') + , cs = split(function (line) { return line.toUpperCase() }) + , actual = [] + , ended = false + , x = spec(cs).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).equal(v.trim().toUpperCase()) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + }) + } + a.writable = true + + fs.createReadStream(readme, {flags: 'r'}).pipe(cs) + cs.pipe(a) + +} + +exports ['split() works with empty string chunks'] = function (test) { + var str = ' foo' + , expected = str.split(/[\s]*/).reduce(splitBy(/[\s]*/), []) + , cs1 = split(/[\s]*/) + , cs2 = split(/[\s]*/) + , actual = [] + , ended = false + , x = spec(cs1).through() + , y = spec(cs2).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).like(v) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + y.validate() + }) + } + a.writable = true + + cs1.pipe(cs2) + cs2.pipe(a) + + cs1.write(str) + cs1.end() + +} + +function splitBy (delimeter) { + return function (arr, piece) { + return arr.concat(piece.split(delimeter)) + } +} \ No newline at end of file diff --git a/front/frontend/node_modules/split/test/try_catch.asynct.js b/front/frontend/node_modules/split/test/try_catch.asynct.js new file mode 100644 index 0000000..39e49f7 --- /dev/null +++ b/front/frontend/node_modules/split/test/try_catch.asynct.js @@ -0,0 +1,51 @@ +var it = require('it-is').style('colour') + , split = require('..') + +exports ['emit mapper exceptions as error events'] = function (test) { + var s = split(JSON.parse) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + s.write('{"a":1}\n{"') + it(caughtError).equal(false) + it(rows).deepEqual([ { a: 1 } ]) + + s.write('b":2}\n{"c":}\n') + it(caughtError).equal(true) + it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) + + s.end() + test.done() +} + +exports ['mapper error events on trailing chunks'] = function (test) { + var s = split(JSON.parse) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + s.write('{"a":1}\n{"') + it(caughtError).equal(false) + it(rows).deepEqual([ { a: 1 } ]) + + s.write('b":2}\n{"c":}') + it(caughtError).equal(false) + it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) + + s.end() + it(caughtError).equal(true) + it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) + + test.done() +} diff --git a/front/frontend/node_modules/static-extend/LICENSE b/front/frontend/node_modules/static-extend/LICENSE new file mode 100644 index 0000000..e28e603 --- /dev/null +++ b/front/frontend/node_modules/static-extend/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/static-extend/index.js b/front/frontend/node_modules/static-extend/index.js new file mode 100644 index 0000000..f4124b2 --- /dev/null +++ b/front/frontend/node_modules/static-extend/index.js @@ -0,0 +1,90 @@ +/*! + * static-extend + * + * Copyright (c) 2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var copy = require('object-copy'); +var define = require('define-property'); +var util = require('util'); + +/** + * Returns a function for extending the static properties, + * prototype properties, and descriptors from the `Parent` + * constructor onto `Child` constructors. + * + * ```js + * var extend = require('static-extend'); + * Parent.extend = extend(Parent); + * + * // optionally pass a custom merge function as the second arg + * Parent.extend = extend(Parent, function(Child) { + * Child.prototype.mixin = function(key, val) { + * Child.prototype[key] = val; + * }; + * }); + * + * // extend "child" constructors + * Parent.extend(Child); + * + * // optionally define prototype methods as the second arg + * Parent.extend(Child, { + * foo: function() {}, + * bar: function() {} + * }); + * ``` + * @param {Function} `Parent` Parent ctor + * @param {Function} `extendFn` Optional extend function for handling any necessary custom merging. Useful when updating methods that require a specific prototype. + * @param {Function} `Child` Child ctor + * @param {Object} `proto` Optionally pass additional prototype properties to inherit. + * @return {Object} + * @api public + */ + +function extend(Parent, extendFn) { + if (typeof Parent !== 'function') { + throw new TypeError('expected Parent to be a function.'); + } + + return function(Ctor, proto) { + if (typeof Ctor !== 'function') { + throw new TypeError('expected Ctor to be a function.'); + } + + util.inherits(Ctor, Parent); + copy(Ctor, Parent); + + // proto can be null or a plain object + if (typeof proto === 'object') { + var obj = Object.create(proto); + + for (var k in obj) { + Ctor.prototype[k] = obj[k]; + } + } + + // keep a reference to the parent prototype + define(Ctor.prototype, '_parent_', { + configurable: true, + set: function() {}, + get: function() { + return Parent.prototype; + } + }); + + if (typeof extendFn === 'function') { + extendFn(Ctor, Parent); + } + + Ctor.extend = extend(Ctor, extendFn); + }; +}; + +/** + * Expose `extend` + */ + +module.exports = extend; diff --git a/front/frontend/node_modules/static-extend/node_modules/define-property/LICENSE b/front/frontend/node_modules/static-extend/node_modules/define-property/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/static-extend/node_modules/define-property/README.md b/front/frontend/node_modules/static-extend/node_modules/define-property/README.md new file mode 100644 index 0000000..8cac698 --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/define-property/README.md @@ -0,0 +1,77 @@ +# define-property [![NPM version](https://badge.fury.io/js/define-property.svg)](http://badge.fury.io/js/define-property) + +> Define a non-enumerable property on an object. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i define-property --save +``` + +## Usage + +**Params** + +* `obj`: The object on which to define the property. +* `prop`: The name of the property to be defined or modified. +* `descriptor`: The descriptor for the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**get/set** + +```js +define(obj, 'foo', { + get: function() {}, + set: function() {} +}); +``` + +## Related projects + +* [delegate-object](https://www.npmjs.com/package/delegate-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/delegate-object) | [homepage](https://github.com/doowb/delegate-object) +* [forward-object](https://www.npmjs.com/package/forward-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/forward-object) | [homepage](https://github.com/doowb/forward-object) +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep) +* [mixin-object](https://www.npmjs.com/package/mixin-object): Mixin the own and inherited properties of other objects onto the first object. Pass an… [more](https://www.npmjs.com/package/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/define-property/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 31, 2015._ diff --git a/front/frontend/node_modules/static-extend/node_modules/define-property/index.js b/front/frontend/node_modules/static-extend/node_modules/define-property/index.js new file mode 100644 index 0000000..3e0e5e1 --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/define-property/index.js @@ -0,0 +1,31 @@ +/*! + * define-property + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isDescriptor = require('is-descriptor'); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; diff --git a/front/frontend/node_modules/static-extend/node_modules/define-property/package.json b/front/frontend/node_modules/static-extend/node_modules/define-property/package.json new file mode 100644 index 0000000..43561bf --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/define-property/package.json @@ -0,0 +1,51 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "0.2.5", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "^7.0.4" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "mixin-deep", + "mixin-object", + "delegate-object", + "forward-object" + ] + } + }, + "dependencies": { + "is-descriptor": "^0.1.0" + } +} diff --git a/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.editorconfig b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.editorconfig new file mode 100644 index 0000000..449f0da --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.eslintrc b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.eslintrc new file mode 100644 index 0000000..24e5090 --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.eslintrc @@ -0,0 +1,16 @@ +{ + "extends": "@ljharb", + + "rules": { + "func-style": "warn", + }, + + "overrides": [ + { + "files": "test/**/*.js", + "rules": { + "max-lines-per-function": "off", + }, + }, + ], +} diff --git a/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.gitattributes b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.gitattributes new file mode 100644 index 0000000..660957e --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.gitattributes @@ -0,0 +1,10 @@ +# Enforce Unix newlines +* text eol=lf + +# binaries +*.ai binary +*.psd binary +*.jpg binary +*.gif binary +*.png binary +*.jpeg binary diff --git a/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.github/FUNDING.yml b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000..37535da --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.nycrc b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/front/frontend/node_modules/static-extend/node_modules/is-descriptor/CHANGELOG.md b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/CHANGELOG.md new file mode 100644 index 0000000..4963353 --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/CHANGELOG.md @@ -0,0 +1,144 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.0](https://github.com/inspect-js/is-descriptor/compare/v3.0.0...v3.1.0) - 2023-05-01 + +### Commits + +- [eslint] cleanup [`1f4e8cd`](https://github.com/inspect-js/is-descriptor/commit/1f4e8cdb49b4b15666a782f3f05e6f4f0146b9ab) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`5993285`](https://github.com/inspect-js/is-descriptor/commit/5993285a122ef7bf5b91cba3b486f96a1f94f552) +- [readme] clean up docs, URLs, package.json, etc [`8807164`](https://github.com/inspect-js/is-descriptor/commit/88071644c15d543c7830e6ac00a5ed8531c82750) +- [Docs] remove verb [`0bc26a3`](https://github.com/inspect-js/is-descriptor/commit/0bc26a306f02241e6c5c506e95c53ca828031c05) +- [Tests] convert from mocha to tape [`1604d7f`](https://github.com/inspect-js/is-descriptor/commit/1604d7feebd776b0fb67163e3013cc6d5ab9fd6b) +- [New] increase support from node 6 down to node 0.4 [`7893404`](https://github.com/inspect-js/is-descriptor/commit/789340412f4028d46a3121466a25497716b94402) +- [Tests] add coverage [`1dcc45e`](https://github.com/inspect-js/is-descriptor/commit/1dcc45ed57aebc83ba0588c232663f4164a7d0a8) +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`d1edefe`](https://github.com/inspect-js/is-descriptor/commit/d1edefef56c7eeaab385b1704417b314f197034d) +- [meta] switch from `files` field to npmignore; add `exports` [`c64d3d3`](https://github.com/inspect-js/is-descriptor/commit/c64d3d356d459f2e73198841f93fb902895875b4) + +## [v3.0.0](https://github.com/inspect-js/is-descriptor/compare/v2.0.0...v3.0.0) - 2018-12-13 + +### Commits + +- refactor [`7f7e2c8`](https://github.com/inspect-js/is-descriptor/commit/7f7e2c865674526424f5cd1fb98f0ed7811a67f9) + +## [v2.0.0](https://github.com/inspect-js/is-descriptor/compare/v1.0.3...v2.0.0) - 2017-12-28 + +### Commits + +- run verb to generate readme [`7d97594`](https://github.com/inspect-js/is-descriptor/commit/7d97594666afaa825e0421883507cfec04ceef1d) +- upgrade is-accessor-descriptor [`2e2cb1e`](https://github.com/inspect-js/is-descriptor/commit/2e2cb1e723d2ca1d6b8580d384702700e26dda81) +- run update [`c04832a`](https://github.com/inspect-js/is-descriptor/commit/c04832a3a2bf48bef2ea0f5844652da7d6209242) + +## [v1.0.3](https://github.com/inspect-js/is-descriptor/compare/v1.0.2...v1.0.3) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v1.0.2](https://github.com/inspect-js/is-descriptor/compare/v1.0.1...v1.0.2) - 2017-12-28 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +## [v1.0.1](https://github.com/inspect-js/is-descriptor/compare/v1.0.0...v1.0.1) - 2017-07-22 + +### Commits + +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) + +## [v1.0.0](https://github.com/inspect-js/is-descriptor/compare/v0.1.7...v1.0.0) - 2017-02-25 + +## [v0.1.7](https://github.com/inspect-js/is-descriptor/compare/v0.1.6...v0.1.7) - 2023-10-26 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- v0.x line: v1 and v0 are the same, so, branch v0 from 1.x [`91be723`](https://github.com/inspect-js/is-descriptor/commit/91be72399c3066950d2414a6d2f091e1074625cd) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v0.1.6](https://github.com/inspect-js/is-descriptor/compare/v0.1.5...v0.1.6) - 2017-07-22 + +## [v0.1.5](https://github.com/inspect-js/is-descriptor/compare/v0.1.4...v0.1.5) - 2017-02-25 + +### Merged + +- Bump `lazy-cache`. [`#4`](https://github.com/inspect-js/is-descriptor/pull/4) + +### Commits + +- update docs, fix typos [`bc3cf69`](https://github.com/inspect-js/is-descriptor/commit/bc3cf6915686d4a964997ae7585bf65005bbf955) +- run update [`1956814`](https://github.com/inspect-js/is-descriptor/commit/1956814c67c2033caeaed469ad09e6392dd0799e) + +## [v0.1.4](https://github.com/inspect-js/is-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 + +### Commits + +- allow a key to be passed [`202062b`](https://github.com/inspect-js/is-descriptor/commit/202062b56735525e7def35c8453505778ce9de03) +- update docs [`890fe80`](https://github.com/inspect-js/is-descriptor/commit/890fe80100aa21cac1bee55d6fb4045ffb661ff7) + +## [v0.1.3](https://github.com/inspect-js/is-descriptor/compare/v0.1.2...v0.1.3) - 2015-12-20 + +### Commits + +- lint [`fa81701`](https://github.com/inspect-js/is-descriptor/commit/fa817018aabb6f18e7f09e452b80386775773d42) +- add gulp-format-md to verb config, build readme [`8e6c159`](https://github.com/inspect-js/is-descriptor/commit/8e6c159cfa23b357dbac8f977c3a9421172aafeb) +- update deps [`b7b8321`](https://github.com/inspect-js/is-descriptor/commit/b7b8321e194f4f25c5aa4ff382a0a8ffb6482cc1) + +## [v0.1.2](https://github.com/inspect-js/is-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- files prop [`3aaf1ce`](https://github.com/inspect-js/is-descriptor/commit/3aaf1ce8483bdee217e2f18b293937a09634a33b) + +## [v0.1.1](https://github.com/inspect-js/is-descriptor/compare/v0.1.0...v0.1.1) - 2015-10-04 + +### Merged + +- Update .verb.md [`#1`](https://github.com/inspect-js/is-descriptor/pull/1) + +### Commits + +- adds lazy-caching [`0219f1a`](https://github.com/inspect-js/is-descriptor/commit/0219f1aa95b9ce7c08e0a1e00fe506a572c6ac46) +- 0.1.1 readme [`924a5a7`](https://github.com/inspect-js/is-descriptor/commit/924a5a7a5d648d901b24b7287d9a5d232865f603) +- fix readme [`dd9c431`](https://github.com/inspect-js/is-descriptor/commit/dd9c4315dd61be73f42d07bc71ddb97414dfdbcf) + +## v0.1.0 - 2015-08-31 + +### Commits + +- first commit [`b5d8c39`](https://github.com/inspect-js/is-descriptor/commit/b5d8c39843c98588b67069325a4e6455beb8aef3) +- 0.1.0 readme [`aaffb92`](https://github.com/inspect-js/is-descriptor/commit/aaffb924062d7c588417d9a2184ff1129f8d294a) +- 0.1.0 docs [`eb0da6c`](https://github.com/inspect-js/is-descriptor/commit/eb0da6c548e59ff76f6a80a95ea0a750dab40591) +- use libs [`86ad32f`](https://github.com/inspect-js/is-descriptor/commit/86ad32fe5a07d2705b14bb3e237584c05d60d519) +- lint [`94fbcc9`](https://github.com/inspect-js/is-descriptor/commit/94fbcc9c2a3da1e9b888bad86b9576259d1d7940) diff --git a/front/frontend/node_modules/static-extend/node_modules/is-descriptor/LICENSE b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/front/frontend/node_modules/static-extend/node_modules/is-descriptor/README.md b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/README.md new file mode 100644 index 0000000..fd9ddcf --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/README.md @@ -0,0 +1,134 @@ +# is-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Usage + +```js +const isDescriptor = require('is-descriptor'); +const assert = require('assert'); + +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +``` + +You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument. + +```js +const obj = { foo: 'abc' }; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +assert.equal(isDescriptor(obj, 'foo'), true); +assert.equal(isDescriptor(obj, 'bar'), true); +``` + +## Examples + +### value type + +`false` when not an object + +```js +assert.equal(isDescriptor('a'), false); +assert.equal(isDescriptor(null), false); +assert.equal(isDescriptor([]), false); +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ value() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', get() {} }), false); +assert.equal(isDescriptor({ get() {}, value() {} }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', writable: 'foo' }), false); +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get() {} }), true); +assert.equal(isDescriptor({ set() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'baz' }), false); +assert.equal(isDescriptor({ get() {}, writable: true }), false); +assert.equal(isDescriptor({ get() {}, value: true }), false); +``` + +`false` when an accessor is not a function + +```js +assert.equal(isDescriptor({ get() {}, set: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +assert.equal(isDescriptor({ get: 'foo', bar: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set: 'baz' }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'foo' }), false); +assert.equal(isDescriptor({ set() {}, configurable: 'foo' }), false); +assert.equal(isDescriptor({ get() {}, configurable: 'foo' }), false); +``` + +### Related projects + +You might also be interested in these projects: + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. +* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-descriptor +[actions-url]: https://github.com/inspect-js/is-descriptor/actions diff --git a/front/frontend/node_modules/static-extend/node_modules/is-descriptor/index.js b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/index.js new file mode 100644 index 0000000..c9dd24d --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + return false; + } + + if ('get' in obj || 'set' in obj) { + return isAccessor(obj, key); + } + + return isData(obj, key); +}; diff --git a/front/frontend/node_modules/static-extend/node_modules/is-descriptor/package.json b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/package.json new file mode 100644 index 0000000..6d6ca8b --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/package.json @@ -0,0 +1,88 @@ +{ + "name": "is-descriptor", + "version": "0.1.7", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-descriptor.git" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-descriptor", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/front/frontend/node_modules/static-extend/node_modules/is-descriptor/test/index.js b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/test/index.js new file mode 100644 index 0000000..0b74a35 --- /dev/null +++ b/front/frontend/node_modules/static-extend/node_modules/is-descriptor/test/index.js @@ -0,0 +1,116 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('is false when not an object:', function (st) { + st.notOk(isDescriptor('a')); + st.notOk(isDescriptor(null)); + st.notOk(isDescriptor([])); + + st.end(); + }); + + t.test('returns true if the property exists', function (st) { + var obj = { foo: null }; + + Object.defineProperty(obj, 'bar', { + value: 'xyz' + }); + + Object.defineProperty(obj, 'baz', { + get: function () { + return 'aaa'; + } + }); + + st.ok(isDescriptor(obj, 'foo')); + st.ok(isDescriptor(obj, 'bar')); + st.ok(isDescriptor(obj, 'baz')); + + st.end(); + }); + + t.test('data descriptor:', function (st) { + st.test('is false when the object has invalid properties:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', get: noop })); + s2t.notOk(isDescriptor({ get: noop, value: noop })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo' })); + s2t.ok(isDescriptor({ value: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', enumerable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', configurable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', writable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); + + t.test('accessor descriptor:', function (st) { + st.test('should be false when the object has invalid properties:', function (s2t) { + s2t.ok(!isDescriptor({ get: noop, writable: true })); + s2t.ok(!isDescriptor({ get: noop, value: true })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop, bar: 'baz' })); + + s2t.end(); + }); + + st.test('is false when an accessor is not a function:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: noop })); + s2t.notOk(isDescriptor({ get: 'foo', bar: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: 'baz' })); + + s2t.end(); + }); + + st.test('is false when "get" or "set" is not a function', function (s2t) { + s2t.notOk(isDescriptor({ set: 'foo' })); + s2t.notOk(isDescriptor({ get: 'foo' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop })); + s2t.ok(isDescriptor({ get: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: noop, enumerable: 'foo' })); + s2t.notOk(isDescriptor({ set: noop, configurable: 'foo' })); + s2t.notOk(isDescriptor({ get: noop, configurable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); +}); diff --git a/front/frontend/node_modules/static-extend/package.json b/front/frontend/node_modules/static-extend/package.json new file mode 100644 index 0000000..a63ab95 --- /dev/null +++ b/front/frontend/node_modules/static-extend/package.json @@ -0,0 +1,63 @@ +{ + "name": "static-extend", + "description": "Adds a static `extend` method to a class, to simplify inheritance. Extends the static properties, prototype properties, and descriptors from a `Parent` constructor onto `Child` constructors.", + "version": "0.1.2", + "homepage": "https://github.com/jonschlinkert/static-extend", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/static-extend", + "bugs": { + "url": "https://github.com/jonschlinkert/static-extend/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.5.3" + }, + "keywords": [ + "class", + "ctor", + "descriptor", + "extend", + "extends", + "inherit", + "inheritance", + "merge", + "method", + "prop", + "properties", + "property", + "prototype" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb", + "verb-readme-generator" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/statuses/HISTORY.md b/front/frontend/node_modules/statuses/HISTORY.md new file mode 100644 index 0000000..a1977b2 --- /dev/null +++ b/front/frontend/node_modules/statuses/HISTORY.md @@ -0,0 +1,65 @@ +1.5.0 / 2018-03-27 +================== + + * Add `103 Early Hints` + +1.4.0 / 2017-10-20 +================== + + * Add `STATUS_CODES` export + +1.3.1 / 2016-11-11 +================== + + * Fix return type in JSDoc + +1.3.0 / 2016-05-17 +================== + + * Add `421 Misdirected Request` + * perf: enable strict mode + +1.2.1 / 2015-02-01 +================== + + * Fix message for status 451 + - `451 Unavailable For Legal Reasons` + +1.2.0 / 2014-09-28 +================== + + * Add `208 Already Repored` + * Add `226 IM Used` + * Add `306 (Unused)` + * Add `415 Unable For Legal Reasons` + * Add `508 Loop Detected` + +1.1.1 / 2014-09-24 +================== + + * Add missing 308 to `codes.json` + +1.1.0 / 2014-09-21 +================== + + * Add `codes.json` for universal support + +1.0.4 / 2014-08-20 +================== + + * Package cleanup + +1.0.3 / 2014-06-08 +================== + + * Add 308 to `.redirect` category + +1.0.2 / 2014-03-13 +================== + + * Add `.retry` category + +1.0.1 / 2014-03-12 +================== + + * Initial release diff --git a/front/frontend/node_modules/statuses/LICENSE b/front/frontend/node_modules/statuses/LICENSE new file mode 100644 index 0000000..28a3161 --- /dev/null +++ b/front/frontend/node_modules/statuses/LICENSE @@ -0,0 +1,23 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2016 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/statuses/README.md b/front/frontend/node_modules/statuses/README.md new file mode 100644 index 0000000..0fe5720 --- /dev/null +++ b/front/frontend/node_modules/statuses/README.md @@ -0,0 +1,127 @@ +# Statuses + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +HTTP status utility for node. + +This module provides a list of status codes and messages sourced from +a few different projects: + + * The [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) + * The [Node.js project](https://nodejs.org/) + * The [NGINX project](https://www.nginx.com/) + * The [Apache HTTP Server project](https://httpd.apache.org/) + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install statuses +``` + +## API + + + +```js +var status = require('statuses') +``` + +### var code = status(Integer || String) + +If `Integer` or `String` is a valid HTTP code or status message, then the +appropriate `code` will be returned. Otherwise, an error will be thrown. + + + +```js +status(403) // => 403 +status('403') // => 403 +status('forbidden') // => 403 +status('Forbidden') // => 403 +status(306) // throws, as it's not supported by node.js +``` + +### status.STATUS_CODES + +Returns an object which maps status codes to status messages, in +the same format as the +[Node.js http module](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes). + +### status.codes + +Returns an array of all the status codes as `Integer`s. + +### var msg = status[code] + +Map of `code` to `status message`. `undefined` for invalid `code`s. + + + +```js +status[404] // => 'Not Found' +``` + +### var code = status[msg] + +Map of `status message` to `code`. `msg` can either be title-cased or +lower-cased. `undefined` for invalid `status message`s. + + + +```js +status['not found'] // => 404 +status['Not Found'] // => 404 +``` + +### status.redirect[code] + +Returns `true` if a status code is a valid redirect status. + + + +```js +status.redirect[200] // => undefined +status.redirect[301] // => true +``` + +### status.empty[code] + +Returns `true` if a status code expects an empty body. + + + +```js +status.empty[200] // => undefined +status.empty[204] // => true +status.empty[304] // => true +``` + +### status.retry[code] + +Returns `true` if you should retry the rest. + + + +```js +status.retry[501] // => undefined +status.retry[503] // => true +``` + +[npm-image]: https://img.shields.io/npm/v/statuses.svg +[npm-url]: https://npmjs.org/package/statuses +[node-version-image]: https://img.shields.io/node/v/statuses.svg +[node-version-url]: https://nodejs.org/en/download +[travis-image]: https://img.shields.io/travis/jshttp/statuses.svg +[travis-url]: https://travis-ci.org/jshttp/statuses +[coveralls-image]: https://img.shields.io/coveralls/jshttp/statuses.svg +[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master +[downloads-image]: https://img.shields.io/npm/dm/statuses.svg +[downloads-url]: https://npmjs.org/package/statuses diff --git a/front/frontend/node_modules/statuses/codes.json b/front/frontend/node_modules/statuses/codes.json new file mode 100644 index 0000000..a09283a --- /dev/null +++ b/front/frontend/node_modules/statuses/codes.json @@ -0,0 +1,66 @@ +{ + "100": "Continue", + "101": "Switching Protocols", + "102": "Processing", + "103": "Early Hints", + "200": "OK", + "201": "Created", + "202": "Accepted", + "203": "Non-Authoritative Information", + "204": "No Content", + "205": "Reset Content", + "206": "Partial Content", + "207": "Multi-Status", + "208": "Already Reported", + "226": "IM Used", + "300": "Multiple Choices", + "301": "Moved Permanently", + "302": "Found", + "303": "See Other", + "304": "Not Modified", + "305": "Use Proxy", + "306": "(Unused)", + "307": "Temporary Redirect", + "308": "Permanent Redirect", + "400": "Bad Request", + "401": "Unauthorized", + "402": "Payment Required", + "403": "Forbidden", + "404": "Not Found", + "405": "Method Not Allowed", + "406": "Not Acceptable", + "407": "Proxy Authentication Required", + "408": "Request Timeout", + "409": "Conflict", + "410": "Gone", + "411": "Length Required", + "412": "Precondition Failed", + "413": "Payload Too Large", + "414": "URI Too Long", + "415": "Unsupported Media Type", + "416": "Range Not Satisfiable", + "417": "Expectation Failed", + "418": "I'm a teapot", + "421": "Misdirected Request", + "422": "Unprocessable Entity", + "423": "Locked", + "424": "Failed Dependency", + "425": "Unordered Collection", + "426": "Upgrade Required", + "428": "Precondition Required", + "429": "Too Many Requests", + "431": "Request Header Fields Too Large", + "451": "Unavailable For Legal Reasons", + "500": "Internal Server Error", + "501": "Not Implemented", + "502": "Bad Gateway", + "503": "Service Unavailable", + "504": "Gateway Timeout", + "505": "HTTP Version Not Supported", + "506": "Variant Also Negotiates", + "507": "Insufficient Storage", + "508": "Loop Detected", + "509": "Bandwidth Limit Exceeded", + "510": "Not Extended", + "511": "Network Authentication Required" +} diff --git a/front/frontend/node_modules/statuses/index.js b/front/frontend/node_modules/statuses/index.js new file mode 100644 index 0000000..4df469a --- /dev/null +++ b/front/frontend/node_modules/statuses/index.js @@ -0,0 +1,113 @@ +/*! + * statuses + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var codes = require('./codes.json') + +/** + * Module exports. + * @public + */ + +module.exports = status + +// status code to message map +status.STATUS_CODES = codes + +// array of status codes +status.codes = populateStatusesMap(status, codes) + +// status codes for redirects +status.redirect = { + 300: true, + 301: true, + 302: true, + 303: true, + 305: true, + 307: true, + 308: true +} + +// status codes for empty bodies +status.empty = { + 204: true, + 205: true, + 304: true +} + +// status codes for when you should retry the request +status.retry = { + 502: true, + 503: true, + 504: true +} + +/** + * Populate the statuses map for given codes. + * @private + */ + +function populateStatusesMap (statuses, codes) { + var arr = [] + + Object.keys(codes).forEach(function forEachCode (code) { + var message = codes[code] + var status = Number(code) + + // Populate properties + statuses[status] = message + statuses[message] = status + statuses[message.toLowerCase()] = status + + // Add to array + arr.push(status) + }) + + return arr +} + +/** + * Get the status code. + * + * Given a number, this will throw if it is not a known status + * code, otherwise the code will be returned. Given a string, + * the string will be parsed for a number and return the code + * if valid, otherwise will lookup the code assuming this is + * the status message. + * + * @param {string|number} code + * @returns {number} + * @public + */ + +function status (code) { + if (typeof code === 'number') { + if (!status[code]) throw new Error('invalid status code: ' + code) + return code + } + + if (typeof code !== 'string') { + throw new TypeError('code must be a number or string') + } + + // '403' + var n = parseInt(code, 10) + if (!isNaN(n)) { + if (!status[n]) throw new Error('invalid status code: ' + n) + return n + } + + n = status[code.toLowerCase()] + if (!n) throw new Error('invalid status message: "' + code + '"') + return n +} diff --git a/front/frontend/node_modules/statuses/package.json b/front/frontend/node_modules/statuses/package.json new file mode 100644 index 0000000..7595e2b --- /dev/null +++ b/front/frontend/node_modules/statuses/package.json @@ -0,0 +1,48 @@ +{ + "name": "statuses", + "description": "HTTP status utility", + "version": "1.5.0", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)" + ], + "repository": "jshttp/statuses", + "license": "MIT", + "keywords": [ + "http", + "status", + "code" + ], + "files": [ + "HISTORY.md", + "index.js", + "codes.json", + "LICENSE" + ], + "devDependencies": { + "csv-parse": "1.2.4", + "eslint": "4.19.1", + "eslint-config-standard": "11.0.0", + "eslint-plugin-import": "2.9.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "6.0.1", + "eslint-plugin-promise": "3.7.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5", + "raw-body": "2.3.2", + "stream-to-array": "2.3.0" + }, + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "build": "node scripts/build.js", + "fetch": "node scripts/fetch-apache.js && node scripts/fetch-iana.js && node scripts/fetch-nginx.js && node scripts/fetch-node.js", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "update": "npm run fetch && npm run build" + } +} diff --git a/front/frontend/node_modules/stream-combiner/.npmignore b/front/frontend/node_modules/stream-combiner/.npmignore new file mode 100644 index 0000000..13abef4 --- /dev/null +++ b/front/frontend/node_modules/stream-combiner/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/front/frontend/node_modules/stream-combiner/.travis.yml b/front/frontend/node_modules/stream-combiner/.travis.yml new file mode 100644 index 0000000..895dbd3 --- /dev/null +++ b/front/frontend/node_modules/stream-combiner/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/front/frontend/node_modules/stream-combiner/LICENSE b/front/frontend/node_modules/stream-combiner/LICENSE new file mode 100644 index 0000000..6d03581 --- /dev/null +++ b/front/frontend/node_modules/stream-combiner/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2012 'Dominic Tarr' + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/stream-combiner/README.md b/front/frontend/node_modules/stream-combiner/README.md new file mode 100644 index 0000000..565e0e2 --- /dev/null +++ b/front/frontend/node_modules/stream-combiner/README.md @@ -0,0 +1,29 @@ +# stream-combiner + + + +## Combine (stream1,...,streamN) + +Turn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream +and reads from the last stream. + +Listening for 'error' will recieve errors from all streams inside the pipe. + +``` js + var Combine = require('stream-combiner') + var es = require('event-stream') + + Combine( //connect streams together with `pipe` + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + callback(null + , inspect(JSON.parse(data))) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) +``` + +## License + +MIT diff --git a/front/frontend/node_modules/stream-combiner/index.js b/front/frontend/node_modules/stream-combiner/index.js new file mode 100644 index 0000000..99cf5b6 --- /dev/null +++ b/front/frontend/node_modules/stream-combiner/index.js @@ -0,0 +1,39 @@ +var duplexer = require('duplexer') + +module.exports = function () { + + var streams = [].slice.call(arguments) + , first = streams[0] + , last = streams[streams.length - 1] + , thepipe = duplexer(first, last) + + if(streams.length == 1) + return streams[0] + else if (!streams.length) + throw new Error('connect called with empty args') + + //pipe all the streams together + + function recurse (streams) { + if(streams.length < 2) + return + streams[0].pipe(streams[1]) + recurse(streams.slice(1)) + } + + recurse(streams) + + function onerror () { + var args = [].slice.call(arguments) + args.unshift('error') + thepipe.emit.apply(thepipe, args) + } + + //es.duplex already reemits the error from the first and last stream. + //add a listener for the inner streams in the pipeline. + for(var i = 1; i < streams.length - 1; i ++) + streams[i].on('error', onerror) + + return thepipe +} + diff --git a/front/frontend/node_modules/stream-combiner/package.json b/front/frontend/node_modules/stream-combiner/package.json new file mode 100644 index 0000000..c0e9845 --- /dev/null +++ b/front/frontend/node_modules/stream-combiner/package.json @@ -0,0 +1,21 @@ +{ + "name": "stream-combiner", + "version": "0.0.4", + "homepage": "https://github.com/dominictarr/stream-combiner", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/stream-combiner.git" + }, + "dependencies": { + "duplexer": "~0.1.1" + }, + "devDependencies": { + "tape": "~2.3.0", + "event-stream": "~3.0.7" + }, + "scripts": { + "test": "set -e; for t in test/*.js; do node $t; done" + }, + "author": "'Dominic Tarr' (http://dominictarr.com)", + "license": "MIT" +} diff --git a/front/frontend/node_modules/stream-combiner/test/index.js b/front/frontend/node_modules/stream-combiner/test/index.js new file mode 100644 index 0000000..d17ddad --- /dev/null +++ b/front/frontend/node_modules/stream-combiner/test/index.js @@ -0,0 +1,52 @@ +var es = require('event-stream') +var combine = require('..') +var test = require('tape') + +test('do not duplicate errors', function (test) { + + var errors = 0; + var pipe = combine( + es.through(function(data) { + return this.emit('data', data); + }), + es.through(function(data) { + return this.emit('error', new Error(data)); + }) + ) + + pipe.on('error', function(err) { + errors++ + test.ok(errors, 'expected error count') + process.nextTick(function () { + return test.end(); + }) + }) + + return pipe.write('meh'); +}) + +test('3 pipe do not duplicate errors', function (test) { + + var errors = 0; + var pipe = combine( + es.through(function(data) { + return this.emit('data', data); + }), + es.through(function(data) { + return this.emit('error', new Error(data)); + }), + es.through() + ) + + pipe.on('error', function(err) { + errors++ + test.ok(errors, 'expected error count') + process.nextTick(function () { + return test.end(); + }) + }) + + return pipe.write('meh'); + +}) + diff --git a/front/frontend/node_modules/string_decoder/.travis.yml b/front/frontend/node_modules/string_decoder/.travis.yml new file mode 100644 index 0000000..3347a72 --- /dev/null +++ b/front/frontend/node_modules/string_decoder/.travis.yml @@ -0,0 +1,50 @@ +sudo: false +language: node_js +before_install: + - npm install -g npm@2 + - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g +notifications: + email: false +matrix: + fast_finish: true + include: + - node_js: '0.8' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.10' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.11' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.12' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 1 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 2 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 3 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 4 + env: TASK=test + - node_js: 5 + env: TASK=test + - node_js: 6 + env: TASK=test + - node_js: 7 + env: TASK=test + - node_js: 8 + env: TASK=test + - node_js: 9 + env: TASK=test diff --git a/front/frontend/node_modules/string_decoder/LICENSE b/front/frontend/node_modules/string_decoder/LICENSE new file mode 100644 index 0000000..778edb2 --- /dev/null +++ b/front/frontend/node_modules/string_decoder/LICENSE @@ -0,0 +1,48 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + diff --git a/front/frontend/node_modules/string_decoder/README.md b/front/frontend/node_modules/string_decoder/README.md new file mode 100644 index 0000000..5fd5831 --- /dev/null +++ b/front/frontend/node_modules/string_decoder/README.md @@ -0,0 +1,47 @@ +# string_decoder + +***Node-core v8.9.4 string_decoder for userland*** + + +[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) +[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) + + +```bash +npm install --save string_decoder +``` + +***Node-core string_decoder for userland*** + +This package is a mirror of the string_decoder implementation in Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). + +As of version 1.0.0 **string_decoder** uses semantic versioning. + +## Previous versions + +Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. + +## Update + +The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. + +## Streams Working Group + +`string_decoder` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + +See [readable-stream](https://github.com/nodejs/readable-stream) for +more details. diff --git a/front/frontend/node_modules/string_decoder/lib/string_decoder.js b/front/frontend/node_modules/string_decoder/lib/string_decoder.js new file mode 100644 index 0000000..2e89e63 --- /dev/null +++ b/front/frontend/node_modules/string_decoder/lib/string_decoder.js @@ -0,0 +1,296 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +/**/ + +var Buffer = require('safe-buffer').Buffer; +/**/ + +var isEncoding = Buffer.isEncoding || function (encoding) { + encoding = '' + encoding; + switch (encoding && encoding.toLowerCase()) { + case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': + return true; + default: + return false; + } +}; + +function _normalizeEncoding(enc) { + if (!enc) return 'utf8'; + var retried; + while (true) { + switch (enc) { + case 'utf8': + case 'utf-8': + return 'utf8'; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return 'utf16le'; + case 'latin1': + case 'binary': + return 'latin1'; + case 'base64': + case 'ascii': + case 'hex': + return enc; + default: + if (retried) return; // undefined + enc = ('' + enc).toLowerCase(); + retried = true; + } + } +}; + +// Do not cache `Buffer.isEncoding` when checking encoding names as some +// modules monkey-patch it to support additional encodings +function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); + return nenc || enc; +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. +exports.StringDecoder = StringDecoder; +function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case 'utf16le': + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case 'utf8': + this.fillLast = utf8FillLast; + nb = 4; + break; + case 'base64': + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer.allocUnsafe(nb); +} + +StringDecoder.prototype.write = function (buf) { + if (buf.length === 0) return ''; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === undefined) return ''; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ''; +}; + +StringDecoder.prototype.end = utf8End; + +// Returns only complete characters in a Buffer +StringDecoder.prototype.text = utf8Text; + +// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer +StringDecoder.prototype.fillLast = function (buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; +}; + +// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a +// continuation byte. If an invalid byte is detected, -2 is returned. +function utf8CheckByte(byte) { + if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; + return byte >> 6 === 0x02 ? -1 : -2; +} + +// Checks at most 3 bytes at the end of a Buffer in order to detect an +// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) +// needed to complete the UTF-8 character (if applicable) are returned. +function utf8CheckIncomplete(self, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 1; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 2; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0;else self.lastNeed = nb - 3; + } + return nb; + } + return 0; +} + +// Validates as many continuation bytes for a multi-byte UTF-8 character as +// needed or are available. If we see a non-continuation byte where we expect +// one, we "replace" the validated continuation bytes we've seen so far with +// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding +// behavior. The continuation byte check is included three times in the case +// where all of the continuation bytes for a character exist in the same buffer. +// It is also done this way as a slight performance increase instead of using a +// loop. +function utf8CheckExtraBytes(self, buf, p) { + if ((buf[0] & 0xC0) !== 0x80) { + self.lastNeed = 0; + return '\ufffd'; + } + if (self.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 0xC0) !== 0x80) { + self.lastNeed = 1; + return '\ufffd'; + } + if (self.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 0xC0) !== 0x80) { + self.lastNeed = 2; + return '\ufffd'; + } + } + } +} + +// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. +function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== undefined) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; +} + +// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a +// partial character, the character's bytes are buffered until the required +// number of bytes are available. +function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString('utf8', i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString('utf8', i, end); +} + +// For UTF-8, a replacement character is added when ending on a partial +// character. +function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + '\ufffd'; + return r; +} + +// UTF-16LE typically needs two bytes per character, but even if we have an even +// number of bytes available, we need to check if we end on a leading/high +// surrogate. In that case, we need to wait for the next two bytes in order to +// decode the last character properly. +function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString('utf16le', i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 0xD800 && c <= 0xDBFF) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString('utf16le', i, buf.length - 1); +} + +// For UTF-16LE we do not explicitly append special replacement characters if we +// end on a partial character, we simply let v8 handle that. +function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString('utf16le', 0, end); + } + return r; +} + +function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString('base64', i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString('base64', i, buf.length - n); +} + +function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); + return r; +} + +// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) +function simpleWrite(buf) { + return buf.toString(this.encoding); +} + +function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ''; +} \ No newline at end of file diff --git a/front/frontend/node_modules/string_decoder/package.json b/front/frontend/node_modules/string_decoder/package.json new file mode 100644 index 0000000..518c3eb --- /dev/null +++ b/front/frontend/node_modules/string_decoder/package.json @@ -0,0 +1,31 @@ +{ + "name": "string_decoder", + "version": "1.1.1", + "description": "The string_decoder module from Node core", + "main": "lib/string_decoder.js", + "dependencies": { + "safe-buffer": "~5.1.0" + }, + "devDependencies": { + "babel-polyfill": "^6.23.0", + "core-util-is": "^1.0.2", + "inherits": "^2.0.3", + "tap": "~0.4.8" + }, + "scripts": { + "test": "tap test/parallel/*.js && node test/verify-dependencies", + "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/string_decoder.git" + }, + "homepage": "https://github.com/nodejs/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT" +} diff --git a/front/frontend/node_modules/through/.travis.yml b/front/frontend/node_modules/through/.travis.yml new file mode 100644 index 0000000..c693a93 --- /dev/null +++ b/front/frontend/node_modules/through/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - 0.6 + - 0.8 + - "0.10" diff --git a/front/frontend/node_modules/through/LICENSE.APACHE2 b/front/frontend/node_modules/through/LICENSE.APACHE2 new file mode 100644 index 0000000..6366c04 --- /dev/null +++ b/front/frontend/node_modules/through/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/front/frontend/node_modules/through/LICENSE.MIT b/front/frontend/node_modules/through/LICENSE.MIT new file mode 100644 index 0000000..6eafbd7 --- /dev/null +++ b/front/frontend/node_modules/through/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/through/index.js b/front/frontend/node_modules/through/index.js new file mode 100644 index 0000000..ca5fc59 --- /dev/null +++ b/front/frontend/node_modules/through/index.js @@ -0,0 +1,108 @@ +var Stream = require('stream') + +// through +// +// a stream that does nothing but re-emit the input. +// useful for aggregating a series of changing but not ending streams into one stream) + +exports = module.exports = through +through.through = through + +//create a readable writable stream. + +function through (write, end, opts) { + write = write || function (data) { this.queue(data) } + end = end || function () { this.queue(null) } + + var ended = false, destroyed = false, buffer = [], _ended = false + var stream = new Stream() + stream.readable = stream.writable = true + stream.paused = false + +// stream.autoPause = !(opts && opts.autoPause === false) + stream.autoDestroy = !(opts && opts.autoDestroy === false) + + stream.write = function (data) { + write.call(this, data) + return !stream.paused + } + + function drain() { + while(buffer.length && !stream.paused) { + var data = buffer.shift() + if(null === data) + return stream.emit('end') + else + stream.emit('data', data) + } + } + + stream.queue = stream.push = function (data) { +// console.error(ended) + if(_ended) return stream + if(data === null) _ended = true + buffer.push(data) + drain() + return stream + } + + //this will be registered as the first 'end' listener + //must call destroy next tick, to make sure we're after any + //stream piped from here. + //this is only a problem if end is not emitted synchronously. + //a nicer way to do this is to make sure this is the last listener for 'end' + + stream.on('end', function () { + stream.readable = false + if(!stream.writable && stream.autoDestroy) + process.nextTick(function () { + stream.destroy() + }) + }) + + function _end () { + stream.writable = false + end.call(stream) + if(!stream.readable && stream.autoDestroy) + stream.destroy() + } + + stream.end = function (data) { + if(ended) return + ended = true + if(arguments.length) stream.write(data) + _end() // will emit or queue + return stream + } + + stream.destroy = function () { + if(destroyed) return + destroyed = true + ended = true + buffer.length = 0 + stream.writable = stream.readable = false + stream.emit('close') + return stream + } + + stream.pause = function () { + if(stream.paused) return + stream.paused = true + return stream + } + + stream.resume = function () { + if(stream.paused) { + stream.paused = false + stream.emit('resume') + } + drain() + //may have become paused again, + //as drain emits 'data'. + if(!stream.paused) + stream.emit('drain') + return stream + } + return stream +} + diff --git a/front/frontend/node_modules/through/package.json b/front/frontend/node_modules/through/package.json new file mode 100644 index 0000000..9862189 --- /dev/null +++ b/front/frontend/node_modules/through/package.json @@ -0,0 +1,36 @@ +{ + "name": "through", + "version": "2.3.8", + "description": "simplified stream construction", + "main": "index.js", + "scripts": { + "test": "set -e; for t in test/*.js; do node $t; done" + }, + "devDependencies": { + "stream-spec": "~0.3.5", + "tape": "~2.3.2", + "from": "~0.1.3" + }, + "keywords": [ + "stream", + "streams", + "user-streams", + "pipe" + ], + "author": "Dominic Tarr (dominictarr.com)", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/dominictarr/through.git" + }, + "homepage": "https://github.com/dominictarr/through", + "testling": { + "browsers": [ + "ie/8..latest", + "ff/15..latest", + "chrome/20..latest", + "safari/5.1..latest" + ], + "files": "test/*.js" + } +} diff --git a/front/frontend/node_modules/through/readme.markdown b/front/frontend/node_modules/through/readme.markdown new file mode 100644 index 0000000..cb34c81 --- /dev/null +++ b/front/frontend/node_modules/through/readme.markdown @@ -0,0 +1,64 @@ +#through + +[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) +[![testling badge](https://ci.testling.com/dominictarr/through.png)](https://ci.testling.com/dominictarr/through) + +Easy way to create a `Stream` that is both `readable` and `writable`. + +* Pass in optional `write` and `end` methods. +* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. +* Use `this.pause()` and `this.resume()` to manage flow. +* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`). + +This function is the basis for most of the synchronous streams in +[event-stream](http://github.com/dominictarr/event-stream). + +``` js +var through = require('through') + +through(function write(data) { + this.queue(data) //data *must* not be null + }, + function end () { //optional + this.queue(null) + }) +``` + +Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`, +and this.emit('end') + +``` js +var through = require('through') + +through(function write(data) { + this.emit('data', data) + //this.pause() + }, + function end () { //optional + this.emit('end') + }) +``` + +## Extended Options + +You will probably not need these 99% of the time. + +### autoDestroy=false + +By default, `through` emits close when the writable +and readable side of the stream has ended. +If that is not desired, set `autoDestroy=false`. + +``` js +var through = require('through') + +//like this +var ts = through(write, end, {autoDestroy: false}) +//or like this +var ts = through(write, end) +ts.autoDestroy = false +``` + +## License + +MIT / Apache2 diff --git a/front/frontend/node_modules/through/test/async.js b/front/frontend/node_modules/through/test/async.js new file mode 100644 index 0000000..46bdbae --- /dev/null +++ b/front/frontend/node_modules/through/test/async.js @@ -0,0 +1,28 @@ +var from = require('from') +var through = require('../') + +var tape = require('tape') + +tape('simple async example', function (t) { + + var n = 0, expected = [1,2,3,4,5], actual = [] + from(expected) + .pipe(through(function(data) { + this.pause() + n ++ + setTimeout(function(){ + console.log('pushing data', data) + this.push(data) + this.resume() + }.bind(this), 300) + })).pipe(through(function(data) { + console.log('pushing data second time', data); + this.push(data) + })).on('data', function (d) { + actual.push(d) + }).on('end', function() { + t.deepEqual(actual, expected) + t.end() + }) + +}) diff --git a/front/frontend/node_modules/through/test/auto-destroy.js b/front/frontend/node_modules/through/test/auto-destroy.js new file mode 100644 index 0000000..9a8fd00 --- /dev/null +++ b/front/frontend/node_modules/through/test/auto-destroy.js @@ -0,0 +1,30 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('end before close', function (assert) { + var ts = through() + ts.autoDestroy = false + var ended = false, closed = false + + ts.on('end', function () { + assert.ok(!closed) + ended = true + }) + ts.on('close', function () { + assert.ok(ended) + closed = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.ok(ended) + assert.notOk(closed) + ts.destroy() + assert.ok(closed) + assert.end() +}) + diff --git a/front/frontend/node_modules/through/test/buffering.js b/front/frontend/node_modules/through/test/buffering.js new file mode 100644 index 0000000..b0084bf --- /dev/null +++ b/front/frontend/node_modules/through/test/buffering.js @@ -0,0 +1,71 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('buffering', function(assert) { + var ts = through(function (data) { + this.queue(data) + }, function () { + this.queue(null) + }) + + var ended = false, actual = [] + + ts.on('data', actual.push.bind(actual)) + ts.on('end', function () { + ended = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + assert.deepEqual(actual, [1, 2, 3]) + ts.pause() + ts.write(4) + ts.write(5) + ts.write(6) + assert.deepEqual(actual, [1, 2, 3]) + ts.resume() + assert.deepEqual(actual, [1, 2, 3, 4, 5, 6]) + ts.pause() + ts.end() + assert.ok(!ended) + ts.resume() + assert.ok(ended) + assert.end() +}) + +test('buffering has data in queue, when ends', function (assert) { + + /* + * If stream ends while paused with data in the queue, + * stream should still emit end after all data is written + * on resume. + */ + + var ts = through(function (data) { + this.queue(data) + }, function () { + this.queue(null) + }) + + var ended = false, actual = [] + + ts.on('data', actual.push.bind(actual)) + ts.on('end', function () { + ended = true + }) + + ts.pause() + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.deepEqual(actual, [], 'no data written yet, still paused') + assert.ok(!ended, 'end not emitted yet, still paused') + ts.resume() + assert.deepEqual(actual, [1, 2, 3], 'resumed, all data should be delivered') + assert.ok(ended, 'end should be emitted once all data was delivered') + assert.end(); +}) diff --git a/front/frontend/node_modules/through/test/end.js b/front/frontend/node_modules/through/test/end.js new file mode 100644 index 0000000..fa113f5 --- /dev/null +++ b/front/frontend/node_modules/through/test/end.js @@ -0,0 +1,45 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('end before close', function (assert) { + var ts = through() + var ended = false, closed = false + + ts.on('end', function () { + assert.ok(!closed) + ended = true + }) + ts.on('close', function () { + assert.ok(ended) + closed = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.ok(ended) + assert.ok(closed) + assert.end() +}) + +test('end only once', function (t) { + + var ts = through() + var ended = false, closed = false + + ts.on('end', function () { + t.equal(ended, false) + ended = true + }) + + ts.queue(null) + ts.queue(null) + ts.queue(null) + + ts.resume() + + t.end() +}) diff --git a/front/frontend/node_modules/through/test/index.js b/front/frontend/node_modules/through/test/index.js new file mode 100644 index 0000000..96da82f --- /dev/null +++ b/front/frontend/node_modules/through/test/index.js @@ -0,0 +1,133 @@ + +var test = require('tape') +var spec = require('stream-spec') +var through = require('../') + +/* + I'm using these two functions, and not streams and pipe + so there is less to break. if this test fails it must be + the implementation of _through_ +*/ + +function write(array, stream) { + array = array.slice() + function next() { + while(array.length) + if(stream.write(array.shift()) === false) + return stream.once('drain', next) + + stream.end() + } + + next() +} + +function read(stream, callback) { + var actual = [] + stream.on('data', function (data) { + actual.push(data) + }) + stream.once('end', function () { + callback(null, actual) + }) + stream.once('error', function (err) { + callback(err) + }) +} + +test('simple defaults', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through() + var s = spec(t).through().pausable() + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected) + assert.end() + }) + + t.on('close', s.validate) + + write(expected, t) +}); + +test('simple functions', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through(function (data) { + this.emit('data', data*2) + }) + var s = spec(t).through().pausable() + + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected.map(function (data) { + return data*2 + })) + assert.end() + }) + + t.on('close', s.validate) + + write(expected, t) +}) + +test('pauses', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l) //Math.random()) + + var t = through() + + var s = spec(t) + .through() + .pausable() + + t.on('data', function () { + if(Math.random() > 0.1) return + t.pause() + process.nextTick(function () { + t.resume() + }) + }) + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected) + }) + + t.on('close', function () { + s.validate() + assert.end() + }) + + write(expected, t) +}) + +test('does not soft-end on `undefined`', function(assert) { + var stream = through() + , count = 0 + + stream.on('data', function (data) { + count++ + }) + + stream.write(undefined) + stream.write(undefined) + + assert.equal(count, 2) + + assert.end() +}) diff --git a/front/frontend/node_modules/to-object-path/LICENSE b/front/frontend/node_modules/to-object-path/LICENSE new file mode 100644 index 0000000..1e49edf --- /dev/null +++ b/front/frontend/node_modules/to-object-path/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/to-object-path/README.md b/front/frontend/node_modules/to-object-path/README.md new file mode 100644 index 0000000..7f3cfb1 --- /dev/null +++ b/front/frontend/node_modules/to-object-path/README.md @@ -0,0 +1,71 @@ +# to-object-path [![NPM version](https://badge.fury.io/js/to-object-path.svg)](http://badge.fury.io/js/to-object-path) + +> Create an object path from a list or array of strings. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i to-object-path --save +``` + +## Usage + +```js +var toPath = require('to-object-path'); + +toPath('foo', 'bar', 'baz'); +toPath('foo', ['bar', 'baz']); +//=> 'foo.bar.baz' +``` + +Also supports passing an arguments object (without having to slice args): + +```js +function foo() + return toPath(arguments); +} + +foo('foo', 'bar', 'baz'); +foo('foo', ['bar', 'baz']); +//=> 'foo.bar.baz' +``` + +Visit the [example](./example.js) to see how this could be used in an application. + +## Related projects + +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (` a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value) +* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://www.npmjs.com/package/has-value) | [homepage](https://github.com/jonschlinkert/has-value) +* [omit-value](https://www.npmjs.com/package/omit-value): Omit properties from an object or deeply nested property of an object using object path… [more](https://www.npmjs.com/package/omit-value) | [homepage](https://github.com/jonschlinkert/omit-value) +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value) +* [unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/to-object-path/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 28, 2015._ \ No newline at end of file diff --git a/front/frontend/node_modules/to-object-path/index.js b/front/frontend/node_modules/to-object-path/index.js new file mode 100644 index 0000000..489f8f6 --- /dev/null +++ b/front/frontend/node_modules/to-object-path/index.js @@ -0,0 +1,33 @@ +/*! + * to-object-path + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +module.exports = function toPath(args) { + if (typeOf(args) !== 'arguments') { + args = arguments; + } + return filter(args).join('.'); +}; + +function filter(arr) { + var len = arr.length; + var idx = -1; + var res = []; + + while (++idx < len) { + var ele = arr[idx]; + if (typeOf(ele) === 'arguments' || Array.isArray(ele)) { + res.push.apply(res, filter(ele)); + } else if (typeof ele === 'string') { + res.push(ele); + } + } + return res; +} diff --git a/front/frontend/node_modules/to-object-path/package.json b/front/frontend/node_modules/to-object-path/package.json new file mode 100644 index 0000000..2fe341b --- /dev/null +++ b/front/frontend/node_modules/to-object-path/package.json @@ -0,0 +1,48 @@ +{ + "name": "to-object-path", + "description": "Create an object path from a list or array of strings.", + "version": "0.3.0", + "homepage": "https://github.com/jonschlinkert/to-object-path", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/to-object-path", + "bugs": { + "url": "https://github.com/jonschlinkert/to-object-path/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "devDependencies": { + "base": "^0.6.7", + "mocha": "*" + }, + "keywords": [ + "dot", + "nested", + "notation", + "object", + "path", + "stringify" + ], + "verb": { + "related": { + "list": [ + "get-value", + "set-value", + "has-value", + "omit-value", + "unset-value" + ] + } + } +} diff --git a/front/frontend/node_modules/to-regex-range/LICENSE b/front/frontend/node_modules/to-regex-range/LICENSE new file mode 100644 index 0000000..83b56e7 --- /dev/null +++ b/front/frontend/node_modules/to-regex-range/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/to-regex-range/README.md b/front/frontend/node_modules/to-regex-range/README.md new file mode 100644 index 0000000..2763c5a --- /dev/null +++ b/front/frontend/node_modules/to-regex-range/README.md @@ -0,0 +1,281 @@ +# to-regex-range [![NPM version](https://img.shields.io/npm/v/to-regex-range.svg?style=flat)](https://www.npmjs.com/package/to-regex-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/to-regex-range.svg?style=flat)](https://npmjs.org/package/to-regex-range) [![NPM total downloads](https://img.shields.io/npm/dt/to-regex-range.svg?style=flat)](https://npmjs.org/package/to-regex-range) [![Linux Build Status](https://img.shields.io/travis/micromatch/to-regex-range.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/to-regex-range) + +> Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save to-regex-range +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add to-regex-range +``` + +
    +What does this do? + +
    + +This libary generates the `source` string to be passed to `new RegExp()` for matching a range of numbers. + +**Example** + +```js +var toRegexRange = require('to-regex-range'); +var regex = new RegExp(toRegexRange('15', '95')); +``` + +A string is returned so that you can do whatever you need with it before passing it to `new RegExp()` (like adding `^` or `$` boundaries, defining flags, or combining it another string). + +
    + +
    + +
    +Why use this library? + +
    + +### Convenience + +Creating regular expressions for matching numbers gets deceptively complicated pretty fast. + +For example, let's say you need a validation regex for matching part of a user-id, postal code, social security number, tax id, etc: + +* regex for matching `1` => `/1/` (easy enough) +* regex for matching `1` through `5` => `/[1-5]/` (not bad...) +* regex for matching `1` or `5` => `/(1|5)/` (still easy...) +* regex for matching `1` through `50` => `/([1-9]|[1-4][0-9]|50)/` (uh-oh...) +* regex for matching `1` through `55` => `/([1-9]|[1-4][0-9]|5[0-5])/` (no prob, I can do this...) +* regex for matching `1` through `555` => `/([1-9]|[1-9][0-9]|[1-4][0-9]{2}|5[0-4][0-9]|55[0-5])/` (maybe not...) +* regex for matching `0001` through `5555` => `/(0{3}[1-9]|0{2}[1-9][0-9]|0[1-9][0-9]{2}|[1-4][0-9]{3}|5[0-4][0-9]{2}|55[0-4][0-9]|555[0-5])/` (okay, I get the point!) + +The numbers are contrived, but they're also really basic. In the real world you might need to generate a regex on-the-fly for validation. + +**Learn more** + +If you're interested in learning more about [character classes](http://www.regular-expressions.info/charclass.html) and other regex features, I personally have always found [regular-expressions.info](http://www.regular-expressions.info/charclass.html) to be pretty useful. + +### Heavily tested + +As of April 27, 2017, this library runs [2,783,483 test assertions](./test/test.js) against generated regex-ranges to provide brute-force verification that results are indeed correct. + +Tests run in ~870ms on my MacBook Pro, 2.5 GHz Intel Core i7. + +### Highly optimized + +Generated regular expressions are highly optimized: + +* duplicate sequences and character classes are reduced using quantifiers +* smart enough to use `?` conditionals when number(s) or range(s) can be positive or negative +* uses fragment caching to avoid processing the same exact string more than once + +
    + +
    + +## Usage + +Add this library to your javascript application with the following line of code + +```js +var toRegexRange = require('to-regex-range'); +``` + +The main export is a function that takes two integers: the `min` value and `max` value (formatted as strings or numbers). + +```js +var source = toRegexRange('15', '95'); +//=> 1[5-9]|[2-8][0-9]|9[0-5] + +var re = new RegExp('^' + source + '$'); +console.log(re.test('14')); //=> false +console.log(re.test('50')); //=> true +console.log(re.test('94')); //=> true +console.log(re.test('96')); //=> false +``` + +## Options + +### options.capture + +**Type**: `boolean` + +**Deafault**: `undefined` + +Wrap the returned value in parentheses when there is more than one regex condition. Useful when you're dynamically generating ranges. + +```js +console.log(toRegexRange('-10', '10')); +//=> -[1-9]|-?10|[0-9] + +console.log(toRegexRange('-10', '10', {capture: true})); +//=> (-[1-9]|-?10|[0-9]) +``` + +### options.shorthand + +**Type**: `boolean` + +**Deafault**: `undefined` + +Use the regex shorthand for `[0-9]`: + +```js +console.log(toRegexRange('0', '999999')); +//=> [0-9]|[1-9][0-9]{1,5} + +console.log(toRegexRange('0', '999999', {shorthand: true})); +//=> \d|[1-9]\d{1,5} +``` + +### options.relaxZeros + +**Type**: `boolean` + +**Default**: `true` + +This option only applies to **negative zero-padded ranges**. By default, when a negative zero-padded range is defined, the number of leading zeros is relaxed using `-0*`. + +```js +console.log(toRegexRange('-001', '100')); +//=> -0*1|0{2}[0-9]|0[1-9][0-9]|100 + +console.log(toRegexRange('-001', '100', {relaxZeros: false})); +//=> -0{2}1|0{2}[0-9]|0[1-9][0-9]|100 +``` + +
    +Why are zeros relaxed for negative zero-padded ranges by default? + +Consider the following. + +```js +var regex = toRegexRange('-001', '100'); +``` + +_Note that `-001` and `100` are both three digits long_. + +In most zero-padding implementations, only a single leading zero is enough to indicate that zero-padding should be applied. Thus, the leading zeros would be "corrected" on the negative range in the example to `-01`, instead of `-001`, to make total length of each string no greater than the length of the largest number in the range (in other words, `-001` is 4 digits, but `100` is only three digits). + +If zeros were not relaxed by default, you might expect the resulting regex of the above pattern to match `-001` - given that it's defined that way in the arguments - _but it wouldn't_. It would, however, match `-01`. This gets even more ambiguous with large ranges, like `-01` to `1000000`. + +Thus, we relax zeros by default to provide a more predictable experience for users. + +
    + +## Examples + +| **Range** | **Result** | **Compile time** | +| --- | --- | --- | +| `toRegexRange('5, 5')` | `5` | _33μs_ | +| `toRegexRange('5, 6')` | `5\|6` | _53μs_ | +| `toRegexRange('29, 51')` | `29\|[34][0-9]\|5[01]` | _699μs_ | +| `toRegexRange('31, 877')` | `3[1-9]\|[4-9][0-9]\|[1-7][0-9]{2}\|8[0-6][0-9]\|87[0-7]` | _711μs_ | +| `toRegexRange('111, 555')` | `11[1-9]\|1[2-9][0-9]\|[2-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _62μs_ | +| `toRegexRange('-10, 10')` | `-[1-9]\|-?10\|[0-9]` | _74μs_ | +| `toRegexRange('-100, -10')` | `-1[0-9]\|-[2-9][0-9]\|-100` | _49μs_ | +| `toRegexRange('-100, 100')` | `-[1-9]\|-?[1-9][0-9]\|-?100\|[0-9]` | _45μs_ | +| `toRegexRange('001, 100')` | `0{2}[1-9]\|0[1-9][0-9]\|100` | _158μs_ | +| `toRegexRange('0010, 1000')` | `0{2}1[0-9]\|0{2}[2-9][0-9]\|0[1-9][0-9]{2}\|1000` | _61μs_ | +| `toRegexRange('1, 2')` | `1\|2` | _10μs_ | +| `toRegexRange('1, 5')` | `[1-5]` | _24μs_ | +| `toRegexRange('1, 10')` | `[1-9]\|10` | _23μs_ | +| `toRegexRange('1, 100')` | `[1-9]\|[1-9][0-9]\|100` | _30μs_ | +| `toRegexRange('1, 1000')` | `[1-9]\|[1-9][0-9]{1,2}\|1000` | _52μs_ | +| `toRegexRange('1, 10000')` | `[1-9]\|[1-9][0-9]{1,3}\|10000` | _47μs_ | +| `toRegexRange('1, 100000')` | `[1-9]\|[1-9][0-9]{1,4}\|100000` | _44μs_ | +| `toRegexRange('1, 1000000')` | `[1-9]\|[1-9][0-9]{1,5}\|1000000` | _49μs_ | +| `toRegexRange('1, 10000000')` | `[1-9]\|[1-9][0-9]{1,6}\|10000000` | _63μs_ | + +## Heads up! + +**Order of arguments** + +When the `min` is larger than the `max`, values will be flipped to create a valid range: + +```js +toRegexRange('51', '29'); +``` + +Is effectively flipped to: + +```js +toRegexRange('29', '51'); +//=> 29|[3-4][0-9]|5[0-1] +``` + +**Steps / increments** + +This library does not support steps (increments). A pr to add support would be welcome. + +## History + +### v2.0.0 - 2017-04-21 + +**New features** + +Adds support for zero-padding! + +### v1.0.0 + +**Optimizations** + +Repeating ranges are now grouped using quantifiers. rocessing time is roughly the same, but the generated regex is much smaller, which should result in faster matching. + +## Attribution + +Inspired by the python library [range-regex](https://github.com/dimka665/range-regex). + +## About + +### Related projects + +* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.") +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") +* [repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.") +* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 27, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/to-regex-range/index.js b/front/frontend/node_modules/to-regex-range/index.js new file mode 100644 index 0000000..7bb5a74 --- /dev/null +++ b/front/frontend/node_modules/to-regex-range/index.js @@ -0,0 +1,294 @@ +/*! + * to-regex-range + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var repeat = require('repeat-string'); +var isNumber = require('is-number'); +var cache = {}; + +function toRegexRange(min, max, options) { + if (isNumber(min) === false) { + throw new RangeError('toRegexRange: first argument is invalid.'); + } + + if (typeof max === 'undefined' || min === max) { + return String(min); + } + + if (isNumber(max) === false) { + throw new RangeError('toRegexRange: second argument is invalid.'); + } + + options = options || {}; + var relax = String(options.relaxZeros); + var shorthand = String(options.shorthand); + var capture = String(options.capture); + var key = min + ':' + max + '=' + relax + shorthand + capture; + if (cache.hasOwnProperty(key)) { + return cache[key].result; + } + + var a = Math.min(min, max); + var b = Math.max(min, max); + + if (Math.abs(a - b) === 1) { + var result = min + '|' + max; + if (options.capture) { + return '(' + result + ')'; + } + return result; + } + + var isPadded = padding(min) || padding(max); + var positives = []; + var negatives = []; + + var tok = {min: min, max: max, a: a, b: b}; + if (isPadded) { + tok.isPadded = isPadded; + tok.maxLen = String(tok.max).length; + } + + if (a < 0) { + var newMin = b < 0 ? Math.abs(b) : 1; + var newMax = Math.abs(a); + negatives = splitToPatterns(newMin, newMax, tok, options); + a = tok.a = 0; + } + + if (b >= 0) { + positives = splitToPatterns(a, b, tok, options); + } + + tok.negatives = negatives; + tok.positives = positives; + tok.result = siftPatterns(negatives, positives, options); + + if (options.capture && (positives.length + negatives.length) > 1) { + tok.result = '(' + tok.result + ')'; + } + + cache[key] = tok; + return tok.result; +} + +function siftPatterns(neg, pos, options) { + var onlyNegative = filterPatterns(neg, pos, '-', false, options) || []; + var onlyPositive = filterPatterns(pos, neg, '', false, options) || []; + var intersected = filterPatterns(neg, pos, '-?', true, options) || []; + var subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); + return subpatterns.join('|'); +} + +function splitToRanges(min, max) { + min = Number(min); + max = Number(max); + + var nines = 1; + var stops = [max]; + var stop = +countNines(min, nines); + + while (min <= stop && stop <= max) { + stops = push(stops, stop); + nines += 1; + stop = +countNines(min, nines); + } + + var zeros = 1; + stop = countZeros(max + 1, zeros) - 1; + + while (min < stop && stop <= max) { + stops = push(stops, stop); + zeros += 1; + stop = countZeros(max + 1, zeros) - 1; + } + + stops.sort(compare); + return stops; +} + +/** + * Convert a range to a regex pattern + * @param {Number} `start` + * @param {Number} `stop` + * @return {String} + */ + +function rangeToPattern(start, stop, options) { + if (start === stop) { + return {pattern: String(start), digits: []}; + } + + var zipped = zip(String(start), String(stop)); + var len = zipped.length, i = -1; + + var pattern = ''; + var digits = 0; + + while (++i < len) { + var numbers = zipped[i]; + var startDigit = numbers[0]; + var stopDigit = numbers[1]; + + if (startDigit === stopDigit) { + pattern += startDigit; + + } else if (startDigit !== '0' || stopDigit !== '9') { + pattern += toCharacterClass(startDigit, stopDigit); + + } else { + digits += 1; + } + } + + if (digits) { + pattern += options.shorthand ? '\\d' : '[0-9]'; + } + + return { pattern: pattern, digits: [digits] }; +} + +function splitToPatterns(min, max, tok, options) { + var ranges = splitToRanges(min, max); + var len = ranges.length; + var idx = -1; + + var tokens = []; + var start = min; + var prev; + + while (++idx < len) { + var range = ranges[idx]; + var obj = rangeToPattern(start, range, options); + var zeros = ''; + + if (!tok.isPadded && prev && prev.pattern === obj.pattern) { + if (prev.digits.length > 1) { + prev.digits.pop(); + } + prev.digits.push(obj.digits[0]); + prev.string = prev.pattern + toQuantifier(prev.digits); + start = range + 1; + continue; + } + + if (tok.isPadded) { + zeros = padZeros(range, tok); + } + + obj.string = zeros + obj.pattern + toQuantifier(obj.digits); + tokens.push(obj); + start = range + 1; + prev = obj; + } + + return tokens; +} + +function filterPatterns(arr, comparison, prefix, intersection, options) { + var res = []; + + for (var i = 0; i < arr.length; i++) { + var tok = arr[i]; + var ele = tok.string; + + if (options.relaxZeros !== false) { + if (prefix === '-' && ele.charAt(0) === '0') { + if (ele.charAt(1) === '{') { + ele = '0*' + ele.replace(/^0\{\d+\}/, ''); + } else { + ele = '0*' + ele.slice(1); + } + } + } + + if (!intersection && !contains(comparison, 'string', ele)) { + res.push(prefix + ele); + } + + if (intersection && contains(comparison, 'string', ele)) { + res.push(prefix + ele); + } + } + return res; +} + +/** + * Zip strings (`for in` can be used on string characters) + */ + +function zip(a, b) { + var arr = []; + for (var ch in a) arr.push([a[ch], b[ch]]); + return arr; +} + +function compare(a, b) { + return a > b ? 1 : b > a ? -1 : 0; +} + +function push(arr, ele) { + if (arr.indexOf(ele) === -1) arr.push(ele); + return arr; +} + +function contains(arr, key, val) { + for (var i = 0; i < arr.length; i++) { + if (arr[i][key] === val) { + return true; + } + } + return false; +} + +function countNines(min, len) { + return String(min).slice(0, -len) + repeat('9', len); +} + +function countZeros(integer, zeros) { + return integer - (integer % Math.pow(10, zeros)); +} + +function toQuantifier(digits) { + var start = digits[0]; + var stop = digits[1] ? (',' + digits[1]) : ''; + if (!stop && (!start || start === 1)) { + return ''; + } + return '{' + start + stop + '}'; +} + +function toCharacterClass(a, b) { + return '[' + a + ((b - a === 1) ? '' : '-') + b + ']'; +} + +function padding(str) { + return /^-?(0+)\d/.exec(str); +} + +function padZeros(val, tok) { + if (tok.isPadded) { + var diff = Math.abs(tok.maxLen - String(val).length); + switch (diff) { + case 0: + return ''; + case 1: + return '0'; + default: { + return '0{' + diff + '}'; + } + } + } + return val; +} + +/** + * Expose `toRegexRange` + */ + +module.exports = toRegexRange; diff --git a/front/frontend/node_modules/to-regex-range/package.json b/front/frontend/node_modules/to-regex-range/package.json new file mode 100644 index 0000000..6c8e6b1 --- /dev/null +++ b/front/frontend/node_modules/to-regex-range/package.json @@ -0,0 +1,86 @@ +{ + "name": "to-regex-range", + "description": "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.", + "version": "2.1.1", + "homepage": "https://github.com/micromatch/to-regex-range", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "micromatch/to-regex-range", + "bugs": { + "url": "https://github.com/micromatch/to-regex-range/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "devDependencies": { + "fill-range": "^3.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.2.0", + "text-table": "^0.2.0", + "time-diff": "^0.3.1" + }, + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "date", + "expand", + "expansion", + "glob", + "match", + "matches", + "matching", + "number", + "numerical", + "range", + "ranges", + "regex", + "sequence", + "sh", + "to", + "year" + ], + "verb": { + "related": { + "list": [ + "expand-range", + "fill-range", + "micromatch", + "repeat-element", + "repeat-string" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "helpers": [ + "./examples.js" + ], + "reflinks": [ + "0-5", + "0-9", + "1-5", + "1-9" + ] + } +} diff --git a/front/frontend/node_modules/to-regex/LICENSE b/front/frontend/node_modules/to-regex/LICENSE new file mode 100644 index 0000000..7c9987b --- /dev/null +++ b/front/frontend/node_modules/to-regex/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/to-regex/README.md b/front/frontend/node_modules/to-regex/README.md new file mode 100644 index 0000000..5a28fc3 --- /dev/null +++ b/front/frontend/node_modules/to-regex/README.md @@ -0,0 +1,205 @@ +# to-regex [![NPM version](https://img.shields.io/npm/v/to-regex.svg?style=flat)](https://www.npmjs.com/package/to-regex) [![NPM monthly downloads](https://img.shields.io/npm/dm/to-regex.svg?style=flat)](https://npmjs.org/package/to-regex) [![NPM total downloads](https://img.shields.io/npm/dt/to-regex.svg?style=flat)](https://npmjs.org/package/to-regex) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/to-regex.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/to-regex) + +> Generate a regex from a string or array of strings. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +- [Install](#install) +- [Usage](#usage) +- [Options](#options) + * [options.contains](#optionscontains) + * [options.negate](#optionsnegate) + * [options.nocase](#optionsnocase) + * [options.flags](#optionsflags) + * [options.cache](#optionscache) + * [options.safe](#optionssafe) +- [About](#about) + * [Related projects](#related-projects) + * [Author](#author) + * [License](#license) + +_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save to-regex +``` + +## Usage + +```js +var toRegex = require('to-regex'); + +console.log(toRegex('foo')); +//=> /^(?:foo)$/ + +console.log(toRegex('foo', {negate: true})); +//=> /^(?:(?:(?!^(?:foo)$).)*)$/ + +console.log(toRegex('foo', {contains: true})); +//=> /(?:foo)/ + +console.log(toRegex(['foo', 'bar'], {negate: true})); +//=> /^(?:(?:(?!^(?:(?:foo)|(?:bar))$).)*)$/ + +console.log(toRegex(['foo', 'bar'], {negate: true, contains: true})); +//=> /^(?:(?:(?!(?:(?:foo)|(?:bar))).)*)$/ +``` + +## Options + +### options.contains + +**Type**: `Boolean` + +**Default**: `undefined` + +Generate a regex that will match any string that _contains_ the given pattern. By default, regex is strict will only return true for exact matches. + +```js +var toRegex = require('to-regex'); +console.log(toRegex('foo', {contains: true})); +//=> /(?:foo)/ +``` + +### options.negate + +**Type**: `Boolean` + +**Default**: `undefined` + +Create a regex that will match everything except the given pattern. + +```js +var toRegex = require('to-regex'); +console.log(toRegex('foo', {negate: true})); +//=> /^(?:(?:(?!^(?:foo)$).)*)$/ +``` + +### options.nocase + +**Type**: `Boolean` + +**Default**: `undefined` + +Adds the `i` flag, to enable case-insensitive matching. + +```js +var toRegex = require('to-regex'); +console.log(toRegex('foo', {nocase: true})); +//=> /^(?:foo)$/i +``` + +Alternatively you can pass the flags you want directly on [options.flags](#options.flags). + +### options.flags + +**Type**: `String` + +**Default**: `undefined` + +Define the flags you want to use on the generated regex. + +```js +var toRegex = require('to-regex'); +console.log(toRegex('foo', {flags: 'gm'})); +//=> /^(?:foo)$/gm +console.log(toRegex('foo', {flags: 'gmi', nocase: true})); //<= handles redundancy +//=> /^(?:foo)$/gmi +``` + +### options.cache + +**Type**: `Boolean` + +**Default**: `true` + +Generated regex is cached based on the provided string and options. As a result, runtime compilation only happens once per pattern (as long as options are also the same), which can result in dramatic speed improvements. + +This also helps with debugging, since adding options and pattern are added to the generated regex. + +**Disable caching** + +```js +toRegex('foo', {cache: false}); +``` + +### options.safe + +**Type**: `Boolean` + +**Default**: `undefined` + +Check the generated regular expression with [safe-regex](https://github.com/substack/safe-regex) and throw an error if the regex is potentially unsafe. + +**Examples** + +```js +console.log(toRegex('(x+x+)+y')); +//=> /^(?:(x+x+)+y)$/ + +// The following would throw an error +toRegex('(x+x+)+y', {safe: true}); +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [path-regex](https://www.npmjs.com/package/path-regex): Regular expression for matching the parts of a file path. | [homepage](https://github.com/regexps/path-regex "Regular expression for matching the parts of a file path.") +* [to-regex-range](https://www.npmjs.com/package/to-regex-range): Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than… [more](https://github.com/micromatch/to-regex-range) | [homepage](https://github.com/micromatch/to-regex-range "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.") + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 24, 2018._ \ No newline at end of file diff --git a/front/frontend/node_modules/to-regex/index.js b/front/frontend/node_modules/to-regex/index.js new file mode 100644 index 0000000..a87d015 --- /dev/null +++ b/front/frontend/node_modules/to-regex/index.js @@ -0,0 +1,155 @@ +'use strict'; + +var safe = require('safe-regex'); +var define = require('define-property'); +var extend = require('extend-shallow'); +var not = require('regex-not'); +var MAX_LENGTH = 1024 * 64; + +/** + * Session cache + */ + +var cache = {}; + +/** + * Create a regular expression from the given `pattern` string. + * + * @param {String|RegExp} `pattern` Pattern can be a string or regular expression. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +module.exports = function(patterns, options) { + if (!Array.isArray(patterns)) { + return makeRe(patterns, options); + } + return makeRe(patterns.join('|'), options); +}; + +/** + * Create a regular expression from the given `pattern` string. + * + * @param {String|RegExp} `pattern` Pattern can be a string or regular expression. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +function makeRe(pattern, options) { + if (pattern instanceof RegExp) { + return pattern; + } + + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + var key = pattern; + // do this before shallow cloning options, it's a lot faster + if (!options || (options && options.cache !== false)) { + key = createKey(pattern, options); + + if (cache.hasOwnProperty(key)) { + return cache[key]; + } + } + + var opts = extend({}, options); + if (opts.contains === true) { + if (opts.negate === true) { + opts.strictNegate = false; + } else { + opts.strict = false; + } + } + + if (opts.strict === false) { + opts.strictOpen = false; + opts.strictClose = false; + } + + var open = opts.strictOpen !== false ? '^' : ''; + var close = opts.strictClose !== false ? '$' : ''; + var flags = opts.flags || ''; + var regex; + + if (opts.nocase === true && !/i/.test(flags)) { + flags += 'i'; + } + + try { + if (opts.negate || typeof opts.strictNegate === 'boolean') { + pattern = not.create(pattern, opts); + } + + var str = open + '(?:' + pattern + ')' + close; + regex = new RegExp(str, flags); + + if (opts.safe === true && safe(regex) === false) { + throw new Error('potentially unsafe regular expression: ' + regex.source); + } + + } catch (err) { + if (opts.strictErrors === true || opts.safe === true) { + err.key = key; + err.pattern = pattern; + err.originalOptions = options; + err.createdOptions = opts; + throw err; + } + + try { + regex = new RegExp('^' + pattern.replace(/(\W)/g, '\\$1') + '$'); + } catch (err) { + regex = /.^/; //<= match nothing + } + } + + if (opts.cache !== false) { + memoize(regex, key, pattern, opts); + } + return regex; +} + +/** + * Memoize generated regex. This can result in dramatic speed improvements + * and simplify debugging by adding options and pattern to the regex. It can be + * disabled by passing setting `options.cache` to false. + */ + +function memoize(regex, key, pattern, options) { + define(regex, 'cached', true); + define(regex, 'pattern', pattern); + define(regex, 'options', options); + define(regex, 'key', key); + cache[key] = regex; +} + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +function createKey(pattern, options) { + if (!options) return pattern; + var key = pattern; + for (var prop in options) { + if (options.hasOwnProperty(prop)) { + key += ';' + prop + '=' + String(options[prop]); + } + } + return key; +} + +/** + * Expose `makeRe` + */ + +module.exports.makeRe = makeRe; diff --git a/front/frontend/node_modules/to-regex/node_modules/extend-shallow/LICENSE b/front/frontend/node_modules/to-regex/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/front/frontend/node_modules/to-regex/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/to-regex/node_modules/extend-shallow/README.md b/front/frontend/node_modules/to-regex/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/front/frontend/node_modules/to-regex/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/to-regex/node_modules/extend-shallow/index.js b/front/frontend/node_modules/to-regex/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/front/frontend/node_modules/to-regex/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/front/frontend/node_modules/to-regex/node_modules/extend-shallow/package.json b/front/frontend/node_modules/to-regex/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e5e9105 --- /dev/null +++ b/front/frontend/node_modules/to-regex/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/to-regex/node_modules/is-extendable/LICENSE b/front/frontend/node_modules/to-regex/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/front/frontend/node_modules/to-regex/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/front/frontend/node_modules/to-regex/node_modules/is-extendable/README.md b/front/frontend/node_modules/to-regex/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/front/frontend/node_modules/to-regex/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/to-regex/node_modules/is-extendable/index.d.ts b/front/frontend/node_modules/to-regex/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/front/frontend/node_modules/to-regex/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/front/frontend/node_modules/to-regex/node_modules/is-extendable/index.js b/front/frontend/node_modules/to-regex/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/front/frontend/node_modules/to-regex/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/front/frontend/node_modules/to-regex/node_modules/is-extendable/package.json b/front/frontend/node_modules/to-regex/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/front/frontend/node_modules/to-regex/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/to-regex/package.json b/front/frontend/node_modules/to-regex/package.json new file mode 100644 index 0000000..e4277d3 --- /dev/null +++ b/front/frontend/node_modules/to-regex/package.json @@ -0,0 +1,62 @@ +{ + "name": "to-regex", + "description": "Generate a regex from a string or array of strings.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/to-regex", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/to-regex", + "bugs": { + "url": "https://github.com/jonschlinkert/to-regex/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "match", + "regex", + "regular expression", + "test", + "to" + ], + "verb": { + "toc": { + "method": "preWrite" + }, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-glob", + "is-glob", + "path-regex", + "to-regex-range" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/toidentifier/HISTORY.md b/front/frontend/node_modules/toidentifier/HISTORY.md new file mode 100644 index 0000000..cb7cc89 --- /dev/null +++ b/front/frontend/node_modules/toidentifier/HISTORY.md @@ -0,0 +1,9 @@ +1.0.1 / 2021-11-14 +================== + + * pref: enable strict mode + +1.0.0 / 2018-07-09 +================== + + * Initial release diff --git a/front/frontend/node_modules/toidentifier/LICENSE b/front/frontend/node_modules/toidentifier/LICENSE new file mode 100644 index 0000000..de22d15 --- /dev/null +++ b/front/frontend/node_modules/toidentifier/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/front/frontend/node_modules/toidentifier/README.md b/front/frontend/node_modules/toidentifier/README.md new file mode 100644 index 0000000..57e8a78 --- /dev/null +++ b/front/frontend/node_modules/toidentifier/README.md @@ -0,0 +1,61 @@ +# toidentifier + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Build Status][github-actions-ci-image]][github-actions-ci-url] +[![Test Coverage][codecov-image]][codecov-url] + +> Convert a string of words to a JavaScript identifier + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```bash +$ npm install toidentifier +``` + +## Example + +```js +var toIdentifier = require('toidentifier') + +console.log(toIdentifier('Bad Request')) +// => "BadRequest" +``` + +## API + +This CommonJS module exports a single default function: `toIdentifier`. + +### toIdentifier(string) + +Given a string as the argument, it will be transformed according to +the following rules and the new string will be returned: + +1. Split into words separated by space characters (`0x20`). +2. Upper case the first character of each word. +3. Join the words together with no separator. +4. Remove all non-word (`[0-9a-z_]`) characters. + +## License + +[MIT](LICENSE) + +[codecov-image]: https://img.shields.io/codecov/c/github/component/toidentifier.svg +[codecov-url]: https://codecov.io/gh/component/toidentifier +[downloads-image]: https://img.shields.io/npm/dm/toidentifier.svg +[downloads-url]: https://npmjs.org/package/toidentifier +[github-actions-ci-image]: https://img.shields.io/github/workflow/status/component/toidentifier/ci/master?label=ci +[github-actions-ci-url]: https://github.com/component/toidentifier?query=workflow%3Aci +[npm-image]: https://img.shields.io/npm/v/toidentifier.svg +[npm-url]: https://npmjs.org/package/toidentifier + + +## + +[npm]: https://www.npmjs.com/ + +[yarn]: https://yarnpkg.com/ diff --git a/front/frontend/node_modules/toidentifier/index.js b/front/frontend/node_modules/toidentifier/index.js new file mode 100644 index 0000000..9295d02 --- /dev/null +++ b/front/frontend/node_modules/toidentifier/index.js @@ -0,0 +1,32 @@ +/*! + * toidentifier + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = toIdentifier + +/** + * Trasform the given string into a JavaScript identifier + * + * @param {string} str + * @returns {string} + * @public + */ + +function toIdentifier (str) { + return str + .split(' ') + .map(function (token) { + return token.slice(0, 1).toUpperCase() + token.slice(1) + }) + .join('') + .replace(/[^ _0-9a-z]/gi, '') +} diff --git a/front/frontend/node_modules/toidentifier/package.json b/front/frontend/node_modules/toidentifier/package.json new file mode 100644 index 0000000..42db1a6 --- /dev/null +++ b/front/frontend/node_modules/toidentifier/package.json @@ -0,0 +1,38 @@ +{ + "name": "toidentifier", + "description": "Convert a string of words to a JavaScript identifier", + "version": "1.0.1", + "author": "Douglas Christopher Wilson ", + "contributors": [ + "Douglas Christopher Wilson ", + "Nick Baugh (http://niftylettuce.com/)" + ], + "repository": "component/toidentifier", + "devDependencies": { + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.3", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "4.3.1", + "eslint-plugin-standard": "4.1.0", + "mocha": "9.1.3", + "nyc": "15.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "license": "MIT", + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/front/frontend/node_modules/union-value/LICENSE b/front/frontend/node_modules/union-value/LICENSE new file mode 100644 index 0000000..83b56e7 --- /dev/null +++ b/front/frontend/node_modules/union-value/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/union-value/README.md b/front/frontend/node_modules/union-value/README.md new file mode 100644 index 0000000..1a90ffb --- /dev/null +++ b/front/frontend/node_modules/union-value/README.md @@ -0,0 +1,73 @@ +# union-value [![NPM version](https://img.shields.io/npm/v/union-value.svg?style=flat)](https://www.npmjs.com/package/union-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/union-value.svg?style=flat)](https://npmjs.org/package/union-value) [![NPM total downloads](https://img.shields.io/npm/dt/union-value.svg?style=flat)](https://npmjs.org/package/union-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/union-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/union-value) + +> Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save union-value +``` + +## Usage + +```js +var union = require('union-value'); + +var obj = {}; + +union(obj, 'a.b.c', ['one', 'two']); +union(obj, 'a.b.c', ['three']); + +console.log(obj); +//=> {a: {b: {c: [ 'one', 'two', 'three' ] }}} +``` + +## About + +### Related projects + +* [assign-value](https://www.npmjs.com/package/assign-value): Assign a value or extend a deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/assign-value) | [homepage](https://github.com/jonschlinkert/assign-value "Assign a value or extend a deeply nested property of an object using object path notation.") +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.") +* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://github.com/jonschlinkert/has-value) | [homepage](https://github.com/jonschlinkert/has-value "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.") +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.") +* [unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value "Delete nested properties from an object using dot notation.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 25, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/union-value/index.js b/front/frontend/node_modules/union-value/index.js new file mode 100644 index 0000000..9c5d8db --- /dev/null +++ b/front/frontend/node_modules/union-value/index.js @@ -0,0 +1,30 @@ +'use strict'; + +var isObject = require('is-extendable'); +var union = require('arr-union'); +var get = require('get-value'); +var set = require('set-value'); + +module.exports = function unionValue(obj, prop, value) { + if (!isObject(obj)) { + throw new TypeError('union-value expects the first argument to be an object.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('union-value expects `prop` to be a string.'); + } + + var arr = arrayify(get(obj, prop)); + set(obj, prop, union(arr, arrayify(value))); + return obj; +}; + +function arrayify(val) { + if (val === null || typeof val === 'undefined') { + return []; + } + if (Array.isArray(val)) { + return val; + } + return [val]; +} diff --git a/front/frontend/node_modules/union-value/package.json b/front/frontend/node_modules/union-value/package.json new file mode 100644 index 0000000..65441f6 --- /dev/null +++ b/front/frontend/node_modules/union-value/package.json @@ -0,0 +1,70 @@ +{ + "name": "union-value", + "description": "Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/union-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/union-value", + "bugs": { + "url": "https://github.com/jonschlinkert/union-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.2.0", + "should": "^11.2.0" + }, + "keywords": [ + "array", + "dot", + "get", + "has", + "nested", + "notation", + "object", + "path", + "prop", + "property", + "set", + "union", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assign-value", + "get-value", + "has-value", + "set-value", + "unset-value" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/unix-crypt-td-js/Makefile b/front/frontend/node_modules/unix-crypt-td-js/Makefile new file mode 100644 index 0000000..1dbf1c6 --- /dev/null +++ b/front/frontend/node_modules/unix-crypt-td-js/Makefile @@ -0,0 +1,4 @@ +all: unix-crypt-td.min.js + +unix-crypt-td.min.js: src/unix-crypt-td.js + google-closure-compiler --js src/unix-crypt-td.js --compilation_level ADVANCED_OPTIMIZATIONS > unix-crypt-td.min.js diff --git a/front/frontend/node_modules/unix-crypt-td-js/README.markdown b/front/frontend/node_modules/unix-crypt-td-js/README.markdown new file mode 100644 index 0000000..61b2f60 --- /dev/null +++ b/front/frontend/node_modules/unix-crypt-td-js/README.markdown @@ -0,0 +1,51 @@ +Unix crypt(3) Javascript Implementation +======================================= + +Straightforward implementaiton of the DES-based Unix crypt(3) hash, based largely on crypt.c in the Seventh Edition Unix distribution released by Caldera Systems under a BSD-style license. + +Building the minified version +----------------------------- + +Running the Makefile requires the [Google Closure Compiler](http://code.google.com/closure/compiler/) +installed on your path. Alternatively, you may use any JS Minifier you want. + +Usage +----- + +Simple examples: + + unixCryptTD('foob' /* pw */, 'ar' /* salt */) // === 'arlEKn0OzVJn.' + unixCryptTD([102, 111, 111, 98], 'ar') // === 'arlEKn0OzVJn.' + unixCryptTD([102, 111, 111, 98], [97, 114] // === 'arlEKn0OzVJn.' + unixCryptTD('foob', 'ar', true /* returnBytes */) // === [97, 114, 108, 69, + // 75, 110, 48, 79, 122, 86, 74, 110, 46] + +Testing +------- + +Just run `npm test` + +Author +------ + +Tim Joseph Dumol <[tim@timdumol.com](mailto:tim@timdumol.com)> + +Licensing +--------- + +BSD License: + +Copyright(C) Tim Joseph F. Dumol 2011. All rights reserved. +Derived from crypt.c in the Seventh Edition Unix distribution by Caldera International, which is Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code and documentation must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed or owned by Caldera International, Inc. + +* Neither the name of Caldera International, Inc. nor the names of other contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,e BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/front/frontend/node_modules/unix-crypt-td-js/package.json b/front/frontend/node_modules/unix-crypt-td-js/package.json new file mode 100644 index 0000000..d498800 --- /dev/null +++ b/front/frontend/node_modules/unix-crypt-td-js/package.json @@ -0,0 +1,28 @@ +{ + "name": "unix-crypt-td-js", + "version": "1.1.4", + "description": "Javascript implementation of the Unix crypt(3) DES-based hash", + "main": "unix-crypt-td.min.js", + "directories": { + "test": "test" + }, + "scripts": { + "test": "mocha" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/TimDumol/unix-crypt-td-js.git" + }, + "keywords": [ + "crypt" + ], + "author": "Tim Dumol ", + "license": "BSD-3-Clause", + "bugs": { + "url": "https://github.com/TimDumol/unix-crypt-td-js/issues" + }, + "homepage": "https://github.com/TimDumol/unix-crypt-td-js#readme", + "devDependencies": { + "mocha": "^6.2.2" + } +} diff --git a/front/frontend/node_modules/unix-crypt-td-js/src/unix-crypt-td.js b/front/frontend/node_modules/unix-crypt-td-js/src/unix-crypt-td.js new file mode 100644 index 0000000..51cf47f --- /dev/null +++ b/front/frontend/node_modules/unix-crypt-td-js/src/unix-crypt-td.js @@ -0,0 +1,464 @@ +'use strict'; +/** + * Unix crypt(3) Javascript Implementation + * + * Straightforward implementaiton of the DES-based Unix crypt(3) hash, based largely + * on crypt.c in the Seventh Edition Unix distribution released by Caldera Systems + * under a BSD-style license. + * + * @author Tim Joseph Dumol + */ + +/* +Legalese: + +Copyright(C) Tim Joseph F. Dumol 2011. All rights reserved. +Derived from crypt.c in the Seventh Edition Unix distribution by +Caldera International, which is Copyright(C) Caldera International +Inc. 2001-2002. All rights reserved. + +Redistribution and use in source and binary forms, +with or without modification, are permitted provided that the +following conditions are met: + +Redistributions of source code and documentation must retain the above +copyright notice, this list of conditions and the following +disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* All advertising materials mentioning features or use of this software + must display the following acknowledgement: This product includes + software developed or owned by Caldera International, Inc. + +* Neither the name of Caldera International, Inc. nor the names of + other contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA +INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE +FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/** + * Implements the Unix crypt(3) DES-based hash. + * + * @param {Array.|string} pw The string to hash + * @param {Array.|string} salt The salt to use (two character string from [a-zA-Z0-9./]). + * @param {boolean=} returnBytes (optional) If true, return an array of bytes; + * otherwise, return a string. + */ +var unixCryptTD = (function() { + /* + * Initial permutation, + */ + var IP = [ + 58,50,42,34,26,18,10, 2, + 60,52,44,36,28,20,12, 4, + 62,54,46,38,30,22,14, 6, + 64,56,48,40,32,24,16, 8, + 57,49,41,33,25,17, 9, 1, + 59,51,43,35,27,19,11, 3, + 61,53,45,37,29,21,13, 5, + 63,55,47,39,31,23,15, 7 + ]; + + /* + * Final permutation, FP = IP^(-1) + */ + var FP =[ + 40, 8,48,16,56,24,64,32, + 39, 7,47,15,55,23,63,31, + 38, 6,46,14,54,22,62,30, + 37, 5,45,13,53,21,61,29, + 36, 4,44,12,52,20,60,28, + 35, 3,43,11,51,19,59,27, + 34, 2,42,10,50,18,58,26, + 33, 1,41, 9,49,17,57,25 + ]; + + /* + * Permuted-choice 1 from the key bits + * to yield C and D. + * Note that bits 8,16... are left out: + * They are intended for a parity check. + */ + var PC1_C = [ + 57,49,41,33,25,17, 9, + 1,58,50,42,34,26,18, + 10, 2,59,51,43,35,27, + 19,11, 3,60,52,44,36 + ]; + + var PC1_D = [ + 63,55,47,39,31,23,15, + 7,62,54,46,38,30,22, + 14, 6,61,53,45,37,29, + 21,13, 5,28,20,12, 4 + ]; + + /* + * Sequence of shifts used for the key schedule. + */ + var shifts =[ + 1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1 + ]; + + /* + * Permuted-choice 2, to pick out the bits from + * the CD array that generate the key schedule. + */ + var PC2_C = [ + 14,17,11,24, 1, 5, + 3,28,15, 6,21,10, + 23,19,12, 4,26, 8, + 16, 7,27,20,13, 2 + ]; + + var PC2_D = [ + 41,52,31,37,47,55, + 30,40,51,45,33,48, + 44,49,39,56,34,53, + 46,42,50,36,29,32 + ]; + + /* + * The C and D arrays used to calculate the key schedule. + */ + + var C = []; + var D = []; + /* + * The key schedule. + * Generated from the key. + */ + var KS = []; + for (var i = 0; i < 16; ++i) { + KS[i] = []; + } + + /* + * Set up the key schedule from the key. + */ + + function setkey(key) { + var i, j, k, t; + + /* + * First, generate C and D by permuting + * the key. The low order bit of each + * 8-bit char is not used, so C and D are only 28 + * bits apiece. + */ + for (i=0; i<28; i++) { + C[i] = key[PC1_C[i]-1]; + D[i] = key[PC1_D[i]-1]; + } + /* + * To generate Ki, rotate C and D according + * to schedule and pick up a permutation + * using PC2. + */ + for (i=0; i<16; i++) { + /* + * rotate. + */ + for (k=0; k>3)&1; + f[t+1] = (k>>2)&1; + f[t+2] = (k>>1)&1; + f[t+3] = (k>>0)&1; + } + /* + * The new R is L ^ f(R, K). + * The f here has to be permuted first, though. + */ + for (j=0; j<32; j++) + R[j] = L[j] ^ f[P[j]-1]; + /* + * Finally, the new L (the original R) + * is copied back. + */ + for (j=0; j<32; j++) + L[j] = tempL[j]; + } + /* + * The output L and R are reversed. + */ + for (j=0; j<32; j++) { + t = L[j]; + L[j] = R[j]; + R[j] = t; + } + /* + * The final output + * gets the inverse permutation of the very original. + */ + for (j=0; j<32; ++j) { + perm[j] = L[j]; + perm[j+32] = R[j]; + } + for (j=0; j<64; j++) { + block[j] = perm[FP[j]-1]; + } + } + + /** + * Transform a string to an array of bytes + */ + var strToBytes = function(str) { + var i, x = []; + for (i = 0; i < str.length; ++i) { + x[i] = str.charCodeAt(i); + } + return x + }; + + var bytesToStr = function(bytes) { + return String.fromCharCode.apply(String, bytes); + } + + return function crypt(pw, salt, returnBytes) { + if (typeof(pw) === 'string') pw = strToBytes(pw); + if (typeof(salt) === 'string') salt = strToBytes(salt); + + var i, j, k, c, temp; + var block = [], iobuf = []; + for(i=0; i<66; i++) + block[i] = 0; + for(i=0, k=0; (c= pw[k]) && i<64; ++k){ + for(j=0; j<7; j++, i++) + block[i] = (c>>(6-j)) & 1; + i++; + } + + setkey(block); + + for(i=0; i<66; i++) + block[i] = 0; + + for(i=0;i<48;i++) + E[i] = e[i]; + + for(i=0, k=0;i<2;i++, ++k){ + c = salt[k]; + iobuf[i] = c; + if(c>'Z'.charCodeAt(0)) c -= 6; + if(c>'9'.charCodeAt(0)) c -= 7; + c -= '.'.charCodeAt(0); + for(j=0;j<6;j++){ + if((c>>j) & 1){ + temp = E[6*i+j]; + E[6*i+j] = E[6*i+j+24]; + E[6*i+j+24] = temp; + } + } + } + + for(i=0; i<25; i++) + encrypt(block,0); + + for(i=0; i<11; i++){ + c = 0; + for(j=0; j<6; j++){ + c <<= 1; + c |= block[6*i+j]; + } + c += '.'.charCodeAt(0); + if(c>'9'.charCodeAt(0)) c += 7; + if(c>'Z'.charCodeAt(0)) c += 6; + iobuf[i+2] = c; + } + if(iobuf[1]==0) + iobuf[1] = iobuf[0]; + + if (returnBytes) return(iobuf); + else return bytesToStr(iobuf); + } +})(); + +if (typeof(module) !== "undefined" && module != null) { + module["exports"] = unixCryptTD; +} +if (typeof(window) !== "undefined" && window != null) { + window["unixCryptTD"] = unixCryptTD; +} diff --git a/front/frontend/node_modules/unix-crypt-td-js/test/test.js b/front/frontend/node_modules/unix-crypt-td-js/test/test.js new file mode 100644 index 0000000..938927f --- /dev/null +++ b/front/frontend/node_modules/unix-crypt-td-js/test/test.js @@ -0,0 +1,13 @@ +/** Tests for Unix Crypt **/ +let assert = require('assert'); +let unixCryptTD = require('../src/unix-crypt-td.js'); + +describe('unixCryptTD', function() { + it('should equal output of crypt(3)', function() { + assert.equal(unixCryptTD('foo', 'ba'), 'ba4TuD1iozTxw'); + assert.equal(unixCryptTD('random long string', 'hi'), 'hib8W/d4WOlU.'); + assert.equal(unixCryptTD('foob', 'ar'), 'arlEKn0OzVJn.'); + assert.equal(unixCryptTD('Hello World! This is Unix crypt(3)!', 'ux'), + 'uxNS5oJDUz4Sc'); + }); +}); diff --git a/front/frontend/node_modules/unix-crypt-td-js/unix-crypt-td.min.js b/front/frontend/node_modules/unix-crypt-td-js/unix-crypt-td.min.js new file mode 100644 index 0000000..fb56b1d --- /dev/null +++ b/front/frontend/node_modules/unix-crypt-td-js/unix-crypt-td.min.js @@ -0,0 +1,8 @@ +var z=function(){function x(e){var a,t=[];for(a=0;aw;++w)u[w]=[];var p=[],H=[32,1,2,3,4,5,4,5,6,7,8,9,8,9,10,11,12,13,12,13,14,15,16,17,16,17,18,19,20,21,20,21,22,23,24,25,24,25,26,27,28,29,28,29,30,31,32,1], +I=[[14,4,13,1,2,15,11,8,3,10,6,12,5,9,0,7,0,15,7,4,14,2,13,1,10,6,12,11,9,5,3,8,4,1,14,8,13,6,2,11,15,12,9,7,3,10,5,0,15,12,8,2,4,9,1,7,5,11,3,14,10,0,6,13],[15,1,8,14,6,11,3,4,9,7,2,13,12,0,5,10,3,13,4,7,15,2,8,14,12,0,1,10,6,9,11,5,0,14,7,11,10,4,13,1,5,8,12,6,9,3,2,15,13,8,10,1,3,15,4,2,11,6,7,12,0,5,14,9],[10,0,9,14,6,3,15,5,1,13,12,7,11,4,2,8,13,7,0,9,3,4,6,10,2,8,5,14,12,11,15,1,13,6,4,9,8,15,3,0,11,1,2,12,5,10,14,7,1,10,13,0,6,9,8,7,4,15,14,3,11,5,2,12],[7,13,14,3,0,6,9,10,1,2,8,5,11,12,4, +15,13,8,11,5,6,15,0,3,4,7,2,12,1,10,14,9,10,6,9,0,12,11,7,13,15,1,3,14,5,2,8,4,3,15,0,6,10,1,13,8,9,4,5,11,12,7,2,14],[2,12,4,1,7,10,11,6,8,5,3,15,13,0,14,9,14,11,2,12,4,7,13,1,5,0,15,10,3,9,8,6,4,2,1,11,10,13,7,8,15,9,12,5,6,3,0,14,11,8,12,7,1,14,2,13,6,15,0,9,10,4,5,3],[12,1,10,15,9,2,6,8,0,13,3,4,14,7,5,11,10,15,4,2,7,12,9,5,6,1,13,14,0,11,3,8,9,14,15,5,2,8,12,3,7,0,4,10,1,13,11,6,4,3,2,12,9,5,15,10,11,14,1,7,6,0,8,13],[4,11,2,14,15,0,8,13,3,12,9,7,5,10,6,1,13,0,11,7,4,9,1,10,14,3,5,12,2,15,8, +6,1,4,11,13,12,3,7,14,10,15,6,8,0,5,9,2,6,11,13,8,1,4,10,7,9,5,0,15,14,2,3,12],[13,2,8,4,6,15,11,1,10,9,3,14,5,0,12,7,1,15,13,8,10,3,7,4,12,5,6,11,0,14,9,2,7,11,4,1,9,12,14,2,0,6,10,13,15,3,5,8,2,1,14,7,4,10,8,13,15,12,9,0,3,5,6,11]],J=[16,7,20,21,29,12,28,17,1,15,23,26,5,18,31,10,2,8,24,14,32,27,3,9,19,13,30,6,22,11,4,25],q=[],g=[],y=[[]],r=[],h=[];return function(e,a,t){"string"===typeof e&&(e=x(e));"string"===typeof a&&(a=x(a));var b,c,f,d,k=[],l=[];for(b=0;66>b;b++)k[b]=0;for(f=b=0;(d=e[f])&& +64>b;++f){for(c=0;7>c;c++,b++)k[b]=d>>6-c&1;b++}for(b=0;28>b;b++)m[b]=k[C[b]-1],n[b]=k[D[b]-1];for(b=0;16>b;b++){for(f=0;fc;c++)m[c]=m[c+1];m[27]=d;d=n[0];for(c=0;27>c;c++)n[c]=n[c+1];n[27]=d}for(c=0;24>c;c++)u[b][c]=m[F[c]-1],u[b][c+24]=n[G[c]-28-1]}for(b=0;66>b;b++)k[b]=0;for(b=0;48>b;b++)p[b]=H[b];for(f=b=0;2>b;b++,++f)for(d=a[f],l[b]=d,90c;c++)d>>c&1&&(e=p[6*b+c],p[6*b+c]=p[6*b+c+24],p[6*b+c+24]=e);for(b=0;25>b;b++){f=k;d=[];for(a= +0;64>a;a++)d[a]=f[A[a]-1];for(a=0;32>a;++a)q[a]=d[a],g[a]=d[a+32];for(c=0;16>c;c++){e=c;for(a=0;32>a;a++)y[a]=g[a];for(a=0;48>a;a++)h[a]=g[p[a]-1]^u[e][a];for(a=0;8>a;a++){e=6*a;var v=I[a][(h[e]<<5)+(h[e+1]<<3)+(h[e+2]<<2)+(h[e+3]<<1)+(h[e+4]<<0)+(h[e+5]<<4)];e=4*a;r[e]=v>>3&1;r[e+1]=v>>2&1;r[e+2]=v>>1&1;r[e+3]=v>>0&1}for(a=0;32>a;a++)g[a]=q[a]^r[J[a]-1];for(a=0;32>a;a++)q[a]=y[a]}for(a=0;32>a;a++)e=q[a],q[a]=g[a],g[a]=e;for(a=0;32>a;++a)d[a]=q[a],d[a+32]=g[a];for(a=0;64>a;a++)f[a]=d[B[a]-1]}for(b= +0;11>b;b++){for(c=d=0;6>c;c++)d<<=1,d|=k[6*b+c];d+=46;57 + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/unpipe/README.md b/front/frontend/node_modules/unpipe/README.md new file mode 100644 index 0000000..e536ad2 --- /dev/null +++ b/front/frontend/node_modules/unpipe/README.md @@ -0,0 +1,43 @@ +# unpipe + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Unpipe a stream from all destinations. + +## Installation + +```sh +$ npm install unpipe +``` + +## API + +```js +var unpipe = require('unpipe') +``` + +### unpipe(stream) + +Unpipes all destinations from a given stream. With stream 2+, this is +equivalent to `stream.unpipe()`. When used with streams 1 style streams +(typically Node.js 0.8 and below), this module attempts to undo the +actions done in `stream.pipe(dest)`. + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/unpipe.svg +[npm-url]: https://npmjs.org/package/unpipe +[node-image]: https://img.shields.io/node/v/unpipe.svg +[node-url]: http://nodejs.org/download/ +[travis-image]: https://img.shields.io/travis/stream-utils/unpipe.svg +[travis-url]: https://travis-ci.org/stream-utils/unpipe +[coveralls-image]: https://img.shields.io/coveralls/stream-utils/unpipe.svg +[coveralls-url]: https://coveralls.io/r/stream-utils/unpipe?branch=master +[downloads-image]: https://img.shields.io/npm/dm/unpipe.svg +[downloads-url]: https://npmjs.org/package/unpipe diff --git a/front/frontend/node_modules/unpipe/index.js b/front/frontend/node_modules/unpipe/index.js new file mode 100644 index 0000000..15c3d97 --- /dev/null +++ b/front/frontend/node_modules/unpipe/index.js @@ -0,0 +1,69 @@ +/*! + * unpipe + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = unpipe + +/** + * Determine if there are Node.js pipe-like data listeners. + * @private + */ + +function hasPipeDataListeners(stream) { + var listeners = stream.listeners('data') + + for (var i = 0; i < listeners.length; i++) { + if (listeners[i].name === 'ondata') { + return true + } + } + + return false +} + +/** + * Unpipe a stream from all destinations. + * + * @param {object} stream + * @public + */ + +function unpipe(stream) { + if (!stream) { + throw new TypeError('argument stream is required') + } + + if (typeof stream.unpipe === 'function') { + // new-style + stream.unpipe() + return + } + + // Node.js 0.8 hack + if (!hasPipeDataListeners(stream)) { + return + } + + var listener + var listeners = stream.listeners('close') + + for (var i = 0; i < listeners.length; i++) { + listener = listeners[i] + + if (listener.name !== 'cleanup' && listener.name !== 'onclose') { + continue + } + + // invoke the listener + listener.call(stream) + } +} diff --git a/front/frontend/node_modules/unpipe/package.json b/front/frontend/node_modules/unpipe/package.json new file mode 100644 index 0000000..a2b7358 --- /dev/null +++ b/front/frontend/node_modules/unpipe/package.json @@ -0,0 +1,27 @@ +{ + "name": "unpipe", + "description": "Unpipe a stream from all destinations", + "version": "1.0.0", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "repository": "stream-utils/unpipe", + "devDependencies": { + "istanbul": "0.3.15", + "mocha": "2.2.5", + "readable-stream": "1.1.13" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + } +} diff --git a/front/frontend/node_modules/unset-value/LICENSE b/front/frontend/node_modules/unset-value/LICENSE new file mode 100644 index 0000000..ec85897 --- /dev/null +++ b/front/frontend/node_modules/unset-value/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/unset-value/README.md b/front/frontend/node_modules/unset-value/README.md new file mode 100644 index 0000000..f0fec3d --- /dev/null +++ b/front/frontend/node_modules/unset-value/README.md @@ -0,0 +1,131 @@ +# unset-value [![NPM version](https://img.shields.io/npm/v/unset-value.svg?style=flat)](https://www.npmjs.com/package/unset-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/unset-value.svg?style=flat)](https://npmjs.org/package/unset-value) [![NPM total downloads](https://img.shields.io/npm/dt/unset-value.svg?style=flat)](https://npmjs.org/package/unset-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/unset-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/unset-value) + +> Delete nested properties from an object using dot notation. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save unset-value +``` + +## Usage + +```js +var unset = require('unset-value'); + +var obj = {a: {b: {c: 'd', e: 'f'}}}; +unset(obj, 'a.b.c'); +console.log(obj); +//=> {a: {b: {e: 'f'}}}; +``` + +## Examples + +### Updates the object when a property is deleted + +```js +var obj = {a: 'b'}; +unset(obj, 'a'); +console.log(obj); +//=> {} +``` + +### Returns true when a property is deleted + +```js +unset({a: 'b'}, 'a') // true +``` + +### Returns `true` when a property does not exist + +This is consistent with `delete` behavior in that it does not +throw when a property does not exist. + +```js +unset({a: {b: {c: 'd'}}}, 'd') // true +``` + +### delete nested values + +```js +var one = {a: {b: {c: 'd'}}}; +unset(one, 'a.b'); +console.log(one); +//=> {a: {}} + +var two = {a: {b: {c: 'd'}}}; +unset(two, 'a.b.c'); +console.log(two); +//=> {a: {b: {}}} + +var three = {a: {b: {c: 'd', e: 'f'}}}; +unset(three, 'a.b.c'); +console.log(three); +//=> {a: {b: {e: 'f'}}} +``` + +### throws on invalid args + +```js +unset(); +// 'expected an object.' +``` + +## About + +### Related projects + +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.") +* [get-values](https://www.npmjs.com/package/get-values): Return an array of all values from the given object. | [homepage](https://github.com/jonschlinkert/get-values "Return an array of all values from the given object.") +* [omit-value](https://www.npmjs.com/package/omit-value): Omit properties from an object or deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/omit-value) | [homepage](https://github.com/jonschlinkert/omit-value "Omit properties from an object or deeply nested property of an object using object path notation.") +* [put-value](https://www.npmjs.com/package/put-value): Update only existing values from an object, works with dot notation paths like `a.b.c` and… [more](https://github.com/tunnckocore/put-value#readme) | [homepage](https://github.com/tunnckocore/put-value#readme "Update only existing values from an object, works with dot notation paths like `a.b.c` and support deep nesting.") +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.") +* [union-value](https://www.npmjs.com/package/union-value): Set an array of unique values as the property of an object. Supports setting deeply… [more](https://github.com/jonschlinkert/union-value) | [homepage](https://github.com/jonschlinkert/union-value "Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation.") +* [upsert-value](https://www.npmjs.com/package/upsert-value): Update or set nested values and any intermediaries with dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/doowb/upsert-value "Update or set nested values and any intermediaries with dot notation (`'a.b.c'`) paths.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 6 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 25, 2017._ \ No newline at end of file diff --git a/front/frontend/node_modules/unset-value/index.js b/front/frontend/node_modules/unset-value/index.js new file mode 100644 index 0000000..a919010 --- /dev/null +++ b/front/frontend/node_modules/unset-value/index.js @@ -0,0 +1,32 @@ +/*! + * unset-value + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); +var has = require('has-value'); + +module.exports = function unset(obj, prop) { + if (!isObject(obj)) { + throw new TypeError('expected an object.'); + } + if (obj.hasOwnProperty(prop)) { + delete obj[prop]; + return true; + } + + if (has(obj, prop)) { + var segs = prop.split('.'); + var last = segs.pop(); + while (segs.length && segs[segs.length - 1].slice(-1) === '\\') { + last = segs.pop().slice(0, -1) + '.' + last; + } + while (segs.length) obj = obj[prop = segs.shift()]; + return (delete obj[last]); + } + return true; +}; diff --git a/front/frontend/node_modules/unset-value/node_modules/has-value/LICENSE b/front/frontend/node_modules/unset-value/node_modules/has-value/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/front/frontend/node_modules/unset-value/node_modules/has-value/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/unset-value/node_modules/has-value/README.md b/front/frontend/node_modules/unset-value/node_modules/has-value/README.md new file mode 100644 index 0000000..a927633 --- /dev/null +++ b/front/frontend/node_modules/unset-value/node_modules/has-value/README.md @@ -0,0 +1,130 @@ +# has-value [![NPM version](https://img.shields.io/npm/v/has-value.svg?style=flat)](https://www.npmjs.com/package/has-value) [![NPM downloads](https://img.shields.io/npm/dm/has-value.svg?style=flat)](https://npmjs.org/package/has-value) [![Build Status](https://img.shields.io/travis/jonschlinkert/has-value.svg?style=flat)](https://travis-ci.org/jonschlinkert/has-value) + +> Returns true if a value exists, false if empty. Works with deeply nested values using object paths. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install has-value --save +``` + +**Works for:** + +* booleans +* functions +* numbers (pass `true` as the last arg to treat zero as a value instead of falsey) +* strings +* nulls +* object +* arrays + +## Usage + +Works with nested object paths or a single value: + +```js +var hasValue = require('has-value'); + +hasValue({a: {b: {c: 'foo'}}} 'a.b.c'); +//=> true + +hasValue('a'); +//=> true + +hasValue(''); +//=> false + +hasValue(1); +//=> true + +hasValue(0); +//=> false + +hasValue(0, true); // pass `true` as the last arg to treat zero as a value +//=> true + +hasValue({a: 'a'}}); +//=> true + +hasValue({}}); +//=> false + +hasValue(['a']); +//=> true + +hasValue([]); +//=> false + +hasValue(function(foo) {}); // function length/arity +//=> true + +hasValue(function() {}); +//=> false + +hasValue(true); +hasValue(false); +//=> true +``` + +## isEmpty + +To do the opposite and test for empty values, do: + +```js +function isEmpty(o, isZero) { + return !hasValue.apply(hasValue, arguments); +} +``` + +## Related projects + +You might also be interested in these projects: + +* [get-object](https://www.npmjs.com/package/get-object): Get a property from an object using dot (object path) notation. | [homepage](https://github.com/jonschlinkert/get-object) +* [get-property](https://www.npmjs.com/package/get-property): Get a nested property or its value from an object using simple `a.b.c` paths. | [homepage](https://github.com/jonschlinkert/get-property) +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value) +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/has-value/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/has-value/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v, on March 27, 2016._ \ No newline at end of file diff --git a/front/frontend/node_modules/unset-value/node_modules/has-value/index.js b/front/frontend/node_modules/unset-value/node_modules/has-value/index.js new file mode 100644 index 0000000..90687c8 --- /dev/null +++ b/front/frontend/node_modules/unset-value/node_modules/has-value/index.js @@ -0,0 +1,19 @@ +/*! + * has-value + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); +var hasValues = require('has-values'); +var get = require('get-value'); + +module.exports = function(obj, prop, noZero) { + if (isObject(obj)) { + return hasValues(get(obj, prop), noZero); + } + return hasValues(obj, prop); +}; diff --git a/front/frontend/node_modules/unset-value/node_modules/has-value/node_modules/isobject/LICENSE b/front/frontend/node_modules/unset-value/node_modules/has-value/node_modules/isobject/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/front/frontend/node_modules/unset-value/node_modules/has-value/node_modules/isobject/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/unset-value/node_modules/has-value/node_modules/isobject/README.md b/front/frontend/node_modules/unset-value/node_modules/has-value/node_modules/isobject/README.md new file mode 100644 index 0000000..9dd897a --- /dev/null +++ b/front/frontend/node_modules/unset-value/node_modules/has-value/node_modules/isobject/README.md @@ -0,0 +1,112 @@ +# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat)](https://travis-ci.org/jonschlinkert/isobject) + +Returns true if the value is an object and not an array or null. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install isobject --save +``` + +Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install isobject +``` + +Install with [bower](http://bower.io/) + +```sh +$ bower install isobject +``` + +## Usage + +```js +var isObject = require('isobject'); +``` + +**True** + +All of the following return `true`: + +```js +isObject({}); +isObject(Object.create({})); +isObject(Object.create(Object.prototype)); +isObject(Object.create(null)); +isObject({}); +isObject(new Foo); +isObject(/foo/); +``` + +**False** + +All of the following return `false`: + +```js +isObject(); +isObject(function () {}); +isObject(1); +isObject([]); +isObject(undefined); +isObject(null); +``` + +## Related projects + +You might also be interested in these projects: + +[merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep) + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow) +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object) +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/isobject/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/isobject/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 25, 2016._ \ No newline at end of file diff --git a/front/frontend/node_modules/unset-value/node_modules/has-value/node_modules/isobject/index.js b/front/frontend/node_modules/unset-value/node_modules/has-value/node_modules/isobject/index.js new file mode 100644 index 0000000..aa0dce0 --- /dev/null +++ b/front/frontend/node_modules/unset-value/node_modules/has-value/node_modules/isobject/index.js @@ -0,0 +1,14 @@ +/*! + * isobject + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isArray = require('isarray'); + +module.exports = function isObject(val) { + return val != null && typeof val === 'object' && isArray(val) === false; +}; diff --git a/front/frontend/node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json b/front/frontend/node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json new file mode 100644 index 0000000..954f411 --- /dev/null +++ b/front/frontend/node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json @@ -0,0 +1,67 @@ +{ + "name": "isobject", + "description": "Returns true if the value is an object and not an array or null.", + "version": "2.1.0", + "homepage": "https://github.com/jonschlinkert/isobject", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/isobject", + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "isarray": "1.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "verb": { + "related": { + "list": [ + "merge-deep", + "extend-shallow", + "is-plain-object", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/front/frontend/node_modules/unset-value/node_modules/has-value/package.json b/front/frontend/node_modules/unset-value/node_modules/has-value/package.json new file mode 100644 index 0000000..88ff6ed --- /dev/null +++ b/front/frontend/node_modules/unset-value/node_modules/has-value/package.json @@ -0,0 +1,81 @@ +{ + "name": "has-value", + "version": "0.3.1", + "description": "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.", + "homepage": "https://github.com/jonschlinkert/has-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/has-value", + "bugs": { + "url": "https://github.com/jonschlinkert/has-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.7", + "mocha": "^2.4.5" + }, + "keywords": [ + "array", + "boolean", + "empty", + "find", + "function", + "has", + "hasOwn", + "javascript", + "js", + "key", + "keys", + "node.js", + "null", + "number", + "object", + "properties", + "property", + "string", + "type", + "util", + "utilities", + "utility", + "value" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "get-object", + "get-property", + "get-value", + "set-value" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/unset-value/node_modules/has-values/LICENSE b/front/frontend/node_modules/unset-value/node_modules/has-values/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/front/frontend/node_modules/unset-value/node_modules/has-values/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/unset-value/node_modules/has-values/README.md b/front/frontend/node_modules/unset-value/node_modules/has-values/README.md new file mode 100644 index 0000000..13319c5 --- /dev/null +++ b/front/frontend/node_modules/unset-value/node_modules/has-values/README.md @@ -0,0 +1,114 @@ +# has-values [![NPM version](https://img.shields.io/npm/v/has-values.svg?style=flat)](https://www.npmjs.com/package/has-values) [![NPM downloads](https://img.shields.io/npm/dm/has-values.svg?style=flat)](https://npmjs.org/package/has-values) [![Build Status](https://img.shields.io/travis/jonschlinkert/has-values.svg?style=flat)](https://travis-ci.org/jonschlinkert/has-values) + +> Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install has-values --save +``` + +## Usage + +```js +var hasValue = require('has-values'); + +hasValue('a'); +//=> true + +hasValue(''); +//=> false + +hasValue(1); +//=> true + +hasValue(0); +//=> false + +hasValue(0, true); // treat zero as a value +//=> true + +hasValue({a: 'a'}}); +//=> true + +hasValue({}}); +//=> false + +hasValue(['a']); +//=> true + +hasValue([]); +//=> false + +hasValue(function(foo) {}); // function length/arity +//=> true + +hasValue(function() {}); +//=> false + +hasValue(true); +hasValue(false); +//=> true +``` + +## isEmpty + +To test for empty values, do: + +```js +function isEmpty(o, isZero) { + return !hasValue(o, isZero); +} +``` + +## Related projects + +You might also be interested in these projects: + +* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://www.npmjs.com/package/has-value) | [homepage](https://github.com/jonschlinkert/has-value) +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object) +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/has-values/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/has-values/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v, on March 27, 2016._ \ No newline at end of file diff --git a/front/frontend/node_modules/unset-value/node_modules/has-values/index.js b/front/frontend/node_modules/unset-value/node_modules/has-values/index.js new file mode 100644 index 0000000..6d04ba1 --- /dev/null +++ b/front/frontend/node_modules/unset-value/node_modules/has-values/index.js @@ -0,0 +1,36 @@ +/*! + * has-values + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function hasValue(o, noZero) { + if (o === null || o === undefined) { + return false; + } + + if (typeof o === 'boolean') { + return true; + } + + if (typeof o === 'number') { + if (o === 0 && noZero === true) { + return false; + } + return true; + } + + if (o.length !== undefined) { + return o.length !== 0; + } + + for (var key in o) { + if (o.hasOwnProperty(key)) { + return true; + } + } + return false; +}; diff --git a/front/frontend/node_modules/unset-value/node_modules/has-values/package.json b/front/frontend/node_modules/unset-value/node_modules/has-values/package.json new file mode 100644 index 0000000..519a2c8 --- /dev/null +++ b/front/frontend/node_modules/unset-value/node_modules/has-values/package.json @@ -0,0 +1,75 @@ +{ + "name": "has-values", + "version": "0.1.4", + "description": "Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays. ", + "homepage": "https://github.com/jonschlinkert/has-values", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/has-values", + "bugs": { + "url": "https://github.com/jonschlinkert/has-values/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.7", + "mocha": "^2.4.5" + }, + "keywords": [ + "array", + "boolean", + "empty", + "find", + "function", + "has", + "hasOwn", + "javascript", + "js", + "key", + "keys", + "node.js", + "null", + "number", + "object", + "properties", + "property", + "string", + "type", + "util", + "utilities", + "utility", + "value" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-value", + "isobject", + "is-plain-object" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/unset-value/package.json b/front/frontend/node_modules/unset-value/package.json new file mode 100644 index 0000000..0753ba6 --- /dev/null +++ b/front/frontend/node_modules/unset-value/package.json @@ -0,0 +1,71 @@ +{ + "name": "unset-value", + "description": "Delete nested properties from an object using dot notation.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/unset-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + " (https://github.com/wtgtybhertgeghgtwtg)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/unset-value", + "bugs": { + "url": "https://github.com/jonschlinkert/unset-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "*", + "should": "*" + }, + "keywords": [ + "del", + "delete", + "key", + "object", + "omit", + "prop", + "property", + "remove", + "unset", + "value" + ], + "verb": { + "related": { + "list": [ + "get-value", + "get-values", + "omit-value", + "put-value", + "set-value", + "union-value", + "upsert-value" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/upath/LICENSE b/front/frontend/node_modules/upath/LICENSE new file mode 100644 index 0000000..77fab24 --- /dev/null +++ b/front/frontend/node_modules/upath/LICENSE @@ -0,0 +1,22 @@ +Copyright(c) 2014-2019 Angelos Pikoulas (agelos.pikoulas@gmail.com) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/upath/build/code/upath.js b/front/frontend/node_modules/upath/build/code/upath.js new file mode 100644 index 0000000..f0949e1 --- /dev/null +++ b/front/frontend/node_modules/upath/build/code/upath.js @@ -0,0 +1,171 @@ +/** +* upath http://github.com/anodynos/upath/ +* +* A proxy to `path`, replacing `\` with `/` for all results & new methods to normalize & join keeping leading `./` and add, change, default, trim file extensions. +* Version 1.2.0 - Compiled on 2019-09-02 23:33:57 +* Repository git://github.com/anodynos/upath +* Copyright(c) 2019 Angelos Pikoulas +* License MIT +*/ + +// Generated by uRequire v0.7.0-beta.33 target: 'lib' template: 'nodejs' + + +var VERSION = '1.2.0'; // injected by urequire-rc-inject-version + +var extraFn, extraFunctions, isFunction, isString, isValidExt, name, path, propName, propValue, toUnix, upath, slice = [].slice, indexOf = [].indexOf || function (item) { + for (var i = 0, l = this.length; i < l; i++) { + if (i in this && this[i] === item) + return i; + } + return -1; + }, hasProp = {}.hasOwnProperty; +path = require("path"); +isFunction = function (val) { + return val instanceof Function; +}; +isString = function (val) { + return typeof val === "string" || !!val && typeof val === "object" && Object.prototype.toString.call(val) === "[object String]"; +}; +upath = exports; +upath.VERSION = typeof VERSION !== "undefined" && VERSION !== null ? VERSION : "NO-VERSION"; +toUnix = function (p) { + var double; + p = p.replace(/\\/g, "/"); + double = /\/\//; + while (p.match(double)) { + p = p.replace(double, "/"); + } + return p; +}; +for (propName in path) { + propValue = path[propName]; + if (isFunction(propValue)) { + upath[propName] = function (propName) { + return function () { + var args, result; + args = 1 <= arguments.length ? slice.call(arguments, 0) : []; + args = args.map(function (p) { + if (isString(p)) { + return toUnix(p); + } else { + return p; + } + }); + result = path[propName].apply(path, args); + if (isString(result)) { + return toUnix(result); + } else { + return result; + } + }; + }(propName); + } else { + upath[propName] = propValue; + } +} +upath.sep = "/"; +extraFunctions = { + toUnix: toUnix, + normalizeSafe: function (p) { + p = toUnix(p); + if (p.startsWith("./")) { + if (p.startsWith("./..") || p === "./") { + return upath.normalize(p); + } else { + return "./" + upath.normalize(p); + } + } else { + return upath.normalize(p); + } + }, + normalizeTrim: function (p) { + p = upath.normalizeSafe(p); + if (p.endsWith("/")) { + return p.slice(0, +(p.length - 2) + 1 || 9000000000); + } else { + return p; + } + }, + joinSafe: function () { + var p, result; + p = 1 <= arguments.length ? slice.call(arguments, 0) : []; + result = upath.join.apply(null, p); + if (p[0].startsWith("./") && !result.startsWith("./")) { + result = "./" + result; + } + return result; + }, + addExt: function (file, ext) { + if (!ext) { + return file; + } else { + if (ext[0] !== ".") { + ext = "." + ext; + } + return file + (file.endsWith(ext) ? "" : ext); + } + }, + trimExt: function (filename, ignoreExts, maxSize) { + var oldExt; + if (maxSize == null) { + maxSize = 7; + } + oldExt = upath.extname(filename); + if (isValidExt(oldExt, ignoreExts, maxSize)) { + return filename.slice(0, +(filename.length - oldExt.length - 1) + 1 || 9000000000); + } else { + return filename; + } + }, + removeExt: function (filename, ext) { + if (!ext) { + return filename; + } else { + ext = ext[0] === "." ? ext : "." + ext; + if (upath.extname(filename) === ext) { + return upath.trimExt(filename); + } else { + return filename; + } + } + }, + changeExt: function (filename, ext, ignoreExts, maxSize) { + if (maxSize == null) { + maxSize = 7; + } + return upath.trimExt(filename, ignoreExts, maxSize) + (!ext ? "" : ext[0] === "." ? ext : "." + ext); + }, + defaultExt: function (filename, ext, ignoreExts, maxSize) { + var oldExt; + if (maxSize == null) { + maxSize = 7; + } + oldExt = upath.extname(filename); + if (isValidExt(oldExt, ignoreExts, maxSize)) { + return filename; + } else { + return upath.addExt(filename, ext); + } + } +}; +isValidExt = function (ext, ignoreExts, maxSize) { + if (ignoreExts == null) { + ignoreExts = []; + } + return ext && ext.length <= maxSize && indexOf.call(ignoreExts.map(function (e) { + return (e && e[0] !== "." ? "." : "") + e; + }), ext) < 0; +}; +for (name in extraFunctions) { + if (!hasProp.call(extraFunctions, name)) + continue; + extraFn = extraFunctions[name]; + if (upath[name] !== void 0) { + throw new Error("path." + name + " already exists."); + } else { + upath[name] = extraFn; + } +} + +; \ No newline at end of file diff --git a/front/frontend/node_modules/upath/package.json b/front/frontend/node_modules/upath/package.json new file mode 100644 index 0000000..38f605b --- /dev/null +++ b/front/frontend/node_modules/upath/package.json @@ -0,0 +1,60 @@ +{ + "name": "upath", + "description": "A proxy to `path`, replacing `\\` with `/` for all results & new methods to normalize & join keeping leading `./` and add, change, default, trim file extensions.", + "version": "1.2.0", + "homepage": "http://github.com/anodynos/upath/", + "author": { + "name": "Angelos Pikoulas", + "email": "agelos.pikoulas@gmail.com" + }, + "license": "MIT", + "keywords": [ + "path", + "unix", + "windows", + "extension", + "file extension", + "replace extension", + "change extension", + "trim extension", + "add extension", + "default extension" + ], + "repository": { + "type": "git", + "url": "git://github.com/anodynos/upath" + }, + "bugs": { + "url": "http://github.com/anodynos/upath/issues", + "email": "agelos.pikoulas@gmail.com" + }, + "main": "./build/code/upath.js", + "types": "./upath.d.ts", + "preferGlobal": false, + "scripts": { + "test": "grunt", + "build": "grunt lib" + }, + "directories": { + "doc": "./doc", + "dist": "./build" + }, + "engines": { + "node": ">=4", + "yarn": "*" + }, + "devDependencies": { + "chai": "~4.0.2", + "coffee-script": "1.12.6", + "grunt": "0.4.5", + "grunt-contrib-watch": "^1.1.0", + "grunt-urequire": "0.7.x", + "lodash": "^4.17.15", + "mocha": "~3.4.2", + "uberscore": "0.0.19", + "underscore.string": "^3.3.5", + "urequire": "0.7.0-beta.33", + "urequire-ab-specrunner": "^0.2.5", + "urequire-rc-inject-version": "^0.1.6" + } +} diff --git a/front/frontend/node_modules/upath/readme.md b/front/frontend/node_modules/upath/readme.md new file mode 100644 index 0000000..21bd958 --- /dev/null +++ b/front/frontend/node_modules/upath/readme.md @@ -0,0 +1,342 @@ +# upath v1.2.0 + +[![Build Status](https://travis-ci.org/anodynos/upath.svg?branch=master)](https://travis-ci.org/anodynos/upath) +[![Up to date Status](https://david-dm.org/anodynos/upath.png)](https://david-dm.org/anodynos/upath) + +A drop-in replacement / proxy to nodejs's `path` that: + + * Replaces the windows `\` with the unix `/` in all string params & results. This has significant positives - see below. + + * Adds **filename extensions** functions `addExt`, `trimExt`, `removeExt`, `changeExt`, and `defaultExt`. + + * Add a `normalizeSafe` function to preserve any meaningful leading `./` & a `normalizeTrim` which additionally trims any useless ending `/`. + + * Plus a helper `toUnix` that simply converts `\` to `/` and consolidates duplicates. + +**Useful note: these docs are actually auto generated from [specs](https://github.com/anodynos/upath/blob/master/source/spec/upath-spec.coffee), running on Linux.** + +Notes: + + * `upath.sep` is set to `'/'` for seamless replacement (as of 1.0.3). + + * upath has no runtime dependencies, except built-in `path` (as of 1.0.4) + + * travis-ci tested in node versions 4 to 12 + + +## Why ? + +Normal `path` doesn't convert paths to a unified format (ie `/`) before calculating paths (`normalize`, `join`), which can lead to numerous problems. +Also path joining, normalization etc on the two formats is not consistent, depending on where it runs. Running `path` on Windows yields different results than when it runs on Linux / Mac. + +In general, if you code your paths logic while developing on Unix/Mac and it runs on Windows, you may run into problems when using `path`. + +Note that using **Unix `/` on Windows** works perfectly inside nodejs (and other languages), so there's no reason to stick to the Windows legacy at all. + +##### Examples / specs + + +Check out the different (improved) behavior to vanilla `path`: + + `upath.normalize(path)` --returns--> + + ✓ `'c:/windows/nodejs/path'` ---> `'c:/windows/nodejs/path'` // equal to `path.normalize()` + ✓ `'c:/windows/../nodejs/path'` ---> `'c:/nodejs/path'` // equal to `path.normalize()` + ✓ `'c:\\windows\\nodejs\\path'` ---> `'c:/windows/nodejs/path'` // `path.normalize()` gives `'c:\windows\nodejs\path'` + ✓ `'c:\\windows\\..\\nodejs\\path'` ---> `'c:/nodejs/path'` // `path.normalize()` gives `'c:\windows\..\nodejs\path'` + ✓ `'//windows\\unix/mixed'` ---> `'/windows/unix/mixed'` // `path.normalize()` gives `'/windows\unix/mixed'` + ✓ `'\\windows//unix/mixed'` ---> `'/windows/unix/mixed'` // `path.normalize()` gives `'\windows/unix/mixed'` + ✓ `'////\\windows\\..\\unix/mixed/'` ---> `'/unix/mixed/'` // `path.normalize()` gives `'/\windows\..\unix/mixed/'` + + +Joining paths can also be a problem: + + `upath.join(paths...)` --returns--> + + ✓ `'some/nodejs/deep', '../path'` ---> `'some/nodejs/path'` // equal to `path.join()` + ✓ `'some/nodejs\\windows', '../path'` ---> `'some/nodejs/path'` // `path.join()` gives `'some/path'` + ✓ `'some\\windows\\only', '..\\path'` ---> `'some/windows/path'` // `path.join()` gives `'some\windows\only/..\path'` + + +Parsing with `path.parse()` should also be consistent across OSes: + + `upath.parse(path)` --returns--> + + ✓ `'c:\Windows\Directory\somefile.ext'` ---> `{ root: '', dir: 'c:/Windows/Directory', base: 'somefile.ext', ext: '.ext', name: 'somefile' }` + // `path.parse()` gives `'{ root: '', dir: '', base: 'c:\\Windows\\Directory\\somefile.ext', ext: '.ext', name: 'c:\\Windows\\Directory\\somefile' }'` + ✓ `'/root/of/unix/somefile.ext'` ---> `{ root: '/', dir: '/root/of/unix', base: 'somefile.ext', ext: '.ext', name: 'somefile' }` // equal to `path.parse()` + + +## Added functions + + +#### `upath.toUnix(path)` + +Just converts all `` to `/` and consolidates duplicates, without performing any normalization. + +##### Examples / specs + + `upath.toUnix(path)` --returns--> + + ✓ `'.//windows\//unix//mixed////'` ---> `'./windows/unix/mixed/'` + ✓ `'..///windows\..\\unix/mixed'` ---> `'../windows/../unix/mixed'` + + +#### `upath.normalizeSafe(path)` + +Exactly like `path.normalize(path)`, but it keeps the first meaningful `./`. + +Note that the unix `/` is returned everywhere, so windows `\` is always converted to unix `/`. + +##### Examples / specs & how it differs from vanilla `path` + + `upath.normalizeSafe(path)` --returns--> + + ✓ `''` ---> `'.'` // equal to `path.normalize()` + ✓ `'.'` ---> `'.'` // equal to `path.normalize()` + ✓ `'./'` ---> `'./'` // equal to `path.normalize()` + ✓ `'.//'` ---> `'./'` // equal to `path.normalize()` + ✓ `'.\\'` ---> `'./'` // `path.normalize()` gives `'.\'` + ✓ `'.\\//'` ---> `'./'` // `path.normalize()` gives `'.\/'` + ✓ `'./..'` ---> `'..'` // equal to `path.normalize()` + ✓ `'.//..'` ---> `'..'` // equal to `path.normalize()` + ✓ `'./../'` ---> `'../'` // equal to `path.normalize()` + ✓ `'.\\..\\'` ---> `'../'` // `path.normalize()` gives `'.\..\'` + ✓ `'./../dep'` ---> `'../dep'` // equal to `path.normalize()` + ✓ `'../dep'` ---> `'../dep'` // equal to `path.normalize()` + ✓ `'../path/dep'` ---> `'../path/dep'` // equal to `path.normalize()` + ✓ `'../path/../dep'` ---> `'../dep'` // equal to `path.normalize()` + ✓ `'dep'` ---> `'dep'` // equal to `path.normalize()` + ✓ `'path//dep'` ---> `'path/dep'` // equal to `path.normalize()` + ✓ `'./dep'` ---> `'./dep'` // `path.normalize()` gives `'dep'` + ✓ `'./path/dep'` ---> `'./path/dep'` // `path.normalize()` gives `'path/dep'` + ✓ `'./path/../dep'` ---> `'./dep'` // `path.normalize()` gives `'dep'` + ✓ `'.//windows\\unix/mixed/'` ---> `'./windows/unix/mixed/'` // `path.normalize()` gives `'windows\unix/mixed/'` + ✓ `'..//windows\\unix/mixed'` ---> `'../windows/unix/mixed'` // `path.normalize()` gives `'../windows\unix/mixed'` + ✓ `'windows\\unix/mixed/'` ---> `'windows/unix/mixed/'` // `path.normalize()` gives `'windows\unix/mixed/'` + ✓ `'..//windows\\..\\unix/mixed'` ---> `'../unix/mixed'` // `path.normalize()` gives `'../windows\..\unix/mixed'` + + +#### `upath.normalizeTrim(path)` + +Exactly like `path.normalizeSafe(path)`, but it trims any useless ending `/`. + +##### Examples / specs + + `upath.normalizeTrim(path)` --returns--> + + ✓ `'./'` ---> `'.'` // `upath.normalizeSafe()` gives `'./'` + ✓ `'./../'` ---> `'..'` // `upath.normalizeSafe()` gives `'../'` + ✓ `'./../dep/'` ---> `'../dep'` // `upath.normalizeSafe()` gives `'../dep/'` + ✓ `'path//dep\\'` ---> `'path/dep'` // `upath.normalizeSafe()` gives `'path/dep/'` + ✓ `'.//windows\\unix/mixed/'` ---> `'./windows/unix/mixed'` // `upath.normalizeSafe()` gives `'./windows/unix/mixed/'` + + +#### `upath.joinSafe([path1][, path2][, ...])` + +Exactly like `path.join()`, but it keeps the first meaningful `./`. + +Note that the unix `/` is returned everywhere, so windows `\` is always converted to unix `/`. + +##### Examples / specs & how it differs from vanilla `path` + + `upath.joinSafe(path)` --returns--> + + ✓ `'some/nodejs/deep', '../path'` ---> `'some/nodejs/path'` // equal to `path.join()` + ✓ `'./some/local/unix/', '../path'` ---> `'./some/local/path'` // `path.join()` gives `'some/local/path'` + ✓ `'./some\\current\\mixed', '..\\path'` ---> `'./some/current/path'` // `path.join()` gives `'some\current\mixed/..\path'` + ✓ `'../some/relative/destination', '..\\path'` ---> `'../some/relative/path'` // `path.join()` gives `'../some/relative/destination/..\path'` + + +## Added functions for *filename extension* manipulation. + +**Happy notes:** + + In all functions you can: + + * use both `.ext` & `ext` - the dot `.` on the extension is always adjusted correctly. + + * omit the `ext` param (pass null/undefined/empty string) and the common sense thing will happen. + + * ignore specific extensions from being considered as valid ones (eg `.min`, `.dev` `.aLongExtIsNotAnExt` etc), hence no trimming or replacement takes place on them. + + + +#### `upath.addExt(filename, [ext])` + +Adds `.ext` to `filename`, but only if it doesn't already have the exact extension. + +##### Examples / specs + + `upath.addExt(filename, 'js')` --returns--> + + ✓ `'myfile/addExt'` ---> `'myfile/addExt.js'` + ✓ `'myfile/addExt.txt'` ---> `'myfile/addExt.txt.js'` + ✓ `'myfile/addExt.js'` ---> `'myfile/addExt.js'` + ✓ `'myfile/addExt.min.'` ---> `'myfile/addExt.min..js'` + + +It adds nothing if no `ext` param is passed. + + `upath.addExt(filename)` --returns--> + + ✓ `'myfile/addExt'` ---> `'myfile/addExt'` + ✓ `'myfile/addExt.txt'` ---> `'myfile/addExt.txt'` + ✓ `'myfile/addExt.js'` ---> `'myfile/addExt.js'` + ✓ `'myfile/addExt.min.'` ---> `'myfile/addExt.min.'` + + +#### `upath.trimExt(filename, [ignoreExts], [maxSize=7])` + +Trims a filename's extension. + + * Extensions are considered to be up to `maxSize` chars long, counting the dot (defaults to 7). + + * An `Array` of `ignoreExts` (eg `['.min']`) prevents these from being considered as extension, thus are not trimmed. + +##### Examples / specs + + `upath.trimExt(filename)` --returns--> + + ✓ `'my/trimedExt.txt'` ---> `'my/trimedExt'` + ✓ `'my/trimedExt'` ---> `'my/trimedExt'` + ✓ `'my/trimedExt.min'` ---> `'my/trimedExt'` + ✓ `'my/trimedExt.min.js'` ---> `'my/trimedExt.min'` + ✓ `'../my/trimedExt.longExt'` ---> `'../my/trimedExt.longExt'` + + +It is ignoring `.min` & `.dev` as extensions, and considers exts with up to 8 chars. + + `upath.trimExt(filename, ['min', '.dev'], 8)` --returns--> + + ✓ `'my/trimedExt.txt'` ---> `'my/trimedExt'` + ✓ `'my/trimedExt.min'` ---> `'my/trimedExt.min'` + ✓ `'my/trimedExt.dev'` ---> `'my/trimedExt.dev'` + ✓ `'../my/trimedExt.longExt'` ---> `'../my/trimedExt'` + ✓ `'../my/trimedExt.longRExt'` ---> `'../my/trimedExt.longRExt'` + + +#### `upath.removeExt(filename, ext)` + +Removes the specific `ext` extension from filename, if it has it. Otherwise it leaves it as is. +As in all upath functions, it be `.ext` or `ext`. + +##### Examples / specs + + `upath.removeExt(filename, '.js')` --returns--> + + ✓ `'removedExt.js'` ---> `'removedExt'` + ✓ `'removedExt.txt.js'` ---> `'removedExt.txt'` + ✓ `'notRemoved.txt'` ---> `'notRemoved.txt'` + +It does not care about the length of exts. + + `upath.removeExt(filename, '.longExt')` --returns--> + + ✓ `'removedExt.longExt'` ---> `'removedExt'` + ✓ `'removedExt.txt.longExt'` ---> `'removedExt.txt'` + ✓ `'notRemoved.txt'` ---> `'notRemoved.txt'` + + +#### `upath.changeExt(filename, [ext], [ignoreExts], [maxSize=7])` + +Changes a filename's extension to `ext`. If it has no (valid) extension, it adds it. + + * Valid extensions are considered to be up to `maxSize` chars long, counting the dot (defaults to 7). + + * An `Array` of `ignoreExts` (eg `['.min']`) prevents these from being considered as extension, thus are not changed - the new extension is added instead. + +##### Examples / specs + + `upath.changeExt(filename, '.js')` --returns--> + + ✓ `'my/module.min'` ---> `'my/module.js'` + ✓ `'my/module.coffee'` ---> `'my/module.js'` + ✓ `'my/module'` ---> `'my/module.js'` + ✓ `'file/withDot.'` ---> `'file/withDot.js'` + ✓ `'file/change.longExt'` ---> `'file/change.longExt.js'` + + +If no `ext` param is given, it trims the current extension (if any). + + `upath.changeExt(filename)` --returns--> + + ✓ `'my/module.min'` ---> `'my/module'` + ✓ `'my/module.coffee'` ---> `'my/module'` + ✓ `'my/module'` ---> `'my/module'` + ✓ `'file/withDot.'` ---> `'file/withDot'` + ✓ `'file/change.longExt'` ---> `'file/change.longExt'` + + +It is ignoring `.min` & `.dev` as extensions, and considers exts with up to 8 chars. + + `upath.changeExt(filename, 'js', ['min', '.dev'], 8)` --returns--> + + ✓ `'my/module.coffee'` ---> `'my/module.js'` + ✓ `'file/notValidExt.min'` ---> `'file/notValidExt.min.js'` + ✓ `'file/notValidExt.dev'` ---> `'file/notValidExt.dev.js'` + ✓ `'file/change.longExt'` ---> `'file/change.js'` + ✓ `'file/change.longRExt'` ---> `'file/change.longRExt.js'` + + +#### `upath.defaultExt(filename, [ext], [ignoreExts], [maxSize=7])` + +Adds `.ext` to `filename`, only if it doesn't already have _any_ *old* extension. + + * (Old) extensions are considered to be up to `maxSize` chars long, counting the dot (defaults to 7). + + * An `Array` of `ignoreExts` (eg `['.min']`) will force adding default `.ext` even if one of these is present. + +##### Examples / specs + + `upath.defaultExt(filename, 'js')` --returns--> + + ✓ `'fileWith/defaultExt'` ---> `'fileWith/defaultExt.js'` + ✓ `'fileWith/defaultExt.js'` ---> `'fileWith/defaultExt.js'` + ✓ `'fileWith/defaultExt.min'` ---> `'fileWith/defaultExt.min'` + ✓ `'fileWith/defaultExt.longExt'` ---> `'fileWith/defaultExt.longExt.js'` + + +If no `ext` param is passed, it leaves filename intact. + + `upath.defaultExt(filename)` --returns--> + + ✓ `'fileWith/defaultExt'` ---> `'fileWith/defaultExt'` + ✓ `'fileWith/defaultExt.js'` ---> `'fileWith/defaultExt.js'` + ✓ `'fileWith/defaultExt.min'` ---> `'fileWith/defaultExt.min'` + ✓ `'fileWith/defaultExt.longExt'` ---> `'fileWith/defaultExt.longExt'` + + +It is ignoring `.min` & `.dev` as extensions, and considers exts with up to 8 chars. + + `upath.defaultExt(filename, 'js', ['min', '.dev'], 8)` --returns--> + + ✓ `'fileWith/defaultExt'` ---> `'fileWith/defaultExt.js'` + ✓ `'fileWith/defaultExt.min'` ---> `'fileWith/defaultExt.min.js'` + ✓ `'fileWith/defaultExt.dev'` ---> `'fileWith/defaultExt.dev.js'` + ✓ `'fileWith/defaultExt.longExt'` ---> `'fileWith/defaultExt.longExt'` + ✓ `'fileWith/defaultExt.longRext'` ---> `'fileWith/defaultExt.longRext.js'` + + +Copyright(c) 2014-2019 Angelos Pikoulas (agelos.pikoulas@gmail.com) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/upath/upath.d.ts b/front/frontend/node_modules/upath/upath.d.ts new file mode 100644 index 0000000..778d70a --- /dev/null +++ b/front/frontend/node_modules/upath/upath.d.ts @@ -0,0 +1,239 @@ +declare module "upath" { + + /** + * A parsed path object generated by path.parse() or consumed by path.format(). + */ + export interface ParsedPath { + /** + * The root of the path such as '/' or 'c:\' + */ + root: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base: string; + /** + * The file extension (if any) such as '.html' + */ + ext: string; + /** + * The file name without extension (if any) such as 'index' + */ + name: string; + } + + /** + * Version of the library + */ + export var VERSION: string; + + /** + * Just converts all `to/` and consolidates duplicates, without performing any normalization. + * + * @param p string path to convert to unix. + */ + export function toUnix(p: string): string; + + /** + * Exactly like path.normalize(path), but it keeps the first meaningful ./. + * + * Note that the unix / is returned everywhere, so windows \ is always converted to unix /. + * + * @param p string path to normalize. + */ + export function normalizeSafe(p: string): string; + + /** + * Exactly like path.normalizeSafe(path), but it trims any useless ending /. + * + * @param p string path to normalize + */ + export function normalizeTrim(p: string): string; + + /** + * Exactly like path.join(), but it keeps the first meaningful ./. + * + * Note that the unix / is returned everywhere, so windows \ is always converted to unix /. + * + * @param paths string paths to join + */ + export function joinSafe(...p: any[]): string; + + /** + * Adds .ext to filename, but only if it doesn't already have the exact extension. + * + * @param file string filename to add extension to + * @param ext string extension to add + */ + export function addExt(file: string, ext: string): string; + + /** + * Trims a filename's extension. + * + * Extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7). + * + * An Array of ignoreExts (eg ['.min']) prevents these from being considered as extension, thus are not trimmed. + * + * @param filename string filename to trim it's extension + * @param ignoreExts array extensions to ignore + * @param maxSize number max length of the extension + */ + export function trimExt(filename: string, ignoreExts?: string[], maxSize?: number): string; + + /** + * Removes the specific ext extension from filename, if it has it. Otherwise it leaves it as is. As in all upath functions, it be .ext or ext. + * + * @param file string filename to remove extension to + * @param ext string extension to remove + */ + export function removeExt(filename: string, ext: string): string; + + /** + * Changes a filename's extension to ext. If it has no (valid) extension, it adds it. + * + * Valid extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7). + * + * An Array of ignoreExts (eg ['.min']) prevents these from being considered as extension, thus are not changed - the new extension is added instead. + * + * @param filename string filename to change it's extension + * @param ext string extension to change to + * @param ignoreExts array extensions to ignore + * @param maxSize number max length of the extension + */ + export function changeExt(filename: string, ext: string, ignoreExts?: string[], maxSize?: number): string; + + /** + * Adds .ext to filename, only if it doesn't already have any old extension. + * + * (Old) extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7). + * + * An Array of ignoreExts (eg ['.min']) will force adding default .ext even if one of these is present. + * + * @param filename string filename to default to it's extension + * @param ext string extension to default to + * @param ignoreExts array extensions to ignore + * @param maxSize number max length of the extension + */ + export function defaultExt(filename: string, ext: string, ignoreExts?: string[], maxSize?: number): string; + + /** + * Normalize a string path, reducing '..' and '.' parts. + * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. + * + * @param p string path to normalize. + */ + export function normalize(p: string): string; + /** + * Join all arguments together and normalize the resulting path. + * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. + * + * @param paths string paths to join. + */ + export function join(...paths: any[]): string; + /** + * Join all arguments together and normalize the resulting path. + * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. + * + * @param paths string paths to join. + */ + export function join(...paths: string[]): string; + /** + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * + * Starting from leftmost {from} parameter, resolves {to} to an absolute path. + * + * If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory. + * + * @param pathSegments string paths to join. Non-string arguments are ignored. + */ + export function resolve(...pathSegments: any[]): string; + /** + * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. + * + * @param path path to test. + */ + export function isAbsolute(path: string): boolean; + /** + * Solve the relative path from {from} to {to}. + * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. + * + * @param from + * @param to + */ + export function relative(from: string, to: string): string; + /** + * Return the directory name of a path. Similar to the Unix dirname command. + * + * @param p the path to evaluate. + */ + export function dirname(p: string): string; + /** + * Return the last portion of a path. Similar to the Unix basename command. + * Often used to extract the file name from a fully qualified path. + * + * @param p the path to evaluate. + * @param ext optionally, an extension to remove from the result. + */ + export function basename(p: string, ext?: string): string; + /** + * Return the extension of the path, from the last '.' to end of string in the last portion of the path. + * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string + * + * @param p the path to evaluate. + */ + export function extname(p: string): string; + /** + * The platform-specific file separator. '\\' or '/'. + */ + export var sep: string; + /** + * The platform-specific file delimiter. ';' or ':'. + */ + export var delimiter: string; + /** + * Returns an object from a path string - the opposite of format(). + * + * @param pathString path to evaluate. + */ + export function parse(pathString: string): ParsedPath; + /** + * Returns a path string from an object - the opposite of parse(). + * + * @param pathString path to evaluate. + */ + export function format(pathObject: ParsedPath): string; + + export module posix { + export function normalize(p: string): string; + export function join(...paths: any[]): string; + export function resolve(...pathSegments: any[]): string; + export function isAbsolute(p: string): boolean; + export function relative(from: string, to: string): string; + export function dirname(p: string): string; + export function basename(p: string, ext?: string): string; + export function extname(p: string): string; + export var sep: string; + export var delimiter: string; + export function parse(p: string): ParsedPath; + export function format(pP: ParsedPath): string; + } + + export module win32 { + export function normalize(p: string): string; + export function join(...paths: any[]): string; + export function resolve(...pathSegments: any[]): string; + export function isAbsolute(p: string): boolean; + export function relative(from: string, to: string): string; + export function dirname(p: string): string; + export function basename(p: string, ext?: string): string; + export function extname(p: string): string; + export var sep: string; + export var delimiter: string; + export function parse(p: string): ParsedPath; + export function format(pP: ParsedPath): string; + } +} diff --git a/front/frontend/node_modules/urix/.jshintrc b/front/frontend/node_modules/urix/.jshintrc new file mode 100644 index 0000000..e722e46 --- /dev/null +++ b/front/frontend/node_modules/urix/.jshintrc @@ -0,0 +1,42 @@ +{ + "bitwise": true, + "camelcase": true, + "curly": false, + "eqeqeq": true, + "es3": false, + "forin": true, + "immed": false, + "indent": false, + "latedef": "nofunc", + "newcap": false, + "noarg": true, + "noempty": true, + "nonew": false, + "plusplus": false, + "quotmark": true, + "undef": true, + "unused": "vars", + "strict": false, + "trailing": true, + "maxparams": 5, + "maxdepth": false, + "maxstatements": false, + "maxcomplexity": false, + "maxlen": 100, + + "asi": true, + "expr": true, + "globalstrict": true, + "smarttabs": true, + "sub": true, + + "node": true, + "globals": { + "describe": false, + "it": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false + } +} diff --git a/front/frontend/node_modules/urix/LICENSE b/front/frontend/node_modules/urix/LICENSE new file mode 100644 index 0000000..0595be3 --- /dev/null +++ b/front/frontend/node_modules/urix/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Simon Lydell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/urix/index.js b/front/frontend/node_modules/urix/index.js new file mode 100644 index 0000000..3fb7903 --- /dev/null +++ b/front/frontend/node_modules/urix/index.js @@ -0,0 +1,17 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +var path = require("path") + +"use strict" + +function urix(aPath) { + if (path.sep === "\\") { + return aPath + .replace(/\\/g, "/") + .replace(/^[a-z]:\/?/i, "/") + } + return aPath +} + +module.exports = urix diff --git a/front/frontend/node_modules/urix/package.json b/front/frontend/node_modules/urix/package.json new file mode 100644 index 0000000..ce795d1 --- /dev/null +++ b/front/frontend/node_modules/urix/package.json @@ -0,0 +1,25 @@ +{ + "name": "urix", + "version": "0.1.0", + "author": "Simon Lydell", + "license": "MIT", + "description": "Makes Windows-style paths more unix and URI friendly.", + "main": "index.js", + "repository": "lydell/urix", + "keywords": [ + "path", + "url", + "uri", + "unix", + "windows", + "backslash", + "slash" + ], + "scripts": { + "test": "jshint index.js test/ && mocha" + }, + "devDependencies": { + "mocha": "^1.17.1", + "jshint": "^2.4.4" + } +} diff --git a/front/frontend/node_modules/urix/readme.md b/front/frontend/node_modules/urix/readme.md new file mode 100644 index 0000000..ac386f5 --- /dev/null +++ b/front/frontend/node_modules/urix/readme.md @@ -0,0 +1,46 @@ +[![Build Status](https://travis-ci.org/lydell/urix.png?branch=master)](https://travis-ci.org/lydell/urix) + +Overview +======== + +Makes Windows-style paths more unix and URI friendly. Useful if you work with +paths that eventually will be used in URLs. + +```js +var urix = require("urix") + +// On Windows: +urix("c:\\users\\you\\foo") +// /users/you/foo + +// On unix-like systems: +urix("c:\\users\\you\\foo") +// c:\users\you\foo +``` + + +Installation +============ + +`npm install urix` + +```js +var urix = require("urix") +``` + + +Usage +===== + +### `urix(path)` ### + +On Windows, replaces all backslashes with slashes and uses a slash instead of a +drive letter and a colon for absolute paths. + +On unix-like systems it is a no-op. + + +License +======= + +[The X11 (“MIT”) License](LICENSE). diff --git a/front/frontend/node_modules/urix/test/index.js b/front/frontend/node_modules/urix/test/index.js new file mode 100644 index 0000000..b84b8f3 --- /dev/null +++ b/front/frontend/node_modules/urix/test/index.js @@ -0,0 +1,43 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +var path = require("path") +var assert = require("assert") +var urix = require("../") + +"use stict" + +function test(testPath, expected) { + path.sep = "\\" + assert.equal(urix(testPath), expected) + path.sep = "/" + assert.equal(urix(testPath), testPath) +} + +describe("urix", function() { + + it("is a function", function() { + assert.equal(typeof urix, "function") + }) + + + it("converts backslashes to slashes", function() { + test("a\\b\\c", "a/b/c") + test("\\a\\b\\c", "/a/b/c") + test("a/b\\c", "a/b/c") + test("\\\\a\\\\\\b///c", "//a///b///c") + }) + + + it("changes the drive letter to a slash", function() { + test("c:\\a", "/a") + test("C:\\a", "/a") + test("z:\\a", "/a") + test("c:a", "/a") + test("c:/a", "/a") + test("c:\\\\a", "//a") + test("c://a", "//a") + test("c:\\//a", "///a") + }) + +}) diff --git a/front/frontend/node_modules/use/LICENSE b/front/frontend/node_modules/use/LICENSE new file mode 100644 index 0000000..7cccaf9 --- /dev/null +++ b/front/frontend/node_modules/use/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/front/frontend/node_modules/use/README.md b/front/frontend/node_modules/use/README.md new file mode 100644 index 0000000..59b1dbd --- /dev/null +++ b/front/frontend/node_modules/use/README.md @@ -0,0 +1,90 @@ +# use [![NPM version](https://img.shields.io/npm/v/use.svg?style=flat)](https://www.npmjs.com/package/use) [![NPM monthly downloads](https://img.shields.io/npm/dm/use.svg?style=flat)](https://npmjs.org/package/use) [![NPM total downloads](https://img.shields.io/npm/dt/use.svg?style=flat)](https://npmjs.org/package/use) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/use.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/use) + +> Easily add plugin support to your node.js application. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save use +``` + +A different take on plugin handling! This is not a middleware system, if you need something that handles async middleware, [ware](https://github.com/segmentio/ware) is great for that. + +## Usage + +```js +const use = require('use'); +``` + +See the [examples folder](./examples) for usage examples. + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [base-plugins](https://www.npmjs.com/package/base-plugins): Adds 'smart plugin' support to your base application. | [homepage](https://github.com/node-base/base-plugins "Adds 'smart plugin' support to your base application.") +* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks") +* [ware](https://www.npmjs.com/package/ware): Easily create your own middleware layer. | [homepage](https://github.com/segmentio/ware "Easily create your own middleware layer.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 37 | [jonschlinkert](https://github.com/jonschlinkert) | +| 7 | [charlike-old](https://github.com/charlike-old) | +| 2 | [doowb](https://github.com/doowb) | +| 2 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 12, 2018._ \ No newline at end of file diff --git a/front/frontend/node_modules/use/index.js b/front/frontend/node_modules/use/index.js new file mode 100644 index 0000000..9a1eb4e --- /dev/null +++ b/front/frontend/node_modules/use/index.js @@ -0,0 +1,155 @@ +/*! + * use + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function base(app, options) { + if (!isObject(app) && typeof app !== 'function') { + throw new TypeError('expected an object or function'); + } + + var opts = isObject(options) ? options : {}; + var prop = typeof opts.prop === 'string' ? opts.prop : 'fns'; + if (!Array.isArray(app[prop])) { + define(app, prop, []); + } + + /** + * Define a plugin function to be passed to use. The only + * parameter exposed to the plugin is `app`, the object or function. + * passed to `use(app)`. `app` is also exposed as `this` in plugins. + * + * Additionally, **if a plugin returns a function, the function will + * be pushed onto the `fns` array**, allowing the plugin to be + * called at a later point by the `run` method. + * + * ```js + * var use = require('use'); + * + * // define a plugin + * function foo(app) { + * // do stuff + * } + * + * var app = function(){}; + * use(app); + * + * // register plugins + * app.use(foo); + * app.use(bar); + * app.use(baz); + * ``` + * @name .use + * @param {Function} `fn` plugin function to call + * @api public + */ + + define(app, 'use', use); + + /** + * Run all plugins on `fns`. Any plugin that returns a function + * when called by `use` is pushed onto the `fns` array. + * + * ```js + * var config = {}; + * app.run(config); + * ``` + * @name .run + * @param {Object} `value` Object to be modified by plugins. + * @return {Object} Returns the object passed to `run` + * @api public + */ + + define(app, 'run', function(val) { + if (!isObject(val)) return; + + if (!val.use || !val.run) { + define(val, prop, val[prop] || []); + define(val, 'use', use); + } + + if (!val[prop] || val[prop].indexOf(base) === -1) { + val.use(base); + } + + var self = this || app; + var fns = self[prop]; + var len = fns.length; + var idx = -1; + + while (++idx < len) { + val.use(fns[idx]); + } + return val; + }); + + /** + * Call plugin `fn`. If a function is returned push it into the + * `fns` array to be called by the `run` method. + */ + + function use(type, fn, options) { + var offset = 1; + + if (typeof type === 'string' || Array.isArray(type)) { + fn = wrap(type, fn); + offset++; + } else { + options = fn; + fn = type; + } + + if (typeof fn !== 'function') { + throw new TypeError('expected a function'); + } + + var self = this || app; + var fns = self[prop]; + + var args = [].slice.call(arguments, offset); + args.unshift(self); + + if (typeof opts.hook === 'function') { + opts.hook.apply(self, args); + } + + var val = fn.apply(self, args); + if (typeof val === 'function' && fns.indexOf(val) === -1) { + fns.push(val); + } + return self; + } + + /** + * Wrap a named plugin function so that it's only called on objects of the + * given `type` + * + * @param {String} `type` + * @param {Function} `fn` Plugin function + * @return {Function} + */ + + function wrap(type, fn) { + return function plugin() { + return this.type === type ? fn.apply(this, arguments) : plugin; + }; + } + + return app; +}; + +function isObject(val) { + return val && typeof val === 'object' && !Array.isArray(val); +} + +function define(obj, key, val) { + Object.defineProperty(obj, key, { + configurable: true, + writable: true, + value: val + }); +} diff --git a/front/frontend/node_modules/use/package.json b/front/frontend/node_modules/use/package.json new file mode 100644 index 0000000..b7a3f9a --- /dev/null +++ b/front/frontend/node_modules/use/package.json @@ -0,0 +1,66 @@ +{ + "name": "use", + "description": "Easily add plugin support to your node.js application.", + "version": "3.1.1", + "homepage": "https://github.com/jonschlinkert/use", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Olsten Larck (https://i.am.charlike.online)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/use", + "bugs": { + "url": "https://github.com/jonschlinkert/use/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "base-plugins": "^1.0.0", + "define-property": "^2.0.0", + "extend-shallow": "^3.0.1", + "gulp": "^3.9.1", + "gulp-eslint": "^4.0.0", + "gulp-format-md": "^1.0.0", + "gulp-istanbul": "^1.1.2", + "gulp-mocha": "^3.0.1", + "mocha": "^4.0.1" + }, + "keywords": [ + "use" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "base", + "base-plugins", + "ware" + ] + }, + "reflinks": [ + "verb", + "ware" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/front/frontend/node_modules/util-deprecate/History.md b/front/frontend/node_modules/util-deprecate/History.md new file mode 100644 index 0000000..acc8675 --- /dev/null +++ b/front/frontend/node_modules/util-deprecate/History.md @@ -0,0 +1,16 @@ + +1.0.2 / 2015-10-07 +================== + + * use try/catch when checking `localStorage` (#3, @kumavis) + +1.0.1 / 2014-11-25 +================== + + * browser: use `console.warn()` for deprecation calls + * browser: more jsdocs + +1.0.0 / 2014-04-30 +================== + + * initial commit diff --git a/front/frontend/node_modules/util-deprecate/LICENSE b/front/frontend/node_modules/util-deprecate/LICENSE new file mode 100644 index 0000000..6a60e8c --- /dev/null +++ b/front/frontend/node_modules/util-deprecate/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/util-deprecate/README.md b/front/frontend/node_modules/util-deprecate/README.md new file mode 100644 index 0000000..75622fa --- /dev/null +++ b/front/frontend/node_modules/util-deprecate/README.md @@ -0,0 +1,53 @@ +util-deprecate +============== +### The Node.js `util.deprecate()` function with browser support + +In Node.js, this module simply re-exports the `util.deprecate()` function. + +In the web browser (i.e. via browserify), a browser-specific implementation +of the `util.deprecate()` function is used. + + +## API + +A `deprecate()` function is the only thing exposed by this module. + +``` javascript +// setup: +exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); + + +// users see: +foo(); +// foo() is deprecated, use bar() instead +foo(); +foo(); +``` + + +## License + +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/util-deprecate/browser.js b/front/frontend/node_modules/util-deprecate/browser.js new file mode 100644 index 0000000..549ae2f --- /dev/null +++ b/front/frontend/node_modules/util-deprecate/browser.js @@ -0,0 +1,67 @@ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} diff --git a/front/frontend/node_modules/util-deprecate/node.js b/front/frontend/node_modules/util-deprecate/node.js new file mode 100644 index 0000000..5e6fcff --- /dev/null +++ b/front/frontend/node_modules/util-deprecate/node.js @@ -0,0 +1,6 @@ + +/** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + +module.exports = require('util').deprecate; diff --git a/front/frontend/node_modules/util-deprecate/package.json b/front/frontend/node_modules/util-deprecate/package.json new file mode 100644 index 0000000..2e79f89 --- /dev/null +++ b/front/frontend/node_modules/util-deprecate/package.json @@ -0,0 +1,27 @@ +{ + "name": "util-deprecate", + "version": "1.0.2", + "description": "The Node.js `util.deprecate()` function with browser support", + "main": "node.js", + "browser": "browser.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/util-deprecate.git" + }, + "keywords": [ + "util", + "deprecate", + "browserify", + "browser", + "node" + ], + "author": "Nathan Rajlich (http://n8.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/TooTallNate/util-deprecate/issues" + }, + "homepage": "https://github.com/TooTallNate/util-deprecate" +} diff --git a/front/frontend/node_modules/utils-merge/.npmignore b/front/frontend/node_modules/utils-merge/.npmignore new file mode 100644 index 0000000..3e53844 --- /dev/null +++ b/front/frontend/node_modules/utils-merge/.npmignore @@ -0,0 +1,9 @@ +CONTRIBUTING.md +Makefile +docs/ +examples/ +reports/ +test/ + +.jshintrc +.travis.yml diff --git a/front/frontend/node_modules/utils-merge/LICENSE b/front/frontend/node_modules/utils-merge/LICENSE new file mode 100644 index 0000000..76f6d08 --- /dev/null +++ b/front/frontend/node_modules/utils-merge/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013-2017 Jared Hanson + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/utils-merge/README.md b/front/frontend/node_modules/utils-merge/README.md new file mode 100644 index 0000000..0cb7117 --- /dev/null +++ b/front/frontend/node_modules/utils-merge/README.md @@ -0,0 +1,34 @@ +# utils-merge + +[![Version](https://img.shields.io/npm/v/utils-merge.svg?label=version)](https://www.npmjs.com/package/utils-merge) +[![Build](https://img.shields.io/travis/jaredhanson/utils-merge.svg)](https://travis-ci.org/jaredhanson/utils-merge) +[![Quality](https://img.shields.io/codeclimate/github/jaredhanson/utils-merge.svg?label=quality)](https://codeclimate.com/github/jaredhanson/utils-merge) +[![Coverage](https://img.shields.io/coveralls/jaredhanson/utils-merge.svg)](https://coveralls.io/r/jaredhanson/utils-merge) +[![Dependencies](https://img.shields.io/david/jaredhanson/utils-merge.svg)](https://david-dm.org/jaredhanson/utils-merge) + + +Merges the properties from a source object into a destination object. + +## Install + +```bash +$ npm install utils-merge +``` + +## Usage + +```javascript +var a = { foo: 'bar' } + , b = { bar: 'baz' }; + +merge(a, b); +// => { foo: 'bar', bar: 'baz' } +``` + +## License + +[The MIT License](http://opensource.org/licenses/MIT) + +Copyright (c) 2013-2017 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)> + + Sponsor diff --git a/front/frontend/node_modules/utils-merge/index.js b/front/frontend/node_modules/utils-merge/index.js new file mode 100644 index 0000000..4265c69 --- /dev/null +++ b/front/frontend/node_modules/utils-merge/index.js @@ -0,0 +1,23 @@ +/** + * Merge object b with object a. + * + * var a = { foo: 'bar' } + * , b = { bar: 'baz' }; + * + * merge(a, b); + * // => { foo: 'bar', bar: 'baz' } + * + * @param {Object} a + * @param {Object} b + * @return {Object} + * @api public + */ + +exports = module.exports = function(a, b){ + if (a && b) { + for (var key in b) { + a[key] = b[key]; + } + } + return a; +}; diff --git a/front/frontend/node_modules/utils-merge/package.json b/front/frontend/node_modules/utils-merge/package.json new file mode 100644 index 0000000..e36b078 --- /dev/null +++ b/front/frontend/node_modules/utils-merge/package.json @@ -0,0 +1,40 @@ +{ + "name": "utils-merge", + "version": "1.0.1", + "description": "merge() utility function", + "keywords": [ + "util" + ], + "author": { + "name": "Jared Hanson", + "email": "jaredhanson@gmail.com", + "url": "http://www.jaredhanson.net/" + }, + "repository": { + "type": "git", + "url": "git://github.com/jaredhanson/utils-merge.git" + }, + "bugs": { + "url": "http://github.com/jaredhanson/utils-merge/issues" + }, + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "http://opensource.org/licenses/MIT" + } + ], + "main": "./index", + "dependencies": {}, + "devDependencies": { + "make-node": "0.3.x", + "mocha": "1.x.x", + "chai": "1.x.x" + }, + "engines": { + "node": ">= 0.4.0" + }, + "scripts": { + "test": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js" + } +} diff --git a/front/frontend/node_modules/uuid/AUTHORS b/front/frontend/node_modules/uuid/AUTHORS new file mode 100644 index 0000000..5a10523 --- /dev/null +++ b/front/frontend/node_modules/uuid/AUTHORS @@ -0,0 +1,5 @@ +Robert Kieffer +Christoph Tavan +AJ ONeal +Vincent Voyer +Roman Shtylman diff --git a/front/frontend/node_modules/uuid/CHANGELOG.md b/front/frontend/node_modules/uuid/CHANGELOG.md new file mode 100644 index 0000000..f811b8a --- /dev/null +++ b/front/frontend/node_modules/uuid/CHANGELOG.md @@ -0,0 +1,119 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) + + +### Features + +* rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) + +### [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) + + +## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) + + +### Bug Fixes + +* typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) + + + + +## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) + + +### Bug Fixes + +* fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) + + + + +# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) + + +### Bug Fixes + +* assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) +* fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) +* Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) +* mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) + +### Features + +* enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) + + + +## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) + + +### Bug Fixes + +* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + + + + +# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) + + +### Bug Fixes + +* remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) +* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + + +### Features + +* Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) + + +# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) + +### Bug Fixes + +* (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) +* Fix typo (#178) +* Simple typo fix (#165) + +### Features +* v5 support in CLI (#197) +* V5 support (#188) + + +# 3.0.1 (2016-11-28) + +* split uuid versions into separate files + + +# 3.0.0 (2016-11-17) + +* remove .parse and .unparse + + +# 2.0.0 + +* Removed uuid.BufferClass + + +# 1.4.0 + +* Improved module context detection +* Removed public RNG functions + + +# 1.3.2 + +* Improve tests and handling of v1() options (Issue #24) +* Expose RNG option to allow for perf testing with different generators + + +# 1.3.0 + +* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! +* Support for node.js crypto API +* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/front/frontend/node_modules/uuid/LICENSE.md b/front/frontend/node_modules/uuid/LICENSE.md new file mode 100644 index 0000000..8c84e39 --- /dev/null +++ b/front/frontend/node_modules/uuid/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010-2016 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/front/frontend/node_modules/uuid/README.md b/front/frontend/node_modules/uuid/README.md new file mode 100644 index 0000000..1752e47 --- /dev/null +++ b/front/frontend/node_modules/uuid/README.md @@ -0,0 +1,276 @@ + + +# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # + +Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. + +Features: + +* Support for version 1, 3, 4 and 5 UUIDs +* Cross-platform +* Uses cryptographically-strong random number APIs (when available) +* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) + +[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be +supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] + +## Quickstart - CommonJS (Recommended) + +```shell +npm install uuid +``` + +Then generate your uuid version of choice ... + +Version 1 (timestamp): + +```javascript +const uuidv1 = require('uuid/v1'); +uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' + +``` + +Version 3 (namespace): + +```javascript +const uuidv3 = require('uuid/v3'); + +// ... using predefined DNS namespace (for domain names) +uuidv3('hello.example.com', uuidv3.DNS); // ⇨ '9125a8dc-52ee-365b-a5aa-81b0b3681cf6' + +// ... using predefined URL namespace (for, well, URLs) +uuidv3('http://example.com/hello', uuidv3.URL); // ⇨ 'c6235813-3ba4-3801-ae84-e0a6ebb7d138' + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv3('Hello, World!', MY_NAMESPACE); // ⇨ 'e8b5a51d-11c8-3310-a6ab-367563f20686' + +``` + +Version 4 (random): + +```javascript +const uuidv4 = require('uuid/v4'); +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' + +``` + +Version 5 (namespace): + +```javascript +const uuidv5 = require('uuid/v5'); + +// ... using predefined DNS namespace (for domain names) +uuidv5('hello.example.com', uuidv5.DNS); // ⇨ 'fdda765f-fc57-5604-a269-52a7df8164ec' + +// ... using predefined URL namespace (for, well, URLs) +uuidv5('http://example.com/hello', uuidv5.URL); // ⇨ '3bbcee75-cecc-5b56-8031-b6641c1ed1f1' + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' + +``` + +## API + +### Version 1 + +```javascript +const uuidv1 = require('uuid/v1'); + +// Incantations +uuidv1(); +uuidv1(options); +uuidv1(options, buffer, offset); +``` + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. + * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. + +Example: Generate string UUID with fully-specified options + +```javascript +const v1options = { + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678 +}; +uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' + +``` + +Example: In-place generation of two binary IDs + +```javascript +// Generate two ids in an array +const arr = new Array(); +uuidv1(null, arr, 0); // ⇨ + // [ + // 44, 94, 164, 192, 64, 103, + // 17, 233, 146, 52, 155, 29, + // 235, 77, 59, 125 + // ] +uuidv1(null, arr, 16); // ⇨ + // [ + // 44, 94, 164, 192, 64, 103, 17, 233, + // 146, 52, 155, 29, 235, 77, 59, 125, + // 44, 94, 164, 193, 64, 103, 17, 233, + // 146, 52, 155, 29, 235, 77, 59, 125 + // ] + +``` + +### Version 3 + +```javascript +const uuidv3 = require('uuid/v3'); + +// Incantations +uuidv3(name, namespace); +uuidv3(name, namespace, buffer); +uuidv3(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v3 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript +uuidv3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172424' + +``` + +### Version 4 + +```javascript +const uuidv4 = require('uuid/v4') + +// Incantations +uuidv4(); +uuidv4(options); +uuidv4(options, buffer, offset); +``` + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values + * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: Generate string UUID with predefined `random` values + +```javascript +const v4options = { + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, + 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 + ] +}; +uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' + +``` + +Example: Generate two IDs in a single buffer + +```javascript +const buffer = new Array(); +uuidv4(null, buffer, 0); // ⇨ + // [ + // 155, 29, 235, 77, 59, + // 125, 75, 173, 155, 221, + // 43, 13, 123, 61, 203, + // 109 + // ] +uuidv4(null, buffer, 16); // ⇨ + // [ + // 155, 29, 235, 77, 59, 125, 75, 173, + // 155, 221, 43, 13, 123, 61, 203, 109, + // 27, 157, 107, 205, 187, 253, 75, 45, + // 155, 93, 171, 141, 251, 189, 75, 237 + // ] + +``` + +### Version 5 + +```javascript +const uuidv5 = require('uuid/v5'); + +// Incantations +uuidv5(name, namespace); +uuidv5(name, namespace, buffer); +uuidv5(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v5 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript +uuidv5('hello world', MY_NAMESPACE); // ⇨ '9f282611-e0fd-5650-8953-89c8e342da0b' + +``` + +## Command Line + +UUIDs can be generated from the command line with the `uuid` command. + +```shell +$ uuid +ddeb27fb-d9a0-4624-be4d-4615062daed4 + +$ uuid v1 +02d37060-d446-11e7-a9fa-7bdae751ebe1 +``` + +Type `uuid --help` for usage details + +## Testing + +```shell +npm test +``` + +---- +Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file diff --git a/front/frontend/node_modules/uuid/bin/uuid b/front/frontend/node_modules/uuid/bin/uuid new file mode 100644 index 0000000..502626e --- /dev/null +++ b/front/frontend/node_modules/uuid/bin/uuid @@ -0,0 +1,65 @@ +#!/usr/bin/env node +var assert = require('assert'); + +function usage() { + console.log('Usage:'); + console.log(' uuid'); + console.log(' uuid v1'); + console.log(' uuid v3 '); + console.log(' uuid v4'); + console.log(' uuid v5 '); + console.log(' uuid --help'); + console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'); +} + +var args = process.argv.slice(2); + +if (args.indexOf('--help') >= 0) { + usage(); + process.exit(0); +} +var version = args.shift() || 'v4'; + +switch (version) { + case 'v1': + var uuidV1 = require('../v1'); + console.log(uuidV1()); + break; + + case 'v3': + var uuidV3 = require('../v3'); + + var name = args.shift(); + var namespace = args.shift(); + assert(name != null, 'v3 name not specified'); + assert(namespace != null, 'v3 namespace not specified'); + + if (namespace == 'URL') namespace = uuidV3.URL; + if (namespace == 'DNS') namespace = uuidV3.DNS; + + console.log(uuidV3(name, namespace)); + break; + + case 'v4': + var uuidV4 = require('../v4'); + console.log(uuidV4()); + break; + + case 'v5': + var uuidV5 = require('../v5'); + + var name = args.shift(); + var namespace = args.shift(); + assert(name != null, 'v5 name not specified'); + assert(namespace != null, 'v5 namespace not specified'); + + if (namespace == 'URL') namespace = uuidV5.URL; + if (namespace == 'DNS') namespace = uuidV5.DNS; + + console.log(uuidV5(name, namespace)); + break; + + default: + usage(); + process.exit(1); +} diff --git a/front/frontend/node_modules/uuid/index.js b/front/frontend/node_modules/uuid/index.js new file mode 100644 index 0000000..e96791a --- /dev/null +++ b/front/frontend/node_modules/uuid/index.js @@ -0,0 +1,8 @@ +var v1 = require('./v1'); +var v4 = require('./v4'); + +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; + +module.exports = uuid; diff --git a/front/frontend/node_modules/uuid/lib/bytesToUuid.js b/front/frontend/node_modules/uuid/lib/bytesToUuid.js new file mode 100644 index 0000000..24b6041 --- /dev/null +++ b/front/frontend/node_modules/uuid/lib/bytesToUuid.js @@ -0,0 +1,26 @@ +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([ + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]] + ]).join(''); +} + +module.exports = bytesToUuid; diff --git a/front/frontend/node_modules/uuid/lib/md5-browser.js b/front/frontend/node_modules/uuid/lib/md5-browser.js new file mode 100644 index 0000000..9b3b6c7 --- /dev/null +++ b/front/frontend/node_modules/uuid/lib/md5-browser.js @@ -0,0 +1,216 @@ +/* + * Browser-compatible JavaScript MD5 + * + * Modification of JavaScript MD5 + * https://github.com/blueimp/JavaScript-MD5 + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + * + * Based on + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +'use strict'; + +function md5(bytes) { + if (typeof(bytes) == 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + bytes = new Array(msg.length); + for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); + } + + return md5ToHexEncodedArray( + wordsToMd5( + bytesToWords(bytes) + , bytes.length * 8) + ); +} + + +/* +* Convert an array of little-endian words to an array of bytes +*/ +function md5ToHexEncodedArray(input) { + var i; + var x; + var output = []; + var length32 = input.length * 32; + var hexTab = '0123456789abcdef'; + var hex; + + for (i = 0; i < length32; i += 8) { + x = (input[i >> 5] >>> (i % 32)) & 0xFF; + + hex = parseInt(hexTab.charAt((x >>> 4) & 0x0F) + hexTab.charAt(x & 0x0F), 16); + + output.push(hex); + } + return output; +} + +/* +* Calculate the MD5 of an array of little-endian words, and a bit length. +*/ +function wordsToMd5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << (len % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var i; + var olda; + var oldb; + var oldc; + var oldd; + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + + var d = 271733878; + + for (i = 0; i < x.length; i += 16) { + olda = a; + oldb = b; + oldc = c; + oldd = d; + + a = md5ff(a, b, c, d, x[i], 7, -680876936); + d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); + + a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5gg(b, c, d, a, x[i], 20, -373897302); + a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); + + a = md5hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5hh(d, a, b, c, x[i], 11, -358537222); + c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); + + a = md5ii(a, b, c, d, x[i], 6, -198630844); + d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); + + a = safeAdd(a, olda); + b = safeAdd(b, oldb); + c = safeAdd(c, oldc); + d = safeAdd(d, oldd); + } + return [a, b, c, d]; +} + +/* +* Convert an array bytes to an array of little-endian words +* Characters >255 have their high-byte silently ignored. +*/ +function bytesToWords(input) { + var i; + var output = []; + output[(input.length >> 2) - 1] = undefined; + for (i = 0; i < output.length; i += 1) { + output[i] = 0; + } + var length8 = input.length * 8; + for (i = 0; i < length8; i += 8) { + output[i >> 5] |= (input[(i / 8)] & 0xFF) << (i % 32); + } + + return output; +} + +/* +* Add integers, wrapping at 2^32. This uses 16-bit operations internally +* to work around bugs in some JS interpreters. +*/ +function safeAdd(x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* +* Bitwise rotate a 32-bit number to the left. +*/ +function bitRotateLeft(num, cnt) { + return (num << cnt) | (num >>> (32 - cnt)); +} + +/* +* These functions implement the four basic operations the algorithm uses. +*/ +function md5cmn(q, a, b, x, s, t) { + return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); +} +function md5ff(a, b, c, d, x, s, t) { + return md5cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function md5gg(a, b, c, d, x, s, t) { + return md5cmn((b & d) | (c & (~d)), a, b, x, s, t); +} +function md5hh(a, b, c, d, x, s, t) { + return md5cmn(b ^ c ^ d, a, b, x, s, t); +} +function md5ii(a, b, c, d, x, s, t) { + return md5cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +module.exports = md5; diff --git a/front/frontend/node_modules/uuid/lib/md5.js b/front/frontend/node_modules/uuid/lib/md5.js new file mode 100644 index 0000000..7044b87 --- /dev/null +++ b/front/frontend/node_modules/uuid/lib/md5.js @@ -0,0 +1,25 @@ +'use strict'; + +var crypto = require('crypto'); + +function md5(bytes) { + if (typeof Buffer.from === 'function') { + // Modern Buffer API + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + } else { + // Pre-v4 Buffer API + if (Array.isArray(bytes)) { + bytes = new Buffer(bytes); + } else if (typeof bytes === 'string') { + bytes = new Buffer(bytes, 'utf8'); + } + } + + return crypto.createHash('md5').update(bytes).digest(); +} + +module.exports = md5; diff --git a/front/frontend/node_modules/uuid/lib/rng-browser.js b/front/frontend/node_modules/uuid/lib/rng-browser.js new file mode 100644 index 0000000..6361fb8 --- /dev/null +++ b/front/frontend/node_modules/uuid/lib/rng-browser.js @@ -0,0 +1,34 @@ +// Unique ID creation requires a high quality random # generator. In the +// browser this is a little complicated due to unknown quality of Math.random() +// and inconsistent support for the `crypto` API. We do the best we can via +// feature-detection + +// getRandomValues needs to be invoked in a context where "this" is a Crypto +// implementation. Also, find the complete implementation of crypto on IE11. +var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) || + (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto)); + +if (getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + + module.exports = function whatwgRNG() { + getRandomValues(rnds8); + return rnds8; + }; +} else { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + + module.exports = function mathRNG() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return rnds; + }; +} diff --git a/front/frontend/node_modules/uuid/lib/rng.js b/front/frontend/node_modules/uuid/lib/rng.js new file mode 100644 index 0000000..58f0dc9 --- /dev/null +++ b/front/frontend/node_modules/uuid/lib/rng.js @@ -0,0 +1,8 @@ +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. + +var crypto = require('crypto'); + +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; diff --git a/front/frontend/node_modules/uuid/lib/sha1-browser.js b/front/frontend/node_modules/uuid/lib/sha1-browser.js new file mode 100644 index 0000000..5758ed7 --- /dev/null +++ b/front/frontend/node_modules/uuid/lib/sha1-browser.js @@ -0,0 +1,89 @@ +// Adapted from Chris Veness' SHA1 code at +// http://www.movable-type.co.uk/scripts/sha1.html +'use strict'; + +function f(s, x, y, z) { + switch (s) { + case 0: return (x & y) ^ (~x & z); + case 1: return x ^ y ^ z; + case 2: return (x & y) ^ (x & z) ^ (y & z); + case 3: return x ^ y ^ z; + } +} + +function ROTL(x, n) { + return (x << n) | (x>>> (32 - n)); +} + +function sha1(bytes) { + var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; + var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; + + if (typeof(bytes) == 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + bytes = new Array(msg.length); + for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); + } + + bytes.push(0x80); + + var l = bytes.length/4 + 2; + var N = Math.ceil(l/16); + var M = new Array(N); + + for (var i=0; i>> 0; + e = d; + d = c; + c = ROTL(b, 30) >>> 0; + b = a; + a = T; + } + + H[0] = (H[0] + a) >>> 0; + H[1] = (H[1] + b) >>> 0; + H[2] = (H[2] + c) >>> 0; + H[3] = (H[3] + d) >>> 0; + H[4] = (H[4] + e) >>> 0; + } + + return [ + H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, + H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, + H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, + H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, + H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff + ]; +} + +module.exports = sha1; diff --git a/front/frontend/node_modules/uuid/lib/sha1.js b/front/frontend/node_modules/uuid/lib/sha1.js new file mode 100644 index 0000000..0b54b25 --- /dev/null +++ b/front/frontend/node_modules/uuid/lib/sha1.js @@ -0,0 +1,25 @@ +'use strict'; + +var crypto = require('crypto'); + +function sha1(bytes) { + if (typeof Buffer.from === 'function') { + // Modern Buffer API + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + } else { + // Pre-v4 Buffer API + if (Array.isArray(bytes)) { + bytes = new Buffer(bytes); + } else if (typeof bytes === 'string') { + bytes = new Buffer(bytes, 'utf8'); + } + } + + return crypto.createHash('sha1').update(bytes).digest(); +} + +module.exports = sha1; diff --git a/front/frontend/node_modules/uuid/lib/v35.js b/front/frontend/node_modules/uuid/lib/v35.js new file mode 100644 index 0000000..8b066cc --- /dev/null +++ b/front/frontend/node_modules/uuid/lib/v35.js @@ -0,0 +1,57 @@ +var bytesToUuid = require('./bytesToUuid'); + +function uuidToBytes(uuid) { + // Note: We assume we're being passed a valid uuid string + var bytes = []; + uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) { + bytes.push(parseInt(hex, 16)); + }); + + return bytes; +} + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + var bytes = new Array(str.length); + for (var i = 0; i < str.length; i++) { + bytes[i] = str.charCodeAt(i); + } + return bytes; +} + +module.exports = function(name, version, hashfunc) { + var generateUUID = function(value, namespace, buf, offset) { + var off = buf && offset || 0; + + if (typeof(value) == 'string') value = stringToBytes(value); + if (typeof(namespace) == 'string') namespace = uuidToBytes(namespace); + + if (!Array.isArray(value)) throw TypeError('value must be an array of bytes'); + if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values'); + + // Per 4.3 + var bytes = hashfunc(namespace.concat(value)); + bytes[6] = (bytes[6] & 0x0f) | version; + bytes[8] = (bytes[8] & 0x3f) | 0x80; + + if (buf) { + for (var idx = 0; idx < 16; ++idx) { + buf[off+idx] = bytes[idx]; + } + } + + return buf || bytesToUuid(bytes); + }; + + // Function#name is not settable on some platforms (#270) + try { + generateUUID.name = name; + } catch (err) { + } + + // Pre-defined namespaces, per Appendix C + generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; + generateUUID.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; + + return generateUUID; +}; diff --git a/front/frontend/node_modules/uuid/package.json b/front/frontend/node_modules/uuid/package.json new file mode 100644 index 0000000..efc07b8 --- /dev/null +++ b/front/frontend/node_modules/uuid/package.json @@ -0,0 +1,49 @@ +{ + "name": "uuid", + "version": "3.4.0", + "description": "RFC4122 (v1, v4, and v5) UUIDs", + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "license": "MIT", + "bin": { + "uuid": "./bin/uuid" + }, + "devDependencies": { + "@commitlint/cli": "~8.2.0", + "@commitlint/config-conventional": "~8.2.0", + "eslint": "~6.4.0", + "husky": "~3.0.5", + "mocha": "6.2.0", + "runmd": "1.2.1", + "standard-version": "7.0.0" + }, + "scripts": { + "lint": "eslint .", + "test": "npm run lint && mocha test/test.js", + "md": "runmd --watch --output=README.md README_js.md", + "release": "standard-version", + "prepare": "runmd --output=README.md README_js.md" + }, + "browser": { + "./lib/rng.js": "./lib/rng-browser.js", + "./lib/sha1.js": "./lib/sha1-browser.js", + "./lib/md5.js": "./lib/md5-browser.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/uuidjs/uuid.git" + }, + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" + } + } +} diff --git a/front/frontend/node_modules/uuid/v1.js b/front/frontend/node_modules/uuid/v1.js new file mode 100644 index 0000000..8c245de --- /dev/null +++ b/front/frontend/node_modules/uuid/v1.js @@ -0,0 +1,109 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +var _nodeId; +var _clockseq; + +// Previous uuid creation time +var _lastMSecs = 0; +var _lastNSecs = 0; + +// See https://github.com/uuidjs/uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + var node = options.node || _nodeId; + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; + + // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + if (node == null || clockseq == null) { + var seedBytes = rng(); + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [ + seedBytes[0] | 0x01, + seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] + ]; + } + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf ? buf : bytesToUuid(b); +} + +module.exports = v1; diff --git a/front/frontend/node_modules/uuid/v3.js b/front/frontend/node_modules/uuid/v3.js new file mode 100644 index 0000000..ee7e14c --- /dev/null +++ b/front/frontend/node_modules/uuid/v3.js @@ -0,0 +1,4 @@ +var v35 = require('./lib/v35.js'); +var md5 = require('./lib/md5'); + +module.exports = v35('v3', 0x30, md5); \ No newline at end of file diff --git a/front/frontend/node_modules/uuid/v4.js b/front/frontend/node_modules/uuid/v4.js new file mode 100644 index 0000000..1f07be1 --- /dev/null +++ b/front/frontend/node_modules/uuid/v4.js @@ -0,0 +1,29 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); +} + +module.exports = v4; diff --git a/front/frontend/node_modules/uuid/v5.js b/front/frontend/node_modules/uuid/v5.js new file mode 100644 index 0000000..4945baf --- /dev/null +++ b/front/frontend/node_modules/uuid/v5.js @@ -0,0 +1,3 @@ +var v35 = require('./lib/v35.js'); +var sha1 = require('./lib/sha1'); +module.exports = v35('v5', 0x50, sha1); diff --git a/front/frontend/node_modules/vary/HISTORY.md b/front/frontend/node_modules/vary/HISTORY.md new file mode 100644 index 0000000..f6cbcf7 --- /dev/null +++ b/front/frontend/node_modules/vary/HISTORY.md @@ -0,0 +1,39 @@ +1.1.2 / 2017-09-23 +================== + + * perf: improve header token parsing speed + +1.1.1 / 2017-03-20 +================== + + * perf: hoist regular expression + +1.1.0 / 2015-09-29 +================== + + * Only accept valid field names in the `field` argument + - Ensures the resulting string is a valid HTTP header value + +1.0.1 / 2015-07-08 +================== + + * Fix setting empty header from empty `field` + * perf: enable strict mode + * perf: remove argument reassignments + +1.0.0 / 2014-08-10 +================== + + * Accept valid `Vary` header string as `field` + * Add `vary.append` for low-level string manipulation + * Move to `jshttp` orgainzation + +0.1.0 / 2014-06-05 +================== + + * Support array of fields to set + +0.0.0 / 2014-06-04 +================== + + * Initial release diff --git a/front/frontend/node_modules/vary/LICENSE b/front/frontend/node_modules/vary/LICENSE new file mode 100644 index 0000000..84441fb --- /dev/null +++ b/front/frontend/node_modules/vary/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2017 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/front/frontend/node_modules/vary/README.md b/front/frontend/node_modules/vary/README.md new file mode 100644 index 0000000..cc000b3 --- /dev/null +++ b/front/frontend/node_modules/vary/README.md @@ -0,0 +1,101 @@ +# vary + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Manipulate the HTTP Vary header + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install vary +``` + +## API + + + +```js +var vary = require('vary') +``` + +### vary(res, field) + +Adds the given header `field` to the `Vary` response header of `res`. +This can be a string of a single field, a string of a valid `Vary` +header, or an array of multiple fields. + +This will append the header if not already listed, otherwise leaves +it listed in the current location. + + + +```js +// Append "Origin" to the Vary header of the response +vary(res, 'Origin') +``` + +### vary.append(header, field) + +Adds the given header `field` to the `Vary` response header string `header`. +This can be a string of a single field, a string of a valid `Vary` header, +or an array of multiple fields. + +This will append the header if not already listed, otherwise leaves +it listed in the current location. The new header string is returned. + + + +```js +// Get header string appending "Origin" to "Accept, User-Agent" +vary.append('Accept, User-Agent', 'Origin') +``` + +## Examples + +### Updating the Vary header when content is based on it + +```js +var http = require('http') +var vary = require('vary') + +http.createServer(function onRequest (req, res) { + // about to user-agent sniff + vary(res, 'User-Agent') + + var ua = req.headers['user-agent'] || '' + var isMobile = /mobi|android|touch|mini/i.test(ua) + + // serve site, depending on isMobile + res.setHeader('Content-Type', 'text/html') + res.end('You are (probably) ' + (isMobile ? '' : 'not ') + 'a mobile user') +}) +``` + +## Testing + +```sh +$ npm test +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/vary.svg +[npm-url]: https://npmjs.org/package/vary +[node-version-image]: https://img.shields.io/node/v/vary.svg +[node-version-url]: https://nodejs.org/en/download +[travis-image]: https://img.shields.io/travis/jshttp/vary/master.svg +[travis-url]: https://travis-ci.org/jshttp/vary +[coveralls-image]: https://img.shields.io/coveralls/jshttp/vary/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/vary +[downloads-image]: https://img.shields.io/npm/dm/vary.svg +[downloads-url]: https://npmjs.org/package/vary diff --git a/front/frontend/node_modules/vary/index.js b/front/frontend/node_modules/vary/index.js new file mode 100644 index 0000000..5b5e741 --- /dev/null +++ b/front/frontend/node_modules/vary/index.js @@ -0,0 +1,149 @@ +/*! + * vary + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + */ + +module.exports = vary +module.exports.append = append + +/** + * RegExp to match field-name in RFC 7230 sec 3.2 + * + * field-name = token + * token = 1*tchar + * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" + * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" + * / DIGIT / ALPHA + * ; any VCHAR, except delimiters + */ + +var FIELD_NAME_REGEXP = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/ + +/** + * Append a field to a vary header. + * + * @param {String} header + * @param {String|Array} field + * @return {String} + * @public + */ + +function append (header, field) { + if (typeof header !== 'string') { + throw new TypeError('header argument is required') + } + + if (!field) { + throw new TypeError('field argument is required') + } + + // get fields array + var fields = !Array.isArray(field) + ? parse(String(field)) + : field + + // assert on invalid field names + for (var j = 0; j < fields.length; j++) { + if (!FIELD_NAME_REGEXP.test(fields[j])) { + throw new TypeError('field argument contains an invalid header name') + } + } + + // existing, unspecified vary + if (header === '*') { + return header + } + + // enumerate current values + var val = header + var vals = parse(header.toLowerCase()) + + // unspecified vary + if (fields.indexOf('*') !== -1 || vals.indexOf('*') !== -1) { + return '*' + } + + for (var i = 0; i < fields.length; i++) { + var fld = fields[i].toLowerCase() + + // append value (case-preserving) + if (vals.indexOf(fld) === -1) { + vals.push(fld) + val = val + ? val + ', ' + fields[i] + : fields[i] + } + } + + return val +} + +/** + * Parse a vary header into an array. + * + * @param {String} header + * @return {Array} + * @private + */ + +function parse (header) { + var end = 0 + var list = [] + var start = 0 + + // gather tokens + for (var i = 0, len = header.length; i < len; i++) { + switch (header.charCodeAt(i)) { + case 0x20: /* */ + if (start === end) { + start = end = i + 1 + } + break + case 0x2c: /* , */ + list.push(header.substring(start, end)) + start = end = i + 1 + break + default: + end = i + 1 + break + } + } + + // final token + list.push(header.substring(start, end)) + + return list +} + +/** + * Mark that a request is varied on a header field. + * + * @param {Object} res + * @param {String|Array} field + * @public + */ + +function vary (res, field) { + if (!res || !res.getHeader || !res.setHeader) { + // quack quack + throw new TypeError('res argument is required') + } + + // get existing header + var val = res.getHeader('Vary') || '' + var header = Array.isArray(val) + ? val.join(', ') + : String(val) + + // set new header + if ((val = append(header, field))) { + res.setHeader('Vary', val) + } +} diff --git a/front/frontend/node_modules/vary/package.json b/front/frontend/node_modules/vary/package.json new file mode 100644 index 0000000..028f72a --- /dev/null +++ b/front/frontend/node_modules/vary/package.json @@ -0,0 +1,43 @@ +{ + "name": "vary", + "description": "Manipulate the HTTP Vary header", + "version": "1.1.2", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "keywords": [ + "http", + "res", + "vary" + ], + "repository": "jshttp/vary", + "devDependencies": { + "beautify-benchmark": "0.2.4", + "benchmark": "2.1.4", + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.7.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "5.1.1", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "2.5.3", + "supertest": "1.1.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + } +} diff --git a/front/frontend/node_modules/websocket-driver/CHANGELOG.md b/front/frontend/node_modules/websocket-driver/CHANGELOG.md new file mode 100644 index 0000000..cb3945f --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/CHANGELOG.md @@ -0,0 +1,142 @@ +### 0.7.4 / 2020-05-22 + +- Avoid crashing if `process.version` does not contain any digits +- Emit `ping` and `pong` events from the `Server` driver +- Require http-parser-js >=0.5.1 which fixes the bug we addressed in 0.7.3 + +### 0.7.3 / 2019-06-13 + +- Cap version of http-parser-js below 0.4.11, which introduced a bug that + prevents us from handling messages that are part of the same input buffer as + the handshake response if chunked encoding is specified + +### 0.7.2 / 2019-06-13 + +(This version was pulled due to an error when publishing) + +### 0.7.1 / 2019-06-10 + +- Catch any exceptions produced while generating a handshake response and send a + `400 Bad Request` response to the client +- Pick the RFC-6455 protocol version if the request contains any of the headers + used by that version +- Use the `Buffer.alloc()` and `Buffer.from()` functions instead of the unsafe + `Buffer()` constructor +- Handle errors encountered while handling malformed draft-76 requests +- Change license from MIT to Apache 2.0 + +### 0.7.0 / 2017-09-11 + +- Add `ping` and `pong` to the set of events users can listen to +- Replace the bindings to Node's HTTP parser with `http-parser-js` + +### 0.6.5 / 2016-05-20 + +- Don't mutate buffers passed in by the application when masking + +### 0.6.4 / 2016-01-07 + +- If a number is given as input for a frame payload, send it as a string + +### 0.6.3 / 2015-11-06 + +- Reject draft-76 handshakes if their Sec-WebSocket-Key headers are invalid +- Throw a more helpful error if a client is created with an invalid URL + +### 0.6.2 / 2015-07-18 + +- When the peer sends a close frame with no error code, emit 1000 + +### 0.6.1 / 2015-07-13 + +- Use the `buffer.{read,write}UInt{16,32}BE` methods for reading/writing numbers + to buffers rather than including duplicate logic for this + +### 0.6.0 / 2015-07-08 + +- Allow the parser to recover cleanly if event listeners raise an error +- Add a `pong` method for sending unsolicited pong frames + +### 0.5.4 / 2015-03-29 + +- Don't emit extra close frames if we receive a close frame after we already + sent one +- Fail the connection when the driver receives an invalid + `Sec-WebSocket-Extensions` header + +### 0.5.3 / 2015-02-22 + +- Don't treat incoming data as WebSocket frames if a client driver is closed + before receiving the server handshake + +### 0.5.2 / 2015-02-19 + +- Fix compatibility with the HTTP parser on io.js +- Use `websocket-extensions` to make sure messages and close frames are kept in + order +- Don't emit multiple `error` events + +### 0.5.1 / 2014-12-18 + +- Don't allow drivers to be created with unrecognized options + +### 0.5.0 / 2014-12-13 + +- Support protocol extensions via the websocket-extensions module + +### 0.4.0 / 2014-11-08 + +- Support connection via HTTP proxies using `CONNECT` + +### 0.3.6 / 2014-10-04 + +- It is now possible to call `close()` before `start()` and close the driver + +### 0.3.5 / 2014-07-06 + +- Don't hold references to frame buffers after a message has been emitted +- Make sure that `protocol` and `version` are exposed properly by the TCP driver + +### 0.3.4 / 2014-05-08 + +- Don't hold memory-leaking references to I/O buffers after they have been + parsed + +### 0.3.3 / 2014-04-24 + +- Correct the draft-76 status line reason phrase + +### 0.3.2 / 2013-12-29 + +- Expand `maxLength` to cover sequences of continuation frames and + `draft-{75,76}` +- Decrease default maximum frame buffer size to 64MB +- Stop parsing when the protocol enters a failure mode, to save CPU cycles + +### 0.3.1 / 2013-12-03 + +- Add a `maxLength` option to limit allowed frame size +- Don't pre-allocate a message buffer until the whole frame has arrived +- Fix compatibility with Node v0.11 `HTTPParser` + +### 0.3.0 / 2013-09-09 + +- Support client URLs with Basic Auth credentials + +### 0.2.2 / 2013-07-05 + +- No functional changes, just updates to package.json + +### 0.2.1 / 2013-05-17 + +- Export the isSecureRequest() method since faye-websocket relies on it +- Queue sent messages in the client's initial state + +### 0.2.0 / 2013-05-12 + +- Add API for setting and reading headers +- Add Driver.server() method for getting a driver for TCP servers + +### 0.1.0 / 2013-05-04 + +- First stable release diff --git a/front/frontend/node_modules/websocket-driver/LICENSE.md b/front/frontend/node_modules/websocket-driver/LICENSE.md new file mode 100644 index 0000000..9475f06 --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/LICENSE.md @@ -0,0 +1,12 @@ +Copyright 2010-2020 James Coglan + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. diff --git a/front/frontend/node_modules/websocket-driver/README.md b/front/frontend/node_modules/websocket-driver/README.md new file mode 100644 index 0000000..95c33c4 --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/README.md @@ -0,0 +1,370 @@ +# websocket-driver [![Build Status](https://travis-ci.org/faye/websocket-driver-node.svg)](https://travis-ci.org/faye/websocket-driver-node) + +This module provides a complete implementation of the WebSocket protocols that +can be hooked up to any I/O stream. It aims to simplify things by decoupling the +protocol details from the I/O layer, such that users only need to implement code +to stream data in and out of it without needing to know anything about how the +protocol actually works. Think of it as a complete WebSocket system with +pluggable I/O. + +Due to this design, you get a lot of things for free. In particular, if you hook +this module up to some I/O object, it will do all of this for you: + +- Select the correct server-side driver to talk to the client +- Generate and send both server- and client-side handshakes +- Recognize when the handshake phase completes and the WS protocol begins +- Negotiate subprotocol selection based on `Sec-WebSocket-Protocol` +- Negotiate and use extensions via the + [websocket-extensions](https://github.com/faye/websocket-extensions-node) + module +- Buffer sent messages until the handshake process is finished +- Deal with proxies that defer delivery of the draft-76 handshake body +- Notify you when the socket is open and closed and when messages arrive +- Recombine fragmented messages +- Dispatch text, binary, ping, pong and close frames +- Manage the socket-closing handshake process +- Automatically reply to ping frames with a matching pong +- Apply masking to messages sent by the client + +This library was originally extracted from the [Faye](http://faye.jcoglan.com) +project but now aims to provide simple WebSocket support for any Node-based +project. + + +## Installation + +``` +$ npm install websocket-driver +``` + + +## Usage + +This module provides protocol drivers that have the same interface on the server +and on the client. A WebSocket driver is an object with two duplex streams +attached; one for incoming/outgoing messages and one for managing the wire +protocol over an I/O stream. The full API is described below. + + +### Server-side with HTTP + +A Node webserver emits a special event for 'upgrade' requests, and this is where +you should handle WebSockets. You first check whether the request is a +WebSocket, and if so you can create a driver and attach the request's I/O stream +to it. + +```js +var http = require('http'), + websocket = require('websocket-driver'); + +var server = http.createServer(); + +server.on('upgrade', function(request, socket, body) { + if (!websocket.isWebSocket(request)) return; + + var driver = websocket.http(request); + + driver.io.write(body); + socket.pipe(driver.io).pipe(socket); + + driver.messages.on('data', function(message) { + console.log('Got a message', message); + }); + + driver.start(); +}); +``` + +Note the line `driver.io.write(body)` - you must pass the `body` buffer to the +socket driver in order to make certain versions of the protocol work. + + +### Server-side with TCP + +You can also handle WebSocket connections in a bare TCP server, if you're not +using an HTTP server and don't want to implement HTTP parsing yourself. + +The driver will emit a `connect` event when a request is received, and at this +point you can detect whether it's a WebSocket and handle it as such. Here's an +example using the Node `net` module: + +```js +var net = require('net'), + websocket = require('websocket-driver'); + +var server = net.createServer(function(connection) { + var driver = websocket.server(); + + driver.on('connect', function() { + if (websocket.isWebSocket(driver)) { + driver.start(); + } else { + // handle other HTTP requests + } + }); + + driver.on('close', function() { connection.end() }); + connection.on('error', function() {}); + + connection.pipe(driver.io).pipe(connection); + + driver.messages.pipe(driver.messages); +}); + +server.listen(4180); +``` + +In the `connect` event, the driver gains several properties to describe the +request, similar to a Node request object, such as `method`, `url` and +`headers`. However you should remember it's not a real request object; you +cannot write data to it, it only tells you what request data we parsed from the +input. + +If the request has a body, it will be in the `driver.body` buffer, but only as +much of the body as has been piped into the driver when the `connect` event +fires. + + +### Client-side + +Similarly, to implement a WebSocket client you just need to make a driver by +passing in a URL. After this you use the driver API as described below to +process incoming data and send outgoing data. + + +```js +var net = require('net'), + websocket = require('websocket-driver'); + +var driver = websocket.client('ws://www.example.com/socket'), + tcp = net.connect(80, 'www.example.com'); + +tcp.pipe(driver.io).pipe(tcp); + +tcp.on('connect', function() { + driver.start(); +}); + +driver.messages.on('data', function(message) { + console.log('Got a message', message); +}); +``` + +Client drivers have two additional properties for reading the HTTP data that was +sent back by the server: + +- `driver.statusCode` - the integer value of the HTTP status code +- `driver.headers` - an object containing the response headers + + +### HTTP Proxies + +The client driver supports connections via HTTP proxies using the `CONNECT` +method. Instead of sending the WebSocket handshake immediately, it will send a +`CONNECT` request, wait for a `200` response, and then proceed as normal. + +To use this feature, call `driver.proxy(url)` where `url` is the origin of the +proxy, including a username and password if required. This produces a duplex +stream that you should pipe in and out of your TCP connection to the proxy +server. When the proxy emits `connect`, you can then pipe `driver.io` to your +TCP stream and call `driver.start()`. + +```js +var net = require('net'), + websocket = require('websocket-driver'); + +var driver = websocket.client('ws://www.example.com/socket'), + proxy = driver.proxy('http://username:password@proxy.example.com'), + tcp = net.connect(80, 'proxy.example.com'); + +tcp.pipe(proxy).pipe(tcp, { end: false }); + +tcp.on('connect', function() { + proxy.start(); +}); + +proxy.on('connect', function() { + driver.io.pipe(tcp).pipe(driver.io); + driver.start(); +}); + +driver.messages.on('data', function(message) { + console.log('Got a message', message); +}); +``` + +The proxy's `connect` event is also where you should perform a TLS handshake on +your TCP stream, if you are connecting to a `wss:` endpoint. + +In the event that proxy connection fails, `proxy` will emit an `error`. You can +inspect the proxy's response via `proxy.statusCode` and `proxy.headers`. + +```js +proxy.on('error', function(error) { + console.error(error.message); + console.log(proxy.statusCode); + console.log(proxy.headers); +}); +``` + +Before calling `proxy.start()` you can set custom headers using +`proxy.setHeader()`: + +```js +proxy.setHeader('User-Agent', 'node'); +proxy.start(); +``` + + +### Driver API + +Drivers are created using one of the following methods: + +```js +driver = websocket.http(request, options) +driver = websocket.server(options) +driver = websocket.client(url, options) +``` + +The `http` method returns a driver chosen using the headers from a Node HTTP +request object. The `server` method returns a driver that will parse an HTTP +request and then decide which driver to use for it using the `http` method. The +`client` method always returns a driver for the RFC version of the protocol with +masking enabled on outgoing frames. + +The `options` argument is optional, and is an object. It may contain the +following fields: + +- `maxLength` - the maximum allowed size of incoming message frames, in bytes. + The default value is `2^26 - 1`, or 1 byte short of 64 MiB. +- `protocols` - an array of strings representing acceptable subprotocols for use + over the socket. The driver will negotiate one of these to use via the + `Sec-WebSocket-Protocol` header if supported by the other peer. + +A driver has two duplex streams attached to it: + +- **`driver.io`** - this stream should be attached to an I/O socket like a TCP + stream. Pipe incoming TCP chunks to this stream for them to be parsed, and + pipe this stream back into TCP to send outgoing frames. +- **`driver.messages`** - this stream emits messages received over the + WebSocket. Writing to it sends messages to the other peer by emitting frames + via the `driver.io` stream. + +All drivers respond to the following API methods, but some of them are no-ops +depending on whether the client supports the behaviour. + +Note that most of these methods are commands: if they produce data that should +be sent over the socket, they will give this to you by emitting `data` events on +the `driver.io` stream. + +#### `driver.on('open', function(event) {})` + +Adds a callback to execute when the socket becomes open. + +#### `driver.on('message', function(event) {})` + +Adds a callback to execute when a message is received. `event` will have a +`data` attribute containing either a string in the case of a text message or a +`Buffer` in the case of a binary message. + +You can also listen for messages using the `driver.messages.on('data')` event, +which emits strings for text messages and buffers for binary messages. + +#### `driver.on('error', function(event) {})` + +Adds a callback to execute when a protocol error occurs due to the other peer +sending an invalid byte sequence. `event` will have a `message` attribute +describing the error. + +#### `driver.on('close', function(event) {})` + +Adds a callback to execute when the socket becomes closed. The `event` object +has `code` and `reason` attributes. + +#### `driver.on('ping', function(event) {})` + +Adds a callback block to execute when a ping is received. You do not need to +handle this by sending a pong frame yourself; the driver handles this for you. + +#### `driver.on('pong', function(event) {})` + +Adds a callback block to execute when a pong is received. If this was in +response to a ping you sent, you can also handle this event via the +`driver.ping(message, function() { ... })` callback. + +#### `driver.addExtension(extension)` + +Registers a protocol extension whose operation will be negotiated via the +`Sec-WebSocket-Extensions` header. `extension` is any extension compatible with +the [websocket-extensions](https://github.com/faye/websocket-extensions-node) +framework. + +#### `driver.setHeader(name, value)` + +Sets a custom header to be sent as part of the handshake response, either from +the server or from the client. Must be called before `start()`, since this is +when the headers are serialized and sent. + +#### `driver.start()` + +Initiates the protocol by sending the handshake - either the response for a +server-side driver or the request for a client-side one. This should be the +first method you invoke. Returns `true` if and only if a handshake was sent. + +#### `driver.parse(string)` + +Takes a string and parses it, potentially resulting in message events being +emitted (see `on('message')` above) or in data being sent to `driver.io`. You +should send all data you receive via I/O to this method by piping a stream into +`driver.io`. + +#### `driver.text(string)` + +Sends a text message over the socket. If the socket handshake is not yet +complete, the message will be queued until it is. Returns `true` if the message +was sent or queued, and `false` if the socket can no longer send messages. + +This method is equivalent to `driver.messages.write(string)`. + +#### `driver.binary(buffer)` + +Takes a `Buffer` and sends it as a binary message. Will queue and return `true` +or `false` the same way as the `text` method. It will also return `false` if the +driver does not support binary messages. + +This method is equivalent to `driver.messages.write(buffer)`. + +#### `driver.ping(string = '', function() {})` + +Sends a ping frame over the socket, queueing it if necessary. `string` and the +callback are both optional. If a callback is given, it will be invoked when the +socket receives a pong frame whose content matches `string`. Returns `false` if +frames can no longer be sent, or if the driver does not support ping/pong. + +#### `driver.pong(string = '')` + +Sends a pong frame over the socket, queueing it if necessary. `string` is +optional. Returns `false` if frames can no longer be sent, or if the driver does +not support ping/pong. + +You don't need to call this when a ping frame is received; pings are replied to +automatically by the driver. This method is for sending unsolicited pongs. + +#### `driver.close()` + +Initiates the closing handshake if the socket is still open. For drivers with no +closing handshake, this will result in the immediate execution of the +`on('close')` driver. For drivers with a closing handshake, this sends a closing +frame and `emit('close')` will execute when a response is received or a protocol +error occurs. + +#### `driver.version` + +Returns the WebSocket version in use as a string. Will either be `hixie-75`, +`hixie-76` or `hybi-$version`. + +#### `driver.protocol` + +Returns a string containing the selected subprotocol, if any was agreed upon +using the `Sec-WebSocket-Protocol` mechanism. This value becomes available after +`emit('open')` has fired. diff --git a/front/frontend/node_modules/websocket-driver/lib/websocket/driver.js b/front/frontend/node_modules/websocket-driver/lib/websocket/driver.js new file mode 100644 index 0000000..3d701cc --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/lib/websocket/driver.js @@ -0,0 +1,43 @@ +'use strict'; + +// Protocol references: +// +// * http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75 +// * http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76 +// * http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17 + +var Base = require('./driver/base'), + Client = require('./driver/client'), + Server = require('./driver/server'); + +var Driver = { + client: function(url, options) { + options = options || {}; + if (options.masking === undefined) options.masking = true; + return new Client(url, options); + }, + + server: function(options) { + options = options || {}; + if (options.requireMasking === undefined) options.requireMasking = true; + return new Server(options); + }, + + http: function() { + return Server.http.apply(Server, arguments); + }, + + isSecureRequest: function(request) { + return Server.isSecureRequest(request); + }, + + isWebSocket: function(request) { + return Base.isWebSocket(request); + }, + + validateOptions: function(options, validKeys) { + Base.validateOptions(options, validKeys); + } +}; + +module.exports = Driver; diff --git a/front/frontend/node_modules/websocket-driver/lib/websocket/driver/base.js b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/base.js new file mode 100644 index 0000000..f05af5f --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/base.js @@ -0,0 +1,193 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer, + Emitter = require('events').EventEmitter, + util = require('util'), + streams = require('../streams'), + Headers = require('./headers'), + Reader = require('./stream_reader'); + +var Base = function(request, url, options) { + Emitter.call(this); + Base.validateOptions(options || {}, ['maxLength', 'masking', 'requireMasking', 'protocols']); + + this._request = request; + this._reader = new Reader(); + this._options = options || {}; + this._maxLength = this._options.maxLength || this.MAX_LENGTH; + this._headers = new Headers(); + this.__queue = []; + this.readyState = 0; + this.url = url; + + this.io = new streams.IO(this); + this.messages = new streams.Messages(this); + this._bindEventListeners(); +}; +util.inherits(Base, Emitter); + +Base.isWebSocket = function(request) { + var connection = request.headers.connection || '', + upgrade = request.headers.upgrade || ''; + + return request.method === 'GET' && + connection.toLowerCase().split(/ *, */).indexOf('upgrade') >= 0 && + upgrade.toLowerCase() === 'websocket'; +}; + +Base.validateOptions = function(options, validKeys) { + for (var key in options) { + if (validKeys.indexOf(key) < 0) + throw new Error('Unrecognized option: ' + key); + } +}; + +var instance = { + // This is 64MB, small enough for an average VPS to handle without + // crashing from process out of memory + MAX_LENGTH: 0x3ffffff, + + STATES: ['connecting', 'open', 'closing', 'closed'], + + _bindEventListeners: function() { + var self = this; + + // Protocol errors are informational and do not have to be handled + this.messages.on('error', function() {}); + + this.on('message', function(event) { + var messages = self.messages; + if (messages.readable) messages.emit('data', event.data); + }); + + this.on('error', function(error) { + var messages = self.messages; + if (messages.readable) messages.emit('error', error); + }); + + this.on('close', function() { + var messages = self.messages; + if (!messages.readable) return; + messages.readable = messages.writable = false; + messages.emit('end'); + }); + }, + + getState: function() { + return this.STATES[this.readyState] || null; + }, + + addExtension: function(extension) { + return false; + }, + + setHeader: function(name, value) { + if (this.readyState > 0) return false; + this._headers.set(name, value); + return true; + }, + + start: function() { + if (this.readyState !== 0) return false; + + if (!Base.isWebSocket(this._request)) + return this._failHandshake(new Error('Not a WebSocket request')); + + var response; + + try { + response = this._handshakeResponse(); + } catch (error) { + return this._failHandshake(error); + } + + this._write(response); + if (this._stage !== -1) this._open(); + return true; + }, + + _failHandshake: function(error) { + var headers = new Headers(); + headers.set('Content-Type', 'text/plain'); + headers.set('Content-Length', Buffer.byteLength(error.message, 'utf8')); + + headers = ['HTTP/1.1 400 Bad Request', headers.toString(), error.message]; + this._write(Buffer.from(headers.join('\r\n'), 'utf8')); + this._fail('protocol_error', error.message); + + return false; + }, + + text: function(message) { + return this.frame(message); + }, + + binary: function(message) { + return false; + }, + + ping: function() { + return false; + }, + + pong: function() { + return false; + }, + + close: function(reason, code) { + if (this.readyState !== 1) return false; + this.readyState = 3; + this.emit('close', new Base.CloseEvent(null, null)); + return true; + }, + + _open: function() { + this.readyState = 1; + this.__queue.forEach(function(args) { this.frame.apply(this, args) }, this); + this.__queue = []; + this.emit('open', new Base.OpenEvent()); + }, + + _queue: function(message) { + this.__queue.push(message); + return true; + }, + + _write: function(chunk) { + var io = this.io; + if (io.readable) io.emit('data', chunk); + }, + + _fail: function(type, message) { + this.readyState = 2; + this.emit('error', new Error(message)); + this.close(); + } +}; + +for (var key in instance) + Base.prototype[key] = instance[key]; + + +Base.ConnectEvent = function() {}; + +Base.OpenEvent = function() {}; + +Base.CloseEvent = function(code, reason) { + this.code = code; + this.reason = reason; +}; + +Base.MessageEvent = function(data) { + this.data = data; +}; + +Base.PingEvent = function(data) { + this.data = data; +}; + +Base.PongEvent = function(data) { + this.data = data; +}; + +module.exports = Base; diff --git a/front/frontend/node_modules/websocket-driver/lib/websocket/driver/client.js b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/client.js new file mode 100644 index 0000000..f24d645 --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/client.js @@ -0,0 +1,142 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer, + crypto = require('crypto'), + url = require('url'), + util = require('util'), + HttpParser = require('../http_parser'), + Base = require('./base'), + Hybi = require('./hybi'), + Proxy = require('./proxy'); + +var Client = function(_url, options) { + this.version = 'hybi-' + Hybi.VERSION; + Hybi.call(this, null, _url, options); + + this.readyState = -1; + this._key = Client.generateKey(); + this._accept = Hybi.generateAccept(this._key); + this._http = new HttpParser('response'); + + var uri = url.parse(this.url), + auth = uri.auth && Buffer.from(uri.auth, 'utf8').toString('base64'); + + if (this.VALID_PROTOCOLS.indexOf(uri.protocol) < 0) + throw new Error(this.url + ' is not a valid WebSocket URL'); + + this._pathname = (uri.pathname || '/') + (uri.search || ''); + + this._headers.set('Host', uri.host); + this._headers.set('Upgrade', 'websocket'); + this._headers.set('Connection', 'Upgrade'); + this._headers.set('Sec-WebSocket-Key', this._key); + this._headers.set('Sec-WebSocket-Version', Hybi.VERSION); + + if (this._protocols.length > 0) + this._headers.set('Sec-WebSocket-Protocol', this._protocols.join(', ')); + + if (auth) + this._headers.set('Authorization', 'Basic ' + auth); +}; +util.inherits(Client, Hybi); + +Client.generateKey = function() { + return crypto.randomBytes(16).toString('base64'); +}; + +var instance = { + VALID_PROTOCOLS: ['ws:', 'wss:'], + + proxy: function(origin, options) { + return new Proxy(this, origin, options); + }, + + start: function() { + if (this.readyState !== -1) return false; + this._write(this._handshakeRequest()); + this.readyState = 0; + return true; + }, + + parse: function(chunk) { + if (this.readyState === 3) return; + if (this.readyState > 0) return Hybi.prototype.parse.call(this, chunk); + + this._http.parse(chunk); + if (!this._http.isComplete()) return; + + this._validateHandshake(); + if (this.readyState === 3) return; + + this._open(); + this.parse(this._http.body); + }, + + _handshakeRequest: function() { + var extensions = this._extensions.generateOffer(); + if (extensions) + this._headers.set('Sec-WebSocket-Extensions', extensions); + + var start = 'GET ' + this._pathname + ' HTTP/1.1', + headers = [start, this._headers.toString(), '']; + + return Buffer.from(headers.join('\r\n'), 'utf8'); + }, + + _failHandshake: function(message) { + message = 'Error during WebSocket handshake: ' + message; + this.readyState = 3; + this.emit('error', new Error(message)); + this.emit('close', new Base.CloseEvent(this.ERRORS.protocol_error, message)); + }, + + _validateHandshake: function() { + this.statusCode = this._http.statusCode; + this.headers = this._http.headers; + + if (this._http.error) + return this._failHandshake(this._http.error.message); + + if (this._http.statusCode !== 101) + return this._failHandshake('Unexpected response code: ' + this._http.statusCode); + + var headers = this._http.headers, + upgrade = headers['upgrade'] || '', + connection = headers['connection'] || '', + accept = headers['sec-websocket-accept'] || '', + protocol = headers['sec-websocket-protocol'] || ''; + + if (upgrade === '') + return this._failHandshake("'Upgrade' header is missing"); + if (upgrade.toLowerCase() !== 'websocket') + return this._failHandshake("'Upgrade' header value is not 'WebSocket'"); + + if (connection === '') + return this._failHandshake("'Connection' header is missing"); + if (connection.toLowerCase() !== 'upgrade') + return this._failHandshake("'Connection' header value is not 'Upgrade'"); + + if (accept !== this._accept) + return this._failHandshake('Sec-WebSocket-Accept mismatch'); + + this.protocol = null; + + if (protocol !== '') { + if (this._protocols.indexOf(protocol) < 0) + return this._failHandshake('Sec-WebSocket-Protocol mismatch'); + else + this.protocol = protocol; + } + + try { + this._extensions.activate(this.headers['sec-websocket-extensions']); + } catch (e) { + return this._failHandshake(e.message); + } + } +}; + +for (var key in instance) + Client.prototype[key] = instance[key]; + +module.exports = Client; diff --git a/front/frontend/node_modules/websocket-driver/lib/websocket/driver/draft75.js b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/draft75.js new file mode 100644 index 0000000..583f985 --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/draft75.js @@ -0,0 +1,123 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer, + Base = require('./base'), + util = require('util'); + +var Draft75 = function(request, url, options) { + Base.apply(this, arguments); + this._stage = 0; + this.version = 'hixie-75'; + + this._headers.set('Upgrade', 'WebSocket'); + this._headers.set('Connection', 'Upgrade'); + this._headers.set('WebSocket-Origin', this._request.headers.origin); + this._headers.set('WebSocket-Location', this.url); +}; +util.inherits(Draft75, Base); + +var instance = { + close: function() { + if (this.readyState === 3) return false; + this.readyState = 3; + this.emit('close', new Base.CloseEvent(null, null)); + return true; + }, + + parse: function(chunk) { + if (this.readyState > 1) return; + + this._reader.put(chunk); + + this._reader.eachByte(function(octet) { + var message; + + switch (this._stage) { + case -1: + this._body.push(octet); + this._sendHandshakeBody(); + break; + + case 0: + this._parseLeadingByte(octet); + break; + + case 1: + this._length = (octet & 0x7F) + 128 * this._length; + + if (this._closing && this._length === 0) { + return this.close(); + } + else if ((octet & 0x80) !== 0x80) { + if (this._length === 0) { + this._stage = 0; + } + else { + this._skipped = 0; + this._stage = 2; + } + } + break; + + case 2: + if (octet === 0xFF) { + this._stage = 0; + message = Buffer.from(this._buffer).toString('utf8', 0, this._buffer.length); + this.emit('message', new Base.MessageEvent(message)); + } + else { + if (this._length) { + this._skipped += 1; + if (this._skipped === this._length) + this._stage = 0; + } else { + this._buffer.push(octet); + if (this._buffer.length > this._maxLength) return this.close(); + } + } + break; + } + }, this); + }, + + frame: function(buffer) { + if (this.readyState === 0) return this._queue([buffer]); + if (this.readyState > 1) return false; + + if (typeof buffer !== 'string') buffer = buffer.toString(); + + var length = Buffer.byteLength(buffer), + frame = Buffer.allocUnsafe(length + 2); + + frame[0] = 0x00; + frame.write(buffer, 1); + frame[frame.length - 1] = 0xFF; + + this._write(frame); + return true; + }, + + _handshakeResponse: function() { + var start = 'HTTP/1.1 101 Web Socket Protocol Handshake', + headers = [start, this._headers.toString(), '']; + + return Buffer.from(headers.join('\r\n'), 'utf8'); + }, + + _parseLeadingByte: function(octet) { + if ((octet & 0x80) === 0x80) { + this._length = 0; + this._stage = 1; + } else { + delete this._length; + delete this._skipped; + this._buffer = []; + this._stage = 2; + } + } +}; + +for (var key in instance) + Draft75.prototype[key] = instance[key]; + +module.exports = Draft75; diff --git a/front/frontend/node_modules/websocket-driver/lib/websocket/driver/draft76.js b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/draft76.js new file mode 100644 index 0000000..bdaab31 --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/draft76.js @@ -0,0 +1,117 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer, + Base = require('./base'), + Draft75 = require('./draft75'), + crypto = require('crypto'), + util = require('util'); + + +var numberFromKey = function(key) { + return parseInt((key.match(/[0-9]/g) || []).join(''), 10); +}; + +var spacesInKey = function(key) { + return (key.match(/ /g) || []).length; +}; + + +var Draft76 = function(request, url, options) { + Draft75.apply(this, arguments); + this._stage = -1; + this._body = []; + this.version = 'hixie-76'; + + this._headers.clear(); + + this._headers.set('Upgrade', 'WebSocket'); + this._headers.set('Connection', 'Upgrade'); + this._headers.set('Sec-WebSocket-Origin', this._request.headers.origin); + this._headers.set('Sec-WebSocket-Location', this.url); +}; +util.inherits(Draft76, Draft75); + +var instance = { + BODY_SIZE: 8, + + start: function() { + if (!Draft75.prototype.start.call(this)) return false; + this._started = true; + this._sendHandshakeBody(); + return true; + }, + + close: function() { + if (this.readyState === 3) return false; + if (this.readyState === 1) this._write(Buffer.from([0xFF, 0x00])); + this.readyState = 3; + this.emit('close', new Base.CloseEvent(null, null)); + return true; + }, + + _handshakeResponse: function() { + var headers = this._request.headers, + key1 = headers['sec-websocket-key1'], + key2 = headers['sec-websocket-key2']; + + if (!key1) throw new Error('Missing required header: Sec-WebSocket-Key1'); + if (!key2) throw new Error('Missing required header: Sec-WebSocket-Key2'); + + var number1 = numberFromKey(key1), + spaces1 = spacesInKey(key1), + + number2 = numberFromKey(key2), + spaces2 = spacesInKey(key2); + + if (number1 % spaces1 !== 0 || number2 % spaces2 !== 0) + throw new Error('Client sent invalid Sec-WebSocket-Key headers'); + + this._keyValues = [number1 / spaces1, number2 / spaces2]; + + var start = 'HTTP/1.1 101 WebSocket Protocol Handshake', + headers = [start, this._headers.toString(), '']; + + return Buffer.from(headers.join('\r\n'), 'binary'); + }, + + _handshakeSignature: function() { + if (this._body.length < this.BODY_SIZE) return null; + + var md5 = crypto.createHash('md5'), + buffer = Buffer.allocUnsafe(8 + this.BODY_SIZE); + + buffer.writeUInt32BE(this._keyValues[0], 0); + buffer.writeUInt32BE(this._keyValues[1], 4); + Buffer.from(this._body).copy(buffer, 8, 0, this.BODY_SIZE); + + md5.update(buffer); + return Buffer.from(md5.digest('binary'), 'binary'); + }, + + _sendHandshakeBody: function() { + if (!this._started) return; + var signature = this._handshakeSignature(); + if (!signature) return; + + this._write(signature); + this._stage = 0; + this._open(); + + if (this._body.length > this.BODY_SIZE) + this.parse(this._body.slice(this.BODY_SIZE)); + }, + + _parseLeadingByte: function(octet) { + if (octet !== 0xFF) + return Draft75.prototype._parseLeadingByte.call(this, octet); + + this._closing = true; + this._length = 0; + this._stage = 1; + } +}; + +for (var key in instance) + Draft76.prototype[key] = instance[key]; + +module.exports = Draft76; diff --git a/front/frontend/node_modules/websocket-driver/lib/websocket/driver/headers.js b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/headers.js new file mode 100644 index 0000000..bc96b7d --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/headers.js @@ -0,0 +1,35 @@ +'use strict'; + +var Headers = function() { + this.clear(); +}; + +Headers.prototype.ALLOWED_DUPLICATES = ['set-cookie', 'set-cookie2', 'warning', 'www-authenticate']; + +Headers.prototype.clear = function() { + this._sent = {}; + this._lines = []; +}; + +Headers.prototype.set = function(name, value) { + if (value === undefined) return; + + name = this._strip(name); + value = this._strip(value); + + var key = name.toLowerCase(); + if (!this._sent.hasOwnProperty(key) || this.ALLOWED_DUPLICATES.indexOf(key) >= 0) { + this._sent[key] = true; + this._lines.push(name + ': ' + value + '\r\n'); + } +}; + +Headers.prototype.toString = function() { + return this._lines.join(''); +}; + +Headers.prototype._strip = function(string) { + return string.toString().replace(/^ */, '').replace(/ *$/, ''); +}; + +module.exports = Headers; diff --git a/front/frontend/node_modules/websocket-driver/lib/websocket/driver/hybi.js b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/hybi.js new file mode 100644 index 0000000..9027f90 --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/hybi.js @@ -0,0 +1,483 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer, + crypto = require('crypto'), + util = require('util'), + Extensions = require('websocket-extensions'), + Base = require('./base'), + Frame = require('./hybi/frame'), + Message = require('./hybi/message'); + +var Hybi = function(request, url, options) { + Base.apply(this, arguments); + + this._extensions = new Extensions(); + this._stage = 0; + this._masking = this._options.masking; + this._protocols = this._options.protocols || []; + this._requireMasking = this._options.requireMasking; + this._pingCallbacks = {}; + + if (typeof this._protocols === 'string') + this._protocols = this._protocols.split(/ *, */); + + if (!this._request) return; + + var protos = this._request.headers['sec-websocket-protocol'], + supported = this._protocols; + + if (protos !== undefined) { + if (typeof protos === 'string') protos = protos.split(/ *, */); + this.protocol = protos.filter(function(p) { return supported.indexOf(p) >= 0 })[0]; + } + + this.version = 'hybi-' + Hybi.VERSION; +}; +util.inherits(Hybi, Base); + +Hybi.VERSION = '13'; + +Hybi.mask = function(payload, mask, offset) { + if (!mask || mask.length === 0) return payload; + offset = offset || 0; + + for (var i = 0, n = payload.length - offset; i < n; i++) { + payload[offset + i] = payload[offset + i] ^ mask[i % 4]; + } + return payload; +}; + +Hybi.generateAccept = function(key) { + var sha1 = crypto.createHash('sha1'); + sha1.update(key + Hybi.GUID); + return sha1.digest('base64'); +}; + +Hybi.GUID = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'; + +var instance = { + FIN: 0x80, + MASK: 0x80, + RSV1: 0x40, + RSV2: 0x20, + RSV3: 0x10, + OPCODE: 0x0F, + LENGTH: 0x7F, + + OPCODES: { + continuation: 0, + text: 1, + binary: 2, + close: 8, + ping: 9, + pong: 10 + }, + + OPCODE_CODES: [0, 1, 2, 8, 9, 10], + MESSAGE_OPCODES: [0, 1, 2], + OPENING_OPCODES: [1, 2], + + ERRORS: { + normal_closure: 1000, + going_away: 1001, + protocol_error: 1002, + unacceptable: 1003, + encoding_error: 1007, + policy_violation: 1008, + too_large: 1009, + extension_error: 1010, + unexpected_condition: 1011 + }, + + ERROR_CODES: [1000, 1001, 1002, 1003, 1007, 1008, 1009, 1010, 1011], + DEFAULT_ERROR_CODE: 1000, + MIN_RESERVED_ERROR: 3000, + MAX_RESERVED_ERROR: 4999, + + // http://www.w3.org/International/questions/qa-forms-utf-8.en.php + UTF8_MATCH: /^([\x00-\x7F]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})*$/, + + addExtension: function(extension) { + this._extensions.add(extension); + return true; + }, + + parse: function(chunk) { + this._reader.put(chunk); + var buffer = true; + while (buffer) { + switch (this._stage) { + case 0: + buffer = this._reader.read(1); + if (buffer) this._parseOpcode(buffer[0]); + break; + + case 1: + buffer = this._reader.read(1); + if (buffer) this._parseLength(buffer[0]); + break; + + case 2: + buffer = this._reader.read(this._frame.lengthBytes); + if (buffer) this._parseExtendedLength(buffer); + break; + + case 3: + buffer = this._reader.read(4); + if (buffer) { + this._stage = 4; + this._frame.maskingKey = buffer; + } + break; + + case 4: + buffer = this._reader.read(this._frame.length); + if (buffer) { + this._stage = 0; + this._emitFrame(buffer); + } + break; + + default: + buffer = null; + } + } + }, + + text: function(message) { + if (this.readyState > 1) return false; + return this.frame(message, 'text'); + }, + + binary: function(message) { + if (this.readyState > 1) return false; + return this.frame(message, 'binary'); + }, + + ping: function(message, callback) { + if (this.readyState > 1) return false; + message = message || ''; + if (callback) this._pingCallbacks[message] = callback; + return this.frame(message, 'ping'); + }, + + pong: function(message) { + if (this.readyState > 1) return false; + message = message ||''; + return this.frame(message, 'pong'); + }, + + close: function(reason, code) { + reason = reason || ''; + code = code || this.ERRORS.normal_closure; + + if (this.readyState <= 0) { + this.readyState = 3; + this.emit('close', new Base.CloseEvent(code, reason)); + return true; + } else if (this.readyState === 1) { + this.readyState = 2; + this._extensions.close(function() { this.frame(reason, 'close', code) }, this); + return true; + } else { + return false; + } + }, + + frame: function(buffer, type, code) { + if (this.readyState <= 0) return this._queue([buffer, type, code]); + if (this.readyState > 2) return false; + + if (buffer instanceof Array) buffer = Buffer.from(buffer); + if (typeof buffer === 'number') buffer = buffer.toString(); + + var message = new Message(), + isText = (typeof buffer === 'string'), + payload, copy; + + message.rsv1 = message.rsv2 = message.rsv3 = false; + message.opcode = this.OPCODES[type || (isText ? 'text' : 'binary')]; + + payload = isText ? Buffer.from(buffer, 'utf8') : buffer; + + if (code) { + copy = payload; + payload = Buffer.allocUnsafe(2 + copy.length); + payload.writeUInt16BE(code, 0); + copy.copy(payload, 2); + } + message.data = payload; + + var onMessageReady = function(message) { + var frame = new Frame(); + + frame.final = true; + frame.rsv1 = message.rsv1; + frame.rsv2 = message.rsv2; + frame.rsv3 = message.rsv3; + frame.opcode = message.opcode; + frame.masked = !!this._masking; + frame.length = message.data.length; + frame.payload = message.data; + + if (frame.masked) frame.maskingKey = crypto.randomBytes(4); + + this._sendFrame(frame); + }; + + if (this.MESSAGE_OPCODES.indexOf(message.opcode) >= 0) + this._extensions.processOutgoingMessage(message, function(error, message) { + if (error) return this._fail('extension_error', error.message); + onMessageReady.call(this, message); + }, this); + else + onMessageReady.call(this, message); + + return true; + }, + + _sendFrame: function(frame) { + var length = frame.length, + header = (length <= 125) ? 2 : (length <= 65535 ? 4 : 10), + offset = header + (frame.masked ? 4 : 0), + buffer = Buffer.allocUnsafe(offset + length), + masked = frame.masked ? this.MASK : 0; + + buffer[0] = (frame.final ? this.FIN : 0) | + (frame.rsv1 ? this.RSV1 : 0) | + (frame.rsv2 ? this.RSV2 : 0) | + (frame.rsv3 ? this.RSV3 : 0) | + frame.opcode; + + if (length <= 125) { + buffer[1] = masked | length; + } else if (length <= 65535) { + buffer[1] = masked | 126; + buffer.writeUInt16BE(length, 2); + } else { + buffer[1] = masked | 127; + buffer.writeUInt32BE(Math.floor(length / 0x100000000), 2); + buffer.writeUInt32BE(length % 0x100000000, 6); + } + + frame.payload.copy(buffer, offset); + + if (frame.masked) { + frame.maskingKey.copy(buffer, header); + Hybi.mask(buffer, frame.maskingKey, offset); + } + + this._write(buffer); + }, + + _handshakeResponse: function() { + var secKey = this._request.headers['sec-websocket-key'], + version = this._request.headers['sec-websocket-version']; + + if (version !== Hybi.VERSION) + throw new Error('Unsupported WebSocket version: ' + version); + + if (typeof secKey !== 'string') + throw new Error('Missing handshake request header: Sec-WebSocket-Key'); + + this._headers.set('Upgrade', 'websocket'); + this._headers.set('Connection', 'Upgrade'); + this._headers.set('Sec-WebSocket-Accept', Hybi.generateAccept(secKey)); + + if (this.protocol) this._headers.set('Sec-WebSocket-Protocol', this.protocol); + + var extensions = this._extensions.generateResponse(this._request.headers['sec-websocket-extensions']); + if (extensions) this._headers.set('Sec-WebSocket-Extensions', extensions); + + var start = 'HTTP/1.1 101 Switching Protocols', + headers = [start, this._headers.toString(), '']; + + return Buffer.from(headers.join('\r\n'), 'utf8'); + }, + + _shutdown: function(code, reason, error) { + delete this._frame; + delete this._message; + this._stage = 5; + + var sendCloseFrame = (this.readyState === 1); + this.readyState = 2; + + this._extensions.close(function() { + if (sendCloseFrame) this.frame(reason, 'close', code); + this.readyState = 3; + if (error) this.emit('error', new Error(reason)); + this.emit('close', new Base.CloseEvent(code, reason)); + }, this); + }, + + _fail: function(type, message) { + if (this.readyState > 1) return; + this._shutdown(this.ERRORS[type], message, true); + }, + + _parseOpcode: function(octet) { + var rsvs = [this.RSV1, this.RSV2, this.RSV3].map(function(rsv) { + return (octet & rsv) === rsv; + }); + + var frame = this._frame = new Frame(); + + frame.final = (octet & this.FIN) === this.FIN; + frame.rsv1 = rsvs[0]; + frame.rsv2 = rsvs[1]; + frame.rsv3 = rsvs[2]; + frame.opcode = (octet & this.OPCODE); + + this._stage = 1; + + if (!this._extensions.validFrameRsv(frame)) + return this._fail('protocol_error', + 'One or more reserved bits are on: reserved1 = ' + (frame.rsv1 ? 1 : 0) + + ', reserved2 = ' + (frame.rsv2 ? 1 : 0) + + ', reserved3 = ' + (frame.rsv3 ? 1 : 0)); + + if (this.OPCODE_CODES.indexOf(frame.opcode) < 0) + return this._fail('protocol_error', 'Unrecognized frame opcode: ' + frame.opcode); + + if (this.MESSAGE_OPCODES.indexOf(frame.opcode) < 0 && !frame.final) + return this._fail('protocol_error', 'Received fragmented control frame: opcode = ' + frame.opcode); + + if (this._message && this.OPENING_OPCODES.indexOf(frame.opcode) >= 0) + return this._fail('protocol_error', 'Received new data frame but previous continuous frame is unfinished'); + }, + + _parseLength: function(octet) { + var frame = this._frame; + frame.masked = (octet & this.MASK) === this.MASK; + frame.length = (octet & this.LENGTH); + + if (frame.length >= 0 && frame.length <= 125) { + this._stage = frame.masked ? 3 : 4; + if (!this._checkFrameLength()) return; + } else { + this._stage = 2; + frame.lengthBytes = (frame.length === 126 ? 2 : 8); + } + + if (this._requireMasking && !frame.masked) + return this._fail('unacceptable', 'Received unmasked frame but masking is required'); + }, + + _parseExtendedLength: function(buffer) { + var frame = this._frame; + frame.length = this._readUInt(buffer); + + this._stage = frame.masked ? 3 : 4; + + if (this.MESSAGE_OPCODES.indexOf(frame.opcode) < 0 && frame.length > 125) + return this._fail('protocol_error', 'Received control frame having too long payload: ' + frame.length); + + if (!this._checkFrameLength()) return; + }, + + _checkFrameLength: function() { + var length = this._message ? this._message.length : 0; + + if (length + this._frame.length > this._maxLength) { + this._fail('too_large', 'WebSocket frame length too large'); + return false; + } else { + return true; + } + }, + + _emitFrame: function(buffer) { + var frame = this._frame, + payload = frame.payload = Hybi.mask(buffer, frame.maskingKey), + opcode = frame.opcode, + message, + code, reason, + callbacks, callback; + + delete this._frame; + + if (opcode === this.OPCODES.continuation) { + if (!this._message) return this._fail('protocol_error', 'Received unexpected continuation frame'); + this._message.pushFrame(frame); + } + + if (opcode === this.OPCODES.text || opcode === this.OPCODES.binary) { + this._message = new Message(); + this._message.pushFrame(frame); + } + + if (frame.final && this.MESSAGE_OPCODES.indexOf(opcode) >= 0) + return this._emitMessage(this._message); + + if (opcode === this.OPCODES.close) { + code = (payload.length >= 2) ? payload.readUInt16BE(0) : null; + reason = (payload.length > 2) ? this._encode(payload.slice(2)) : null; + + if (!(payload.length === 0) && + !(code !== null && code >= this.MIN_RESERVED_ERROR && code <= this.MAX_RESERVED_ERROR) && + this.ERROR_CODES.indexOf(code) < 0) + code = this.ERRORS.protocol_error; + + if (payload.length > 125 || (payload.length > 2 && !reason)) + code = this.ERRORS.protocol_error; + + this._shutdown(code || this.DEFAULT_ERROR_CODE, reason || ''); + } + + if (opcode === this.OPCODES.ping) { + this.frame(payload, 'pong'); + this.emit('ping', new Base.PingEvent(payload.toString())) + } + + if (opcode === this.OPCODES.pong) { + callbacks = this._pingCallbacks; + message = this._encode(payload); + callback = callbacks[message]; + + delete callbacks[message]; + if (callback) callback() + + this.emit('pong', new Base.PongEvent(payload.toString())) + } + }, + + _emitMessage: function(message) { + var message = this._message; + message.read(); + + delete this._message; + + this._extensions.processIncomingMessage(message, function(error, message) { + if (error) return this._fail('extension_error', error.message); + + var payload = message.data; + if (message.opcode === this.OPCODES.text) payload = this._encode(payload); + + if (payload === null) + return this._fail('encoding_error', 'Could not decode a text frame as UTF-8'); + else + this.emit('message', new Base.MessageEvent(payload)); + }, this); + }, + + _encode: function(buffer) { + try { + var string = buffer.toString('binary', 0, buffer.length); + if (!this.UTF8_MATCH.test(string)) return null; + } catch (e) {} + return buffer.toString('utf8', 0, buffer.length); + }, + + _readUInt: function(buffer) { + if (buffer.length === 2) return buffer.readUInt16BE(0); + + return buffer.readUInt32BE(0) * 0x100000000 + + buffer.readUInt32BE(4); + } +}; + +for (var key in instance) + Hybi.prototype[key] = instance[key]; + +module.exports = Hybi; diff --git a/front/frontend/node_modules/websocket-driver/lib/websocket/driver/hybi/frame.js b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/hybi/frame.js new file mode 100644 index 0000000..0fb003f --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/hybi/frame.js @@ -0,0 +1,21 @@ +'use strict'; + +var Frame = function() {}; + +var instance = { + final: false, + rsv1: false, + rsv2: false, + rsv3: false, + opcode: null, + masked: false, + maskingKey: null, + lengthBytes: 1, + length: 0, + payload: null +}; + +for (var key in instance) + Frame.prototype[key] = instance[key]; + +module.exports = Frame; diff --git a/front/frontend/node_modules/websocket-driver/lib/websocket/driver/hybi/message.js b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/hybi/message.js new file mode 100644 index 0000000..e881273 --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/hybi/message.js @@ -0,0 +1,34 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer; + +var Message = function() { + this.rsv1 = false; + this.rsv2 = false; + this.rsv3 = false; + this.opcode = null; + this.length = 0; + this._chunks = []; +}; + +var instance = { + read: function() { + return this.data = this.data || Buffer.concat(this._chunks, this.length); + }, + + pushFrame: function(frame) { + this.rsv1 = this.rsv1 || frame.rsv1; + this.rsv2 = this.rsv2 || frame.rsv2; + this.rsv3 = this.rsv3 || frame.rsv3; + + if (this.opcode === null) this.opcode = frame.opcode; + + this._chunks.push(frame.payload); + this.length += frame.length; + } +}; + +for (var key in instance) + Message.prototype[key] = instance[key]; + +module.exports = Message; diff --git a/front/frontend/node_modules/websocket-driver/lib/websocket/driver/proxy.js b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/proxy.js new file mode 100644 index 0000000..2fdd32e --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/proxy.js @@ -0,0 +1,99 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer, + Stream = require('stream').Stream, + url = require('url'), + util = require('util'), + Base = require('./base'), + Headers = require('./headers'), + HttpParser = require('../http_parser'); + +var PORTS = { 'ws:': 80, 'wss:': 443 }; + +var Proxy = function(client, origin, options) { + this._client = client; + this._http = new HttpParser('response'); + this._origin = (typeof client.url === 'object') ? client.url : url.parse(client.url); + this._url = (typeof origin === 'object') ? origin : url.parse(origin); + this._options = options || {}; + this._state = 0; + + this.readable = this.writable = true; + this._paused = false; + + this._headers = new Headers(); + this._headers.set('Host', this._origin.host); + this._headers.set('Connection', 'keep-alive'); + this._headers.set('Proxy-Connection', 'keep-alive'); + + var auth = this._url.auth && Buffer.from(this._url.auth, 'utf8').toString('base64'); + if (auth) this._headers.set('Proxy-Authorization', 'Basic ' + auth); +}; +util.inherits(Proxy, Stream); + +var instance = { + setHeader: function(name, value) { + if (this._state !== 0) return false; + this._headers.set(name, value); + return true; + }, + + start: function() { + if (this._state !== 0) return false; + this._state = 1; + + var origin = this._origin, + port = origin.port || PORTS[origin.protocol], + start = 'CONNECT ' + origin.hostname + ':' + port + ' HTTP/1.1'; + + var headers = [start, this._headers.toString(), '']; + + this.emit('data', Buffer.from(headers.join('\r\n'), 'utf8')); + return true; + }, + + pause: function() { + this._paused = true; + }, + + resume: function() { + this._paused = false; + this.emit('drain'); + }, + + write: function(chunk) { + if (!this.writable) return false; + + this._http.parse(chunk); + if (!this._http.isComplete()) return !this._paused; + + this.statusCode = this._http.statusCode; + this.headers = this._http.headers; + + if (this.statusCode === 200) { + this.emit('connect', new Base.ConnectEvent()); + } else { + var message = "Can't establish a connection to the server at " + this._origin.href; + this.emit('error', new Error(message)); + } + this.end(); + return !this._paused; + }, + + end: function(chunk) { + if (!this.writable) return; + if (chunk !== undefined) this.write(chunk); + this.readable = this.writable = false; + this.emit('close'); + this.emit('end'); + }, + + destroy: function() { + this.end(); + } +}; + +for (var key in instance) + Proxy.prototype[key] = instance[key]; + +module.exports = Proxy; diff --git a/front/frontend/node_modules/websocket-driver/lib/websocket/driver/server.js b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/server.js new file mode 100644 index 0000000..dc635b0 --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/server.js @@ -0,0 +1,112 @@ +'use strict'; + +var util = require('util'), + HttpParser = require('../http_parser'), + Base = require('./base'), + Draft75 = require('./draft75'), + Draft76 = require('./draft76'), + Hybi = require('./hybi'); + +var Server = function(options) { + Base.call(this, null, null, options); + this._http = new HttpParser('request'); +}; +util.inherits(Server, Base); + +var instance = { + EVENTS: ['open', 'message', 'error', 'close', 'ping', 'pong'], + + _bindEventListeners: function() { + this.messages.on('error', function() {}); + this.on('error', function() {}); + }, + + parse: function(chunk) { + if (this._delegate) return this._delegate.parse(chunk); + + this._http.parse(chunk); + if (!this._http.isComplete()) return; + + this.method = this._http.method; + this.url = this._http.url; + this.headers = this._http.headers; + this.body = this._http.body; + + var self = this; + this._delegate = Server.http(this, this._options); + this._delegate.messages = this.messages; + this._delegate.io = this.io; + this._open(); + + this.EVENTS.forEach(function(event) { + this._delegate.on(event, function(e) { self.emit(event, e) }); + }, this); + + this.protocol = this._delegate.protocol; + this.version = this._delegate.version; + + this.parse(this._http.body); + this.emit('connect', new Base.ConnectEvent()); + }, + + _open: function() { + this.__queue.forEach(function(msg) { + this._delegate[msg[0]].apply(this._delegate, msg[1]); + }, this); + this.__queue = []; + } +}; + +['addExtension', 'setHeader', 'start', 'frame', 'text', 'binary', 'ping', 'close'].forEach(function(method) { + instance[method] = function() { + if (this._delegate) { + return this._delegate[method].apply(this._delegate, arguments); + } else { + this.__queue.push([method, arguments]); + return true; + } + }; +}); + +for (var key in instance) + Server.prototype[key] = instance[key]; + +Server.isSecureRequest = function(request) { + if (request.connection && request.connection.authorized !== undefined) return true; + if (request.socket && request.socket.secure) return true; + + var headers = request.headers; + if (!headers) return false; + if (headers['https'] === 'on') return true; + if (headers['x-forwarded-ssl'] === 'on') return true; + if (headers['x-forwarded-scheme'] === 'https') return true; + if (headers['x-forwarded-proto'] === 'https') return true; + + return false; +}; + +Server.determineUrl = function(request) { + var scheme = this.isSecureRequest(request) ? 'wss:' : 'ws:'; + return scheme + '//' + request.headers.host + request.url; +}; + +Server.http = function(request, options) { + options = options || {}; + if (options.requireMasking === undefined) options.requireMasking = true; + + var headers = request.headers, + version = headers['sec-websocket-version'], + key = headers['sec-websocket-key'], + key1 = headers['sec-websocket-key1'], + key2 = headers['sec-websocket-key2'], + url = this.determineUrl(request); + + if (version || key) + return new Hybi(request, url, options); + else if (key1 || key2) + return new Draft76(request, url, options); + else + return new Draft75(request, url, options); +}; + +module.exports = Server; diff --git a/front/frontend/node_modules/websocket-driver/lib/websocket/driver/stream_reader.js b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/stream_reader.js new file mode 100644 index 0000000..3564da8 --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/lib/websocket/driver/stream_reader.js @@ -0,0 +1,69 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer; + +var StreamReader = function() { + this._queue = []; + this._queueSize = 0; + this._offset = 0; +}; + +StreamReader.prototype.put = function(buffer) { + if (!buffer || buffer.length === 0) return; + if (!Buffer.isBuffer(buffer)) buffer = Buffer.from(buffer); + this._queue.push(buffer); + this._queueSize += buffer.length; +}; + +StreamReader.prototype.read = function(length) { + if (length > this._queueSize) return null; + if (length === 0) return Buffer.alloc(0); + + this._queueSize -= length; + + var queue = this._queue, + remain = length, + first = queue[0], + buffers, buffer; + + if (first.length >= length) { + if (first.length === length) { + return queue.shift(); + } else { + buffer = first.slice(0, length); + queue[0] = first.slice(length); + return buffer; + } + } + + for (var i = 0, n = queue.length; i < n; i++) { + if (remain < queue[i].length) break; + remain -= queue[i].length; + } + buffers = queue.splice(0, i); + + if (remain > 0 && queue.length > 0) { + buffers.push(queue[0].slice(0, remain)); + queue[0] = queue[0].slice(remain); + } + return Buffer.concat(buffers, length); +}; + +StreamReader.prototype.eachByte = function(callback, context) { + var buffer, n, index; + + while (this._queue.length > 0) { + buffer = this._queue[0]; + n = buffer.length; + + while (this._offset < n) { + index = this._offset; + this._offset += 1; + callback.call(context, buffer[index]); + } + this._offset = 0; + this._queue.shift(); + } +}; + +module.exports = StreamReader; diff --git a/front/frontend/node_modules/websocket-driver/lib/websocket/http_parser.js b/front/frontend/node_modules/websocket-driver/lib/websocket/http_parser.js new file mode 100644 index 0000000..1396656 --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/lib/websocket/http_parser.js @@ -0,0 +1,135 @@ +'use strict'; + +var NodeHTTPParser = require('http-parser-js').HTTPParser, + Buffer = require('safe-buffer').Buffer; + +var TYPES = { + request: NodeHTTPParser.REQUEST || 'request', + response: NodeHTTPParser.RESPONSE || 'response' +}; + +var HttpParser = function(type) { + this._type = type; + this._parser = new NodeHTTPParser(TYPES[type]); + this._complete = false; + this.headers = {}; + + var current = null, + self = this; + + this._parser.onHeaderField = function(b, start, length) { + current = b.toString('utf8', start, start + length).toLowerCase(); + }; + + this._parser.onHeaderValue = function(b, start, length) { + var value = b.toString('utf8', start, start + length); + + if (self.headers.hasOwnProperty(current)) + self.headers[current] += ', ' + value; + else + self.headers[current] = value; + }; + + this._parser.onHeadersComplete = this._parser[NodeHTTPParser.kOnHeadersComplete] = + function(majorVersion, minorVersion, headers, method, pathname, statusCode) { + var info = arguments[0]; + + if (typeof info === 'object') { + method = info.method; + pathname = info.url; + statusCode = info.statusCode; + headers = info.headers; + } + + self.method = (typeof method === 'number') ? HttpParser.METHODS[method] : method; + self.statusCode = statusCode; + self.url = pathname; + + if (!headers) return; + + for (var i = 0, n = headers.length, key, value; i < n; i += 2) { + key = headers[i].toLowerCase(); + value = headers[i+1]; + if (self.headers.hasOwnProperty(key)) + self.headers[key] += ', ' + value; + else + self.headers[key] = value; + } + + self._complete = true; + }; +}; + +HttpParser.METHODS = { + 0: 'DELETE', + 1: 'GET', + 2: 'HEAD', + 3: 'POST', + 4: 'PUT', + 5: 'CONNECT', + 6: 'OPTIONS', + 7: 'TRACE', + 8: 'COPY', + 9: 'LOCK', + 10: 'MKCOL', + 11: 'MOVE', + 12: 'PROPFIND', + 13: 'PROPPATCH', + 14: 'SEARCH', + 15: 'UNLOCK', + 16: 'BIND', + 17: 'REBIND', + 18: 'UNBIND', + 19: 'ACL', + 20: 'REPORT', + 21: 'MKACTIVITY', + 22: 'CHECKOUT', + 23: 'MERGE', + 24: 'M-SEARCH', + 25: 'NOTIFY', + 26: 'SUBSCRIBE', + 27: 'UNSUBSCRIBE', + 28: 'PATCH', + 29: 'PURGE', + 30: 'MKCALENDAR', + 31: 'LINK', + 32: 'UNLINK' +}; + +var VERSION = process.version + ? process.version.match(/[0-9]+/g).map(function(n) { return parseInt(n, 10) }) + : []; + +if (VERSION[0] === 0 && VERSION[1] === 12) { + HttpParser.METHODS[16] = 'REPORT'; + HttpParser.METHODS[17] = 'MKACTIVITY'; + HttpParser.METHODS[18] = 'CHECKOUT'; + HttpParser.METHODS[19] = 'MERGE'; + HttpParser.METHODS[20] = 'M-SEARCH'; + HttpParser.METHODS[21] = 'NOTIFY'; + HttpParser.METHODS[22] = 'SUBSCRIBE'; + HttpParser.METHODS[23] = 'UNSUBSCRIBE'; + HttpParser.METHODS[24] = 'PATCH'; + HttpParser.METHODS[25] = 'PURGE'; +} + +HttpParser.prototype.isComplete = function() { + return this._complete; +}; + +HttpParser.prototype.parse = function(chunk) { + var consumed = this._parser.execute(chunk, 0, chunk.length); + + if (typeof consumed !== 'number') { + this.error = consumed; + this._complete = true; + return; + } + + if (this._complete) + this.body = (consumed < chunk.length) + ? chunk.slice(consumed) + : Buffer.alloc(0); +}; + +module.exports = HttpParser; diff --git a/front/frontend/node_modules/websocket-driver/lib/websocket/streams.js b/front/frontend/node_modules/websocket-driver/lib/websocket/streams.js new file mode 100644 index 0000000..96ab31f --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/lib/websocket/streams.js @@ -0,0 +1,146 @@ +'use strict'; + +/** + +Streams in a WebSocket connection +--------------------------------- + +We model a WebSocket as two duplex streams: one stream is for the wire protocol +over an I/O socket, and the other is for incoming/outgoing messages. + + + +----------+ +---------+ +----------+ + [1] write(chunk) -->| ~~~~~~~~ +----->| parse() +----->| ~~~~~~~~ +--> emit('data') [2] + | | +----+----+ | | + | | | | | + | IO | | [5] | Messages | + | | V | | + | | +---------+ | | + [4] emit('data') <--+ ~~~~~~~~ |<-----+ frame() |<-----+ ~~~~~~~~ |<-- write(chunk) [3] + +----------+ +---------+ +----------+ + + +Message transfer in each direction is simple: IO receives a byte stream [1] and +sends this stream for parsing. The parser will periodically emit a complete +message text on the Messages stream [2]. Similarly, when messages are written +to the Messages stream [3], they are framed using the WebSocket wire format and +emitted via IO [4]. + +There is a feedback loop via [5] since some input from [1] will be things like +ping, pong and close frames. In these cases the protocol responds by emitting +responses directly back to [4] rather than emitting messages via [2]. + +For the purposes of flow control, we consider the sources of each Readable +stream to be as follows: + +* [2] receives input from [1] +* [4] receives input from [1] and [3] + +The classes below express the relationships described above without prescribing +anything about how parse() and frame() work, other than assuming they emit +'data' events to the IO and Messages streams. They will work with any protocol +driver having these two methods. +**/ + + +var Stream = require('stream').Stream, + util = require('util'); + + +var IO = function(driver) { + this.readable = this.writable = true; + this._paused = false; + this._driver = driver; +}; +util.inherits(IO, Stream); + +// The IO pause() and resume() methods will be called when the socket we are +// piping to gets backed up and drains. Since IO output [4] comes from IO input +// [1] and Messages input [3], we need to tell both of those to return false +// from write() when this stream is paused. + +IO.prototype.pause = function() { + this._paused = true; + this._driver.messages._paused = true; +}; + +IO.prototype.resume = function() { + this._paused = false; + this.emit('drain'); + + var messages = this._driver.messages; + messages._paused = false; + messages.emit('drain'); +}; + +// When we receive input from a socket, send it to the parser and tell the +// source whether to back off. +IO.prototype.write = function(chunk) { + if (!this.writable) return false; + this._driver.parse(chunk); + return !this._paused; +}; + +// The IO end() method will be called when the socket piping into it emits +// 'close' or 'end', i.e. the socket is closed. In this situation the Messages +// stream will not emit any more data so we emit 'end'. +IO.prototype.end = function(chunk) { + if (!this.writable) return; + if (chunk !== undefined) this.write(chunk); + this.writable = false; + + var messages = this._driver.messages; + if (messages.readable) { + messages.readable = messages.writable = false; + messages.emit('end'); + } +}; + +IO.prototype.destroy = function() { + this.end(); +}; + + +var Messages = function(driver) { + this.readable = this.writable = true; + this._paused = false; + this._driver = driver; +}; +util.inherits(Messages, Stream); + +// The Messages pause() and resume() methods will be called when the app that's +// processing the messages gets backed up and drains. If we're emitting +// messages too fast we should tell the source to slow down. Message output [2] +// comes from IO input [1]. + +Messages.prototype.pause = function() { + this._driver.io._paused = true; +}; + +Messages.prototype.resume = function() { + this._driver.io._paused = false; + this._driver.io.emit('drain'); +}; + +// When we receive messages from the user, send them to the formatter and tell +// the source whether to back off. +Messages.prototype.write = function(message) { + if (!this.writable) return false; + if (typeof message === 'string') this._driver.text(message); + else this._driver.binary(message); + return !this._paused; +}; + +// The Messages end() method will be called when a stream piping into it emits +// 'end'. Many streams may be piped into the WebSocket and one of them ending +// does not mean the whole socket is done, so just process the input and move +// on leaving the socket open. +Messages.prototype.end = function(message) { + if (message !== undefined) this.write(message); +}; + +Messages.prototype.destroy = function() {}; + + +exports.IO = IO; +exports.Messages = Messages; diff --git a/front/frontend/node_modules/websocket-driver/package.json b/front/frontend/node_modules/websocket-driver/package.json new file mode 100644 index 0000000..fab2506 --- /dev/null +++ b/front/frontend/node_modules/websocket-driver/package.json @@ -0,0 +1,35 @@ +{ + "name": "websocket-driver", + "description": "WebSocket protocol handler with pluggable I/O", + "homepage": "https://github.com/faye/websocket-driver-node", + "author": "James Coglan (http://jcoglan.com/)", + "keywords": [ + "websocket" + ], + "license": "Apache-2.0", + "version": "0.7.4", + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "lib" + ], + "main": "./lib/websocket/driver", + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "devDependencies": { + "jstest": "*", + "permessage-deflate": "*" + }, + "scripts": { + "test": "jstest spec/runner.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/faye/websocket-driver-node.git" + }, + "bugs": "https://github.com/faye/websocket-driver-node/issues" +} diff --git a/front/frontend/node_modules/websocket-extensions/CHANGELOG.md b/front/frontend/node_modules/websocket-extensions/CHANGELOG.md new file mode 100644 index 0000000..bb84f5a --- /dev/null +++ b/front/frontend/node_modules/websocket-extensions/CHANGELOG.md @@ -0,0 +1,28 @@ +### 0.1.4 / 2020-06-02 + +- Remove a ReDoS vulnerability in the header parser (CVE-2020-7662, reported by + Robert McLaughlin) +- Change license from MIT to Apache 2.0 + +### 0.1.3 / 2017-11-11 + +- Accept extension names and parameters including uppercase letters +- Handle extension names that clash with `Object.prototype` properties + +### 0.1.2 / 2017-09-10 + +- Catch synchronous exceptions thrown when calling an extension +- Fix race condition caused when a message is pushed after a cell has stopped + due to an error +- Fix failure of `close()` to return if a message that's queued after one that + produces an error never finishes being processed + +### 0.1.1 / 2015-02-19 + +- Prevent sessions being closed before they have finished processing messages +- Add a callback to `Extensions.close()` so the caller can tell when it's safe + to close the socket + +### 0.1.0 / 2014-12-12 + +- Initial release diff --git a/front/frontend/node_modules/websocket-extensions/LICENSE.md b/front/frontend/node_modules/websocket-extensions/LICENSE.md new file mode 100644 index 0000000..3a88e51 --- /dev/null +++ b/front/frontend/node_modules/websocket-extensions/LICENSE.md @@ -0,0 +1,12 @@ +Copyright 2014-2020 James Coglan + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. diff --git a/front/frontend/node_modules/websocket-extensions/README.md b/front/frontend/node_modules/websocket-extensions/README.md new file mode 100644 index 0000000..68694ea --- /dev/null +++ b/front/frontend/node_modules/websocket-extensions/README.md @@ -0,0 +1,331 @@ +# websocket-extensions [![Build status](https://secure.travis-ci.org/faye/websocket-extensions-node.svg)](http://travis-ci.org/faye/websocket-extensions-node) + +A minimal framework that supports the implementation of WebSocket extensions in +a way that's decoupled from the main protocol. This library aims to allow a +WebSocket extension to be written and used with any protocol library, by +defining abstract representations of frames and messages that allow modules to +co-operate. + +`websocket-extensions` provides a container for registering extension plugins, +and provides all the functions required to negotiate which extensions to use +during a session via the `Sec-WebSocket-Extensions` header. By implementing the +APIs defined in this document, an extension may be used by any WebSocket library +based on this framework. + +## Installation + +``` +$ npm install websocket-extensions +``` + +## Usage + +There are two main audiences for this library: authors implementing the +WebSocket protocol, and authors implementing extensions. End users of a +WebSocket library or an extension should be able to use any extension by passing +it as an argument to their chosen protocol library, without needing to know how +either of them work, or how the `websocket-extensions` framework operates. + +The library is designed with the aim that any protocol implementation and any +extension can be used together, so long as they support the same abstract +representation of frames and messages. + +### Data types + +The APIs provided by the framework rely on two data types; extensions will +expect to be given data and to be able to return data in these formats: + +#### *Frame* + +*Frame* is a structure representing a single WebSocket frame of any type. Frames +are simple objects that must have at least the following properties, which +represent the data encoded in the frame: + +| property | description | +| ------------ | ------------------------------------------------------------------ | +| `final` | `true` if the `FIN` bit is set, `false` otherwise | +| `rsv1` | `true` if the `RSV1` bit is set, `false` otherwise | +| `rsv2` | `true` if the `RSV2` bit is set, `false` otherwise | +| `rsv3` | `true` if the `RSV3` bit is set, `false` otherwise | +| `opcode` | the numeric opcode (`0`, `1`, `2`, `8`, `9`, or `10`) of the frame | +| `masked` | `true` if the `MASK` bit is set, `false` otherwise | +| `maskingKey` | a 4-byte `Buffer` if `masked` is `true`, otherwise `null` | +| `payload` | a `Buffer` containing the (unmasked) application data | + +#### *Message* + +A *Message* represents a complete application message, which can be formed from +text, binary and continuation frames. It has the following properties: + +| property | description | +| -------- | ----------------------------------------------------------------- | +| `rsv1` | `true` if the first frame of the message has the `RSV1` bit set | +| `rsv2` | `true` if the first frame of the message has the `RSV2` bit set | +| `rsv3` | `true` if the first frame of the message has the `RSV3` bit set | +| `opcode` | the numeric opcode (`1` or `2`) of the first frame of the message | +| `data` | the concatenation of all the frame payloads in the message | + +### For driver authors + +A driver author is someone implementing the WebSocket protocol proper, and who +wishes end users to be able to use WebSocket extensions with their library. + +At the start of a WebSocket session, on both the client and the server side, +they should begin by creating an extension container and adding whichever +extensions they want to use. + +```js +var Extensions = require('websocket-extensions'), + deflate = require('permessage-deflate'); + +var exts = new Extensions(); +exts.add(deflate); +``` + +In the following examples, `exts` refers to this `Extensions` instance. + +#### Client sessions + +Clients will use the methods `generateOffer()` and `activate(header)`. + +As part of the handshake process, the client must send a +`Sec-WebSocket-Extensions` header to advertise that it supports the registered +extensions. This header should be generated using: + +```js +request.headers['sec-websocket-extensions'] = exts.generateOffer(); +``` + +This returns a string, for example `"permessage-deflate; +client_max_window_bits"`, that represents all the extensions the client is +offering to use, and their parameters. This string may contain multiple offers +for the same extension. + +When the client receives the handshake response from the server, it should pass +the incoming `Sec-WebSocket-Extensions` header in to `exts` to activate the +extensions the server has accepted: + +```js +exts.activate(response.headers['sec-websocket-extensions']); +``` + +If the server has sent any extension responses that the client does not +recognize, or are in conflict with one another for use of RSV bits, or that use +invalid parameters for the named extensions, then `exts.activate()` will +`throw`. In this event, the client driver should fail the connection with +closing code `1010`. + +#### Server sessions + +Servers will use the method `generateResponse(header)`. + +A server session needs to generate a `Sec-WebSocket-Extensions` header to send +in its handshake response: + +```js +var clientOffer = request.headers['sec-websocket-extensions'], + extResponse = exts.generateResponse(clientOffer); + +response.headers['sec-websocket-extensions'] = extResponse; +``` + +Calling `exts.generateResponse(header)` activates those extensions the client +has asked to use, if they are registered, asks each extension for a set of +response parameters, and returns a string containing the response parameters for +all accepted extensions. + +#### In both directions + +Both clients and servers will use the methods `validFrameRsv(frame)`, +`processIncomingMessage(message)` and `processOutgoingMessage(message)`. + +The WebSocket protocol requires that frames do not have any of the `RSV` bits +set unless there is an extension in use that allows otherwise. When processing +an incoming frame, sessions should pass a *Frame* object to: + +```js +exts.validFrameRsv(frame) +``` + +If this method returns `false`, the session should fail the WebSocket connection +with closing code `1002`. + +To pass incoming messages through the extension stack, a session should +construct a *Message* object according to the above datatype definitions, and +call: + +```js +exts.processIncomingMessage(message, function(error, msg) { + // hand the message off to the application +}); +``` + +If any extensions fail to process the message, then the callback will yield an +error and the session should fail the WebSocket connection with closing code +`1010`. If `error` is `null`, then `msg` should be passed on to the application. + +To pass outgoing messages through the extension stack, a session should +construct a *Message* as before, and call: + +```js +exts.processOutgoingMessage(message, function(error, msg) { + // write message to the transport +}); +``` + +If any extensions fail to process the message, then the callback will yield an +error and the session should fail the WebSocket connection with closing code +`1010`. If `error` is `null`, then `message` should be converted into frames +(with the message's `rsv1`, `rsv2`, `rsv3` and `opcode` set on the first frame) +and written to the transport. + +At the end of the WebSocket session (either when the protocol is explicitly +ended or the transport connection disconnects), the driver should call: + +```js +exts.close(function() {}) +``` + +The callback is invoked when all extensions have finished processing any +messages in the pipeline and it's safe to close the socket. + +### For extension authors + +An extension author is someone implementing an extension that transforms +WebSocket messages passing between the client and server. They would like to +implement their extension once and have it work with any protocol library. + +Extension authors will not install `websocket-extensions` or call it directly. +Instead, they should implement the following API to allow their extension to +plug into the `websocket-extensions` framework. + +An `Extension` is any object that has the following properties: + +| property | description | +| -------- | ---------------------------------------------------------------------------- | +| `name` | a string containing the name of the extension as used in negotiation headers | +| `type` | a string, must be `"permessage"` | +| `rsv1` | either `true` if the extension uses the RSV1 bit, `false` otherwise | +| `rsv2` | either `true` if the extension uses the RSV2 bit, `false` otherwise | +| `rsv3` | either `true` if the extension uses the RSV3 bit, `false` otherwise | + +It must also implement the following methods: + +```js +ext.createClientSession() +``` + +This returns a *ClientSession*, whose interface is defined below. + +```js +ext.createServerSession(offers) +``` + +This takes an array of offer params and returns a *ServerSession*, whose +interface is defined below. For example, if the client handshake contains the +offer header: + +``` +Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover; server_max_window_bits=8, \ + permessage-deflate; server_max_window_bits=15 +``` + +then the `permessage-deflate` extension will receive the call: + +```js +ext.createServerSession([ + { server_no_context_takeover: true, server_max_window_bits: 8 }, + { server_max_window_bits: 15 } +]); +``` + +The extension must decide which set of parameters it wants to accept, if any, +and return a *ServerSession* if it wants to accept the parameters and `null` +otherwise. + +#### *ClientSession* + +A *ClientSession* is the type returned by `ext.createClientSession()`. It must +implement the following methods, as well as the *Session* API listed below. + +```js +clientSession.generateOffer() +// e.g. -> [ +// { server_no_context_takeover: true, server_max_window_bits: 8 }, +// { server_max_window_bits: 15 } +// ] +``` + +This must return a set of parameters to include in the client's +`Sec-WebSocket-Extensions` offer header. If the session wants to offer multiple +configurations, it can return an array of sets of parameters as shown above. + +```js +clientSession.activate(params) // -> true +``` + +This must take a single set of parameters from the server's handshake response +and use them to configure the client session. If the client accepts the given +parameters, then this method must return `true`. If it returns any other value, +the framework will interpret this as the client rejecting the response, and will +`throw`. + +#### *ServerSession* + +A *ServerSession* is the type returned by `ext.createServerSession(offers)`. It +must implement the following methods, as well as the *Session* API listed below. + +```js +serverSession.generateResponse() +// e.g. -> { server_max_window_bits: 8 } +``` + +This returns the set of parameters the server session wants to send in its +`Sec-WebSocket-Extensions` response header. Only one set of parameters is +returned to the client per extension. Server sessions that would confict on +their use of RSV bits are not activated. + +#### *Session* + +The *Session* API must be implemented by both client and server sessions. It +contains two methods, `processIncomingMessage(message)` and +`processOutgoingMessage(message)`. + +```js +session.processIncomingMessage(message, function(error, msg) { ... }) +``` + +The session must implement this method to take an incoming *Message* as defined +above, transform it in any way it needs, then return it via the callback. If +there is an error processing the message, this method should yield an error as +the first argument. + +```js +session.processOutgoingMessage(message, function(error, msg) { ... }) +``` + +The session must implement this method to take an outgoing *Message* as defined +above, transform it in any way it needs, then return it via the callback. If +there is an error processing the message, this method should yield an error as +the first argument. + +Note that both `processIncomingMessage()` and `processOutgoingMessage()` can +perform their logic asynchronously, are allowed to process multiple messages +concurrently, and are not required to complete working on messages in the same +order the messages arrive. `websocket-extensions` will reorder messages as your +extension emits them and will make sure every extension is given messages in the +order they arrive from the driver. This allows extensions to maintain state that +depends on the messages' wire order, for example keeping a DEFLATE compression +context between messages. + +```js +session.close() +``` + +The framework will call this method when the WebSocket session ends, allowing +the session to release any resources it's using. + +## Examples + +- Consumer: [websocket-driver](https://github.com/faye/websocket-driver-node) +- Provider: [permessage-deflate](https://github.com/faye/permessage-deflate-node) diff --git a/front/frontend/node_modules/websocket-extensions/lib/parser.js b/front/frontend/node_modules/websocket-extensions/lib/parser.js new file mode 100644 index 0000000..533767e --- /dev/null +++ b/front/frontend/node_modules/websocket-extensions/lib/parser.js @@ -0,0 +1,103 @@ +'use strict'; + +var TOKEN = /([!#\$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+)/, + NOTOKEN = /([^!#\$%&'\*\+\-\.\^_`\|~0-9A-Za-z])/g, + QUOTED = /"((?:\\[\x00-\x7f]|[^\x00-\x08\x0a-\x1f\x7f"\\])*)"/, + PARAM = new RegExp(TOKEN.source + '(?:=(?:' + TOKEN.source + '|' + QUOTED.source + '))?'), + EXT = new RegExp(TOKEN.source + '(?: *; *' + PARAM.source + ')*', 'g'), + EXT_LIST = new RegExp('^' + EXT.source + '(?: *, *' + EXT.source + ')*$'), + NUMBER = /^-?(0|[1-9][0-9]*)(\.[0-9]+)?$/; + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +var Parser = { + parseHeader: function(header) { + var offers = new Offers(); + if (header === '' || header === undefined) return offers; + + if (!EXT_LIST.test(header)) + throw new SyntaxError('Invalid Sec-WebSocket-Extensions header: ' + header); + + var values = header.match(EXT); + + values.forEach(function(value) { + var params = value.match(new RegExp(PARAM.source, 'g')), + name = params.shift(), + offer = {}; + + params.forEach(function(param) { + var args = param.match(PARAM), key = args[1], data; + + if (args[2] !== undefined) { + data = args[2]; + } else if (args[3] !== undefined) { + data = args[3].replace(/\\/g, ''); + } else { + data = true; + } + if (NUMBER.test(data)) data = parseFloat(data); + + if (hasOwnProperty.call(offer, key)) { + offer[key] = [].concat(offer[key]); + offer[key].push(data); + } else { + offer[key] = data; + } + }, this); + offers.push(name, offer); + }, this); + + return offers; + }, + + serializeParams: function(name, params) { + var values = []; + + var print = function(key, value) { + if (value instanceof Array) { + value.forEach(function(v) { print(key, v) }); + } else if (value === true) { + values.push(key); + } else if (typeof value === 'number') { + values.push(key + '=' + value); + } else if (NOTOKEN.test(value)) { + values.push(key + '="' + value.replace(/"/g, '\\"') + '"'); + } else { + values.push(key + '=' + value); + } + }; + + for (var key in params) print(key, params[key]); + + return [name].concat(values).join('; '); + } +}; + +var Offers = function() { + this._byName = {}; + this._inOrder = []; +}; + +Offers.prototype.push = function(name, params) { + if (!hasOwnProperty.call(this._byName, name)) + this._byName[name] = []; + + this._byName[name].push(params); + this._inOrder.push({ name: name, params: params }); +}; + +Offers.prototype.eachOffer = function(callback, context) { + var list = this._inOrder; + for (var i = 0, n = list.length; i < n; i++) + callback.call(context, list[i].name, list[i].params); +}; + +Offers.prototype.byName = function(name) { + return this._byName[name] || []; +}; + +Offers.prototype.toArray = function() { + return this._inOrder.slice(); +}; + +module.exports = Parser; diff --git a/front/frontend/node_modules/websocket-extensions/lib/pipeline/README.md b/front/frontend/node_modules/websocket-extensions/lib/pipeline/README.md new file mode 100644 index 0000000..322a9c5 --- /dev/null +++ b/front/frontend/node_modules/websocket-extensions/lib/pipeline/README.md @@ -0,0 +1,607 @@ +# Extension pipelining + +`websocket-extensions` models the extension negotiation and processing pipeline +of the WebSocket protocol. Between the driver parsing messages from the TCP +stream and handing those messages off to the application, there may exist a +stack of extensions that transform the message somehow. + +In the parlance of this framework, a *session* refers to a single instance of an +extension, acting on a particular socket on either the server or the client +side. A session may transform messages both incoming to the application and +outgoing from the application, for example the `permessage-deflate` extension +compresses outgoing messages and decompresses incoming messages. Message streams +in either direction are independent; that is, incoming and outgoing messages +cannot be assumed to 'pair up' as in a request-response protocol. + +Asynchronous processing of messages poses a number of problems that this +pipeline construction is intended to solve. + + +## Overview + +Logically, we have the following: + + + +-------------+ out +---+ +---+ +---+ +--------+ + | |------>| |---->| |---->| |------>| | + | Application | | A | | B | | C | | Driver | + | |<------| |<----| |<----| |<------| | + +-------------+ in +---+ +---+ +---+ +--------+ + + \ / + +----------o----------+ + | + sessions + + +For outgoing messages, the driver receives the result of + + C.outgoing(B.outgoing(A.outgoing(message))) + + or, [A, B, C].reduce(((m, ext) => ext.outgoing(m)), message) + +For incoming messages, the application receives the result of + + A.incoming(B.incoming(C.incoming(message))) + + or, [C, B, A].reduce(((m, ext) => ext.incoming(m)), message) + +A session is of the following type, to borrow notation from pseudo-Haskell: + + type Session = { + incoming :: Message -> Message + outgoing :: Message -> Message + close :: () -> () + } + +(That `() -> ()` syntax is intended to mean that `close()` is a nullary void +method; I apologise to any Haskell readers for not using the right monad.) + +The `incoming()` and `outgoing()` methods perform message transformation in the +respective directions; `close()` is called when a socket closes so the session +can release any resources it's holding, for example a DEFLATE de/compression +context. + +However because this is JavaScript, the `incoming()` and `outgoing()` methods +may be asynchronous (indeed, `permessage-deflate` is based on `zlib`, whose API +is stream-based). So their interface is strictly: + + type Session = { + incoming :: Message -> Callback -> () + outgoing :: Message -> Callback -> () + close :: () -> () + } + + type Callback = Either Error Message -> () + +This means a message *m2* can be pushed into a session while it's still +processing the preceding message *m1*. The messages can be processed +concurrently but they *must* be given to the next session in line (or to the +application) in the same order they came in. Applications will expect to receive +messages in the order they arrived over the wire, and sessions require this too. +So ordering of messages must be preserved throughout the pipeline. + +Consider the following highly simplified extension that deflates messages on the +wire. `message` is a value conforming the type: + + type Message = { + rsv1 :: Boolean + rsv2 :: Boolean + rsv3 :: Boolean + opcode :: Number + data :: Buffer + } + +Here's the extension: + +```js +var zlib = require('zlib'); + +var deflate = { + outgoing: function(message, callback) { + zlib.deflateRaw(message.data, function(error, result) { + message.rsv1 = true; + message.data = result; + callback(error, message); + }); + }, + + incoming: function(message, callback) { + // decompress inbound messages (elided) + }, + + close: function() { + // no state to clean up + } +}; +``` + +We can call it with a large message followed by a small one, and the small one +will be returned first: + +```js +var crypto = require('crypto'), + large = crypto.randomBytes(1 << 14), + small = new Buffer('hi'); + +deflate.outgoing({ data: large }, function() { + console.log(1, 'large'); +}); + +deflate.outgoing({ data: small }, function() { + console.log(2, 'small'); +}); + +/* prints: 2 'small' + 1 'large' */ +``` + +So a session that processes messages asynchronously may fail to preserve message +ordering. + +Now, this extension is stateless, so it can process messages in any order and +still produce the same output. But some extensions are stateful and require +message order to be preserved. + +For example, when using `permessage-deflate` without `no_context_takeover` set, +the session retains a DEFLATE de/compression context between messages, which +accumulates state as it consumes data (later messages can refer to sections of +previous ones to improve compression). Reordering parts of the DEFLATE stream +will result in a failed decompression. Messages must be decompressed in the same +order they were compressed by the peer in order for the DEFLATE protocol to +work. + +Finally, there is the problem of closing a socket. When a WebSocket is closed by +the application, or receives a closing request from the other peer, there may be +messages outgoing from the application and incoming from the peer in the +pipeline. If we close the socket and pipeline immediately, two problems arise: + +* We may send our own closing frame to the peer before all prior messages we + sent have been written to the socket, and before we have finished processing + all prior messages from the peer +* The session may be instructed to close its resources (e.g. its de/compression + context) while it's in the middle of processing a message, or before it has + received messages that are upstream of it in the pipeline + +Essentially, we must defer closing the sessions and sending a closing frame +until after all prior messages have exited the pipeline. + + +## Design goals + +* Message order must be preserved between the protocol driver, the extension + sessions, and the application +* Messages should be handed off to sessions and endpoints as soon as possible, + to maximise throughput of stateless sessions +* The closing procedure should block any further messages from entering the + pipeline, and should allow all existing messages to drain +* Sessions should be closed as soon as possible to prevent them holding memory + and other resources when they have no more messages to handle +* The closing API should allow the caller to detect when the pipeline is empty + and it is safe to continue the WebSocket closing procedure +* Individual extensions should remain as simple as possible to facilitate + modularity and independent authorship + +The final point about modularity is an important one: this framework is designed +to facilitate extensions existing as plugins, by decoupling the protocol driver, +extensions, and application. In an ideal world, plugins should only need to +contain code for their specific functionality, and not solve these problems that +apply to all sessions. Also, solving some of these problems requires +consideration of all active sessions collectively, which an individual session +is incapable of doing. + +For example, it is entirely possible to take the simple `deflate` extension +above and wrap its `incoming()` and `outgoing()` methods in two `Transform` +streams, producing this type: + + type Session = { + incoming :: TransformStream + outtoing :: TransformStream + close :: () -> () + } + +The `Transform` class makes it easy to wrap an async function such that message +order is preserved: + +```js +var stream = require('stream'), + session = new stream.Transform({ objectMode: true }); + +session._transform = function(message, _, callback) { + var self = this; + deflate.outgoing(message, function(error, result) { + self.push(result); + callback(); + }); +}; +``` + +However, this has a negative impact on throughput: it works by deferring +`callback()` until the async function has 'returned', which blocks `Transform` +from passing further input into the `_transform()` method until the current +message is dealt with completely. This would prevent sessions from processing +messages concurrently, and would unnecessarily reduce the throughput of +stateless extensions. + +So, input should be handed off to sessions as soon as possible, and all we need +is a mechanism to reorder the output so that message order is preserved for the +next session in line. + + +## Solution + +We now describe the model implemented here and how it meets the above design +goals. The above diagram where a stack of extensions sit between the driver and +application describes the data flow, but not the object graph. That looks like +this: + + + +--------+ + | Driver | + +---o----+ + | + V + +------------+ +----------+ + | Extensions o----->| Pipeline | + +------------+ +-----o----+ + | + +---------------+---------------+ + | | | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + + +A driver using this framework holds an instance of the `Extensions` class, which +it uses to register extension plugins, negotiate headers and transform messages. +The `Extensions` instance itself holds a `Pipeline`, which contains an array of +`Cell` objects, each of which wraps one of the sessions. + + +### Message processing + +Both the `Pipeline` and `Cell` classes have `incoming()` and `outgoing()` +methods; the `Pipeline` interface pushes messages into the pipe, delegates the +message to each `Cell` in turn, then returns it back to the driver. Outgoing +messages pass through `A` then `B` then `C`, and incoming messages in the +reverse order. + +Internally, a `Cell` contains two `Functor` objects. A `Functor` wraps an async +function and makes sure its output messages maintain the order of its input +messages. This name is due to [@fronx](https://github.com/fronx), on the basis +that, by preserving message order, the abstraction preserves the *mapping* +between input and output messages. To use our simple `deflate` extension from +above: + +```js +var functor = new Functor(deflate, 'outgoing'); + +functor.call({ data: large }, function() { + console.log(1, 'large'); +}); + +functor.call({ data: small }, function() { + console.log(2, 'small'); +}); + +/* -> 1 'large' + 2 'small' */ +``` + +A `Cell` contains two of these, one for each direction: + + + +-----------------------+ + +---->| Functor [A, incoming] | + +----------+ | +-----------------------+ + | Cell [A] o------+ + +----------+ | +-----------------------+ + +---->| Functor [A, outgoing] | + +-----------------------+ + + +This satisfies the message transformation requirements: the `Pipeline` simply +loops over the cells in the appropriate direction to transform each message. +Because each `Cell` will preserve message order, we can pass a message to the +next `Cell` in line as soon as the current `Cell` returns it. This gives each +`Cell` all the messages in order while maximising throughput. + + +### Session closing + +We want to close each session as soon as possible, after all existing messages +have drained. To do this, each `Cell` begins with a pending message counter in +each direction, labelled `in` and `out` below. + + + +----------+ + | Pipeline | + +-----o----+ + | + +---------------+---------------+ + | | | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 0 out: 0 out: 0 + + +When a message *m1* enters the pipeline, say in the `outgoing` direction, we +increment the `pending.out` counter on all cells immediately. + + + +----------+ + m1 => | Pipeline | + +-----o----+ + | + +---------------+---------------+ + | | | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 1 out: 1 out: 1 + + +*m1* is handed off to `A`, meanwhile a second message `m2` arrives in the same +direction. All `pending.out` counters are again incremented. + + + +----------+ + m2 => | Pipeline | + +-----o----+ + | + +---------------+---------------+ + m1 | | | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 2 out: 2 out: 2 + + +When the first cell's `A.outgoing` functor finishes processing *m1*, the first +`pending.out` counter is decremented and *m1* is handed off to cell `B`. + + + +----------+ + | Pipeline | + +-----o----+ + | + +---------------+---------------+ + m2 | m1 | | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 1 out: 2 out: 2 + + + +As `B` finishes with *m1*, and as `A` finishes with *m2*, the `pending.out` +counters continue to decrement. + + + +----------+ + | Pipeline | + +-----o----+ + | + +---------------+---------------+ + | m2 | m1 | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 0 out: 1 out: 2 + + + +Say `C` is a little slow, and begins processing *m2* while still processing +*m1*. That's fine, the `Functor` mechanism will keep *m1* ahead of *m2* in the +output. + + + +----------+ + | Pipeline | + +-----o----+ + | + +---------------+---------------+ + | | m2 | m1 + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 0 out: 0 out: 2 + + +Once all messages are dealt with, the counters return to `0`. + + + +----------+ + | Pipeline | + +-----o----+ + | + +---------------+---------------+ + | | | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 0 out: 0 out: 0 + + +The same process applies in the `incoming` direction, the only difference being +that messages are passed to `C` first. + +This makes closing the sessions quite simple. When the driver wants to close the +socket, it calls `Pipeline.close()`. This *immediately* calls `close()` on all +the cells. If a cell has `in == out == 0`, then it immediately calls +`session.close()`. Otherwise, it stores the closing call and defers it until +`in` and `out` have both ticked down to zero. The pipeline will not accept new +messages after `close()` has been called, so we know the pending counts will not +increase after this point. + +This means each session is closed as soon as possible: `A` can close while the +slow `C` session is still working, because it knows there are no more messages +on the way. Similarly, `C` will defer closing if `close()` is called while *m1* +is still in `B`, and *m2* in `A`, because its pending count means it knows it +has work yet to do, even if it's not received those messages yet. This concern +cannot be addressed by extensions acting only on their own local state, unless +we pollute individual extensions by making them all implement this same +mechanism. + +The actual closing API at each level is slightly different: + + type Session = { + close :: () -> () + } + + type Cell = { + close :: () -> Promise () + } + + type Pipeline = { + close :: Callback -> () + } + +This might appear inconsistent so it's worth explaining. Remember that a +`Pipeline` holds a list of `Cell` objects, each wrapping a `Session`. The driver +talks (via the `Extensions` API) to the `Pipeline` interface, and it wants +`Pipeline.close()` to do two things: close all the sessions, and tell me when +it's safe to start the closing procedure (i.e. when all messages have drained +from the pipe and been handed off to the application or socket). A callback API +works well for that. + +At the other end of the stack, `Session.close()` is a nullary void method with +no callback or promise API because we don't care what it does, and whatever it +does do will not block the WebSocket protocol; we're not going to hold off +processing messages while a session closes its de/compression context. We just +tell it to close itself, and don't want to wait while it does that. + +In the middle, `Cell.close()` returns a promise rather than using a callback. +This is for two reasons. First, `Cell.close()` might not do anything +immediately, it might have to defer its effect while messages drain. So, if +given a callback, it would have to store it in a queue for later execution. +Callbacks work fine if your method does something and can then invoke the +callback itself, but if you need to store callbacks somewhere so another method +can execute them, a promise is a better fit. Second, it better serves the +purposes of `Pipeline.close()`: it wants to call `close()` on each of a list of +cells, and wait for all of them to finish. This is simple and idiomatic using +promises: + +```js +var closed = cells.map((cell) => cell.close()); +Promise.all(closed).then(callback); +``` + +(We don't actually use a full *Promises/A+* compatible promise here, we use a +much simplified construction that acts as a callback aggregater and resolves +synchronously and does not support chaining, but the principle is the same.) + + +### Error handling + +We've not mentioned error handling so far but it bears some explanation. The +above counter system still applies, but behaves slightly differently in the +presence of errors. + +Say we push three messages into the pipe in the outgoing direction: + + + +----------+ + m3, m2, m1 => | Pipeline | + +-----o----+ + | + +---------------+---------------+ + | | | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 3 out: 3 out: 3 + + +They pass through the cells successfully up to this point: + + + +----------+ + | Pipeline | + +-----o----+ + | + +---------------+---------------+ + m3 | m2 | m1 | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 1 out: 2 out: 3 + + +At this point, session `B` produces an error while processing *m2*, that is *m2* +becomes *e2*. *m1* is still in the pipeline, and *m3* is queued behind *m2*. +What ought to happen is that *m1* is handed off to the socket, then *m2* is +released to the driver, which will detect the error and begin closing the +socket. No further processing should be done on *m3* and it should not be +released to the driver after the error is emitted. + +To handle this, we allow errors to pass down the pipeline just like messages do, +to maintain ordering. But, once a cell sees its session produce an error, or it +receives an error from upstream, it should refuse to accept any further +messages. Session `B` might have begun processing *m3* by the time it produces +the error *e2*, but `C` will have been given *e2* before it receives *m3*, and +can simply drop *m3*. + +Now, say *e2* reaches the slow session `C` while *m1* is still present, +meanwhile *m3* has been dropped. `C` will never receive *m3* since it will have +been dropped upstream. Under the present model, its `out` counter will be `3` +but it is only going to emit two more values: *m1* and *e2*. In order for +closing to work, we need to decrement `out` to reflect this. The situation +should look like this: + + + +----------+ + | Pipeline | + +-----o----+ + | + +---------------+---------------+ + | | e2 | m1 + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 0 out: 0 out: 2 + + +When a cell sees its session emit an error, or when it receives an error from +upstream, it sets its pending count in the appropriate direction to equal the +number of messages it is *currently* processing. It will not accept any messages +after it sees the error, so this will allow the counter to reach zero. + +Note that while *e2* is in the pipeline, `Pipeline` should drop any further +messages in the outgoing direction, but should continue to accept incoming +messages. Until *e2* makes it out of the pipe to the driver, behind previous +successful messages, the driver does not know an error has happened, and a +message may arrive over the socket and make it all the way through the incoming +pipe in the meantime. We only halt processing in the affected direction to avoid +doing unnecessary work since messages arriving after an error should not be +processed. + +Some unnecessary work may happen, for example any messages already in the +pipeline following *m2* will be processed by `A`, since it's upstream of the +error. Those messages will be dropped by `B`. + + +## Alternative ideas + +I am considering implementing `Functor` as an object-mode transform stream +rather than what is essentially an async function. Being object-mode, a stream +would preserve message boundaries and would also possibly help address +back-pressure. I'm not sure whether this would require external API changes so +that such streams could be connected to the downstream driver's streams. + + +## Acknowledgements + +Credit is due to [@mnowster](https://github.com/mnowster) for helping with the +design and to [@fronx](https://github.com/fronx) for helping name things. diff --git a/front/frontend/node_modules/websocket-extensions/lib/pipeline/cell.js b/front/frontend/node_modules/websocket-extensions/lib/pipeline/cell.js new file mode 100644 index 0000000..b2901ba --- /dev/null +++ b/front/frontend/node_modules/websocket-extensions/lib/pipeline/cell.js @@ -0,0 +1,53 @@ +'use strict'; + +var Functor = require('./functor'), + Pledge = require('./pledge'); + +var Cell = function(tuple) { + this._ext = tuple[0]; + this._session = tuple[1]; + + this._functors = { + incoming: new Functor(this._session, 'processIncomingMessage'), + outgoing: new Functor(this._session, 'processOutgoingMessage') + }; +}; + +Cell.prototype.pending = function(direction) { + var functor = this._functors[direction]; + if (!functor._stopped) functor.pending += 1; +}; + +Cell.prototype.incoming = function(error, message, callback, context) { + this._exec('incoming', error, message, callback, context); +}; + +Cell.prototype.outgoing = function(error, message, callback, context) { + this._exec('outgoing', error, message, callback, context); +}; + +Cell.prototype.close = function() { + this._closed = this._closed || new Pledge(); + this._doClose(); + return this._closed; +}; + +Cell.prototype._exec = function(direction, error, message, callback, context) { + this._functors[direction].call(error, message, function(err, msg) { + if (err) err.message = this._ext.name + ': ' + err.message; + callback.call(context, err, msg); + this._doClose(); + }, this); +}; + +Cell.prototype._doClose = function() { + var fin = this._functors.incoming, + fout = this._functors.outgoing; + + if (!this._closed || fin.pending + fout.pending !== 0) return; + if (this._session) this._session.close(); + this._session = null; + this._closed.done(); +}; + +module.exports = Cell; diff --git a/front/frontend/node_modules/websocket-extensions/lib/pipeline/functor.js b/front/frontend/node_modules/websocket-extensions/lib/pipeline/functor.js new file mode 100644 index 0000000..fadb49a --- /dev/null +++ b/front/frontend/node_modules/websocket-extensions/lib/pipeline/functor.js @@ -0,0 +1,72 @@ +'use strict'; + +var RingBuffer = require('./ring_buffer'); + +var Functor = function(session, method) { + this._session = session; + this._method = method; + this._queue = new RingBuffer(Functor.QUEUE_SIZE); + this._stopped = false; + this.pending = 0; +}; + +Functor.QUEUE_SIZE = 8; + +Functor.prototype.call = function(error, message, callback, context) { + if (this._stopped) return; + + var record = { error: error, message: message, callback: callback, context: context, done: false }, + called = false, + self = this; + + this._queue.push(record); + + if (record.error) { + record.done = true; + this._stop(); + return this._flushQueue(); + } + + var handler = function(err, msg) { + if (!(called ^ (called = true))) return; + + if (err) { + self._stop(); + record.error = err; + record.message = null; + } else { + record.message = msg; + } + + record.done = true; + self._flushQueue(); + }; + + try { + this._session[this._method](message, handler); + } catch (err) { + handler(err); + } +}; + +Functor.prototype._stop = function() { + this.pending = this._queue.length; + this._stopped = true; +}; + +Functor.prototype._flushQueue = function() { + var queue = this._queue, record; + + while (queue.length > 0 && queue.peek().done) { + record = queue.shift(); + if (record.error) { + this.pending = 0; + queue.clear(); + } else { + this.pending -= 1; + } + record.callback.call(record.context, record.error, record.message); + } +}; + +module.exports = Functor; diff --git a/front/frontend/node_modules/websocket-extensions/lib/pipeline/index.js b/front/frontend/node_modules/websocket-extensions/lib/pipeline/index.js new file mode 100644 index 0000000..930bbc8 --- /dev/null +++ b/front/frontend/node_modules/websocket-extensions/lib/pipeline/index.js @@ -0,0 +1,47 @@ +'use strict'; + +var Cell = require('./cell'), + Pledge = require('./pledge'); + +var Pipeline = function(sessions) { + this._cells = sessions.map(function(session) { return new Cell(session) }); + this._stopped = { incoming: false, outgoing: false }; +}; + +Pipeline.prototype.processIncomingMessage = function(message, callback, context) { + if (this._stopped.incoming) return; + this._loop('incoming', this._cells.length - 1, -1, -1, message, callback, context); +}; + +Pipeline.prototype.processOutgoingMessage = function(message, callback, context) { + if (this._stopped.outgoing) return; + this._loop('outgoing', 0, this._cells.length, 1, message, callback, context); +}; + +Pipeline.prototype.close = function(callback, context) { + this._stopped = { incoming: true, outgoing: true }; + + var closed = this._cells.map(function(a) { return a.close() }); + if (callback) + Pledge.all(closed).then(function() { callback.call(context) }); +}; + +Pipeline.prototype._loop = function(direction, start, end, step, message, callback, context) { + var cells = this._cells, + n = cells.length, + self = this; + + while (n--) cells[n].pending(direction); + + var pipe = function(index, error, msg) { + if (index === end) return callback.call(context, error, msg); + + cells[index][direction](error, msg, function(err, m) { + if (err) self._stopped[direction] = true; + pipe(index + step, err, m); + }); + }; + pipe(start, null, message); +}; + +module.exports = Pipeline; diff --git a/front/frontend/node_modules/websocket-extensions/lib/pipeline/pledge.js b/front/frontend/node_modules/websocket-extensions/lib/pipeline/pledge.js new file mode 100644 index 0000000..8a1f45d --- /dev/null +++ b/front/frontend/node_modules/websocket-extensions/lib/pipeline/pledge.js @@ -0,0 +1,37 @@ +'use strict'; + +var RingBuffer = require('./ring_buffer'); + +var Pledge = function() { + this._complete = false; + this._callbacks = new RingBuffer(Pledge.QUEUE_SIZE); +}; + +Pledge.QUEUE_SIZE = 4; + +Pledge.all = function(list) { + var pledge = new Pledge(), + pending = list.length, + n = pending; + + if (pending === 0) pledge.done(); + + while (n--) list[n].then(function() { + pending -= 1; + if (pending === 0) pledge.done(); + }); + return pledge; +}; + +Pledge.prototype.then = function(callback) { + if (this._complete) callback(); + else this._callbacks.push(callback); +}; + +Pledge.prototype.done = function() { + this._complete = true; + var callbacks = this._callbacks, callback; + while (callback = callbacks.shift()) callback(); +}; + +module.exports = Pledge; diff --git a/front/frontend/node_modules/websocket-extensions/lib/pipeline/ring_buffer.js b/front/frontend/node_modules/websocket-extensions/lib/pipeline/ring_buffer.js new file mode 100644 index 0000000..676ff94 --- /dev/null +++ b/front/frontend/node_modules/websocket-extensions/lib/pipeline/ring_buffer.js @@ -0,0 +1,66 @@ +'use strict'; + +var RingBuffer = function(bufferSize) { + this._bufferSize = bufferSize; + this.clear(); +}; + +RingBuffer.prototype.clear = function() { + this._buffer = new Array(this._bufferSize); + this._ringOffset = 0; + this._ringSize = this._bufferSize; + this._head = 0; + this._tail = 0; + this.length = 0; +}; + +RingBuffer.prototype.push = function(value) { + var expandBuffer = false, + expandRing = false; + + if (this._ringSize < this._bufferSize) { + expandBuffer = (this._tail === 0); + } else if (this._ringOffset === this._ringSize) { + expandBuffer = true; + expandRing = (this._tail === 0); + } + + if (expandBuffer) { + this._tail = this._bufferSize; + this._buffer = this._buffer.concat(new Array(this._bufferSize)); + this._bufferSize = this._buffer.length; + + if (expandRing) + this._ringSize = this._bufferSize; + } + + this._buffer[this._tail] = value; + this.length += 1; + if (this._tail < this._ringSize) this._ringOffset += 1; + this._tail = (this._tail + 1) % this._bufferSize; +}; + +RingBuffer.prototype.peek = function() { + if (this.length === 0) return void 0; + return this._buffer[this._head]; +}; + +RingBuffer.prototype.shift = function() { + if (this.length === 0) return void 0; + + var value = this._buffer[this._head]; + this._buffer[this._head] = void 0; + this.length -= 1; + this._ringOffset -= 1; + + if (this._ringOffset === 0 && this.length > 0) { + this._head = this._ringSize; + this._ringOffset = this.length; + this._ringSize = this._bufferSize; + } else { + this._head = (this._head + 1) % this._ringSize; + } + return value; +}; + +module.exports = RingBuffer; diff --git a/front/frontend/node_modules/websocket-extensions/lib/websocket_extensions.js b/front/frontend/node_modules/websocket-extensions/lib/websocket_extensions.js new file mode 100644 index 0000000..48adad8 --- /dev/null +++ b/front/frontend/node_modules/websocket-extensions/lib/websocket_extensions.js @@ -0,0 +1,162 @@ +'use strict'; + +var Parser = require('./parser'), + Pipeline = require('./pipeline'); + +var Extensions = function() { + this._rsv1 = this._rsv2 = this._rsv3 = null; + + this._byName = {}; + this._inOrder = []; + this._sessions = []; + this._index = {}; +}; + +Extensions.MESSAGE_OPCODES = [1, 2]; + +var instance = { + add: function(ext) { + if (typeof ext.name !== 'string') throw new TypeError('extension.name must be a string'); + if (ext.type !== 'permessage') throw new TypeError('extension.type must be "permessage"'); + + if (typeof ext.rsv1 !== 'boolean') throw new TypeError('extension.rsv1 must be true or false'); + if (typeof ext.rsv2 !== 'boolean') throw new TypeError('extension.rsv2 must be true or false'); + if (typeof ext.rsv3 !== 'boolean') throw new TypeError('extension.rsv3 must be true or false'); + + if (this._byName.hasOwnProperty(ext.name)) + throw new TypeError('An extension with name "' + ext.name + '" is already registered'); + + this._byName[ext.name] = ext; + this._inOrder.push(ext); + }, + + generateOffer: function() { + var sessions = [], + offer = [], + index = {}; + + this._inOrder.forEach(function(ext) { + var session = ext.createClientSession(); + if (!session) return; + + var record = [ext, session]; + sessions.push(record); + index[ext.name] = record; + + var offers = session.generateOffer(); + offers = offers ? [].concat(offers) : []; + + offers.forEach(function(off) { + offer.push(Parser.serializeParams(ext.name, off)); + }, this); + }, this); + + this._sessions = sessions; + this._index = index; + + return offer.length > 0 ? offer.join(', ') : null; + }, + + activate: function(header) { + var responses = Parser.parseHeader(header), + sessions = []; + + responses.eachOffer(function(name, params) { + var record = this._index[name]; + + if (!record) + throw new Error('Server sent an extension response for unknown extension "' + name + '"'); + + var ext = record[0], + session = record[1], + reserved = this._reserved(ext); + + if (reserved) + throw new Error('Server sent two extension responses that use the RSV' + + reserved[0] + ' bit: "' + + reserved[1] + '" and "' + ext.name + '"'); + + if (session.activate(params) !== true) + throw new Error('Server sent unacceptable extension parameters: ' + + Parser.serializeParams(name, params)); + + this._reserve(ext); + sessions.push(record); + }, this); + + this._sessions = sessions; + this._pipeline = new Pipeline(sessions); + }, + + generateResponse: function(header) { + var sessions = [], + response = [], + offers = Parser.parseHeader(header); + + this._inOrder.forEach(function(ext) { + var offer = offers.byName(ext.name); + if (offer.length === 0 || this._reserved(ext)) return; + + var session = ext.createServerSession(offer); + if (!session) return; + + this._reserve(ext); + sessions.push([ext, session]); + response.push(Parser.serializeParams(ext.name, session.generateResponse())); + }, this); + + this._sessions = sessions; + this._pipeline = new Pipeline(sessions); + + return response.length > 0 ? response.join(', ') : null; + }, + + validFrameRsv: function(frame) { + var allowed = { rsv1: false, rsv2: false, rsv3: false }, + ext; + + if (Extensions.MESSAGE_OPCODES.indexOf(frame.opcode) >= 0) { + for (var i = 0, n = this._sessions.length; i < n; i++) { + ext = this._sessions[i][0]; + allowed.rsv1 = allowed.rsv1 || ext.rsv1; + allowed.rsv2 = allowed.rsv2 || ext.rsv2; + allowed.rsv3 = allowed.rsv3 || ext.rsv3; + } + } + + return (allowed.rsv1 || !frame.rsv1) && + (allowed.rsv2 || !frame.rsv2) && + (allowed.rsv3 || !frame.rsv3); + }, + + processIncomingMessage: function(message, callback, context) { + this._pipeline.processIncomingMessage(message, callback, context); + }, + + processOutgoingMessage: function(message, callback, context) { + this._pipeline.processOutgoingMessage(message, callback, context); + }, + + close: function(callback, context) { + if (!this._pipeline) return callback.call(context); + this._pipeline.close(callback, context); + }, + + _reserve: function(ext) { + this._rsv1 = this._rsv1 || (ext.rsv1 && ext.name); + this._rsv2 = this._rsv2 || (ext.rsv2 && ext.name); + this._rsv3 = this._rsv3 || (ext.rsv3 && ext.name); + }, + + _reserved: function(ext) { + if (this._rsv1 && ext.rsv1) return [1, this._rsv1]; + if (this._rsv2 && ext.rsv2) return [2, this._rsv2]; + if (this._rsv3 && ext.rsv3) return [3, this._rsv3]; + return false; + } +}; + +for (var key in instance) + Extensions.prototype[key] = instance[key]; + +module.exports = Extensions; diff --git a/front/frontend/node_modules/websocket-extensions/package.json b/front/frontend/node_modules/websocket-extensions/package.json new file mode 100644 index 0000000..e4f2f91 --- /dev/null +++ b/front/frontend/node_modules/websocket-extensions/package.json @@ -0,0 +1,29 @@ +{ + "name": "websocket-extensions", + "description": "Generic extension manager for WebSocket connections", + "homepage": "http://github.com/faye/websocket-extensions-node", + "author": "James Coglan (http://jcoglan.com/)", + "keywords": [ + "websocket" + ], + "license": "Apache-2.0", + "version": "0.1.4", + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "lib" + ], + "main": "./lib/websocket_extensions", + "devDependencies": { + "jstest": "*" + }, + "scripts": { + "test": "jstest spec/runner.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/faye/websocket-extensions-node.git" + }, + "bugs": "http://github.com/faye/websocket-extensions-node/issues" +} diff --git a/front/frontend/package-lock.json b/front/frontend/package-lock.json new file mode 100644 index 0000000..2dd6539 --- /dev/null +++ b/front/frontend/package-lock.json @@ -0,0 +1,2399 @@ +{ + "name": "openrank-frontend", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "openrank-frontend", + "version": "1.0.0", + "license": "Apache-2.0", + "devDependencies": { + "live-server": "^1.2.2" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/accepts/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/accepts/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "license": "ISC", + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "node_modules/anymatch/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/apache-crypt": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/apache-crypt/-/apache-crypt-1.2.6.tgz", + "integrity": "sha512-072WetlM4blL8PREJVeY+WHiUh1R5VNt2HfceGS8aKqttPHcmqE5pkKuXPz/ULmJOFkc8Hw3kfKl6vy7Qka6DA==", + "dev": true, + "license": "MIT", + "dependencies": { + "unix-crypt-td-js": "^1.1.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/apache-md5": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/apache-md5/-/apache-md5-1.1.8.tgz", + "integrity": "sha512-FCAJojipPn0bXjuEpjOOOMN8FZDkxfWWp4JGN9mifU2IhxvKyXZYqpzPHdnTSUpmPDy+tsslB6Z1g+Vg6nVbYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async-each": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.6.tgz", + "integrity": "sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT" + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true, + "license": "(MIT OR Apache-2.0)", + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "optionalDependencies": { + "fsevents": "^1.2.7" + } + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/component-emitter": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true, + "license": "MIT" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true, + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" + } + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "dev": true, + "license": "MIT", + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==", + "dev": true, + "license": "MIT" + }, + "node_modules/fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "deprecated": "Upgrade to fsevents v2 to mitigate potential security issues", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-auth": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/http-auth/-/http-auth-3.1.3.tgz", + "integrity": "sha512-Jbx0+ejo2IOx+cRUYAGS1z6RGc6JfYUNkysZM4u4Sfk1uLlGv814F7/PIjQQAuThLdAWxb74JMGd5J8zex1VQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "apache-crypt": "^1.1.2", + "apache-md5": "^1.0.6", + "bcryptjs": "^2.3.0", + "uuid": "^3.0.0" + }, + "engines": { + "node": ">=4.6.1" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-errors/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.10.tgz", + "integrity": "sha512-Pysuw9XpUq5dVc/2SMHpuTY01RFl8fttgcyunjL7eEMhGM3cI4eOmiCycJDVCo/7O7ClfQD3SaI6ftDzqOXYMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz", + "integrity": "sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-data-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz", + "integrity": "sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/live-server": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/live-server/-/live-server-1.2.2.tgz", + "integrity": "sha512-t28HXLjITRGoMSrCOv4eZ88viHaBVIjKjdI5PO92Vxlu+twbk6aE0t7dVIaz6ZWkjPilYFV6OSdMYl9ybN2B4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^2.0.4", + "colors": "1.4.0", + "connect": "^3.6.6", + "cors": "latest", + "event-stream": "3.3.4", + "faye-websocket": "0.11.x", + "http-auth": "3.1.x", + "morgan": "^1.9.1", + "object-assign": "latest", + "opn": "latest", + "proxy-middleware": "latest", + "send": "latest", + "serve-index": "^1.9.1" + }, + "bin": { + "live-server": "live-server.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==", + "dev": true + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/morgan": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.1.tgz", + "integrity": "sha512-223dMRJtI/l25dJKWpgij2cMtywuG/WiUKXdvwfbhGKBhy1puASqXwFzmWZ7+K73vUPoR7SS2Qz2cI/g9MKw0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.1.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/nan": { + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.23.0.tgz", + "integrity": "sha512-1UxuyYGdoQHcGg87Lkqm3FzefucTa0NAiOcuRsDmysep3c1LVCRK2krrUDafMWtjSG04htvAmvg96+SDknOmgQ==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", + "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/opn": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-6.0.0.tgz", + "integrity": "sha512-I9PKfIZC+e4RXZ/qr1RhgyCnGgYX0UEIlXgWnCOVACIvFgaC9rz6Won7xbdhoHrd8IIhV7YEpHjreNUNkqCGkQ==", + "deprecated": "The package has been renamed to `open`", + "dev": true, + "license": "MIT", + "dependencies": { + "is-wsl": "^1.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==", + "dev": true, + "license": [ + "MIT", + "Apache2" + ], + "dependencies": { + "through": "~2.3" + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/proxy-middleware": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/proxy-middleware/-/proxy-middleware-0.15.0.tgz", + "integrity": "sha512-EGCG8SeoIRVMhsqHQUdDigB2i7qU7fCsWASwn54+nPutYO8n4q6EiwMzyfWlC+dzRFExP+kvcnDFdBDHoZBU7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", + "dev": true, + "license": "ISC" + }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "deprecated": "https://github.com/lydell/resolve-url#deprecated", + "dev": true, + "license": "MIT" + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/send": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", + "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.5", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "mime-types": "^3.0.1", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/send/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/send/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/send/node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-index/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true, + "license": "ISC" + }, + "node_modules/serve-index/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "license": "ISC" + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "license": "MIT", + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dev": true, + "license": "MIT", + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated", + "dev": true, + "license": "MIT" + }, + "node_modules/split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "through": "2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexer": "~0.1.1" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unix-crypt-td-js": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/unix-crypt-td-js/-/unix-crypt-td-js-1.1.4.tgz", + "integrity": "sha512-8rMeVYWSIyccIJscb9NdCfZKSRBKYTeVnwmiRYT2ulE3qd1RaDQ0xQDP+rI3ccIWbhu/zuo5cgN8z73belNZgw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "deprecated": "Please see https://github.com/lydell/urix#deprecated", + "dev": true, + "license": "MIT" + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=0.8.0" + } + } + } +} diff --git a/front/frontend/package.json b/front/frontend/package.json index f007dcf..c8f7359 100644 --- a/front/frontend/package.json +++ b/front/frontend/package.json @@ -4,7 +4,7 @@ "description": "OpenRank 前端可视化界面 - 科技感数据分析仪表板", "main": "index.html", "scripts": { - "dev": "live-server --port=3000 --open", + "dev": "live-server . --port=3000 --open=./index.html", "build": "echo '前端构建完成'" }, "keywords": [ diff --git a/front/frontend/styles.css b/front/frontend/styles.css index 34f4c2f..508db0f 100644 --- a/front/frontend/styles.css +++ b/front/frontend/styles.css @@ -13,6 +13,184 @@ body { overflow-x: hidden; } +/* 模式切换(全局 / 项目) */ +.mode-switch { + display: flex; + background: rgba(255, 255, 255, 0.06); + padding: 4px; + border-radius: 14px; + gap: 4px; + margin: 0 1.5rem; + backdrop-filter: blur(8px); + border: 1px solid rgba(255,255,255,0.15); +} + +.mode-btn { + border: none; + background: transparent; + color: rgba(255,255,255,0.7); + font-size: 0.85rem; + padding: 0.5rem 1rem; + border-radius: 10px; + cursor: pointer; + font-weight: 600; + letter-spacing: .5px; + transition: all .25s ease; +} + +.mode-btn:hover { color:#fff; background: rgba(255,255,255,0.08); } +.mode-btn.active { background: linear-gradient(135deg,#00d4ff,#0099cc); color:#fff; box-shadow:0 4px 15px rgba(0,212,255,.35); } + +.hidden { display: none !important; } + +/* 项目模式布局 */ +.project-mode { margin-bottom: 2rem; } +.project-layout { display: flex; gap: 1.25rem; } + +.project-sidebar { + width: 280px; + flex-shrink: 0; + background: rgba(255,255,255,0.05); + border: 1px solid rgba(255,255,255,0.1); + border-radius: 16px; + padding: 1rem 1rem 1.25rem; + max-height: 70vh; + overflow: hidden; + display: flex; + flex-direction: column; +} + +.project-sidebar-header { margin-bottom: .75rem; } +.project-sidebar-header h3 { margin:0 0 .5rem 0; font-size:1rem; font-weight:600; color:#fff; } +.project-sidebar-header input { + width: 100%; + background: rgba(255,255,255,0.1); + border: 1px solid rgba(255,255,255,0.2); + color:#fff; padding:.5rem .75rem; border-radius:8px; outline:none; font-size:.85rem; +} +.project-sidebar-header input:focus { border-color:#00d4ff; box-shadow:0 0 0 2px rgba(0,212,255,.25); } + +.project-list { list-style:none; margin:0; padding:0; overflow-y:auto; scrollbar-width:thin; flex:1; } +.project-list li { padding:.55rem .6rem; font-size:.85rem; border-radius:8px; display:flex; align-items:center; justify-content:space-between; gap:.5rem; cursor:pointer; transition:background .2s ease; } +.project-list li:hover { background: rgba(255,255,255,0.08); } +.project-list li.active { background: linear-gradient(135deg,#00d4ff,#0099cc); box-shadow:0 4px 15px rgba(0,212,255,.3); } +.project-list li .repo-name { flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } +.project-list li .repo-mini-score { font-weight:600; font-size:.75rem; color:#00d4ff; } +.project-list li.active .repo-mini-score { color:#fff; } + +.project-content { + flex: 1; + min-height: 400px; + background: rgba(255,255,255,0.04); + border: 1px solid rgba(255,255,255,0.08); + border-radius: 16px; + padding: 1.25rem 1.5rem 1.75rem; + position: relative; + width: 100%; +} + +/* 让主体容器在项目模式下可拉伸利用剩余空间 */ +.container { max-width: 100%; } + +.project-placeholder { text-align:center; padding:3rem 1rem; color:rgba(255,255,255,0.6); } +.project-placeholder h3 { font-size:1.15rem; font-weight:600; margin-bottom:.75rem; color:#fff; } + +.project-header-inline { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:1rem; } +.project-header-inline h2 { margin:0; font-size:1.25rem; font-weight:700; } +.badge { display:inline-block; padding:.25rem .6rem; font-size:.65rem; letter-spacing:.5px; background:rgba(0,212,255,.15); border:1px solid rgba(0,212,255,.4); border-radius:6px; color:#00d4ff; font-weight:600; } +.badge.approx { background:rgba(255,193,7,.15); border-color:rgba(255,193,7,.4); color:#ffc107; } +.badge.full { background:rgba(0,255,136,.15); border-color:rgba(0,255,136,.4); color:#00ff88; } + +.split-panels { display:grid; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); gap:1.25rem; margin-top:.5rem; } +.panel-box { background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.08); border-radius:14px; padding:1rem 1.1rem; position:relative; } +.panel-box h4 { margin:0 0 .75rem 0; font-size:.95rem; font-weight:600; letter-spacing:.5px; color:#fff; } +.mini-table { width:100%; border-collapse:collapse; font-size:.75rem; } +.mini-table th, .mini-table td { padding:.4rem .5rem; border-bottom:1px solid rgba(255,255,255,0.06); text-align:left; } +.mini-table th { background:rgba(255,255,255,0.05); font-weight:600; } +.mini-table tbody tr:hover { background:rgba(255,255,255,0.05); } +.chart-slot { height:200px; } + +/* 新版项目模式扩展布局 */ +/* 项目模式核心网格:三列均衡 + 时间序列占满第二行 */ +/* 保留旧类兼容暂不删除,但现在用 flex 顶行 */ +.project-grid-expanded { display:none; } + +.project-top-row { + display:flex; + gap:1.15rem; + width:100%; + align-items:stretch; +} +.project-top-row .panel-box { flex:1 1 0; display:flex; flex-direction:column; } +/* 三块等宽 */ +.project-top-row .panel-ranking, +.project-top-row .panel-activity, +.project-top-row .panel-metrics { flex:1 1 0; } + +/* 贡献者排名表滚动限制(之前只在 .project-grid-expanded 下生效,这里为新布局补齐) */ +.project-top-row .panel-ranking .table-wrap-scroll { + max-height: 480px; /* 可根据需要再调,如 400 / 440 */ + overflow-y: auto; + overflow-x: hidden; + padding-right: 2px; /* 给滚动条留空间避免遮住数据 */ +} +.project-top-row .panel-ranking .table-wrap-scroll::-webkit-scrollbar { width: 6px; } +.project-top-row .panel-ranking .table-wrap-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); border-radius: 3px; } +.project-top-row .panel-ranking .table-wrap-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.45); } + +@media (max-width: 1200px){ + .project-top-row { flex-wrap:wrap; } + .project-top-row .panel-box { flex:1 1 calc(50% - 1.15rem); } + .project-top-row .panel-metrics { order:3; } +} +@media (max-width: 820px){ + .project-top-row .panel-box { flex:1 1 100%; } +} +.project-grid-expanded .panel-box { height:100%; display:flex; flex-direction:column; } +.project-grid-expanded .panel-box .table-wrap-scroll { overflow:auto; max-height:380px; } + +/* 时间序列面板在新布局下全宽 */ +.panel-timeseries { width:100%; } + +/* Remove residual span sizing influence when using template areas */ +.project-grid-expanded .panel-box.span-2, +.project-grid-expanded .panel-box.span-3, +.project-grid-expanded .panel-box.span-4 { grid-column: auto; } + +/* 原响应式网格规则移除,改由 flex wrap 控制 */ + +/* 项目模式宽度限制:防止过宽拉伸(最小1200px,最大1680px,中间按视口92%) */ +body.project-mode-active .container { max-width: clamp(1200px, 92vw, 1680px); margin:0 auto; padding-left:1.2rem; padding-right:1.2rem; } +body.project-mode-active .project-content { padding-right: 2rem; } +body.project-mode-active .project-grid-expanded .panel-box { min-height: 260px; } +body.project-mode-active .panel-ranking { padding-right: .75rem; } +body.project-mode-active .panel-ranking .table-wrap-scroll { max-height: 420px; } + +@media (min-width:1400px){ + .project-grid-expanded { grid-template-columns: repeat(8, 1fr); } + .project-grid-expanded .panel-box.span-2 { grid-column: span 3; } + .project-grid-expanded .panel-box.span-4 { grid-column: span 5; } +} + +.metric-list { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:1fr; gap:.55rem; font-size:.7rem; } +.metric-list li { display:flex; justify-content:space-between; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.06); padding:.45rem .6rem; border-radius:8px; } +.metric-list li span { opacity:.7; } +.metric-list li strong { font-weight:600; color:#00d4ff; } + +.mini-table thead th { position:sticky; top:0; background:rgba(255,255,255,0.08); backdrop-filter:blur(6px); } +.mini-table tbody tr td { white-space:nowrap; } + +/* 滚动条微调表内 */ +.table-wrap-scroll::-webkit-scrollbar { width:6px; } +.table-wrap-scroll::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.25); border-radius:3px; } +.table-wrap-scroll::-webkit-scrollbar-thumb:hover { background:rgba(255,255,255,0.4); } + +@media (max-width: 980px){ + .project-layout { flex-direction:column; } + .project-sidebar { width:100%; max-height:220px; flex-direction:column; } + .project-content { min-height:300px; } +} + .container { max-width: 1400px; margin: 0 auto; @@ -42,6 +220,7 @@ body { font-size: 2rem; background: linear-gradient(135deg, #00d4ff, #0099cc); -webkit-background-clip: text; + background-clip: text; /* 标准属性,提升兼容性 */ -webkit-text-fill-color: transparent; } @@ -78,6 +257,7 @@ body { gap: 1rem; } + /* 按钮样式 */ .btn-primary { background: linear-gradient(135deg, #00d4ff, #0099cc); @@ -1161,3 +1341,96 @@ body { background: white; } } + +/* 模态窗口 (仓库详情) */ +.modal { + position: fixed; + inset: 0; /* top:0; right:0; bottom:0; left:0 */ + display: none; + align-items: center; + justify-content: center; + background: rgba(0,0,0,0.55); + z-index: 1200; + padding: 2rem; +} + +.modal.open { + display: flex; +} + +.modal .modal-content { + background: linear-gradient(180deg, rgba(20,20,35,0.98), rgba(16,16,28,0.98)); + color: #fff; + border-radius: 12px; + max-width: 1100px; + width: 100%; + max-height: 80vh; + overflow: auto; + box-shadow: 0 20px 60px rgba(0,0,0,0.6); + border: 1px solid rgba(255,255,255,0.06); + padding: 1rem 1.25rem; +} + +.modal .modal-close { + position: absolute; + right: 1rem; + top: 1rem; + background: transparent; + border: none; + color: #ffffff; + font-size: 1.6rem; + cursor: pointer; + opacity: 0.9; +} + +.modal #repo-detail-title { + margin: 0 0 0.5rem 0; + padding-right: 2.5rem; /* to avoid overlap with close btn */ +} + +.modal #repo-detail-summary { + margin-bottom: 1rem; + color: rgba(255,255,255,0.9); + font-size: 0.95rem; +} + +.modal #repo-detail-contributors { + margin-bottom: 1rem; +} + +/* 简单表格样式,用于贡献者列表 */ +.simple-table { + width: 100%; + border-collapse: collapse; + margin-top: 0.5rem; + font-size: 0.95rem; +} + +.simple-table thead th { + text-align: left; + padding: 0.6rem 0.75rem; + background: rgba(255,255,255,0.03); + border-bottom: 1px solid rgba(255,255,255,0.06); + color: rgba(255,255,255,0.9); +} + +.simple-table tbody td { + padding: 0.55rem 0.75rem; + border-bottom: 1px solid rgba(255,255,255,0.03); + color: rgba(255,255,255,0.85); +} + +.simple-table tbody tr:hover td { + background: rgba(255,255,255,0.02); +} + +/* ensure the repo timeseries canvas has a minimum height */ +#repo-detail-timeseries { + width: 100% !important; + height: 220px !important; +} + +@media (max-width: 768px) { + .modal .modal-content { padding: 0.75rem; max-width: 100%; } + .modal #repo-detail-title { font-size: 1rem; } +} diff --git a/src/config/.env b/src/config/.env new file mode 100644 index 0000000..94bbaee --- /dev/null +++ b/src/config/.env @@ -0,0 +1,7 @@ +DB_HOST=127.0.0.1 +DB_PORT=3306 +DB_USER=root +DB_PASS=wangjing204711 +DB_NAME=openrank +DB_POOL_MIN=2 +DB_POOL_MAX=10 \ No newline at end of file diff --git a/src/config/openrank.yml b/src/config/openrank.yml index 1ab8df4..bbaca51 100644 --- a/src/config/openrank.yml +++ b/src/config/openrank.yml @@ -1,94 +1,434 @@ global: developerRetentionFactor: 0.5 + # 基于代码量的commit权重(新增) + commitUseCodeMetrics: true # 启用基于代码行数/文件数的权重 + commitLine: 0.02 # 从0.005提升到0.02(提升4倍以补偿网络放大移除) + commitFile: 0.4 # 从0.1提升到0.4(提升4倍以补偿网络放大移除) + commitNonLinearScale: null # 线性(none/undefined),不使用次线性缩放 + commitScaleThreshold: null # 线性模式下阈值不生效 repositoryRetentionFactor: 0.3 attenuationFactor: 0.85 minValue: 1 tolerance: 0.01 maxIterations: 100 - defaultInitValue: 0.1 + defaultInitValue: 1.0 # 从8.0降低50%到4.0 project: developerRetentionFactor: 0.8 repositoryRetentionFactor: 0.15 - issueRetentionFactor: 0.8 - prRetentionFactor: 0.6 + issueRetentionFactor: 0.6 + prRetentionFactor: 0.6 attenuationFactor: 0.8 minValue: 0.1 tolerance: 0.001 maxIterations: 100 - issueInitValue: 2 - prNotMergedInitValue: 0.5 - prMergedInitValue: 1 + issueInitValue: 2 + prNotMergedInitValue: 3 + prMergedInitValue: 5 + + # 时间衰减配置(可选:可关闭以取消时效性偏好) + initOptimization: + timeDecay: null # 设置为null关闭时间衰减,让所有内容平等竞争 + # ===== 传播混合配置:可审计的 baseTransmission 三项混合 ===== + # 建议放在 canonical path: project.transmissionBlend + transmissionBlend: + enabled: true + openrankFraction: 0.15 # α:使用 source.openrank 的系数(少量即时传播) + lastOpenrankFraction: 0.35 # β:使用上一次迭代 lastOpenrank 的系数(稳定基线) + initValueFraction: 0.5 # γ:使用 initValue 的系数(内容基线/可解释) activityWeights: - issueComment: 0.5252 - openIssue: 2.2235 - openPull: 4.0679 - reviewComment: 0.7427 - mergedPull: 2.0339 + issueComment: 0.31512 + openIssue: 1.3341 + openPull: 2.441 + reviewComment: 0.44562 + mergedPull: 1.22034 projectActivityWeights: - belongRatio: 1 - reverseBelongRatio: 35 # 从25增加到35 (增加Repo→Collaboration到目标范围) + belongRatio: 0.8 # 从1.0下调:减少协作单元价值立即抽走,留更多给参与者分配 + reverseBelongRatio: 1 thumbsUp: 0.1 heart: 0.15 rocket: 0.2 - activityRatio: 2.2 # 从1.5增加到2.2 (增加Collaboration→User到目标范围) - reverseActivityRatio: 2.0 # 从3.0降到2.0 (降低User→Collaboration到目标范围) - repoAmplificationFactor: 15 # 保持 - userParticipationWeight: 1.5 - # 活动类型权重 - open: 2.0 # 创建活动权重 - comment: 0.5 # 评论活动权重 - review: 1.0 # 代码评审权重 - close: 0.3 # 关闭活动权重 - commit: 1.5 # 提交权重 - reverseEdgeRatio: 0.15 # 反向边权重比例 + activityRatio: 0.55 # 依据价值守恒模型(单PR总活动提取不超过~节点初始价值) + reverseActivityRatio: 0.19 # 约为 activityRatio * 0.35,限制回流放大 + authorShare: 0.50 # 作者优先份额:固定占活动分配的50%,其余按参与权重再归一 + repoAmplificationFactor: 1 # 移除70倍放大:从2改为1(官方标准) + userParticipationWeight: 0.9 + # ===== 活动权重设计:基于AHP层次分析法的科学权重体系 ===== + # + # 设计方法:使用层次分析法(AHP)进行多准则权重决策 + # AHP步骤: + # 1. 建立层次结构:目标 → 准则 → 方案 + # 2. 构造判断矩阵(1-9标度法) + # 3. 计算特征值和权重向量 + # 4. 一致性检验(CR < 0.1) + # + # 层次结构: + # 目标层:确定合理的活动权重 + # 准则层:工作复杂度(40%) + 活动频率(30%) + 价值贡献(30%) + # 方案层:open, comment, review, close, commit + # + # ===== 准则层权重计算 ===== + # 判断矩阵(工作复杂度 vs 活动频率 vs 价值贡献): + # 工作复杂度 活动频率 价值贡献 + # 工作复杂度 1 3 2 + # 活动频率 1/3 1 1/2 + # 价值贡献 1/2 2 1 + # + # 特征值计算结果:λ_max = 3.009, CR = 0.007 < 0.1 (一致性良好) + # 权重向量:[0.539, 0.145, 0.316] → 归一化 [0.40, 0.30, 0.30] + # + # ===== 方案层权重计算(针对每个准则)===== + # + # 1. 工作复杂度准则的判断矩阵: + # open comment review close commit + # open 1 2 1/3 2 1/5 + # comment 1/2 1 1/5 1 1/7 + # review 3 5 1 4 1/3 + # close 1/2 1 1/4 1 1/5 + # commit 5 7 3 5 1 + # + # 特征值:λ_max = 5.124, CR = 0.029 < 0.1 + # 权重:[0.069, 0.035, 0.387, 0.043, 0.466] + # + # 2. 活动频率准则的判断矩阵(基于统计数据反向权重): + # 频率数据:review(43.7%) > close(29.7%) > commit(17.8%) > comment(4.6%) > open(4.2%) + # 频率权重(归一化):[0.042, 0.223, 0.423, 0.287, 0.171] + # 反频率权重(高频权重低):[0.238, 0.045, 0.024, 0.035, 0.059] + # + # 3. 价值贡献准则的判断矩阵: + # open comment review close commit + # open 1 3 1/5 1/2 1/9 + # comment 1/3 1 1/7 1/3 1/11 + # review 5 7 1 3 1/5 + # close 2 3 1/3 1 1/7 + # commit 9 11 5 7 1 + # + # 特征值:λ_max = 5.089, CR = 0.022 < 0.1 + # 权重:[0.032, 0.019, 0.245, 0.067, 0.637] + # + # ===== 综合权重计算 ===== + # 使用准则层权重加权方案层权重: + # 工作复杂度权重 × 0.40 + 活动频率权重 × 0.30 + 价值贡献权重 × 0.30 + # + # 结果:[0.069, 0.035, 0.387, 0.043, 0.466] × 0.40 = [0.028, 0.014, 0.155, 0.017, 0.186] + # + [0.238, 0.045, 0.024, 0.035, 0.059] × 0.30 = [0.071, 0.014, 0.007, 0.011, 0.018] + # + [0.032, 0.019, 0.245, 0.067, 0.637] × 0.30 = [0.010, 0.006, 0.074, 0.020, 0.191] + # = [0.109, 0.034, 0.236, 0.048, 0.395] → 归一化 [0.16, 0.05, 0.35, 0.07, 0.58] + # + # 最终权重(考虑实际平衡后调整): + # === AHP(主观复杂度/价值) + 频率反调(α=0.35) 结果 === + # 主观初始权重(归一):commit 0.42, review 0.31, close 0.145, open 0.065, comment 0.06 + # 频率(f):open 0.042, comment 0.046, review 0.437, close 0.297, commit 0.178 + # 频率折减:w' = w / f^0.35 → 归一化后: + # commit 0.432, review 0.233, close 0.125, open 0.111, comment 0.099 + # 为保持与原总权重量级(sum≈1.23)接近,放缩系数 S≈1.23: + # commit 0.432*S≈0.53, review≈0.29, close≈0.15, open≈0.14, comment≈0.12 + # 最终采用下列静态权重(替换原 0.60/0.35/0.08/0.15/0.05): + # === 基于 AHP + 频率反调的新一轮基础活动权重 (目标:最终贡献更均衡,commit <= ~50%) === + # 频率估计 (示例): open 4.2%, comment 4.6%, review 33.7%, reviewComment 10.0%, close 29.7%, commit 17.8% + # 目标最终份额: open 8%, comment 9%, review 25%, reviewComment 10%, close 8%, commit 40% + # 反调公式: baseWeight_raw ≈ target_share / frequency 归一 → 得到下列初始向量 + # 再考虑代码规模放大对 commit 的额外贡献 => 进一步下调 commit 基础权重, 上调 open/comment 以提升多样性贡献感知 + open: 0.34 # 微幅上调以鼓励发起(slightly higher) + comment: 0.36 # 微幅上调协作讨论占比 + review: 0.035 # 评审基础权重保持不变 + reviewComment: 0.16 # 轻微提高评审深度权重 + close: 0.14 # 轻微提高关闭/维护动作权重,使其更接近 open + commit: 0.238 # 保持 commit 基础权重不变 + # 关闭旧的硬编码提交占比软上限(改由后续公平性规则与累计递减模型接管) + commitShareCap: null + commitShareCapBlend: null + # 本地软上限(commitLocalShareCap/commitLocalShareBlend)已按用户要求移除 + # 如需恢复,请参阅版本控制历史或联系项目维护者 + # 第三层:全局用户级 commit 份额软上限(已移除) + # NOTE: 全局级别的用户份额上限(commit/review)已被明确禁用以避免跨PR的全局重缩放。 + # 如需历史参考,可在版本控制中检索 2025-09-22 之前的提交记录。 + + # ===== Review 饱和层(防止单用户或少数人垄断评审贡献)===== + # reviewLocalShareCap/reviewLocalShareBlend 已按用户要求移除 + # 如需恢复,请参阅版本控制历史或联系项目维护者 + reviewGamma: 0.7 # 对多评审者的 review 份额应用次线性凹性(<1 使分配更平均) + # 全局级别的 review 份额上限(已移除,禁止使用) + # globalReviewShareCap: + # globalReviewShareBlend: + # globalReviewShareTolerance: + # globalReviewMinOther: + + # ===== 渠道平衡微调层(无硬上界,仅做 soft-floor / concavity 引导)===== + channelBalancing: + enabled: true + # concaveExponent<1 对高份额渠道(如 commit/review)做亚线性收缩,低份额渠道相对抬升 + concaveExponent: 0.80 # 强化凹性以进一步压缩极端通道(低风险) + # additiveSmoothing 在分量非常小(趋近0)时提供一个平滑基线,避免被完全淹没 + additiveSmoothing: 0.03 # 提高到3% 平滑基线,避免被完全淹没并稍微抬升低份额渠道 + # softMinShares:期望各渠道在单PR贡献向量中达到的软下限(算法不硬性截断,仅在低于时给予平滑补偿) + softMinShares: + open: 0.03 + comment: 0.08 + # softMinStrength 控制补偿强度(0~1),越高越快速靠近软下限 + softMinStrength: 0.55 + debug: true + + # ===== Review Dampening(在 pool 分配后可选的 review 缓和)===== + # 说明:这是一个可配置的温和乘子,直接对 PR 层面分配给 review 通道的值进行缩放。 + # 目的:在不使用全局硬上限的前提下,从 pool 输出层面温和降低 review 的绝对放大。 + reviewDampening: + enabled: true + factor: 0.35 # 当 enabled=true 时,wReview = wReview * factor (0.0-1.0),进一步下调到0.35以加强缓和 + debug: true + + # ===== 代码行权重设计 ===== + # 问题:大型项目代码量可达几十万行,需要科学的代码权重设计 + # + # 方法:基于代码影响范围和工作量进行分层设计 + # 1. 小改动(1-10行):权重很低,避免刷分 + # 2. 中等改动(10-100行):权重适中 + # 3. 大改动(100-1000行):权重较高 + # 4. 重大改动(1000+行):权重很高 + # + # 使用分段线性函数:weight = base_weight × scale_factor + # 其中scale_factor基于代码行数分段计算 + # + # 基准:100行中等质量代码 ≈ 1个中等管理活动 + # 所以commitLine基准 = 0.08/100 = 0.0008 + # 但为避免权重过低,使用0.001作为实际权重 + + # 基于代码量的commit权重(重新平衡设计) + # 重新审视:避免过度抑制代码贡献 + # + # 新的平衡标准: + # - 100行代码 ≈ 1个关闭操作 (0.08权重) + # - 1000行代码 ≈ 5个关闭操作 (0.4权重) + # - 10000行代码 ≈ 25个关闭操作 (2.0权重) + # + # 使用tanh非线性缩放:weight = base × tanh(scale × log(1 + lines)) + # 这样可以: + # 1. 小改动权重低(避免刷分) + # 2. 大改动权重高(认可重大贡献) + # 3. 权重增长有上限(防止权重爆炸) + # + # 参数选择: + # commitLine = 0.08/100 = 0.0008 (基准) + # 但实际设为0.001以提高权重上限 + # 使用tanh缩放参数确保大改动获得足够权重 + # + # ==== 提交代码规模权重(重新压缩,降低过高占比) ==== + commitUseCodeMetrics: true + commitLine: 0.0008 # restored: AHP阶段基准行权重 + commitFile: 0.024 # restored: AHP阶段基准文件权重 + # 主非线性:饱和型,避免巨型同步/合并提交占据排行榜 + commitNonLinearScale: tanh_bounded + commitScaleThreshold: 800 # 若未提供单独阈值,作为默认;≈ 上限值 + commitLineThreshold: 2400 # 方案C:大型仓库宽松线性区间 + commitFileThreshold: 60 # 方案C:多模块改动保持区分 + # 评审规模同样 bounded 以提升评审相对权重 + reviewLine: 0.00066 # 方案C:约为提交行权重60% + reviewFile: 0.024 # 方案C:与宽松提交结构匹配 + reviewNonLinearScale: tanh_bounded + reviewLineThreshold: 1200 # 方案C:评审阈值≈提交的一半 + reviewFileThreshold: 36 # 方案C:文件阈值适中放宽 + reverseEdgeRatio: 0.15 + + # ============ CodeImpact V2 (Layer1 凹函数 + Layer2 价值拆分) ============ + # enable: 开启后使用分段凹函数计算 PR 代码规模影响,并将其拆分为实现(commit)与质量保障(review)双通道 + codeImpactV2: + enabled: true # 首次引入,默认开启便于对比;如需回退设为 false + qCommit: 0.65 # 代码影响中分配给提交者的比例,提高到0.65以更偏向 commit (保守再试) + unreviewedPenalty: 0.4 # 无评审时 (review/reviewComment 为空) 对 review 通道的折损比例 + line: # 行数分段凹函数参数 + L1: 200 # 第一段线性结束点 + L2: 2000 # 第二段开始进入饱和过渡 + beta1: 0.65 # 过渡段幂指数 (<1 凹) + tailK: 1200 # 尾部指数衰减尺度 + tailS: 1800 # 尾部最大附加增量 + file: # 文件数分段凹函数参数 + F1: 10 + F2: 60 + beta1: 0.6 + tailK: 40 + tailS: 120 + reviewEffort: # 评审努力分配权重 (总和无需=1,会归一) + reviewComment: 0.3 # 评论条数贡献(保持) + lineTouched: 0.18 # 估算接触行数(保持) + fileTouched: 0.12 # 估算接触文件数(保持) + dynamic: # 动态评审分配参数:控制 qCommit 自适应下调幅度 + qReviewAdjStrength: 0.40 # 评审覆盖率因子 a (提高抑制) + qCollabAdjStrength: 0.30 # 协作度因子 b (提高协作激励) + qMin: 0.15 # 允许更低实现占比 + qMax: 0.60 # 收紧上界 + sizeAdjStrength: 0.55 # 大型改动强力下调 + sizeLineL1: 300 # 更早开始规模下调 + sizeLineL2: 3000 # 更快达到饱和 + commitShareGamma: 0.6 # 强凹性,多提交者拆分更平均 + selfReviewFactor: 0.25 # 无评审时少量自检保留 + unreviewedDecay: 0.8 # 大部分未评审价值丢弃 + + # ===== (已废弃)跨 PR 用户级累计 commit 减益 ===== + # 说明:原机制通过对用户累计 commitWeight 应用 c^{alpha-1} 次线性缩放以抑制极端集中。 + # 在引入 CodeImpact V2 + 动态 qCommit + MCL 池化(gamma concavity, reallocateExcess, pending assurance, diversity boost) 后 + # 该层与整体结构出现功能重叠,并在多层叠加时导致 commit 渠道被过度压缩(真实全局份额曾降到 ~12%)。 + # 为保持可解释性与参数简洁性,现已移除代码实现;配置块同时删除,若需恢复请参考历史提交记录(日期: 2025-09-22 前版本)。 + # crossUserCommitDiminish: (deprecated, removed) + + # ===== Code Impact Pools (MCL Layer A) ===== + codeImpactPools: + enabled: true + gammaCommit: 0.65 # commit份额凹性指数 + assuranceRelease: + selfReviewFactor: 0.25 # 无评审时保留进入review的比例 + pendingDecay: 0.75 # 剩余进入待释放池的折损(丢弃比例) + reviewEffort: + commentCoeff: 0.9 # log1p(reviewCommentCount)*commentCoeff (轻微下调以弱化 review 放大) + reviewCoeff: 0.30 # reviewCount * reviewCoeff (继续下调到0.30,进一步弱化 pool 层 review 得分) + exp: 0.9 # effortScore^exp (保持亚线性) + diversity: + minParticipants: 4 + minReviewers: 1 + boost: 1.01 # 进一步降低 diversity boost 到 1.01 (更弱的多样性放大) + reallocateExcess: # 针对单PR代码影响中 commit 过高时,结构性回流一部分到保障池 + enabled: true + commitShareThreshold: 0.78 # 提高触发阈值到78%,进一步减少回流触发 + reallocateRatio: 0.05 # 轻微再降低回流比例到5%(保守:减少回流但避免过度聚焦 commit) + scaleByReviewers: true # 按有效评审者数量 (sqrt) 放大可回流部分 + debug: true # 输出 pr_value_pools.json / pending_assurance.json + + # ===== Issue 分层(非 PR 活动 L1/L2/L3 扩展)===== + issueImpact: + enabled: true + # L1 规模/深度特征权重 + weights: + desc: 0.45 # 描述长度 / 结构化质量(descScore) + link: 0.30 # 关联 PR / commit / 交叉引用(linkScore) + interest: 0.25 # 独立评论参与者/关注度(interestScore) + desc: + lengthScale: 0.0008 # tanh(lengthScale * log1p(chars)) + minChars: 20 # 过短描述降权 + link: + k: 1.2 # 1-exp(-(linkedItems)/k) + maxClamp: 1.0 + interest: + logK: 1.79 # ≈ ln(6) → >5 参与者接近饱和 + baseWeight: 1.0 # 与 L0 基础 open 权重相乘前的相对系数 + pProposer: 0.60 # L2 proposerClaimable 比例(剩余进入 triageMediated) + untriagedPenalty: 0.5 # 无评审/讨论快速关闭时对 triageMediated 的折损 + minDiscussionComments: 2 # 低于该讨论条数认为未充分讨论 + diversityBoost: + minParticipants: 4 + boost: 1.08 # 多参与提升非 proposer 分量 + gammaProposer: 0.85 # 多 proposer(协同创建改进/编辑)时的次线性指数 + closureBonus: + enabled: true + base: 0.25 # issue 关闭操作额外授予(若满足条件) + requireLinkedPR: true + minComments: 2 # 少于此评论数不授予 full base(可用一半) + lowActivityScale: 0.4 + debug: true # 输出 issue_value_pools.json - # 反刷与密度抑制 + # ===== Comment 分层 ===== + commentImpact: + enabled: true + baseWeight: 1.0 # 与 L0 comment 权重结合 + pAssist: 0.70 # 作者辅助(authorAssist)通道占比 + length: + scale: 0.002 # tanh(scale * log1p(chars)) + shortThreshold: 15 # 短文本(≤阈值)视作低质量 + shortPenalty: 0.35 # 短文本乘以该系数 + structure: + codeBonus: 0.30 # 包含代码片段/多行引用 + refBonus: 0.20 # 引用 issue/PR/commit + replyLogK: 2.08 # ≈ ln(8) 回复数饱和 + gammaAssist: 0.9 # 多条高价值评论来自同一人时的次线性压缩 + minImpact: 0.05 # 过滤极低影响(噪声) + diversityBoost: + minDistinctCommenters: 5 + boost: 1.05 + shallowFilter: + maxPerIssue: 30 # 超过后额外评论应用递增折损 + decayStart: 20 # 从第20条开始线性向下到 maxPerIssue + tailScale: 0.5 # 到达上限时的保留比例 + debug: true # 输出 comment_value_debug.json + + # ===== Repo 事件扩展(防突增与加权) ===== + repoEventEnhance: + enabled: true + star: + spikeWindowDays: 3 + spikeStdDevs: 3 # 超过均值+N*std 视为突增 + spikeScale: 0.6 # 突增部分乘以系数 + fork: + weight: 1.4 # 相对 star 的放大(已有基础权重上再乘) + release: + weight: 1.8 + smoothing: + emaAlpha: 0.3 # 平滑 attention 贡献 + debug: false + + # 关闭 priorOpenRankInfluence(移除基于历史OR的正反馈) + priorOpenRankInfluence: + enabled: false + + # 反刷与密度抑制 - 优化为适应大型项目 antiGaming: enabled: true - commentTransform: sqrt - commitTransform: sqrt + commentTransform: log # 从sqrt改为log,更温和的变换 + commitTransform: log # 保持对高频小提交的抑制 linearThresholds: - comment: 3 - reviewComment: 3 - commit: 1 + comment: 20 # 从3提高到8,允许更多线性增长 + reviewComment: 25 # 从3提高到12,评审评论更宽松 + commit: 6 # 提前进入亚线性,抑制刷 commit 次数 perItemCap: - comment: 50 - reviewComment: 40 - commit: 20 + comment: 80 # 从50提高到80 + reviewComment: 60 # 从40提高到60 + commit: 18 # 轻降上限,避免极端 PR 聚合 - # PR 贡献类型与角色 + # PR 贡献类型与角色 - 降低乘数避免权重过大 contributionTypeMultipliers: - open: 1.0 - comment: 0.9 - review: 1.1 - close: 1.0 - commit: 1.05 - reviewerChangeRequestBonus: 1.03 + open: 1.0 # 发起:保持基础权重 + comment: 1.0 # 评论:保持基础权重 + review: 1.0 # 评审:恢复基础权重,降低评审溢价 + close: 1.0 # 关闭:保持基础权重 + commit: 1.0 # 提交:保持基础权重 + reviewerChangeRequestBonus: 1.05 # 评审改进建议:小幅加成 roleBonus: - author: 1.05 - reviewer: 1.05 - committer: 1.03 - commenter: 1.0 + author: 1.1 # 作者:轻微加成 + reviewer: 1.1 # 评审者:轻微加成 + committer: 1.1 # 提交者:轻微加成 + commenter: 1.0 # 评论者:基础权重 roleClamp: - min: 1.0 - max: 1.2 + min: 0.9 # 最低0.9倍 + max: 1.3 # 最高1.3倍,避免过度放大 clamp: - min: 0.7 - max: 1.6 + min: 0.8 # 整体权重最低0.8倍 + max: 1.5 # 整体权重最高1.5倍 # 质量权重配置 qualityWeighting: projectQuality: assignmentTypeTuning: - task: # 任务类型 + task: # 任务类型(指派):强调执行和评审 activityScale: - open: 1.0 + open: 0.9 comment: 1.0 - review: 1.0 - close: 1.0 - voluntary: # 自愿类型 + review: 1.15 + close: 1.1 + ampScale: + issue: 1.0 + pr: 1.15 + task: 1.1 + eff: 1.1 + prFusedExp: + contentExp: 1.0 + codeExp: 1.25 + voluntary: # 自愿类型(自主):强调协作和创新 activityScale: open: 1.0 - comment: 1.0 - review: 1.0 + comment: 1.15 + review: 1.1 close: 1.0 + ampScale: + issue: 1.1 + pr: 1.0 + task: 1.0 + eff: 1.05 + prFusedExp: + contentExp: 1.2 + codeExp: 1.0 diff --git a/src/data/activity_data.json b/src/data/activity_data.json new file mode 100644 index 0000000..01bb291 --- /dev/null +++ b/src/data/activity_data.json @@ -0,0 +1,14252 @@ +[ + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 4, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 1, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 7, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 10, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 3, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 7, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 7, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 6, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 1, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 7, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 2, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 2, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 8, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 6, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 3, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 4, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 2, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 7, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 8, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 7, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 7, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 7, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 4, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 3, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 2, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 1, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 10, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 6, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 7, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 6, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 7, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 2, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-11-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 3, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 7, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 7, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 10, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 3, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 4, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 4, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 1, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 1, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 8, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 8, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2024-12-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 1, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 9, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 2, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 7, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 1, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 7, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 4, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 2, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 8, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 7, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 9, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 9, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 1, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-01-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 7, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 10, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 7, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 1, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 2, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 3, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 7, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 6, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 3, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 3, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 6, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 3, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 8, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 2, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-02-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 7, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 1, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 1, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 3, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 3, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 1, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 7, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 4, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 10, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 1, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 6, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-03-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 6, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 3, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 4, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 4, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 10, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 4, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 6, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 3, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 4, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 7, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 2, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-04-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 10, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 3, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 10, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 1, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 7, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 4, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 4, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 10, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 10, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 1, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 7, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 1, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 10, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-05-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 6, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 10, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 6, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 7, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 3, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 7, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 3, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 1, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 3, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 4, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 3, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 9, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 3, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 1, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 7, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 10, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 4, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-06-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 6, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 9, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 10, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 3, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 6, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 6, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 7, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 7, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 3, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 9, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 4, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 6, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 10, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 2, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 4, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 2, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 7, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 6, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 6, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 1, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 7, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-07-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 4, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 7, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 4, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 4, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 8, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 4, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 3, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 6, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 7, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 4, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 4, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 4, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 2, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 10, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 7, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 6, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 3, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 3, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-08-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 4, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 7, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 10, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 1, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 2, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 6, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 2, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 7, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 7, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 8, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 3, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 7, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 6, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 5, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 9, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 9, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 5, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 6, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-09-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 1, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 7, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 10, + "openIssue": 2, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 4, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 6, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 5, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 5, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 3, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 3, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 3, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 8, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 3, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 7, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 7, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 7, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 3, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "GitHub", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 1, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 6, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 3, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 7, + "openIssue": 1, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 8, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 4, + "openIssue": 2, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 4, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 9, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 1, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 2, + "openIssue": 3, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 1, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 10, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 10, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 7, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 8, + "openIssue": 2, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 7, + "openIssue": 3, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 4, + "actorLogin": "mock-user-4", + "issueComment": 3, + "openIssue": 1, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 10, + "openIssue": 2, + "openPull": 1, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 6, + "openIssue": 2, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 7, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 8, + "openIssue": 1, + "openPull": 2, + "reviewComment": 5, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 9, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 2, + "openIssue": 3, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 3, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 1, + "openIssue": 1, + "openPull": 2, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 1, + "actorLogin": "mock-user-1", + "issueComment": 8, + "openIssue": 1, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 2, + "actorLogin": "mock-user-2", + "issueComment": 8, + "openIssue": 2, + "openPull": 2, + "reviewComment": 3, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 3, + "actorLogin": "mock-user-3", + "issueComment": 4, + "openIssue": 2, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 5, + "actorLogin": "mock-user-5", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 2, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 6, + "actorLogin": "mock-user-6", + "issueComment": 3, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 7, + "actorLogin": "mock-user-7", + "issueComment": 3, + "openIssue": 3, + "openPull": 2, + "reviewComment": 2, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 8, + "actorLogin": "mock-user-8", + "issueComment": 2, + "openIssue": 2, + "openPull": 2, + "reviewComment": 1, + "mergedPull": 2, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 9, + "actorLogin": "mock-user-9", + "issueComment": 1, + "openIssue": 1, + "openPull": 1, + "reviewComment": 5, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + }, + { + "platform": "Gitee", + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2", + "actorId": 10, + "actorLogin": "mock-user-10", + "issueComment": 5, + "openIssue": 3, + "openPull": 1, + "reviewComment": 4, + "mergedPull": 1, + "createdAt": "2025-10-14T16:00:00.000Z" + } +] \ No newline at end of file diff --git a/src/data/last_month_openrank.json b/src/data/last_month_openrank.json new file mode 100644 index 0000000..02c922a --- /dev/null +++ b/src/data/last_month_openrank.json @@ -0,0 +1,32 @@ +{ + "User_GitHub_1": 42.57650433865217, + "User_GitHub_2": 29.776783773208628, + "User_GitHub_3": 14.18116354588135, + "User_GitHub_4": 12.897474146126978, + "User_GitHub_5": 34.53400730452424, + "User_GitHub_6": 45.6516764908136, + "User_GitHub_7": 25.510848269190056, + "User_GitHub_8": 12.652501791447836, + "User_GitHub_9": 48.07744085881474, + "User_GitHub_10": 17.861166619101077, + "Repo_GitHub_1": 79.87262071821479, + "Repo_GitHub_2": 81.234489605558, + "Repo_GitHub_3": 65.02465353220519, + "Repo_GitHub_4": 56.337133614217464, + "Repo_GitHub_5": 47.46510990130267, + "User_Gitee_1": 58.17360001438681, + "User_Gitee_2": 47.79145147635021, + "User_Gitee_3": 48.14128014642259, + "User_Gitee_4": 55.56756567843505, + "User_Gitee_5": 14.270614680294738, + "User_Gitee_6": 44.999044603526904, + "User_Gitee_7": 14.57092936949296, + "User_Gitee_8": 38.70792873824105, + "User_Gitee_9": 49.77478328732909, + "User_Gitee_10": 23.855291150122294, + "Repo_Gitee_1": 81.79664225323351, + "Repo_Gitee_2": 114.0534014265481, + "Repo_Gitee_3": 74.40348264240879, + "Repo_Gitee_4": 109.61370731304558, + "Repo_Gitee_5": 94.51780815302588 +} \ No newline at end of file diff --git a/src/test_data/latest_openrank_results.json b/src/data/latest_openrank_results.json similarity index 91% rename from src/test_data/latest_openrank_results.json rename to src/data/latest_openrank_results.json index 8e4062e..12c7c1d 100644 --- a/src/test_data/latest_openrank_results.json +++ b/src/data/latest_openrank_results.json @@ -1,33 +1,33 @@ [ { - "id": "Repo_GitHub_2", + "id": "Repo_GitHub_1", "nodeType": "Repo", "type": "Repo", "platform": "GitHub", - "name": "github/mock-org-1/mock-repo-2", - "openrank": 1.9056981279497858, - "lastMonthOpenrank": 1.9056981279497858, + "name": "github/mock-org-1/mock-repo-1", + "openrank": 1.9045309850460366, + "lastMonthOpenrank": 1.9045309850460366, "change": 0, "metadata": { - "repoId": 2, - "repoName": "github/mock-org-1/mock-repo-2", + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", "orgId": 1, "orgName": "mock-org-1" }, "rank": 1 }, { - "id": "Repo_GitHub_3", + "id": "Repo_Gitee_1", "nodeType": "Repo", "type": "Repo", - "platform": "GitHub", - "name": "github/mock-org-1/mock-repo-3", - "openrank": 1.6765550029312295, - "lastMonthOpenrank": 1.6765550029312295, + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-1", + "openrank": 1.877666727830078, + "lastMonthOpenrank": 1.877666727830078, "change": 0, "metadata": { - "repoId": 3, - "repoName": "github/mock-org-1/mock-repo-3", + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", "orgId": 1, "orgName": "mock-org-1" }, @@ -39,8 +39,8 @@ "type": "Repo", "platform": "Gitee", "name": "gitee/mock-org-1/mock-repo-3", - "openrank": 1.6669356331890053, - "lastMonthOpenrank": 1.6669356331890053, + "openrank": 1.7800583811006352, + "lastMonthOpenrank": 1.7800583811006352, "change": 0, "metadata": { "repoId": 3, @@ -51,119 +51,119 @@ "rank": 3 }, { - "id": "Repo_Gitee_4", + "id": "Repo_GitHub_5", "nodeType": "Repo", "type": "Repo", - "platform": "Gitee", - "name": "gitee/mock-org-2/mock-repo-4", - "openrank": 1.5710645645204349, - "lastMonthOpenrank": 1.5710645645204349, + "platform": "GitHub", + "name": "github/mock-org-2/mock-repo-5", + "openrank": 1.749303093278993, + "lastMonthOpenrank": 1.749303093278993, "change": 0, "metadata": { - "repoId": 4, - "repoName": "gitee/mock-org-2/mock-repo-4", + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", "orgId": 2, "orgName": "mock-org-2" }, "rank": 4 }, { - "id": "Repo_Gitee_5", + "id": "Repo_GitHub_2", "nodeType": "Repo", "type": "Repo", - "platform": "Gitee", - "name": "gitee/mock-org-2/mock-repo-5", - "openrank": 1.395732250693027, - "lastMonthOpenrank": 1.395732250693027, + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-2", + "openrank": 1.693712153464084, + "lastMonthOpenrank": 1.693712153464084, "change": 0, "metadata": { - "repoId": 5, - "repoName": "gitee/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2" + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1" }, "rank": 5 }, { - "id": "Repo_Gitee_2", + "id": "Repo_Gitee_4", "nodeType": "Repo", "type": "Repo", "platform": "Gitee", - "name": "gitee/mock-org-1/mock-repo-2", - "openrank": 1.374506957916514, - "lastMonthOpenrank": 1.374506957916514, + "name": "gitee/mock-org-2/mock-repo-4", + "openrank": 1.68335800971928, + "lastMonthOpenrank": 1.68335800971928, "change": 0, "metadata": { - "repoId": 2, - "repoName": "gitee/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1" + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2" }, "rank": 6 }, { - "id": "Repo_GitHub_1", + "id": "Repo_GitHub_3", "nodeType": "Repo", "type": "Repo", "platform": "GitHub", - "name": "github/mock-org-1/mock-repo-1", - "openrank": 1.3501925212361237, - "lastMonthOpenrank": 1.3501925212361237, + "name": "github/mock-org-1/mock-repo-3", + "openrank": 1.647055954529733, + "lastMonthOpenrank": 1.647055954529733, "change": 0, "metadata": { - "repoId": 1, - "repoName": "github/mock-org-1/mock-repo-1", + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", "orgId": 1, "orgName": "mock-org-1" }, "rank": 7 }, { - "id": "Repo_GitHub_4", + "id": "Repo_Gitee_2", "nodeType": "Repo", "type": "Repo", - "platform": "GitHub", - "name": "github/mock-org-2/mock-repo-4", - "openrank": 1.2140649332903524, - "lastMonthOpenrank": 1.2140649332903524, + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-2", + "openrank": 1.595690027983706, + "lastMonthOpenrank": 1.595690027983706, "change": 0, "metadata": { - "repoId": 4, - "repoName": "github/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2" + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1" }, "rank": 8 }, { - "id": "Repo_Gitee_1", + "id": "Repo_Gitee_5", "nodeType": "Repo", "type": "Repo", "platform": "Gitee", - "name": "gitee/mock-org-1/mock-repo-1", - "openrank": 1.1417605936810185, - "lastMonthOpenrank": 1.1417605936810185, + "name": "gitee/mock-org-2/mock-repo-5", + "openrank": 1.5632268533663003, + "lastMonthOpenrank": 1.5632268533663003, "change": 0, "metadata": { - "repoId": 1, - "repoName": "gitee/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1" + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2" }, "rank": 9 }, { - "id": "Repo_GitHub_5", + "id": "Repo_GitHub_4", "nodeType": "Repo", "type": "Repo", "platform": "GitHub", - "name": "github/mock-org-2/mock-repo-5", - "openrank": 1.0034894145925084, - "lastMonthOpenrank": 1.0034894145925084, + "name": "github/mock-org-2/mock-repo-4", + "openrank": 1.505397813681153, + "lastMonthOpenrank": 1.505397813681153, "change": 0, "metadata": { - "repoId": 5, - "repoName": "github/mock-org-2/mock-repo-5", + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", "orgId": 2, "orgName": "mock-org-2" }, @@ -275,32 +275,32 @@ "rank": 17 }, { - "id": "User_GitHub_9", + "id": "User_GitHub_8", "nodeType": "User", "type": "User", "platform": "GitHub", - "name": "mock-user-9", + "name": "mock-user-8", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 9, - "actorLogin": "mock-user-9" + "actorId": 8, + "actorLogin": "mock-user-8" }, "rank": 18 }, { - "id": "User_GitHub_8", + "id": "User_GitHub_9", "nodeType": "User", "type": "User", "platform": "GitHub", - "name": "mock-user-8", + "name": "mock-user-9", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 8, - "actorLogin": "mock-user-8" + "actorId": 9, + "actorLogin": "mock-user-9" }, "rank": 19 }, @@ -410,62 +410,62 @@ "rank": 26 }, { - "id": "User_Gitee_9", + "id": "User_Gitee_8", "nodeType": "User", "type": "User", "platform": "Gitee", - "name": "mock-user-9", + "name": "mock-user-8", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 9, - "actorLogin": "mock-user-9" + "actorId": 8, + "actorLogin": "mock-user-8" }, "rank": 27 }, { - "id": "User_Gitee_8", + "id": "User_Gitee_9", "nodeType": "User", "type": "User", "platform": "Gitee", - "name": "mock-user-8", + "name": "mock-user-9", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 8, - "actorLogin": "mock-user-8" + "actorId": 9, + "actorLogin": "mock-user-9" }, "rank": 28 }, { - "id": "User_Gitee_7", + "id": "User_Gitee_10", "nodeType": "User", "type": "User", "platform": "Gitee", - "name": "mock-user-7", + "name": "mock-user-10", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 7, - "actorLogin": "mock-user-7" + "actorId": 10, + "actorLogin": "mock-user-10" }, "rank": 29 }, { - "id": "User_Gitee_10", + "id": "User_Gitee_7", "nodeType": "User", "type": "User", "platform": "Gitee", - "name": "mock-user-10", + "name": "mock-user-7", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 10, - "actorLogin": "mock-user-10" + "actorId": 7, + "actorLogin": "mock-user-7" }, "rank": 30 } diff --git a/src/test_data/openrank_results_2025-09-16T03-34-58-507Z.json b/src/data/openrank_results_2025-09-29T09-23-53-826Z.json similarity index 91% rename from src/test_data/openrank_results_2025-09-16T03-34-58-507Z.json rename to src/data/openrank_results_2025-09-29T09-23-53-826Z.json index 8e4062e..28aafd0 100644 --- a/src/test_data/openrank_results_2025-09-16T03-34-58-507Z.json +++ b/src/data/openrank_results_2025-09-29T09-23-53-826Z.json @@ -1,169 +1,169 @@ [ { - "id": "Repo_GitHub_2", + "id": "Repo_Gitee_2", "nodeType": "Repo", "type": "Repo", - "platform": "GitHub", - "name": "github/mock-org-1/mock-repo-2", - "openrank": 1.9056981279497858, - "lastMonthOpenrank": 1.9056981279497858, + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-2", + "openrank": 2.408623116319703, + "lastMonthOpenrank": 2.408623116319703, "change": 0, "metadata": { "repoId": 2, - "repoName": "github/mock-org-1/mock-repo-2", + "repoName": "gitee/mock-org-1/mock-repo-2", "orgId": 1, "orgName": "mock-org-1" }, "rank": 1 }, { - "id": "Repo_GitHub_3", + "id": "Repo_GitHub_4", "nodeType": "Repo", "type": "Repo", "platform": "GitHub", - "name": "github/mock-org-1/mock-repo-3", - "openrank": 1.6765550029312295, - "lastMonthOpenrank": 1.6765550029312295, + "name": "github/mock-org-2/mock-repo-4", + "openrank": 2.222400984609847, + "lastMonthOpenrank": 2.222400984609847, "change": 0, "metadata": { - "repoId": 3, - "repoName": "github/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1" + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2" }, "rank": 2 }, { - "id": "Repo_Gitee_3", + "id": "Repo_Gitee_4", "nodeType": "Repo", "type": "Repo", "platform": "Gitee", - "name": "gitee/mock-org-1/mock-repo-3", - "openrank": 1.6669356331890053, - "lastMonthOpenrank": 1.6669356331890053, + "name": "gitee/mock-org-2/mock-repo-4", + "openrank": 2.032129132790573, + "lastMonthOpenrank": 2.032129132790573, "change": 0, "metadata": { - "repoId": 3, - "repoName": "gitee/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1" + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2" }, "rank": 3 }, { - "id": "Repo_Gitee_4", + "id": "Repo_GitHub_1", "nodeType": "Repo", "type": "Repo", - "platform": "Gitee", - "name": "gitee/mock-org-2/mock-repo-4", - "openrank": 1.5710645645204349, - "lastMonthOpenrank": 1.5710645645204349, + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-1", + "openrank": 1.7972704147325589, + "lastMonthOpenrank": 1.7972704147325589, "change": 0, "metadata": { - "repoId": 4, - "repoName": "gitee/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2" + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1" }, "rank": 4 }, { - "id": "Repo_Gitee_5", + "id": "Repo_GitHub_3", "nodeType": "Repo", "type": "Repo", - "platform": "Gitee", - "name": "gitee/mock-org-2/mock-repo-5", - "openrank": 1.395732250693027, - "lastMonthOpenrank": 1.395732250693027, + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-3", + "openrank": 1.6430352349541981, + "lastMonthOpenrank": 1.6430352349541981, "change": 0, "metadata": { - "repoId": 5, - "repoName": "gitee/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2" + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1" }, "rank": 5 }, { - "id": "Repo_Gitee_2", + "id": "Repo_GitHub_5", "nodeType": "Repo", "type": "Repo", - "platform": "Gitee", - "name": "gitee/mock-org-1/mock-repo-2", - "openrank": 1.374506957916514, - "lastMonthOpenrank": 1.374506957916514, + "platform": "GitHub", + "name": "github/mock-org-2/mock-repo-5", + "openrank": 1.551108591396641, + "lastMonthOpenrank": 1.551108591396641, "change": 0, "metadata": { - "repoId": 2, - "repoName": "gitee/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1" + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2" }, "rank": 6 }, { - "id": "Repo_GitHub_1", + "id": "Repo_Gitee_3", "nodeType": "Repo", "type": "Repo", - "platform": "GitHub", - "name": "github/mock-org-1/mock-repo-1", - "openrank": 1.3501925212361237, - "lastMonthOpenrank": 1.3501925212361237, + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-3", + "openrank": 1.4906206086131357, + "lastMonthOpenrank": 1.4906206086131357, "change": 0, "metadata": { - "repoId": 1, - "repoName": "github/mock-org-1/mock-repo-1", + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", "orgId": 1, "orgName": "mock-org-1" }, "rank": 7 }, { - "id": "Repo_GitHub_4", + "id": "Repo_Gitee_1", "nodeType": "Repo", "type": "Repo", - "platform": "GitHub", - "name": "github/mock-org-2/mock-repo-4", - "openrank": 1.2140649332903524, - "lastMonthOpenrank": 1.2140649332903524, + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-1", + "openrank": 1.340061774769773, + "lastMonthOpenrank": 1.340061774769773, "change": 0, "metadata": { - "repoId": 4, - "repoName": "github/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2" + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1" }, "rank": 8 }, { - "id": "Repo_Gitee_1", + "id": "Repo_GitHub_2", "nodeType": "Repo", "type": "Repo", - "platform": "Gitee", - "name": "gitee/mock-org-1/mock-repo-1", - "openrank": 1.1417605936810185, - "lastMonthOpenrank": 1.1417605936810185, + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-2", + "openrank": 1.2861847743067547, + "lastMonthOpenrank": 1.2861847743067547, "change": 0, "metadata": { - "repoId": 1, - "repoName": "gitee/mock-org-1/mock-repo-1", + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", "orgId": 1, "orgName": "mock-org-1" }, "rank": 9 }, { - "id": "Repo_GitHub_5", + "id": "Repo_Gitee_5", "nodeType": "Repo", "type": "Repo", - "platform": "GitHub", - "name": "github/mock-org-2/mock-repo-5", - "openrank": 1.0034894145925084, - "lastMonthOpenrank": 1.0034894145925084, + "platform": "Gitee", + "name": "gitee/mock-org-2/mock-repo-5", + "openrank": 1.2285653675068142, + "lastMonthOpenrank": 1.2285653675068142, "change": 0, "metadata": { "repoId": 5, - "repoName": "github/mock-org-2/mock-repo-5", + "repoName": "gitee/mock-org-2/mock-repo-5", "orgId": 2, "orgName": "mock-org-2" }, @@ -215,107 +215,107 @@ "rank": 13 }, { - "id": "User_GitHub_4", + "id": "User_GitHub_6", "nodeType": "User", "type": "User", "platform": "GitHub", - "name": "mock-user-4", + "name": "mock-user-6", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 4, - "actorLogin": "mock-user-4" + "actorId": 6, + "actorLogin": "mock-user-6" }, "rank": 14 }, { - "id": "User_GitHub_5", + "id": "User_GitHub_7", "nodeType": "User", "type": "User", "platform": "GitHub", - "name": "mock-user-5", + "name": "mock-user-7", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 5, - "actorLogin": "mock-user-5" + "actorId": 7, + "actorLogin": "mock-user-7" }, "rank": 15 }, { - "id": "User_GitHub_6", + "id": "User_GitHub_8", "nodeType": "User", "type": "User", "platform": "GitHub", - "name": "mock-user-6", + "name": "mock-user-8", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 6, - "actorLogin": "mock-user-6" + "actorId": 8, + "actorLogin": "mock-user-8" }, "rank": 16 }, { - "id": "User_GitHub_7", + "id": "User_GitHub_10", "nodeType": "User", "type": "User", "platform": "GitHub", - "name": "mock-user-7", + "name": "mock-user-10", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 7, - "actorLogin": "mock-user-7" + "actorId": 10, + "actorLogin": "mock-user-10" }, "rank": 17 }, { - "id": "User_GitHub_9", + "id": "User_GitHub_5", "nodeType": "User", "type": "User", "platform": "GitHub", - "name": "mock-user-9", + "name": "mock-user-5", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 9, - "actorLogin": "mock-user-9" + "actorId": 5, + "actorLogin": "mock-user-5" }, "rank": 18 }, { - "id": "User_GitHub_8", + "id": "User_GitHub_9", "nodeType": "User", "type": "User", "platform": "GitHub", - "name": "mock-user-8", + "name": "mock-user-9", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 8, - "actorLogin": "mock-user-8" + "actorId": 9, + "actorLogin": "mock-user-9" }, "rank": 19 }, { - "id": "User_GitHub_10", + "id": "User_GitHub_4", "nodeType": "User", "type": "User", "platform": "GitHub", - "name": "mock-user-10", + "name": "mock-user-4", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 10, - "actorLogin": "mock-user-10" + "actorId": 4, + "actorLogin": "mock-user-4" }, "rank": 20 }, @@ -364,21 +364,6 @@ }, "rank": 23 }, - { - "id": "User_Gitee_4", - "nodeType": "User", - "type": "User", - "platform": "Gitee", - "name": "mock-user-4", - "openrank": 1, - "lastMonthOpenrank": 1, - "change": 0, - "metadata": { - "actorId": 4, - "actorLogin": "mock-user-4" - }, - "rank": 24 - }, { "id": "User_Gitee_5", "nodeType": "User", @@ -392,7 +377,7 @@ "actorId": 5, "actorLogin": "mock-user-5" }, - "rank": 25 + "rank": 24 }, { "id": "User_Gitee_6", @@ -407,22 +392,22 @@ "actorId": 6, "actorLogin": "mock-user-6" }, - "rank": 26 + "rank": 25 }, { - "id": "User_Gitee_9", + "id": "User_Gitee_4", "nodeType": "User", "type": "User", "platform": "Gitee", - "name": "mock-user-9", + "name": "mock-user-4", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 9, - "actorLogin": "mock-user-9" + "actorId": 4, + "actorLogin": "mock-user-4" }, - "rank": 27 + "rank": 26 }, { "id": "User_Gitee_8", @@ -437,22 +422,22 @@ "actorId": 8, "actorLogin": "mock-user-8" }, - "rank": 28 + "rank": 27 }, { - "id": "User_Gitee_7", + "id": "User_Gitee_9", "nodeType": "User", "type": "User", "platform": "Gitee", - "name": "mock-user-7", + "name": "mock-user-9", "openrank": 1, "lastMonthOpenrank": 1, "change": 0, "metadata": { - "actorId": 7, - "actorLogin": "mock-user-7" + "actorId": 9, + "actorLogin": "mock-user-9" }, - "rank": 29 + "rank": 28 }, { "id": "User_Gitee_10", @@ -467,6 +452,21 @@ "actorId": 10, "actorLogin": "mock-user-10" }, + "rank": 29 + }, + { + "id": "User_Gitee_7", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-7", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 7, + "actorLogin": "mock-user-7" + }, "rank": 30 } ] \ No newline at end of file diff --git a/src/data/openrank_results_2025-10-01T02-49-08-614Z.json b/src/data/openrank_results_2025-10-01T02-49-08-614Z.json new file mode 100644 index 0000000..84d851b --- /dev/null +++ b/src/data/openrank_results_2025-10-01T02-49-08-614Z.json @@ -0,0 +1,472 @@ +[ + { + "id": "Repo_Gitee_5", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-2/mock-repo-5", + "openrank": 2.000065309589395, + "lastMonthOpenrank": 2.000065309589395, + "change": 0, + "metadata": { + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 1 + }, + { + "id": "Repo_GitHub_5", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-2/mock-repo-5", + "openrank": 1.8894066303432826, + "lastMonthOpenrank": 1.8894066303432826, + "change": 0, + "metadata": { + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 2 + }, + { + "id": "Repo_Gitee_4", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-2/mock-repo-4", + "openrank": 1.8298802994926715, + "lastMonthOpenrank": 1.8298802994926715, + "change": 0, + "metadata": { + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 3 + }, + { + "id": "Repo_GitHub_1", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-1", + "openrank": 1.7648899709198624, + "lastMonthOpenrank": 1.7648899709198624, + "change": 0, + "metadata": { + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 4 + }, + { + "id": "Repo_GitHub_2", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-2", + "openrank": 1.6937904779385886, + "lastMonthOpenrank": 1.6937904779385886, + "change": 0, + "metadata": { + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 5 + }, + { + "id": "Repo_Gitee_2", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-2", + "openrank": 1.6372775314732926, + "lastMonthOpenrank": 1.6372775314732926, + "change": 0, + "metadata": { + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 6 + }, + { + "id": "Repo_GitHub_4", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-2/mock-repo-4", + "openrank": 1.5894860232970294, + "lastMonthOpenrank": 1.5894860232970294, + "change": 0, + "metadata": { + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 7 + }, + { + "id": "Repo_GitHub_3", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-3", + "openrank": 1.5624268975012368, + "lastMonthOpenrank": 1.5624268975012368, + "change": 0, + "metadata": { + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 8 + }, + { + "id": "Repo_Gitee_1", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-1", + "openrank": 1.5507907452074696, + "lastMonthOpenrank": 1.5507907452074696, + "change": 0, + "metadata": { + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 9 + }, + { + "id": "Repo_Gitee_3", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-3", + "openrank": 1.4819861142371706, + "lastMonthOpenrank": 1.4819861142371706, + "change": 0, + "metadata": { + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 10 + }, + { + "id": "User_GitHub_1", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-1", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 1, + "actorLogin": "mock-user-1" + }, + "rank": 11 + }, + { + "id": "User_GitHub_2", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-2", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 2, + "actorLogin": "mock-user-2" + }, + "rank": 12 + }, + { + "id": "User_GitHub_3", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-3", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 3, + "actorLogin": "mock-user-3" + }, + "rank": 13 + }, + { + "id": "User_GitHub_5", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-5", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 5, + "actorLogin": "mock-user-5" + }, + "rank": 14 + }, + { + "id": "User_GitHub_6", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-6", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 6, + "actorLogin": "mock-user-6" + }, + "rank": 15 + }, + { + "id": "User_GitHub_7", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-7", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 7, + "actorLogin": "mock-user-7" + }, + "rank": 16 + }, + { + "id": "User_GitHub_8", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-8", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 8, + "actorLogin": "mock-user-8" + }, + "rank": 17 + }, + { + "id": "User_GitHub_9", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-9", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 9, + "actorLogin": "mock-user-9" + }, + "rank": 18 + }, + { + "id": "User_GitHub_10", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-10", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 10, + "actorLogin": "mock-user-10" + }, + "rank": 19 + }, + { + "id": "User_Gitee_1", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-1", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 1, + "actorLogin": "mock-user-1" + }, + "rank": 20 + }, + { + "id": "User_Gitee_2", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-2", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 2, + "actorLogin": "mock-user-2" + }, + "rank": 21 + }, + { + "id": "User_Gitee_3", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-3", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 3, + "actorLogin": "mock-user-3" + }, + "rank": 22 + }, + { + "id": "User_Gitee_6", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-6", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 6, + "actorLogin": "mock-user-6" + }, + "rank": 23 + }, + { + "id": "User_Gitee_8", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-8", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 8, + "actorLogin": "mock-user-8" + }, + "rank": 24 + }, + { + "id": "User_Gitee_9", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-9", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 9, + "actorLogin": "mock-user-9" + }, + "rank": 25 + }, + { + "id": "User_Gitee_10", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-10", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 10, + "actorLogin": "mock-user-10" + }, + "rank": 26 + }, + { + "id": "User_Gitee_5", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-5", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 5, + "actorLogin": "mock-user-5" + }, + "rank": 27 + }, + { + "id": "User_Gitee_7", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-7", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 7, + "actorLogin": "mock-user-7" + }, + "rank": 28 + }, + { + "id": "User_Gitee_4", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-4", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 4, + "actorLogin": "mock-user-4" + }, + "rank": 29 + }, + { + "id": "User_GitHub_4", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-4", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 4, + "actorLogin": "mock-user-4" + }, + "rank": 30 + } +] \ No newline at end of file diff --git a/src/data/openrank_results_2025-10-01T02-49-08-757Z.json b/src/data/openrank_results_2025-10-01T02-49-08-757Z.json new file mode 100644 index 0000000..f8710de --- /dev/null +++ b/src/data/openrank_results_2025-10-01T02-49-08-757Z.json @@ -0,0 +1,472 @@ +[ + { + "id": "Repo_Gitee_4", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-2/mock-repo-4", + "openrank": 1.992716401099891, + "lastMonthOpenrank": 1.992716401099891, + "change": 0, + "metadata": { + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 1 + }, + { + "id": "Repo_GitHub_3", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-3", + "openrank": 1.8940013649845269, + "lastMonthOpenrank": 1.8940013649845269, + "change": 0, + "metadata": { + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 2 + }, + { + "id": "Repo_GitHub_1", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-1", + "openrank": 1.8679409356117989, + "lastMonthOpenrank": 1.8679409356117989, + "change": 0, + "metadata": { + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 3 + }, + { + "id": "Repo_Gitee_1", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-1", + "openrank": 1.7981802595183713, + "lastMonthOpenrank": 1.7981802595183713, + "change": 0, + "metadata": { + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 4 + }, + { + "id": "Repo_GitHub_4", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-2/mock-repo-4", + "openrank": 1.7941937196640367, + "lastMonthOpenrank": 1.7941937196640367, + "change": 0, + "metadata": { + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 5 + }, + { + "id": "Repo_Gitee_3", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-3", + "openrank": 1.6196147913370151, + "lastMonthOpenrank": 1.6196147913370151, + "change": 0, + "metadata": { + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 6 + }, + { + "id": "Repo_Gitee_5", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-2/mock-repo-5", + "openrank": 1.5813828694682581, + "lastMonthOpenrank": 1.5813828694682581, + "change": 0, + "metadata": { + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 7 + }, + { + "id": "Repo_Gitee_2", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-2", + "openrank": 1.508105678576464, + "lastMonthOpenrank": 1.508105678576464, + "change": 0, + "metadata": { + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 8 + }, + { + "id": "Repo_GitHub_5", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-2/mock-repo-5", + "openrank": 1.4830259365701282, + "lastMonthOpenrank": 1.4830259365701282, + "change": 0, + "metadata": { + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 9 + }, + { + "id": "Repo_GitHub_2", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-2", + "openrank": 1.4608380431695098, + "lastMonthOpenrank": 1.4608380431695098, + "change": 0, + "metadata": { + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 10 + }, + { + "id": "User_GitHub_1", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-1", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 1, + "actorLogin": "mock-user-1" + }, + "rank": 11 + }, + { + "id": "User_GitHub_2", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-2", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 2, + "actorLogin": "mock-user-2" + }, + "rank": 12 + }, + { + "id": "User_GitHub_3", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-3", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 3, + "actorLogin": "mock-user-3" + }, + "rank": 13 + }, + { + "id": "User_GitHub_4", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-4", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 4, + "actorLogin": "mock-user-4" + }, + "rank": 14 + }, + { + "id": "User_GitHub_7", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-7", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 7, + "actorLogin": "mock-user-7" + }, + "rank": 15 + }, + { + "id": "User_GitHub_9", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-9", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 9, + "actorLogin": "mock-user-9" + }, + "rank": 16 + }, + { + "id": "User_GitHub_10", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-10", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 10, + "actorLogin": "mock-user-10" + }, + "rank": 17 + }, + { + "id": "User_GitHub_5", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-5", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 5, + "actorLogin": "mock-user-5" + }, + "rank": 18 + }, + { + "id": "User_GitHub_6", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-6", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 6, + "actorLogin": "mock-user-6" + }, + "rank": 19 + }, + { + "id": "User_GitHub_8", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-8", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 8, + "actorLogin": "mock-user-8" + }, + "rank": 20 + }, + { + "id": "User_Gitee_1", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-1", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 1, + "actorLogin": "mock-user-1" + }, + "rank": 21 + }, + { + "id": "User_Gitee_2", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-2", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 2, + "actorLogin": "mock-user-2" + }, + "rank": 22 + }, + { + "id": "User_Gitee_3", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-3", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 3, + "actorLogin": "mock-user-3" + }, + "rank": 23 + }, + { + "id": "User_Gitee_4", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-4", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 4, + "actorLogin": "mock-user-4" + }, + "rank": 24 + }, + { + "id": "User_Gitee_5", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-5", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 5, + "actorLogin": "mock-user-5" + }, + "rank": 25 + }, + { + "id": "User_Gitee_6", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-6", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 6, + "actorLogin": "mock-user-6" + }, + "rank": 26 + }, + { + "id": "User_Gitee_7", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-7", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 7, + "actorLogin": "mock-user-7" + }, + "rank": 27 + }, + { + "id": "User_Gitee_9", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-9", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 9, + "actorLogin": "mock-user-9" + }, + "rank": 28 + }, + { + "id": "User_Gitee_10", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-10", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 10, + "actorLogin": "mock-user-10" + }, + "rank": 29 + }, + { + "id": "User_Gitee_8", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-8", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 8, + "actorLogin": "mock-user-8" + }, + "rank": 30 + } +] \ No newline at end of file diff --git a/src/data/openrank_results_2025-10-01T03-23-08-065Z.json b/src/data/openrank_results_2025-10-01T03-23-08-065Z.json new file mode 100644 index 0000000..dd765f6 --- /dev/null +++ b/src/data/openrank_results_2025-10-01T03-23-08-065Z.json @@ -0,0 +1,472 @@ +[ + { + "id": "Repo_GitHub_5", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-2/mock-repo-5", + "openrank": 1.872461178540264, + "lastMonthOpenrank": 1.872461178540264, + "change": 0, + "metadata": { + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 1 + }, + { + "id": "Repo_Gitee_2", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-2", + "openrank": 1.864013658283685, + "lastMonthOpenrank": 1.864013658283685, + "change": 0, + "metadata": { + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 2 + }, + { + "id": "Repo_Gitee_3", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-3", + "openrank": 1.7978029163522218, + "lastMonthOpenrank": 1.7978029163522218, + "change": 0, + "metadata": { + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 3 + }, + { + "id": "Repo_Gitee_5", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-2/mock-repo-5", + "openrank": 1.6865861592407587, + "lastMonthOpenrank": 1.6865861592407587, + "change": 0, + "metadata": { + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 4 + }, + { + "id": "Repo_GitHub_2", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-2", + "openrank": 1.6722505798930944, + "lastMonthOpenrank": 1.6722505798930944, + "change": 0, + "metadata": { + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 5 + }, + { + "id": "Repo_GitHub_1", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-1", + "openrank": 1.6680521628943474, + "lastMonthOpenrank": 1.6680521628943474, + "change": 0, + "metadata": { + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 6 + }, + { + "id": "Repo_GitHub_3", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-3", + "openrank": 1.6620817790772977, + "lastMonthOpenrank": 1.6620817790772977, + "change": 0, + "metadata": { + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 7 + }, + { + "id": "Repo_Gitee_1", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-1", + "openrank": 1.6395754877108437, + "lastMonthOpenrank": 1.6395754877108437, + "change": 0, + "metadata": { + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 8 + }, + { + "id": "Repo_GitHub_4", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-2/mock-repo-4", + "openrank": 1.6251542995949968, + "lastMonthOpenrank": 1.6251542995949968, + "change": 0, + "metadata": { + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 9 + }, + { + "id": "Repo_Gitee_4", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-2/mock-repo-4", + "openrank": 1.5120217784124903, + "lastMonthOpenrank": 1.5120217784124903, + "change": 0, + "metadata": { + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 10 + }, + { + "id": "User_GitHub_1", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-1", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 1, + "actorLogin": "mock-user-1" + }, + "rank": 11 + }, + { + "id": "User_GitHub_2", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-2", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 2, + "actorLogin": "mock-user-2" + }, + "rank": 12 + }, + { + "id": "User_GitHub_3", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-3", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 3, + "actorLogin": "mock-user-3" + }, + "rank": 13 + }, + { + "id": "User_GitHub_4", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-4", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 4, + "actorLogin": "mock-user-4" + }, + "rank": 14 + }, + { + "id": "User_GitHub_6", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-6", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 6, + "actorLogin": "mock-user-6" + }, + "rank": 15 + }, + { + "id": "User_GitHub_8", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-8", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 8, + "actorLogin": "mock-user-8" + }, + "rank": 16 + }, + { + "id": "User_GitHub_9", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-9", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 9, + "actorLogin": "mock-user-9" + }, + "rank": 17 + }, + { + "id": "User_GitHub_10", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-10", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 10, + "actorLogin": "mock-user-10" + }, + "rank": 18 + }, + { + "id": "User_GitHub_5", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-5", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 5, + "actorLogin": "mock-user-5" + }, + "rank": 19 + }, + { + "id": "User_GitHub_7", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-7", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 7, + "actorLogin": "mock-user-7" + }, + "rank": 20 + }, + { + "id": "User_Gitee_1", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-1", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 1, + "actorLogin": "mock-user-1" + }, + "rank": 21 + }, + { + "id": "User_Gitee_2", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-2", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 2, + "actorLogin": "mock-user-2" + }, + "rank": 22 + }, + { + "id": "User_Gitee_3", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-3", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 3, + "actorLogin": "mock-user-3" + }, + "rank": 23 + }, + { + "id": "User_Gitee_4", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-4", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 4, + "actorLogin": "mock-user-4" + }, + "rank": 24 + }, + { + "id": "User_Gitee_5", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-5", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 5, + "actorLogin": "mock-user-5" + }, + "rank": 25 + }, + { + "id": "User_Gitee_9", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-9", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 9, + "actorLogin": "mock-user-9" + }, + "rank": 26 + }, + { + "id": "User_Gitee_7", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-7", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 7, + "actorLogin": "mock-user-7" + }, + "rank": 27 + }, + { + "id": "User_Gitee_10", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-10", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 10, + "actorLogin": "mock-user-10" + }, + "rank": 28 + }, + { + "id": "User_Gitee_6", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-6", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 6, + "actorLogin": "mock-user-6" + }, + "rank": 29 + }, + { + "id": "User_Gitee_8", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-8", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 8, + "actorLogin": "mock-user-8" + }, + "rank": 30 + } +] \ No newline at end of file diff --git a/src/data/openrank_results_2025-10-02T10-32-45-249Z.json b/src/data/openrank_results_2025-10-02T10-32-45-249Z.json new file mode 100644 index 0000000..cd375c7 --- /dev/null +++ b/src/data/openrank_results_2025-10-02T10-32-45-249Z.json @@ -0,0 +1,472 @@ +[ + { + "id": "Repo_GitHub_3", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-3", + "openrank": 1.8469863039212955, + "lastMonthOpenrank": 1.8469863039212955, + "change": 0, + "metadata": { + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 1 + }, + { + "id": "Repo_Gitee_1", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-1", + "openrank": 1.8117501415383643, + "lastMonthOpenrank": 1.8117501415383643, + "change": 0, + "metadata": { + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 2 + }, + { + "id": "Repo_GitHub_2", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-2", + "openrank": 1.7266659897538232, + "lastMonthOpenrank": 1.7266659897538232, + "change": 0, + "metadata": { + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 3 + }, + { + "id": "Repo_GitHub_1", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-1", + "openrank": 1.7241606083860876, + "lastMonthOpenrank": 1.7241606083860876, + "change": 0, + "metadata": { + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 4 + }, + { + "id": "Repo_Gitee_4", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-2/mock-repo-4", + "openrank": 1.7151601599013209, + "lastMonthOpenrank": 1.7151601599013209, + "change": 0, + "metadata": { + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 5 + }, + { + "id": "Repo_Gitee_2", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-2", + "openrank": 1.6987541131342978, + "lastMonthOpenrank": 1.6987541131342978, + "change": 0, + "metadata": { + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 6 + }, + { + "id": "Repo_GitHub_5", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-2/mock-repo-5", + "openrank": 1.6515269415458067, + "lastMonthOpenrank": 1.6515269415458067, + "change": 0, + "metadata": { + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 7 + }, + { + "id": "Repo_Gitee_3", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-3", + "openrank": 1.6454348154037264, + "lastMonthOpenrank": 1.6454348154037264, + "change": 0, + "metadata": { + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 8 + }, + { + "id": "Repo_Gitee_5", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-2/mock-repo-5", + "openrank": 1.6289007700222908, + "lastMonthOpenrank": 1.6289007700222908, + "change": 0, + "metadata": { + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 9 + }, + { + "id": "Repo_GitHub_4", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-2/mock-repo-4", + "openrank": 1.5506601563929867, + "lastMonthOpenrank": 1.5506601563929867, + "change": 0, + "metadata": { + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 10 + }, + { + "id": "User_GitHub_1", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-1", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 1, + "actorLogin": "mock-user-1" + }, + "rank": 11 + }, + { + "id": "User_GitHub_2", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-2", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 2, + "actorLogin": "mock-user-2" + }, + "rank": 12 + }, + { + "id": "User_GitHub_3", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-3", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 3, + "actorLogin": "mock-user-3" + }, + "rank": 13 + }, + { + "id": "User_GitHub_5", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-5", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 5, + "actorLogin": "mock-user-5" + }, + "rank": 14 + }, + { + "id": "User_GitHub_7", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-7", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 7, + "actorLogin": "mock-user-7" + }, + "rank": 15 + }, + { + "id": "User_GitHub_8", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-8", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 8, + "actorLogin": "mock-user-8" + }, + "rank": 16 + }, + { + "id": "User_GitHub_9", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-9", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 9, + "actorLogin": "mock-user-9" + }, + "rank": 17 + }, + { + "id": "User_GitHub_4", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-4", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 4, + "actorLogin": "mock-user-4" + }, + "rank": 18 + }, + { + "id": "User_GitHub_10", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-10", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 10, + "actorLogin": "mock-user-10" + }, + "rank": 19 + }, + { + "id": "User_GitHub_6", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-6", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 6, + "actorLogin": "mock-user-6" + }, + "rank": 20 + }, + { + "id": "User_Gitee_1", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-1", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 1, + "actorLogin": "mock-user-1" + }, + "rank": 21 + }, + { + "id": "User_Gitee_2", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-2", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 2, + "actorLogin": "mock-user-2" + }, + "rank": 22 + }, + { + "id": "User_Gitee_3", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-3", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 3, + "actorLogin": "mock-user-3" + }, + "rank": 23 + }, + { + "id": "User_Gitee_4", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-4", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 4, + "actorLogin": "mock-user-4" + }, + "rank": 24 + }, + { + "id": "User_Gitee_5", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-5", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 5, + "actorLogin": "mock-user-5" + }, + "rank": 25 + }, + { + "id": "User_Gitee_8", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-8", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 8, + "actorLogin": "mock-user-8" + }, + "rank": 26 + }, + { + "id": "User_Gitee_6", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-6", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 6, + "actorLogin": "mock-user-6" + }, + "rank": 27 + }, + { + "id": "User_Gitee_9", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-9", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 9, + "actorLogin": "mock-user-9" + }, + "rank": 28 + }, + { + "id": "User_Gitee_7", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-7", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 7, + "actorLogin": "mock-user-7" + }, + "rank": 29 + }, + { + "id": "User_Gitee_10", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-10", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 10, + "actorLogin": "mock-user-10" + }, + "rank": 30 + } +] \ No newline at end of file diff --git a/src/data/openrank_results_2025-10-02T10-34-56-451Z.json b/src/data/openrank_results_2025-10-02T10-34-56-451Z.json new file mode 100644 index 0000000..12c7c1d --- /dev/null +++ b/src/data/openrank_results_2025-10-02T10-34-56-451Z.json @@ -0,0 +1,472 @@ +[ + { + "id": "Repo_GitHub_1", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-1", + "openrank": 1.9045309850460366, + "lastMonthOpenrank": 1.9045309850460366, + "change": 0, + "metadata": { + "repoId": 1, + "repoName": "github/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 1 + }, + { + "id": "Repo_Gitee_1", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-1", + "openrank": 1.877666727830078, + "lastMonthOpenrank": 1.877666727830078, + "change": 0, + "metadata": { + "repoId": 1, + "repoName": "gitee/mock-org-1/mock-repo-1", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 2 + }, + { + "id": "Repo_Gitee_3", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-3", + "openrank": 1.7800583811006352, + "lastMonthOpenrank": 1.7800583811006352, + "change": 0, + "metadata": { + "repoId": 3, + "repoName": "gitee/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 3 + }, + { + "id": "Repo_GitHub_5", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-2/mock-repo-5", + "openrank": 1.749303093278993, + "lastMonthOpenrank": 1.749303093278993, + "change": 0, + "metadata": { + "repoId": 5, + "repoName": "github/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 4 + }, + { + "id": "Repo_GitHub_2", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-2", + "openrank": 1.693712153464084, + "lastMonthOpenrank": 1.693712153464084, + "change": 0, + "metadata": { + "repoId": 2, + "repoName": "github/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 5 + }, + { + "id": "Repo_Gitee_4", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-2/mock-repo-4", + "openrank": 1.68335800971928, + "lastMonthOpenrank": 1.68335800971928, + "change": 0, + "metadata": { + "repoId": 4, + "repoName": "gitee/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 6 + }, + { + "id": "Repo_GitHub_3", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-1/mock-repo-3", + "openrank": 1.647055954529733, + "lastMonthOpenrank": 1.647055954529733, + "change": 0, + "metadata": { + "repoId": 3, + "repoName": "github/mock-org-1/mock-repo-3", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 7 + }, + { + "id": "Repo_Gitee_2", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-1/mock-repo-2", + "openrank": 1.595690027983706, + "lastMonthOpenrank": 1.595690027983706, + "change": 0, + "metadata": { + "repoId": 2, + "repoName": "gitee/mock-org-1/mock-repo-2", + "orgId": 1, + "orgName": "mock-org-1" + }, + "rank": 8 + }, + { + "id": "Repo_Gitee_5", + "nodeType": "Repo", + "type": "Repo", + "platform": "Gitee", + "name": "gitee/mock-org-2/mock-repo-5", + "openrank": 1.5632268533663003, + "lastMonthOpenrank": 1.5632268533663003, + "change": 0, + "metadata": { + "repoId": 5, + "repoName": "gitee/mock-org-2/mock-repo-5", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 9 + }, + { + "id": "Repo_GitHub_4", + "nodeType": "Repo", + "type": "Repo", + "platform": "GitHub", + "name": "github/mock-org-2/mock-repo-4", + "openrank": 1.505397813681153, + "lastMonthOpenrank": 1.505397813681153, + "change": 0, + "metadata": { + "repoId": 4, + "repoName": "github/mock-org-2/mock-repo-4", + "orgId": 2, + "orgName": "mock-org-2" + }, + "rank": 10 + }, + { + "id": "User_GitHub_1", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-1", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 1, + "actorLogin": "mock-user-1" + }, + "rank": 11 + }, + { + "id": "User_GitHub_2", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-2", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 2, + "actorLogin": "mock-user-2" + }, + "rank": 12 + }, + { + "id": "User_GitHub_3", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-3", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 3, + "actorLogin": "mock-user-3" + }, + "rank": 13 + }, + { + "id": "User_GitHub_4", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-4", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 4, + "actorLogin": "mock-user-4" + }, + "rank": 14 + }, + { + "id": "User_GitHub_5", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-5", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 5, + "actorLogin": "mock-user-5" + }, + "rank": 15 + }, + { + "id": "User_GitHub_6", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-6", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 6, + "actorLogin": "mock-user-6" + }, + "rank": 16 + }, + { + "id": "User_GitHub_7", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-7", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 7, + "actorLogin": "mock-user-7" + }, + "rank": 17 + }, + { + "id": "User_GitHub_8", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-8", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 8, + "actorLogin": "mock-user-8" + }, + "rank": 18 + }, + { + "id": "User_GitHub_9", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-9", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 9, + "actorLogin": "mock-user-9" + }, + "rank": 19 + }, + { + "id": "User_GitHub_10", + "nodeType": "User", + "type": "User", + "platform": "GitHub", + "name": "mock-user-10", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 10, + "actorLogin": "mock-user-10" + }, + "rank": 20 + }, + { + "id": "User_Gitee_1", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-1", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 1, + "actorLogin": "mock-user-1" + }, + "rank": 21 + }, + { + "id": "User_Gitee_2", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-2", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 2, + "actorLogin": "mock-user-2" + }, + "rank": 22 + }, + { + "id": "User_Gitee_3", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-3", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 3, + "actorLogin": "mock-user-3" + }, + "rank": 23 + }, + { + "id": "User_Gitee_4", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-4", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 4, + "actorLogin": "mock-user-4" + }, + "rank": 24 + }, + { + "id": "User_Gitee_5", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-5", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 5, + "actorLogin": "mock-user-5" + }, + "rank": 25 + }, + { + "id": "User_Gitee_6", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-6", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 6, + "actorLogin": "mock-user-6" + }, + "rank": 26 + }, + { + "id": "User_Gitee_8", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-8", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 8, + "actorLogin": "mock-user-8" + }, + "rank": 27 + }, + { + "id": "User_Gitee_9", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-9", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 9, + "actorLogin": "mock-user-9" + }, + "rank": 28 + }, + { + "id": "User_Gitee_10", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-10", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 10, + "actorLogin": "mock-user-10" + }, + "rank": 29 + }, + { + "id": "User_Gitee_7", + "nodeType": "User", + "type": "User", + "platform": "Gitee", + "name": "mock-user-7", + "openrank": 1, + "lastMonthOpenrank": 1, + "change": 0, + "metadata": { + "actorId": 7, + "actorLogin": "mock-user-7" + }, + "rank": 30 + } +] \ No newline at end of file diff --git a/src/data/top_contribution_sources.json b/src/data/top_contribution_sources.json index 0b721c0..74a4fe3 100644 --- a/src/data/top_contribution_sources.json +++ b/src/data/top_contribution_sources.json @@ -3,128 +3,128 @@ "user": { "id": "User_GitHub_12828840", "name": "morebtcg", - "openrank": 30.138357190009465 + "openrank": 24.690200989187517 }, "topSources": [ { - "sourceNodeId": "PullRequest_GitHub_2700001956", + "sourceNodeId": "PullRequest_GitHub_1711121023", "sourceType": "PullRequest", - "title": "Remove unused fetchTxs", - "ref": 2700001956, - "edgeWeight": 61.81097399620745, + "title": "Release 3.6.0", + "ref": 1711121023, + "edgeWeight": 8.318534994192131, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 2.2, - "close": 0.6, - "commit": 110.25 + "open": 0.00822398786662569, + "comment": 0.016318267705024342, + "review": 0.0026191044161228308, + "close": 0.00748315547463666, + "commit": 0.2543778923721373 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2663250088", + "sourceNodeId": "PullRequest_GitHub_1882280241", "sourceType": "PullRequest", - "title": "Update performanceTransfer20", - "ref": 2663250088, - "edgeWeight": 61.23764606353981, + "title": "Sync master code into feature-evm-cancun", + "ref": 1882280241, + "edgeWeight": 6.512333817281195, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 165.375 + "open": 0.020782541199578772, + "comment": 0.041237301949543316, + "review": 0.006618643694133366, + "close": 0.01891041055466676, + "commit": 0.64282913766689 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2553885815", + "sourceNodeId": "PullRequest_GitHub_2207301498", "sourceType": "PullRequest", - "title": "Add IsAccount concept", - "ref": 2553885815, - "edgeWeight": 57.48247813706713, + "title": "sync code to release-3.13.0", + "ref": 2207301498, + "edgeWeight": 6.19021618362768, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 143.32500000000002 + "open": 0.020569222369468607, + "comment": 0.04081402873553643, + "review": 0.006550707760977263, + "close": 0.018716307888506468, + "commit": 0.6425932375053888 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2703305020", + "sourceNodeId": "PullRequest_GitHub_1868331611", "sourceType": "PullRequest", - "title": "Fix web3 transaction hash error", - "ref": 2703305020, - "edgeWeight": 54.61775568479557, + "title": "sync code from release-3.8.0", + "ref": 1868331611, + "edgeWeight": 5.92306079650231, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 127.575 + "open": 0.020766866252429118, + "comment": 0.04120619927916023, + "review": 0.006613651672748126, + "close": 0.018896147636423218, + "commit": 0.6423442925912843 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2795477942", + "sourceNodeId": "PullRequest_GitHub_2142830397", "sourceType": "PullRequest", - "title": "sync code from release-3.16.0", - "ref": 2795477942, - "edgeWeight": 52.81227740998508, + "title": "Release v3.12.0", + "ref": 2142830397, + "edgeWeight": 2.678393893877926, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 118.125 + "open": 0.009422323835742872, + "comment": 0.018696039591577153, + "review": 0.5119810259840673, + "close": 0.008573543071649566, + "commit": 0.2733108707811988 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2197148342", + "sourceNodeId": "PullRequest_GitHub_1867969879", "sourceType": "PullRequest", - "title": "Refactor bucket map, add traverse", - "ref": 2197148342, - "edgeWeight": 52.81227740998508, + "title": "(code): sync code from 3.8.0.", + "ref": 1867969879, + "edgeWeight": 2.1714146308349647, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 118.125 + "open": 0.013958212986771756, + "comment": 0.02769627824066146, + "review": 0.4701350117981855, + "close": 0.01270083074319541, + "commit": 0.409781733962203 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2173074319", + "sourceNodeId": "PullRequest_GitHub_2036401899", "sourceType": "PullRequest", - "title": "batchRemove use parallel remove, session use concurrent queue", - "ref": 2173074319, - "edgeWeight": 49.004449548746265, + "title": "merge Release 3.11.0 into master", + "ref": 2036401899, + "edgeWeight": 1.5553031542107825, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.8999999999999999, - "commit": 94.5 + "open": 0.008443835725671074, + "comment": 0.016754496001619705, + "review": 0.719922374029011, + "close": 0.007683199022448657, + "commit": 0.23955876086843392 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2648383877", + "sourceNodeId": "PullRequest_GitHub_2031805726", "sourceType": "PullRequest", - "title": "Move httpserver impl out of line", - "ref": 2648383877, - "edgeWeight": 48.96676157478237, + "title": "sync code from rpbft2", + "ref": 2031805726, + "edgeWeight": 1.5040749506052435, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 99.22500000000001 + "open": 0.009563067955823996, + "comment": 0.018975308027601025, + "review": 0.00304556304325605, + "close": 0.008701608695017286, + "commit": 0.2957972592695645 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" } ] }, @@ -132,128 +132,128 @@ "user": { "id": "User_GitHub_32325790", "name": "kyonRay", - "openrank": 8.763860259331443 + "openrank": 14.718237177236281 }, "topSources": [ { - "sourceNodeId": "PullRequest_GitHub_2142830397", + "sourceNodeId": "PullRequest_GitHub_1743079702", "sourceType": "PullRequest", - "title": "Release v3.12.0", - "ref": 2142830397, - "edgeWeight": 41.20049597364544, + "title": "(sdk,framework): add v2 transaction filed extensions.", + "ref": 1743079702, + "edgeWeight": 3.7816866690691224, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 66.15 + "open": 0.008855766790642561, + "comment": 0.017571861190289244, + "review": 0.13282078372684628, + "close": 0.00805802255745456, + "commit": 0.2618994851185076 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2202337127", + "sourceNodeId": "PullRequest_GitHub_1948964955", "sourceType": "PullRequest", - "title": "Sync code from master", - "ref": 2202337127, - "edgeWeight": 40.03690125476598, + "title": "Release v3.9.0", + "ref": 1948964955, + "edgeWeight": 3.7654289141492185, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 1.1, - "close": 0, - "commit": 56.7 + "open": 0.01545910278621337, + "comment": 0.03067438593491291, + "review": 0.004923281142106168, + "close": 0.014066517548874766, + "commit": 0.47816874836108947 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2077898371", + "sourceNodeId": "PullRequest_GitHub_1980309047", "sourceType": "PullRequest", - "title": "(code): sync code from 3.10.2.", - "ref": 2077898371, - "edgeWeight": 30.40698642189476, + "title": "Sync code", + "ref": 1980309047, + "edgeWeight": 3.713829001132561, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 31.5 + "open": 0.014196739087904562, + "comment": 0.028169568429806384, + "review": 0.4968506507971, + "close": 0.0129178699616966, + "commit": 0.419259089240506 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2225924339", + "sourceNodeId": "PullRequest_GitHub_1939332992", "sourceType": "PullRequest", "title": "sync code", - "ref": 2225924339, - "edgeWeight": 27.049997703261248, + "ref": 1939332992, + "edgeWeight": 3.648831838345592, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0, - "commit": 28.35 + "open": 0.015454817525101779, + "comment": 0.030665882999458854, + "review": 0.726507236594952, + "close": 0.014062618312194523, + "commit": 0.4502856294027315 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2545881183", + "sourceNodeId": "PullRequest_GitHub_1937218041", "sourceType": "PullRequest", - "title": "(txpool,executive): fix web3 pending nonce issue, fix revert tx logic in executive when nonce is too low.", - "ref": 2545881183, - "edgeWeight": 24.903778893076513, + "title": "sync Release 3.9 code to release-3.10.0", + "ref": 1937218041, + "edgeWeight": 3.6195658532818373, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 18.900000000000002 + "open": 0.014992325052437876, + "comment": 0.029748192445571305, + "review": 0.004774625812878304, + "close": 0.013641788036795156, + "commit": 0.46373074844551193 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2197141223", + "sourceNodeId": "PullRequest_GitHub_2142830397", "sourceType": "PullRequest", - "title": "Release v3.12.1", - "ref": 2197141223, - "edgeWeight": 24.903778893076513, + "title": "Release v3.12.0", + "ref": 2142830397, + "edgeWeight": 2.6629938938779256, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 18.900000000000002 + "open": 0.009103463290268926, + "comment": 0.018063347541686176, + "review": 0.002899192130658893, + "close": 0.008283406087596838, + "commit": 0.2815811310305196 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2137288003", + "sourceNodeId": "PullRequest_GitHub_1711121023", "sourceType": "PullRequest", - "title": "(sealer): fix sealer duplicate seal transaction when observer turn into consensus.", - "ref": 2137288003, - "edgeWeight": 24.903778893076513, + "title": "Release 3.6.0", + "ref": 1711121023, + "edgeWeight": 2.4075242840548947, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 18.900000000000002 + "open": 0.004008549930009146, + "comment": 0.007953877355814327, + "review": 0.5798903132637089, + "close": 0.0036474521656134173, + "commit": 0.10747574855069458 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2088484481", + "sourceNodeId": "PullRequest_GitHub_1787404505", "sourceType": "PullRequest", - "title": "(txpool,executor): change web3 nonce mem cache logic to avoid duplicate tx, add only web3 transaction store nonce logic.", - "ref": 2088484481, - "edgeWeight": 24.903778893076513, + "title": "release 3.7.0", + "ref": 1787404505, + "edgeWeight": 2.2221931717290833, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 18.900000000000002 + "open": 0.008175182132842825, + "comment": 0.016221425997287764, + "review": 0.7006124999242515, + "close": 0.007438746253724136, + "commit": 0.2288747495296323 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" } ] }, @@ -261,1346 +261,1691 @@ "user": { "id": "User_GitHub_15418097", "name": "bxq2011hust", - "openrank": 5.394980851482697 + "openrank": 11.790252819506401 }, "topSources": [ { - "sourceNodeId": "PullRequest_GitHub_2548997190", + "sourceNodeId": "PullRequest_GitHub_2036401899", "sourceType": "PullRequest", - "title": " (code): sync code from 3.10.2.", - "ref": 2077898371, - "edgeWeight": 22.880000000000003, + "title": "release 3.7.0", + "ref": 1787404505, + "edgeWeight": 1.4494799205424225, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 2.2, - "close": 0, - "commit": 7.875 + "open": 0.005668781568728747, + "comment": 0.011248155602858195, + "review": 0.6991113757673839, + "close": 0.00515812699611351, + "commit": 0.1533371710414178 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2120480657", + "sourceNodeId": "PullRequest_GitHub_1874824301", "sourceType": "PullRequest", - "title": "Avoid change observer node to sealer", - "ref": 2120480657, - "edgeWeight": 22.791778893076515, + "title": "merge release 2.11.0", + "ref": 1874824301, + "edgeWeight": 1.1821392000000002, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0, - "commit": 18.900000000000002 + "open": 0.005226231850338879, + "comment": 0.010370036022116148, + "review": 0.0016644050478786235, + "close": 0.004755442993938925, + "commit": 0.16327020945856976 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2124937729", + "sourceNodeId": "PullRequest_GitHub_2027373289", "sourceType": "PullRequest", - "title": "sync code from 3.12.0", - "ref": 2124937729, - "edgeWeight": 22.769566922421042, + "title": "sync code 3.11", + "ref": 2027373289, + "edgeWeight": 1.0018655482563408, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 1.1, - "close": 0, - "commit": 12.600000000000001 + "open": 0.00931434975781917, + "comment": 0.018481794393585986, + "review": 0.29341938612087787, + "close": 0.008475295503020173, + "commit": 0.2633723712864676 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2142830397", + "sourceNodeId": "PullRequest_GitHub_2148441790", "sourceType": "PullRequest", - "title": "Release v3.12.0", - "ref": 2142830397, - "edgeWeight": 20.606438921198894, + "title": "add aws kms tools", + "ref": 2148441790, + "edgeWeight": 0.9191002131646705, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 1.1, - "close": 0, - "commit": 9.450000000000001 + "open": 0.030902621746605505, + "comment": 0.06131785000494183, + "review": 0.21045036793112237, + "close": 0.028118855092452683, + "commit": 0.028118855092452683 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2228335718", + "sourceNodeId": "PullRequest_GitHub_1767019714", "sourceType": "PullRequest", - "title": "add txpool validator", - "ref": 2228335718, - "edgeWeight": 20.443500000000007, + "title": "sync code from 3.7", + "ref": 1767019714, + "edgeWeight": 0.911527565223674, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 6.6000000000000005, - "close": 0, - "commit": 0 + "open": 0.004082101393021667, + "comment": 0.008099820234500378, + "review": 0.42256996520266576, + "close": 0.0037143779736320904, + "commit": 0.11132187862890366 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2191614382", + "sourceNodeId": "PullRequest_GitHub_2228335718", "sourceType": "PullRequest", - "title": "fix docker ci build failed", - "ref": 2191614382, - "edgeWeight": 16.476652500000007, + "title": "add txpool validator", + "ref": 2228335718, + "edgeWeight": 0.751438883376513, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 2.2, - "close": 0, - "commit": 4.7250000000000005 + "open": 0.025370786621343355, + "comment": 0.0503414273815069, + "review": 0.1675678402915525, + "close": 0.0230853381449894, + "commit": 0.0230853381449894 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" } ] }, { "user": { - "id": "User_GitHub_34049754", - "name": "HaoXuan40404", - "openrank": 4.816541059606452 + "id": "User_GitHub_12178678", + "name": "JimmyShi22", + "openrank": 7.650820263603354 }, "topSources": [ { - "sourceNodeId": "PullRequest_GitHub_2148441790", + "sourceNodeId": "PullRequest_GitHub_1787404505", "sourceType": "PullRequest", - "title": "add aws kms tools", - "ref": 2148441790, - "edgeWeight": 71.70419460599447, + "title": "release 3.7.0", + "ref": 1787404505, + "edgeWeight": 1.8055580495965224, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 1.1, - "close": 0.6, - "commit": 198.45000000000002 + "open": 0.006755659310078427, + "comment": 0.013404768943443455, + "review": 0.0021514838567128747, + "close": 0.006147096733465357, + "commit": 0.2089607140418917 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2548997190", + "sourceNodeId": "PullRequest_GitHub_1711121023", "sourceType": "PullRequest", - "title": " (txpool,kms):fix with txpool", - "ref": 2666013037, - "edgeWeight": 35.82567018167018, + "title": "Sync code", + "ref": 1980309047, + "edgeWeight": 0.5836393501698842, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 47.25 + "open": 0.0030062559725257303, + "comment": 0.00596509753480841, + "review": 0.49117280685145986, + "close": 0.0027354467447913834, + "commit": 0.07910409677444008 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2174730879", + "sourceNodeId": "PullRequest_GitHub_1937218041", "sourceType": "PullRequest", - "title": "fix cloud kms encrypt key", - "ref": 2174730879, - "edgeWeight": 33.258611683790356, + "title": "sync Release 3.9 code to release-3.10.0", + "ref": 1937218041, + "edgeWeight": 0.5718098779922756, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 39.375 + "open": 0.003381494334772239, + "comment": 0.006709656032174701, + "review": 0.7204642425950536, + "close": 0.003076882925179471, + "commit": 0.08518492132828961 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2172325743", + "sourceNodeId": "PullRequest_GitHub_1826776560", "sourceType": "PullRequest", - "title": "add cloud kms", - "ref": 2172325743, - "edgeWeight": 32.713990443091156, + "title": "(code): sync code from 3.8.0.", + "ref": 1826776560, + "edgeWeight": 0.4813646754141252, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 37.800000000000004 + "open": 0.003406659032158285, + "comment": 0.006759588531507279, + "review": 0.2148884516770533, + "close": 0.0030997807389975284, + "commit": 0.09297999670639048 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2202337127", + "sourceNodeId": "PullRequest_GitHub_1734629961", "sourceType": "PullRequest", - "title": "Sync code from master", - "ref": 2202337127, - "edgeWeight": 32.41287784239778, + "title": "(evm, dmc): sync code fix bug from 3.6.0", + "ref": 1734629961, + "edgeWeight": 0.35694560000000003, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 1.1, - "close": 0, - "commit": 33.075 + "open": 0.004354625071035621, + "comment": 0.008640569370553543, + "review": 0.0013868232710304523, + "close": 0.00396235220294415, + "commit": 0.13604075896774917 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" } ] }, { "user": { - "id": "User_GitHub_4343461", - "name": "cyjseagull", - "openrank": 3.9489215068654975 + "id": "User_GitHub_34049754", + "name": "HaoXuan40404", + "openrank": 4.5061014398493615 }, "topSources": [ { - "sourceNodeId": "PullRequest_GitHub_2322135086", + "sourceNodeId": "PullRequest_GitHub_2199813034", "sourceType": "PullRequest", - "title": "optimize nodeID", - "ref": 2322135086, - "edgeWeight": 31.587999669366837, + "title": "sync code", + "ref": 2199813034, + "edgeWeight": 1.2008061217845447, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 34.65 + "open": 0.0074152070589754366, + "comment": 0.014713462110954596, + "review": 0.002361530910501731, + "close": 0.0067472311728620895, + "commit": 0.23165493693493178 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2355354930", + "sourceNodeId": "PullRequest_GitHub_2202337127", "sourceType": "PullRequest", - "title": "sync code from release-3.14.0 to master", - "ref": 2355354930, - "edgeWeight": 22.326095218659887, + "title": "Sync code from master", + "ref": 2202337127, + "edgeWeight": 0.9426738936522905, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 14.175 + "open": 0.0057992911212617375, + "comment": 0.011507116322503574, + "review": 0.4289176769354004, + "close": 0.005276880001148076, + "commit": 0.16315045304462308 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2333118124", + "sourceNodeId": "PullRequest_GitHub_2148441790", "sourceType": "PullRequest", - "title": "sync code from feature-3.14.0-nodeid-optimize", - "ref": 2333118124, - "edgeWeight": 21.36156692242104, + "title": "add aws kms tools", + "ref": 2148441790, + "edgeWeight": 0.91608, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 12.600000000000001 + "open": 0.009985147206864359, + "comment": 0.01981280953209179, + "review": 0.05569608413091902, + "close": 0.009085666248284222, + "commit": 0.13909497864631729 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2319940224", + "sourceNodeId": "PullRequest_GitHub_2228335718", "sourceType": "PullRequest", - "title": "not verify the certificate when p2p.enable_ssl is false", - "ref": 2319940224, - "edgeWeight": 21.36156692242104, + "title": "add txpool validator", + "ref": 2228335718, + "edgeWeight": 0.3539536000000001, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 12.600000000000001 + "open": 0.003998382753095698, + "comment": 0.007933703357825918, + "review": 0.0012733703035336615, + "close": 0.0036382008672390335, + "commit": 0.12491156310854017 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2348805733", + "sourceNodeId": "PullRequest_GitHub_2174730879", "sourceType": "PullRequest", - "title": "fix routerTimer startTimer exception", - "ref": 2348805733, - "edgeWeight": 19.198438921198893, + "title": "fix cloud kms encrypt key", + "ref": 2174730879, + "edgeWeight": 0.32014400000000004, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 9.450000000000001 + "open": 0.003956226811962168, + "comment": 0.007850056355431151, + "review": 0.0012599448445739388, + "close": 0.003599842413068397, + "commit": 0.12237088070826566 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2330254612", + "sourceNodeId": "PullRequest_GitHub_2200763270", "sourceType": "PullRequest", - "title": "fix thread-safe problems caused by m_sessions ", - "ref": 2330254612, - "edgeWeight": 19.198438921198893, + "title": "use legecy url", + "ref": 2200763270, + "edgeWeight": 0.2986016000000001, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 9.450000000000001 + "open": 0.003926771392915546, + "comment": 0.007791610085669853, + "review": 0.0012505641378711932, + "close": 0.003573040393917695, + "commit": 0.12267438685784086 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2285282941", + "sourceNodeId": "PullRequest_GitHub_2197141223", "sourceType": "PullRequest", - "title": "not return event for non-success receipt", - "ref": 2285282941, - "edgeWeight": 19.198438921198893, + "title": "Release v3.12.1", + "ref": 2197141223, + "edgeWeight": 0.2900406666666667, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 9.450000000000001 + "open": 0.002806814615790648, + "comment": 0.0055693603932370096, + "review": 0.08475443689039067, + "close": 0.002553971442939625, + "commit": 0.06828244232292717 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2338633810", + "sourceNodeId": "PullRequest_GitHub_2098347849", "sourceType": "PullRequest", - "title": "Sync code from 3.12.5", - "ref": 2338633810, - "edgeWeight": 17.606820000000006, + "title": "remove osp", + "ref": 2098347849, + "edgeWeight": 0.2844688, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 1.1, - "close": 0, - "commit": 6.300000000000001 + "open": 0.008071124879341989, + "comment": 0.016014952672324927, + "review": 0.045292170146074714, + "close": 0.007344062674560498, + "commit": 0.10214484179039879 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" } ] }, { "user": { - "id": "User_GitHub_12178678", - "name": "JimmyShi22", - "openrank": 2.9799950869454217 + "id": "User_GitHub_22429695", + "name": "codecov[bot]", + "openrank": 3.914621825842959 }, "topSources": [ { - "sourceNodeId": "PullRequest_GitHub_2172325743", + "sourceNodeId": "PullRequest_GitHub_1662640181", "sourceType": "PullRequest", - "title": "add cloud kms", - "ref": 2172325743, - "edgeWeight": 6.121500000000002, + "title": "更新transferBalance中合约调用的同时也能转账,发送方改为sender,以及接收方地址添加预编译合约地址过滤", + "ref": 1662640181, + "edgeWeight": 0.19992978739951142, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 2.2, - "close": 0, - "commit": 0 + "open": 0.010133724439334895, + "comment": 0.3165828381108565, + "review": 0.0032273007768582455, + "close": 0.00922085936245213, + "commit": 0.00912956372520013 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2098347849", + "sourceNodeId": "PullRequest_GitHub_1668435229", "sourceType": "PullRequest", - "title": "remove osp", - "ref": 2098347849, - "edgeWeight": 6.121500000000002, + "title": "(sdk,boostssl): fix ws service not destruct bug, fix sdk log init logic.", + "ref": 1668435229, + "edgeWeight": 0.19992978739951142, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 2.2, - "close": 0, - "commit": 0 + "open": 0.010133724439334895, + "comment": 0.3165828381108565, + "review": 0.0032273007768582455, + "close": 0.00922085936245213, + "commit": 0.00912956372520013 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2212257897", + "sourceNodeId": "PullRequest_GitHub_1670280992", "sourceType": "PullRequest", - "title": "Transfer balance before execute", - "ref": 2212257897, - "edgeWeight": 5.082000000000002, + "title": "Bug fix for billingTxExec", + "ref": 1670280992, + "edgeWeight": 0.19992978739951142, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 2.2, - "close": 0, - "commit": 0 + "open": 0.010133724439334895, + "comment": 0.3165828381108565, + "review": 0.0032273007768582455, + "close": 0.00922085936245213, + "commit": 0.00912956372520013 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2174730879", + "sourceNodeId": "PullRequest_GitHub_1672297430", "sourceType": "PullRequest", - "title": "fix cloud kms encrypt key", - "ref": 2174730879, - "edgeWeight": 5.082000000000002, + "title": "(executor): Fix call_no_addr_return bug && fix small log bug", + "ref": 1672297430, + "edgeWeight": 0.19992978739951142, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 2.2, - "close": 0, - "commit": 0 + "open": 0.010133724439334895, + "comment": 0.3165828381108565, + "review": 0.0032273007768582455, + "close": 0.00922085936245213, + "commit": 0.00912956372520013 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2142929931", + "sourceNodeId": "PullRequest_GitHub_1672402751", "sourceType": "PullRequest", - "title": "Impl basic balance logic for baseline executor", - "ref": 2142929931, - "edgeWeight": 5.082000000000002, + "title": "(ecrecover): Fix contract call ecrecover pass invalid params lead to core problem", + "ref": 1672402751, + "edgeWeight": 0.19992978739951142, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 2.2, - "close": 0, - "commit": 0 + "open": 0.010133724439334895, + "comment": 0.3165828381108565, + "review": 0.0032273007768582455, + "close": 0.00922085936245213, + "commit": 0.00912956372520013 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2137288003", + "sourceNodeId": "PullRequest_GitHub_1682917012", "sourceType": "PullRequest", - "title": "(sealer): fix sealer duplicate seal transaction when observer turn into consensus.", - "ref": 2137288003, - "edgeWeight": 5.082000000000002, + "title": "(config,utilities): fix rpc max version to v2, fix ioservice remove_timer coredump.", + "ref": 1682917012, + "edgeWeight": 0.19992978739951142, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 2.2, - "close": 0, - "commit": 0 + "open": 0.010133724439334895, + "comment": 0.3165828381108565, + "review": 0.0032273007768582455, + "close": 0.00922085936245213, + "commit": 0.00912956372520013 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2120480657", + "sourceNodeId": "PullRequest_GitHub_1684044038", "sourceType": "PullRequest", - "title": "Avoid change observer node to sealer", - "ref": 2120480657, - "edgeWeight": 5.082000000000002, + "title": "support gasPrice sysconfig", + "ref": 1684044038, + "edgeWeight": 0.19992978739951142, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 2.2, - "close": 0, - "commit": 0 + "open": 0.010133724439334895, + "comment": 0.3165828381108565, + "review": 0.0032273007768582455, + "close": 0.00922085936245213, + "commit": 0.00912956372520013 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2077898371", + "sourceNodeId": "PullRequest_GitHub_1684150216", "sourceType": "PullRequest", - "title": "(code): sync code from 3.10.2.", - "ref": 2077898371, - "edgeWeight": 5.082000000000002, + "title": "add policy1 start check and add balance overflow check", + "ref": 1684150216, + "edgeWeight": 0.19992978739951142, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 2.2, - "close": 0, - "commit": 0 + "open": 0.010133724439334895, + "comment": 0.3165828381108565, + "review": 0.0032273007768582455, + "close": 0.00922085936245213, + "commit": 0.00912956372520013 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" } ] }, { "user": { - "id": "User_GitHub_13342660", - "name": "ywy2090", - "openrank": 2.110457660612292 + "id": "User_GitHub_28520306", + "name": "wenlinlee", + "openrank": 3.759487283108278 }, "topSources": [ { - "sourceNodeId": "PullRequest_GitHub_2687851193", + "sourceNodeId": "PullRequest_GitHub_1711121023", "sourceType": "PullRequest", - "title": ": web3rpc support the websocket protocol", - "ref": 2687851193, - "edgeWeight": 40.365589431543555, + "title": "Release 3.6.0", + "ref": 1711121023, + "edgeWeight": 2.392124284054895, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 63 + "open": 0.003867954856132316, + "comment": 0.007674904661455145, + "review": 0.31217211340138445, + "close": 0.0035195221620858198, + "commit": 0.10833321344677174 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2133676844", + "sourceNodeId": "PullRequest_GitHub_1984932857", "sourceType": "PullRequest", - "title": "fix bcos-sdk crash bugs", - "ref": 2133676844, - "edgeWeight": 34.82768479189102, + "title": "Sync code from release-3.10.0", + "ref": 1984932857, + "edgeWeight": 1.4164101694098379, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 44.1 + "open": 0.010770013165481263, + "comment": 0.021370162611033795, + "review": 0.5398095265394177, + "close": 0.009799829995888317, + "commit": 0.3075573720959321 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2726783642", + "sourceNodeId": "PullRequest_GitHub_2000341793", "sourceType": "PullRequest", - "title": ": support eth_subscribe newHeader functionality", - "ref": 2726783642, - "edgeWeight": 21.36156692242104, + "title": "Release 3.10.0", + "ref": 2000341793, + "edgeWeight": 1.239993051297711, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 12.600000000000001 + "open": 0.008097496014184987, + "comment": 0.016067279018743764, + "review": 0.002578820386683117, + "close": 0.0073680582476660485, + "commit": 0.2504653463728063 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2795477942", + "sourceNodeId": "PullRequest_GitHub_1795544255", "sourceType": "PullRequest", - "title": "sync code from release-3.16.0", - "ref": 2795477942, - "edgeWeight": 20.606438921198894, + "title": "upgrade evm to cancun ", + "ref": 1795544255, + "edgeWeight": 1.041201434482759, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 1.1, - "close": 0, - "commit": 9.450000000000001 + "open": 0.0036869850788953263, + "comment": 0.007315819346719207, + "review": 0.04505609195403351, + "close": 0.003354854484891107, + "commit": 0.10421138515832205 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2318892060", + "sourceNodeId": "PullRequest_GitHub_1787404505", "sourceType": "PullRequest", - "title": "Sync code from 3.7.4 ", - "ref": 2318892060, - "edgeWeight": 17.606820000000006, + "title": "release 3.7.0", + "ref": 1787404505, + "edgeWeight": 0.4012351221325606, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 1.1, - "close": 0, - "commit": 6.300000000000001 + "open": 0.0025414385068852686, + "comment": 0.005042793664556696, + "review": 0.0008093753206640982, + "close": 0.002312500916183138, + "commit": 0.07860976711777665 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2702374266", + "sourceNodeId": "PullRequest_GitHub_1957405430", "sourceType": "PullRequest", - "title": ": web3 rpc support CORS", - "ref": 2702374266, - "edgeWeight": 16.417170000000006, + "title": "Release 2.11.1", + "ref": 1957405430, + "edgeWeight": 0.38776320000000003, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 6.300000000000001 + "open": 0.002525734704891737, + "comment": 0.005011633739581966, + "review": 0.0008043741098381327, + "close": 0.002298211742394665, + "commit": 0.07812402952694737 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2253029714", + "sourceNodeId": "PullRequest_GitHub_1767019714", "sourceType": "PullRequest", - "title": "support config message worker thread num", - "ref": 2253029714, - "edgeWeight": 16.417170000000006, + "title": "sync code from 3.7", + "ref": 1767019714, + "edgeWeight": 0.2987091884078913, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.6, - "commit": 6.300000000000001 + "open": 0.001842609044180875, + "comment": 0.0036561566172372715, + "review": 0.0005868181669365844, + "close": 0.0016766233341045267, + "commit": 0.05699412653886676 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2137700556", + "sourceNodeId": "PullRequest_GitHub_1893129703", "sourceType": "PullRequest", - "title": "(boostssl): Cherry-pick: fix bcos-sdk crash bugs (#4665)", - "ref": 2137700556, - "edgeWeight": 13.859422500000004, + "title": "add point_evaluation Precompiled.cpp and add ut", + "ref": 1893129703, + "edgeWeight": 0.22110880000000002, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 1.1, - "close": 0, - "commit": 4.7250000000000005 + "open": 0.002531504999855214, + "comment": 0.005023083320913804, + "review": 0.0008062117833933803, + "close": 0.002303462238266801, + "commit": 0.07908553684716017 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" } ] }, { "user": { - "id": "User_GitHub_175728472", - "name": "Copilot", - "openrank": 1.9579687501611522 + "id": "User_GitHub_13342660", + "name": "ywy2090", + "openrank": 1.8159826295242933 }, "topSources": [ { - "sourceNodeId": "PullRequest_GitHub_2703305020", + "sourceNodeId": "PullRequest_GitHub_2133676844", "sourceType": "PullRequest", - "title": "Fix web3 transaction hash error", - "ref": 2703305020, - "edgeWeight": 15.939000000000004, + "title": "fix bcos-sdk crash bugs", + "ref": 2133676844, + "edgeWeight": 0.45568159999999996, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 3.3000000000000003, - "close": 0, - "commit": 0 + "open": 0.00479772010489428, + "comment": 0.009519770981564568, + "review": 0.0015279363391383055, + "close": 0.004365532397538016, + "commit": 0.14839928612092929 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2700001956", + "sourceNodeId": "PullRequest_GitHub_2137700556", "sourceType": "PullRequest", - "title": "Remove unused fetchTxs", - "ref": 2700001956, - "edgeWeight": 15.939000000000004, + "title": "(boostssl): Cherry-pick: fix bcos-sdk crash bugs (#4665)", + "ref": 2137700556, + "edgeWeight": 0.40196640000000006, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 3.3000000000000003, - "close": 0, - "commit": 0 + "open": 0.004975887300133365, + "comment": 0.009873295334386557, + "review": 0.05385302835601582, + "close": 0.0045276499546254454, + "commit": 0.1382517577746802 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2709500168", + "sourceNodeId": "PullRequest_GitHub_2253029714", "sourceType": "PullRequest", - "title": "Add crypto::HashListView type", - "ref": 2709500168, - "edgeWeight": 14.899500000000003, + "title": "support config message worker thread num", + "ref": 2253029714, + "edgeWeight": 0.11459360000000002, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 3.3000000000000003, - "close": 0, - "commit": 0 + "open": 0.0025310986114298376, + "comment": 0.00502227695358629, + "review": 0.0008060823603279738, + "close": 0.002303092458079925, + "commit": 0.0782899416443011 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2709034334", + "sourceNodeId": "PullRequest_GitHub_2139686937", "sourceType": "PullRequest", - "title": "Fix delegatecall value error", - "ref": 2709034334, - "edgeWeight": 14.437500000000002, + "title": "sync code from 3.12", + "ref": 2139686937, + "edgeWeight": 0.07796000564336249, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 2.2, - "close": 0, - "commit": 0 + "open": 0.0025851106612725322, + "comment": 0.005129449179874099, + "review": 0.0008232836500867935, + "close": 0.0023522390002479816, + "commit": 0.07996059967839675 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2663250088", + "sourceNodeId": "PullRequest_GitHub_1668435229", "sourceType": "PullRequest", - "title": "Update performanceTransfer20", - "ref": 2663250088, - "edgeWeight": 13.860000000000003, + "title": "(sdk,boostssl): fix ws service not destruct bug, fix sdk log init logic.", + "ref": 1668435229, + "edgeWeight": 0.028875000000000005, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 3.3000000000000003, - "close": 0, - "commit": 0 + "open": 0.0001854678120087893, + "comment": 0.0003680104416625719, + "review": 0.02295600852325039, + "close": 0.00016876052048115495, + "commit": 0.00016708962423876727 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2794870691", + "sourceNodeId": "PullRequest_GitHub_1671648822", "sourceType": "PullRequest", - "title": "Update Block.h methods to any based class", - "ref": 2794870691, - "edgeWeight": 13.398000000000003, + "title": "(sdk,boostssl): fix sdk service drop session when receive msg in handshake phase, perf boostssl code in clang-tidy style.", + "ref": 1671648822, + "edgeWeight": 0.028875000000000005, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 2.2, - "close": 0, - "commit": 0 + "open": 0.00026392064326833417, + "comment": 0.0005236787528848777, + "review": 0.03374914685371584, + "close": 0.00024014617221868436, + "commit": 0.00023776848734523203 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2768873991", + "sourceNodeId": "PullRequest_GitHub_1682830937", "sourceType": "PullRequest", - "title": "Add AnyHolder to improve blockImpl performance", - "ref": 2768873991, - "edgeWeight": 13.398000000000003, + "title": "add some boost log config", + "ref": 1682830937, + "edgeWeight": 0.028875000000000005, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 2.2, - "close": 0, - "commit": 0 + "open": 0.00031886054547394517, + "comment": 0.0006326920498909764, + "review": 0.03381337905748097, + "close": 0.0002901369840527253, + "commit": 0.0002872643406462627 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2758419254", + "sourceNodeId": "PullRequest_GitHub_1684008305", "sourceType": "PullRequest", - "title": "Add call logic for estimateGas()", - "ref": 2758419254, - "edgeWeight": 12.820500000000003, + "title": "copy match_pattern from boost log", + "ref": 1684008305, + "edgeWeight": 0.028875000000000005, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 3.3000000000000003, - "close": 0, - "commit": 0 + "open": 0.00031886054547394517, + "comment": 0.0006326920498909764, + "review": 0.024822575460305772, + "close": 0.0002901369840527253, + "commit": 0.0002872643406462627 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" } ] }, { "user": { - "id": "User_GitHub_106899249", - "name": "22640", - "openrank": 0.477294610671694 + "id": "User_GitHub_111552329", + "name": "jdkuangx", + "openrank": 1.1740758544001626 }, "topSources": [ { - "sourceNodeId": "Issue_GitHub_2661282153", - "sourceType": "Issue", - "title": "FISCO BCOS 3.9使用remix链接Metamask钱包部署合约报错 gas费不足", - "ref": 2661282153, - "edgeWeight": 6.419674775249769, + "sourceNodeId": "PullRequest_GitHub_1836489777", + "sourceType": "PullRequest", + "title": "(rpc): add filter, log matcher and filter request.", + "ref": 1836489777, + "edgeWeight": 0.45777600000000007, "activityBreakdown": { - "open": 0, - "comment": 4, - "review": 0, - "close": 0.3, - "commit": 0 + "open": 0.003927891318010923, + "comment": 0.007793832272498472, + "review": 0.0012509208019143069, + "close": 0.003574059434040877, + "commit": 0.12149442960601002 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "Issue_GitHub_2769296283", - "sourceType": "Issue", - "title": "树莓派上部署节点", - "ref": 2769296283, - "edgeWeight": 2.2, + "sourceNodeId": "PullRequest_GitHub_1842175803", + "sourceType": "PullRequest", + "title": "(rpc): implement ethereum filter related interfaces (newBlockFilter, newPendingTxFilter, newFilter, uninstallFilter, getFilterChanges, getFilterLogs, getLogs)", + "ref": 1842175803, + "edgeWeight": 0.26419360000000003, "activityBreakdown": { - "open": 0, - "comment": 1, - "review": 0, - "close": 0, - "commit": 0 + "open": 0.0032183683174954493, + "comment": 0.006385976807114112, + "review": 0.0010249580628966398, + "close": 0.002928451608276114, + "commit": 0.0995480249678019 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "Issue_GitHub_2661220248", - "sourceType": "Issue", - "title": "使用3.9版本,remix链接metamask钱包部署合约时出现gas费不足的问题", - "ref": 2661220248, - "edgeWeight": 1.7600000000000002, + "sourceNodeId": "PullRequest_GitHub_1861269060", + "sourceType": "PullRequest", + "title": "(rpc): adapt Ethereum event related interfaces in jsonrpc and web3jsonrpc", + "ref": 1861269060, + "edgeWeight": 0.14451360000000005, "activityBreakdown": { - "open": 0, - "comment": 0.5, - "review": 0, - "close": 0.3, - "commit": 0 + "open": 0.0020257384405128706, + "comment": 0.004019527108836882, + "review": 0.0006451396307365831, + "close": 0.0018432560878188088, + "commit": 0.06265854027898922 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "Issue_GitHub_2661269114", - "sourceType": "Issue", - "title": "·1", - "ref": 2661269114, - "edgeWeight": 0.66, + "sourceNodeId": "PullRequest_GitHub_1866155901", + "sourceType": "PullRequest", + "title": "(rpc): remove the threadpool in FilterSystem", + "ref": 1866155901, + "edgeWeight": 0.0780912, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.3, - "commit": 0 + "open": 0.0017628595375864871, + "comment": 0.0034979154063969667, + "review": 0.0005614202349001551, + "close": 0.0016040578140004433, + "commit": 0.05507265161401523 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "Issue_GitHub_2661213782", - "sourceType": "Issue", - "title": "使用remix连接metamask钱包部署合约时报错,gas不够", - "ref": 2661213782, - "edgeWeight": 0.66, + "sourceNodeId": "PullRequest_GitHub_1884400386", + "sourceType": "PullRequest", + "title": "(rpc): replace the type of filterId from uint64 to u256", + "ref": 1884400386, + "edgeWeight": 0.023936000000000002, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0.3, - "commit": 0 + "open": 0.0005403400881491148, + "comment": 0.0010721579789722503, + "review": 0.0001720828306207372, + "close": 0.0004916652303449634, + "commit": 0.016880506241843746 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1886300066", + "sourceType": "PullRequest", + "title": "(gateway, boostssl) disable lower versions of TLS in SM mode", + "ref": 1886300066, + "edgeWeight": 0.0206448, + "activityBreakdown": { + "open": 0.0004559942668111195, + "comment": 0.0009047966313249452, + "review": 0.00014522110407997436, + "close": 0.0004149174402284982, + "commit": 0.014104454238790535 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1926208988", + "sourceType": "PullRequest", + "title": " (filter): add null parameter validation for the newFilter interface", + "ref": 1926208988, + "edgeWeight": 0.013563733333333336, + "activityBreakdown": { + "open": 0.000349829688055783, + "comment": 0.0006941418924054995, + "review": 0.00011141072868018565, + "close": 0.0003183163676576733, + "commit": 0.01082065540222454 + }, + "assignmentType": "voluntary" } ] }, { "user": { - "id": "User_GitHub_88825933", - "name": "tjujingzong", - "openrank": 0.3953980804520013 + "id": "User_GitHub_30165217", + "name": "Mojicode", + "openrank": 1.1566667083620175 }, "topSources": [ { - "sourceNodeId": "Issue_GitHub_3082667791", - "sourceType": "Issue", - "title": "轻节点运行异常", - "ref": 3082667791, - "edgeWeight": 3.3000000000000003, + "sourceNodeId": "PullRequest_GitHub_1711121023", + "sourceType": "PullRequest", + "title": "Release 3.6.0", + "ref": 1711121023, + "edgeWeight": 1.1883621420274475, "activityBreakdown": { - "open": 0, - "comment": 1.5, - "review": 0, - "close": 0, - "commit": 0 + "open": 0.002321500250690129, + "comment": 0.004606385999397884, + "review": 0.0007393312900287034, + "close": 0.002112375114367724, + "commit": 0.0718068108184408 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1684044038", + "sourceType": "PullRequest", + "title": "support gasPrice sysconfig", + "ref": 1684044038, + "edgeWeight": 0.3930784000000001, + "activityBreakdown": { + "open": 0.004629588946642351, + "comment": 0.009186160415206023, + "review": 0.07704297797302538, + "close": 0.0042125468122314385, + "commit": 0.12311411715740635 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "Issue_GitHub_3079522704", + "sourceNodeId": "PullRequest_GitHub_1813707220", + "sourceType": "PullRequest", + "title": "Add judgement for eoa or contract codeEntry", + "ref": 1813707220, + "edgeWeight": 0.0780912, + "activityBreakdown": { + "open": 0.0017628595375864871, + "comment": 0.0034979154063969667, + "review": 0.0005614202349001551, + "close": 0.0016040578140004433, + "commit": 0.05507265161401523 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_2251970522", + "sourceType": "PullRequest", + "title": "add sig len check and rm sender for p2p tx (#4519)", + "ref": 2251970522, + "edgeWeight": 0.06043840000000001, + "activityBreakdown": { + "open": 0.0012869331138855539, + "comment": 0.002553568829553926, + "review": 0.000409851310154635, + "close": 0.0011710037432989572, + "commit": 0.03980639787451901 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1826776560", + "sourceType": "PullRequest", + "title": "(code): sync code from 3.8.0.", + "ref": 1826776560, + "edgeWeight": 0.050381849988243126, + "activityBreakdown": { + "open": 0.0008871447862015164, + "comment": 0.001760297601252751, + "review": 0.000282530186688381, + "close": 0.0008072291048239458, + "commit": 0.02744046131909783 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1670280992", + "sourceType": "PullRequest", + "title": "Bug fix for billingTxExec", + "ref": 1670280992, + "edgeWeight": 0.048171200000000004, + "activityBreakdown": { + "open": 0.001063986622559279, + "comment": 0.0021111921397582055, + "review": 0.0003388492428532735, + "close": 0.0009681406938664959, + "commit": 0.032910393223844585 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1950961195", + "sourceType": "PullRequest", + "title": "add sig len check and rm sender for p2p tx", + "ref": 1950961195, + "edgeWeight": 0.03380960000000001, + "activityBreakdown": { + "open": 0.0007323195443429444, + "comment": 0.0014530890079137223, + "review": 0.0002332227848225937, + "close": 0.0006663508137788393, + "commit": 0.022651529313274077 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_2251667780", + "sourceType": "PullRequest", + "title": "add sig len check and rm sender for p2p tx (#4519)", + "ref": 2251667780, + "edgeWeight": 0.03045856, + "activityBreakdown": { + "open": 0.0008458589979748221, + "comment": 0.0016783771806949612, + "review": 0.0002693818464887969, + "close": 0.0007696624185394197, + "commit": 0.026163441950349912 + }, + "assignmentType": "voluntary" + } + ] + }, + { + "user": { + "id": "User_GitHub_20827861", + "name": "jdkuangxx", + "openrank": 1.155542588080271 + }, + "topSources": [ + { + "sourceNodeId": "PullRequest_GitHub_1948964955", + "sourceType": "PullRequest", + "title": "Release v3.9.0", + "ref": 1948964955, + "edgeWeight": 0.4518514696979063, + "activityBreakdown": { + "open": 0.003896297364344971, + "comment": 0.0077311426622823165, + "review": 0.0012408590332308824, + "close": 0.0035453115235168074, + "commit": 0.12051719040337663 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1980309047", + "sourceType": "PullRequest", + "title": "Sync code", + "ref": 1980309047, + "edgeWeight": 0.44381148013590727, + "activityBreakdown": { + "open": 0.0034977671301722924, + "comment": 0.006940367778461369, + "review": 0.0011139385764879913, + "close": 0.0031826816471085466, + "commit": 0.10819016820203971 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1939332992", + "sourceType": "PullRequest", + "title": "sync code", + "ref": 1939332992, + "edgeWeight": 0.4360118206014711, + "activityBreakdown": { + "open": 0.0037746693544945505, + "comment": 0.007489804949075933, + "review": 0.0012021239982466722, + "close": 0.003434639994990492, + "commit": 0.1167550889386207 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1937218041", + "sourceType": "PullRequest", + "title": "sync Release 3.9 code to release-3.10.0", + "ref": 1937218041, + "edgeWeight": 0.4343479023938205, + "activityBreakdown": { + "open": 0.003778651154277313, + "comment": 0.007497705748038271, + "review": 0.0012033920873494627, + "close": 0.0034382631067127506, + "commit": 0.11687825082224863 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1861269060", + "sourceType": "PullRequest", + "title": "(rpc): adapt Ethereum event related interfaces in jsonrpc and web3jsonrpc", + "ref": 1861269060, + "edgeWeight": 0.14451360000000005, + "activityBreakdown": { + "open": 0.0020257384405128706, + "comment": 0.004019527108836882, + "review": 0.0006451396307365831, + "close": 0.0018432560878188088, + "commit": 0.06265854027898922 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1836489777", + "sourceType": "PullRequest", + "title": "(rpc): add filter, log matcher and filter request.", + "ref": 1836489777, + "edgeWeight": 0.08662500000000002, + "activityBreakdown": { + "open": 0.00043160010056586724, + "comment": 0.0008563930415231736, + "review": 0.07342658393582296, + "close": 0.0003927207466477408, + "commit": 0.00038883242242350577 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1842175803", + "sourceType": "PullRequest", + "title": "(rpc): implement ethereum filter related interfaces (newBlockFilter, newPendingTxFilter, newFilter, uninstallFilter, getFilterChanges, getFilterLogs, getLogs)", + "ref": 1842175803, + "edgeWeight": 0.028875000000000005, + "activityBreakdown": { + "open": 0.0002300764134918593, + "comment": 0.00045652408160865737, + "review": 0.024792451500526155, + "close": 0.00020935069471506758, + "commit": 0.00020727791555947284 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1866155901", + "sourceType": "PullRequest", + "title": "(rpc): remove the threadpool in FilterSystem", + "ref": 1866155901, + "edgeWeight": 0.028875000000000005, + "activityBreakdown": { + "open": 0.0003608720905142159, + "comment": 0.0007160525375019715, + "review": 0.021488717277456465, + "close": 0.0003283640496034721, + "commit": 0.0003283640496034721 + }, + "assignmentType": "voluntary" + } + ] + }, + { + "user": { + "id": "User_GitHub_32122247", + "name": "ZXR-v2", + "openrank": 0.9530714760509021 + }, + "topSources": [ + { + "sourceNodeId": "Issue_GitHub_2312317596", "sourceType": "Issue", - "title": "v3.15 webase 直接导出java项目后 如何关闭log自动生成", - "ref": 3079522704, - "edgeWeight": 2.8600000000000003, + "title": "Fisco-Bcos3.6 使用控制台可以调用RPC接口,使用curl和light_monitor.sh却不可以", + "ref": 2312317596, + "edgeWeight": 0.051114678075514716, "activityBreakdown": { "open": 0, - "comment": 1, + "comment": 0, "review": 0, - "close": 0.3, + "close": 0, "commit": 0 }, - "assignmentType": "unknown" + "assignmentType": "task" }, { - "sourceNodeId": "Issue_GitHub_2770519361", + "sourceNodeId": "Issue_GitHub_2297188402", "sourceType": "Issue", - "title": "2.0版本的默认出块速度是500ms 默认块大小是1000 在实际应用中这两个参数的设置应该怎么选择呢", - "ref": 2770519361, - "edgeWeight": 1.1, + "title": "Air版的v3.6.0的build_train.sh启动出现错误,在调用SSL生成CA的密钥时显示错误。但是之前使用v2.9.1启动没有问题", + "ref": 2297188402, + "edgeWeight": 0.03245313200202794, "activityBreakdown": { "open": 0, - "comment": 0.5, + "comment": 0, "review": 0, "close": 0, "commit": 0 }, - "assignmentType": "unknown" + "assignmentType": "task" }, { - "sourceNodeId": "Issue_GitHub_2759393807", + "sourceNodeId": "Issue_GitHub_2299346628", "sourceType": "Issue", - "title": "搭成的网络中 如果两个节点之间网络不通会不会频繁尝试发起同步请求 还是说只在节点启动时启动一次 如果不通 就不继续尝试了", - "ref": 2759393807, - "edgeWeight": 1.1, + "title": "节点落盘加密无法启动", + "ref": 2299346628, + "edgeWeight": 0.03223159720461438, "activityBreakdown": { "open": 0, - "comment": 0.5, + "comment": 0, "review": 0, "close": 0, "commit": 0 }, - "assignmentType": "unknown" + "assignmentType": "task" }, { - "sourceNodeId": "Issue_GitHub_2768723197", + "sourceNodeId": "Issue_GitHub_2282498082", "sourceType": "Issue", - "title": "日志中Flush elapsed time: 0.0351s具体是哪一部分的用时", - "ref": 2768723197, - "edgeWeight": 0.66, + "title": "FISCO BCOS 3.6 air版 落盘加密报错", + "ref": 2282498082, + "edgeWeight": 0.025512954886091118, "activityBreakdown": { "open": 0, "comment": 0, "review": 0, - "close": 0.3, + "close": 0, "commit": 0 }, - "assignmentType": "unknown" + "assignmentType": "task" } ] }, { "user": { - "id": "User_GitHub_8678234", - "name": "Spark-Liang", - "openrank": 0.2897193988006543 + "id": "User_GitHub_22519865", + "name": "fCorleone", + "openrank": 0.9423361648529047 }, "topSources": [ { - "sourceNodeId": "Issue_GitHub_2883477971", - "sourceType": "Issue", - "title": "如何排查“使用 TableV320 预编译合约出现 Revert instruction,并且没有output” 的问题", - "ref": 2883477971, - "edgeWeight": 5.5, - "activityBreakdown": { - "open": 0, - "comment": 3.5, - "review": 0, - "close": 0, - "commit": 0 - }, - "assignmentType": "unknown" - }, - { - "sourceNodeId": "Issue_GitHub_2867852899", - "sourceType": "Issue", - "title": "msg.sender 为 0 地址", - "ref": 2867852899, - "edgeWeight": 2.8600000000000003, + "sourceNodeId": "PullRequest_GitHub_1954779418", + "sourceType": "PullRequest", + "title": "add the full code of libloki", + "ref": 1954779418, + "edgeWeight": 0.17204000000000005, "activityBreakdown": { - "open": 0, - "comment": 1, - "review": 0, - "close": 0.3, - "commit": 0 + "open": 0.0029167181749020546, + "comment": 0.00578743412199249, + "review": 0.000928891138503839, + "close": 0.00265397468143954, + "commit": 0.09111979739609088 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "Issue_GitHub_2868564513", - "sourceType": "Issue", - "title": "3.7.0 的 contract2java.sh 构造的 java 代码对结构体解析不正确", - "ref": 2868564513, - "edgeWeight": 2.2, + "sourceNodeId": "PullRequest_GitHub_1952932682", + "sourceType": "PullRequest", + "title": "add loki fuzz engine", + "ref": 1952932682, + "edgeWeight": 0.09694080000000001, "activityBreakdown": { - "open": 0, - "comment": 1, - "review": 0, - "close": 0, - "commit": 0 + "open": 0.0013583522864636156, + "comment": 0.002695280757672118, + "review": 0.00043259626957439985, + "close": 0.0012359893416411425, + "commit": 0.04243563406301257 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" } ] }, { "user": { - "id": "User_GitHub_30165217", - "name": "Mojicode", - "openrank": 0.27094661062447817 + "id": "User_GitHub_4343461", + "name": "cyjseagull", + "openrank": 0.9313572188502106 }, "topSources": [ { - "sourceNodeId": "PullRequest_GitHub_2251667780", + "sourceNodeId": "PullRequest_GitHub_1691841175", "sourceType": "PullRequest", - "title": "add sig len check and rm sender for p2p tx (#4519)", - "ref": 2251667780, - "edgeWeight": 15.840000000000002, + "title": "(txpool,pbft): fix txpool check nonce and block limit logic, fix pbft receive large view pre-prepare msg not reset tx bug.", + "ref": 1691841175, + "edgeWeight": 0.028875000000000005, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0, - "commit": 7.875 + "open": 0.0004782908182109178, + "comment": 0.0009490380748364646, + "review": 0.05983519077932514, + "close": 0.00043520547607908797, + "commit": 0.000430896510969394 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2318892060", + "sourceNodeId": "PullRequest_GitHub_1836242472", "sourceType": "PullRequest", - "title": "Sync code from 3.7.4 ", - "ref": 2318892060, - "edgeWeight": 7.137900000000001, + "title": "add WITH_TBB compile option", + "ref": 1836242472, + "edgeWeight": 0.028875000000000005, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0, - "commit": 3.1500000000000004 + "open": 0.0004735552655553641, + "comment": 0.0009396416582539254, + "review": 0.07486766930537378, + "close": 0.000430896510969394, + "commit": 0.000430896510969394 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2276196487", + "sourceNodeId": "PullRequest_GitHub_1839962689", "sourceType": "PullRequest", - "title": "sync code from master to 3.13.0", - "ref": 2276196487, - "edgeWeight": 7.137900000000001, + "title": "when WITH_TBB=OFF not compile tbb library", + "ref": 1839962689, + "edgeWeight": 0.028875000000000005, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0, - "commit": 3.1500000000000004 + "open": 0.0004735552655553641, + "comment": 0.0009396416582539254, + "review": 0.05396127433073733, + "close": 0.000430896510969394, + "commit": 0.000430896510969394 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2252025285", + "sourceNodeId": "PullRequest_GitHub_1952932682", "sourceType": "PullRequest", - "title": "3.12.3 to master", - "ref": 2252025285, - "edgeWeight": 7.137900000000001, + "title": "add loki fuzz engine", + "ref": 1952932682, + "edgeWeight": 0.028875000000000005, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0, - "commit": 3.1500000000000004 + "open": 0.0004735552655553641, + "comment": 0.0009396416582539254, + "review": 0.03278225578439112, + "close": 0.000430896510969394, + "commit": 0.000430896510969394 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2251970522", + "sourceNodeId": "PullRequest_GitHub_2133676844", "sourceType": "PullRequest", - "title": "add sig len check and rm sender for p2p tx (#4519)", - "ref": 2251970522, - "edgeWeight": 7.137900000000001, + "title": "fix bcos-sdk crash bugs", + "ref": 2133676844, + "edgeWeight": 0.028875000000000005, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0, - "commit": 3.1500000000000004 + "open": 0.00015534800472846806, + "comment": 0.00030824587410786716, + "review": 0.02406733197304593, + "close": 0.00014135396244628574, + "commit": 0.00013995441826364924 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "PullRequest_GitHub_2355354930", + "sourceNodeId": "PullRequest_GitHub_2186485131", "sourceType": "PullRequest", - "title": "sync code from release-3.14.0 to master", - "ref": 2355354930, - "edgeWeight": 3.5689500000000005, + "title": "Remove notifyUnSealTxs to avoid transaction block", + "ref": 2186485131, + "edgeWeight": 0.028875000000000005, "activityBreakdown": { - "open": 0, - "comment": 0, - "review": 0, - "close": 0, - "commit": 1.5750000000000002 + "open": 0.0004735552655553641, + "comment": 0.0009396416582539254, + "review": 0.07563348845386675, + "close": 0.000430896510969394, + "commit": 0.000430896510969394 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_2253029714", + "sourceType": "PullRequest", + "title": "support config message worker thread num", + "ref": 2253029714, + "edgeWeight": 0.028875000000000005, + "activityBreakdown": { + "open": 0.00026392064326833417, + "comment": 0.0005236787528848777, + "review": 0.02224049859145382, + "close": 0.00024014617221868436, + "commit": 0.00023776848734523203 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1863894799", + "sourceType": "PullRequest", + "title": "(txpool): fix proposal nonce check failed when same transaction in txpool.", + "ref": 1863894799, + "edgeWeight": 0.021049779694434854, + "activityBreakdown": { + "open": 0.00026392064326833417, + "comment": 0.0005236787528848777, + "review": 0.011650577421135185, + "close": 0.00024014617221868436, + "commit": 0.00023776848734523203 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" } ] }, { "user": { - "id": "User_GitHub_7068352", - "name": "sicwolf", - "openrank": 0.25541439408318106 + "id": "User_GitHub_96527993", + "name": "RagnarokSu", + "openrank": 0.9096159264955196 }, "topSources": [ { - "sourceNodeId": "Issue_GitHub_3250688821", + "sourceNodeId": "Issue_GitHub_2646388200", "sourceType": "Issue", - "title": "SDFCryptoProvider的功能是什么定义在哪个文件", - "ref": 3250688821, - "edgeWeight": 1.7600000000000002, + "title": "没有3.10.2版本的docker镜像", + "ref": 2646388200, + "edgeWeight": 0.06424934750400786, "activityBreakdown": { "open": 0, - "comment": 0.5, + "comment": 0, "review": 0, - "close": 0.3, + "close": 0, "commit": 0 }, - "assignmentType": "unknown" + "assignmentType": "task" } ] }, { "user": { - "id": "User_GitHub_40993399", - "name": "jishitang", - "openrank": 0.24877854931142235 + "id": "User_GitHub_106899249", + "name": "22640", + "openrank": 0.8945986487453519 }, "topSources": [ { - "sourceNodeId": "Issue_GitHub_3379682272", + "sourceNodeId": "Issue_GitHub_2661282153", "sourceType": "Issue", - "title": "节点修改配置重启后产生heap-use-after-free", - "ref": 3379682272, - "edgeWeight": 1.1, + "title": "FISCO BCOS 3.9使用remix链接Metamask钱包部署合约报错 gas费不足", + "ref": 2661282153, + "edgeWeight": 0.06435085127990563, "activityBreakdown": { "open": 0, - "comment": 0.5, + "comment": 0, "review": 0, "close": 0, "commit": 0 }, - "assignmentType": "unknown" - } - ] - }, - { - "user": { - "id": "User_GitHub_130641570", - "name": "851543", - "openrank": 0.22182874433618338 - }, - "topSources": [ + "assignmentType": "voluntary" + }, { - "sourceNodeId": "Issue_GitHub_3171201834", + "sourceNodeId": "Issue_GitHub_2661220248", "sourceType": "Issue", - "title": "A fatal error has been detected by the Java Runtime Environment", - "ref": 3171201834, - "edgeWeight": 1.1, + "title": "使用3.9版本,remix链接metamask钱包部署合约时出现gas费不足的问题", + "ref": 2661220248, + "edgeWeight": 0.00044403382729713947, "activityBreakdown": { "open": 0, - "comment": 0.5, + "comment": 0, "review": 0, "close": 0, "commit": 0 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "Issue_GitHub_2864930102", + "sourceNodeId": "Issue_GitHub_2661213782", "sourceType": "Issue", - "title": "版本0.6.10 编译之后的java文件出现 这种情况 如何解决?", - "ref": 2864930102, - "edgeWeight": 1.1, + "title": "使用remix连接metamask钱包部署合约时报错,gas不够", + "ref": 2661213782, + "edgeWeight": 0.00041538401493119314, "activityBreakdown": { "open": 0, - "comment": 0.5, + "comment": 0, "review": 0, "close": 0, "commit": 0 }, - "assignmentType": "unknown" - } - ] - }, - { - "user": { - "id": "User_GitHub_50353447", - "name": "alisigy", - "openrank": 0.2142518233842421 - }, - "topSources": [ + "assignmentType": "voluntary" + }, { - "sourceNodeId": "Issue_GitHub_3201998827", + "sourceNodeId": "Issue_GitHub_2661269114", "sourceType": "Issue", - "title": "有没有社区群,可以讨论问题的,issue基本没人回复了,微信群小助手也联系不上", - "ref": 3201998827, - "edgeWeight": 1.1, + "title": "·1", + "ref": 2661269114, + "edgeWeight": 0.00013051510628842448, "activityBreakdown": { "open": 0, - "comment": 0.5, + "comment": 0, "review": 0, "close": 0, "commit": 0 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" } ] }, { "user": { - "id": "User_GitHub_68625791", - "name": "userInner", - "openrank": 0.20952747439016614 + "id": "User_GitHub_18379086", + "name": "lengmianshi", + "openrank": 0.8937715125083112 }, "topSources": [ { - "sourceNodeId": "Issue_GitHub_2575016514", + "sourceNodeId": "Issue_GitHub_2397361261", "sourceType": "Issue", - "title": "合约调用参数问题", - "ref": 2575016514, - "edgeWeight": 2.2, + "title": "请教一下合约升级数据共享的问题", + "ref": 2397361261, + "edgeWeight": 0.03227611059567177, "activityBreakdown": { "open": 0, - "comment": 1, + "comment": 0, "review": 0, "close": 0, "commit": 0 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "Issue_GitHub_2549419089", + "sourceNodeId": "Issue_GitHub_2410123508", "sourceType": "Issue", - "title": "安装了openssl还是不行", - "ref": 2549419089, - "edgeWeight": 1.1, + "title": "3.x版本启动控制台后卡住", + "ref": 2410123508, + "edgeWeight": 0.0322602471405753, "activityBreakdown": { "open": 0, - "comment": 0.5, + "comment": 0, "review": 0, "close": 0, "commit": 0 }, - "assignmentType": "unknown" - } - ] - }, - { - "user": { - "id": "User_GitHub_24306657", - "name": "wuhua666", - "openrank": 0.2090554974986747 - }, - "topSources": [ + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "Issue_GitHub_2452504660", + "sourceType": "Issue", + "title": "无法设置日志级别", + "ref": 2452504660, + "edgeWeight": 0.03220775760658495, + "activityBreakdown": { + "open": 0, + "comment": 0, + "review": 0, + "close": 0, + "commit": 0 + }, + "assignmentType": "voluntary" + }, { - "sourceNodeId": "Issue_GitHub_2990131112", + "sourceNodeId": "Issue_GitHub_2410057140", "sourceType": "Issue", - "title": "按照文档操作,无法动态关闭权限检查", - "ref": 2990131112, - "edgeWeight": 2.4200000000000004, + "title": "add application config file failed, error message: 同名文件已经存在 ", + "ref": 2410057140, + "edgeWeight": 0.0004883700544028273, "activityBreakdown": { "open": 0, - "comment": 0.5, + "comment": 0, "review": 0, - "close": 0.6, + "close": 0, "commit": 0 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" }, { - "sourceNodeId": "Issue_GitHub_2883477971", + "sourceNodeId": "Issue_GitHub_2415454241", "sourceType": "Issue", - "title": "如何排查“使用 TableV320 预编译合约出现 Revert instruction,并且没有output” 的问题", - "ref": 2883477971, - "edgeWeight": 2.2, + "title": "3.x控制台无法切换群组", + "ref": 2415454241, + "edgeWeight": 0.00030471555599443533, "activityBreakdown": { "open": 0, - "comment": 1, + "comment": 0, "review": 0, "close": 0, "commit": 0 }, - "assignmentType": "unknown" + "assignmentType": "voluntary" } ] }, { "user": { - "id": "User_GitHub_32031000", - "name": "smartcl", - "openrank": 0.2080985998496016 + "id": "User_GitHub_129931066", + "name": "zhengcookie", + "openrank": 0.893692830516645 }, "topSources": [ { - "sourceNodeId": "Issue_GitHub_2791751653", + "sourceNodeId": "Issue_GitHub_2636092969", + "sourceType": "Issue", + "title": "我在启动idea连接虚拟机时提示 reason: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure. Please make sure the certificate are correctly configured and copied.我不知道为什么握手失败了", + "ref": 2636092969, + "edgeWeight": 0.03256944349096674, + "activityBreakdown": { + "open": 0, + "comment": 0, + "review": 0, + "close": 0, + "commit": 0 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "Issue_GitHub_2465359523", + "sourceType": "Issue", + "title": "合约调用 message: \"not has u permission\"", + "ref": 2465359523, + "edgeWeight": 0.0323757034504255, + "activityBreakdown": { + "open": 0, + "comment": 0, + "review": 0, + "close": 0, + "commit": 0 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "Issue_GitHub_2630470845", "sourceType": "Issue", - "title": "安装合约失败", - "ref": 2791751653, - "edgeWeight": 2.8600000000000003, + "title": "生成一条单群组4节点的FISCO链国密版本报错", + "ref": 2630470845, + "edgeWeight": 0.032324279577184846, "activityBreakdown": { "open": 0, - "comment": 1, + "comment": 0, "review": 0, - "close": 0.3, + "close": 0, "commit": 0 }, - "assignmentType": "unknown" + "assignmentType": "task" } ] }, { "user": { - "id": "User_GitHub_193056338", - "name": "AiW520", - "openrank": 0.20720955300650043 + "id": "User_GitHub_13444794", + "name": "LucasLi1024", + "openrank": 0.8832317781299294 }, "topSources": [ { - "sourceNodeId": "Issue_GitHub_3079522704", + "sourceNodeId": "PullRequest_GitHub_1711121023", + "sourceType": "PullRequest", + "title": "Release 3.6.0", + "ref": 1711121023, + "edgeWeight": 0.5941810710137237, + "activityBreakdown": { + "open": 0.0014794464079207173, + "comment": 0.002935559114533616, + "review": 0.0004711612764078718, + "close": 0.0013461750754510623, + "commit": 0.04576106692127374 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "PullRequest_GitHub_1696862063", + "sourceType": "PullRequest", + "title": "support hostname while parsing nodes.json", + "ref": 1696862063, + "edgeWeight": 0.09662400000000002, + "activityBreakdown": { + "open": 0.0018196203338451532, + "comment": 0.00361054177252502, + "review": 0.02233806824740756, + "close": 0.001655705490304962, + "commit": 0.0426782128822351 + }, + "assignmentType": "voluntary" + }, + { + "sourceNodeId": "Issue_GitHub_2095192062", "sourceType": "Issue", - "title": "v3.15 webase 直接导出java项目后 如何关闭log自动生成", - "ref": 3079522704, - "edgeWeight": 1.1, + "title": "fisco-bcos 2.7.2怎么扩容新节点", + "ref": 2095192062, + "edgeWeight": 0.01542504172147795, "activityBreakdown": { "open": 0, - "comment": 0.5, + "comment": 0, "review": 0, "close": 0, "commit": 0 }, - "assignmentType": "unknown" - }, + "assignmentType": "task" + } + ] + }, + { + "user": { + "id": "User_GitHub_148163077", + "name": "Wangxiujie2001", + "openrank": 0.875094361610457 + }, + "topSources": [ { - "sourceNodeId": "Issue_GitHub_3099753081", + "sourceNodeId": "Issue_GitHub_2645529357", "sourceType": "Issue", - "title": "fisco_me", - "ref": 3099753081, - "edgeWeight": 0.66, + "title": "3.9版本的二进制,拉取get_account.sh脚本出现拒绝访问的问题", + "ref": 2645529357, + "edgeWeight": 0.051066509275748524, "activityBreakdown": { "open": 0, "comment": 0, "review": 0, - "close": 0.3, + "close": 0, "commit": 0 }, - "assignmentType": "unknown" + "assignmentType": "task" } ] } diff --git a/src/docs/weighting_methodology.md b/src/docs/weighting_methodology.md new file mode 100644 index 0000000..13f928d --- /dev/null +++ b/src/docs/weighting_methodology.md @@ -0,0 +1,100 @@ +# Weighting Methodology (Draft) + +> 状态: 草稿 (Draft) +> 最后更新: 2025-09-22 +> 范围: 当前项目级 OpenRank 变体的活动权重、代码影响拆分、池化与再分配机制,以及已废弃/移除的实验机制记录。 + +## 1. 设计目标 +- 减少单一“提交次数/代码量”对排名的结构性垄断 +- 鼓励评审、讨论、协作多维度贡献 +- 通过分层(Layered)与凹性结构实现而非硬阈值魔法参数 +- 保持可解释性:每一层变换拥有清晰的输入与输出语义 +- 兼顾反刷与规模差异:对高频轻量行为抑制,对高质量/高协作行为保留增益 + +## 2. 层次结构总览 +| Layer | 名称 | 作用 | 核心参数 | 输出对象 | +|-------|------|------|----------|----------| +| L0 | 基础活动权重 (AHP+频率反调) | 给各活动(open/comment/review/close/commit)初始静态权重 | open/comment/review/reviewComment/close/commit | per-activity raw weight | +| L1 | CodeImpact V2 凹函数 | 按行数/文件数对代码改动规模进行分段凹性映射 | line.{L1,L2,beta1,tailK,tailS}, file.{F1,F2,beta1,tailK,tailS} | codeImpactValue | +| L2 | 动态实现/评审拆分 (qDynamic) | 根据覆盖率/协作度/规模下调 commit 份额 | qCommit,qMin,qMax,qReviewAdjStrength,qCollabAdjStrength,sizeAdjStrength,* | commitClaimable, reviewMediated | +| L3 | MCL 池化 (Code Impact Pools) | gamma concavity + assurance pooling + pending + diversity | gammaCommit, assuranceRelease.*, reviewEffort.*, diversity.*, reallocateExcess.* | per-PR 价值池对参与者分配 | +| L4 | 反刷与线性阈值 | 小体量活动保持线性,超阈值转 log/sqrt 次线性 | antiGaming.linearThresholds / transforms | 调整后的 activityDetails.* | +| L5 | (已移除) 全局份额软上限 | 全局级别的用户份额上限(commit/review)已被明确移除以避免跨PR的全局重缩放 | - | - | +| L6 | 图传播 (OpenRank) | 迭代计算节点综合影响力 | retentionFactor, attenuationFactor | 节点 OpenRank | + +## 3. 基础活动权重 (AHP) +采用 AHP 建立三层:目标 -> 准则(复杂度/频率/价值) -> 方案(各活动类型)。 +- 准则层权重: 复杂度 0.40, 频率 0.30, 价值 0.30 (CR < 0.1) +- 汇总得到初始向量,结合真实频率反调与平衡目标,形成当前 `openrank.yml` 中的 open/comment/review/reviewComment/close/commit 基础权重。 + +## 4. CodeImpact V2 凹函数 +对 PR 的行数与文件数分别使用 2段线性 + 幂次过渡 + 指数尾部的组合: +``` +linesImpact(l) = + if l <= L1: a1 * l + else if l <= L2: a1*L1 + a2*(l-L1)^{beta1} + else: base + tailS * (1 - exp(-(l-L2)/tailK)) +``` +文件数同构。两个分量再按加权或融合策略合成 codeImpactValue,确保规模增大收益递减。 + +## 5. 动态实现/评审拆分 (qDynamic) +基础 qCommit (e.g. 0.55) 通过下列调制: +``` +q = clamp( + qCommit + - a * reviewCoverage + - b * collaborationFactor + - sizeAdj(lines, files) +, qMin, qMax) +``` +- reviewCoverage: 评审/评论介入 vs 代码影响估计 +- collaborationFactor: 多参与者/多评审激励 +- sizeAdj: 大型改动下调提交占比 (避免大同步提交独占) +输出:`commitClaimable = codeImpactValue * q`;`reviewMediated = codeImpactValue - commitClaimable`。 + +## 6. MCL 池化机制 +对每个 PR: +1. reallocateExcess: 若 commitClaimable 占比超过阈值,将超额部分结构性回流到 reviewMediated(可按有效评审 sqrt 放大)。 +2. gammaCommit: 多提交者分配 commit 池时使用 concave gamma (0 upper: 触发一次性结构回流 or 轻量次线性缩放 +``` +保持调节频率低(例如每周期一次)并写出调节日志。 + +## 11. 回滚策略 +- 关闭新层:`codeImpactV2.enabled=false` 可立即回退到旧线性行为 +- 禁用池化:`codeImpactPools.enabled=false` 回退至仅 qDynamic 拆分 +- 逐步回退:先禁用 reallocateExcess,再调高 qMin 观察 commit 回弹 + +## 12. 后续改进路线 +- 评审深度质量:针对大量浅层单行评论的折损归一 +- 自适应双阈值控制器实现与日志 +- 角色/类型维度引入任务难度评估 (assignmentType → difficulty score) +- Explainability 报表:生成每层变换后的差异瀑布图 + +--- +(本文件为骨架草稿,可根据评审反馈继续补充公式推导与更多数值案例。) diff --git a/src/package-lock.json b/src/package-lock.json index a3906b2..a1fea24 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -10,17 +10,25 @@ "license": "Apache-2.0", "dependencies": { "@types/js-yaml": "^4.0.9", + "body-parser": "^1.20.2", + "cors": "^2.8.5", + "express": "^4.18.2", "js-yaml": "^4.1.0", "lodash": "^4.17.21", + "mysql2": "^3.15.0", "winston": "^3.10.0", "yaml": "^2.3.0" }, "devDependencies": { + "@types/body-parser": "^1.19.2", + "@types/cors": "^2.8.17", + "@types/express": "^4.17.21", "@types/jest": "^29.5.0", "@types/lodash": "^4.14.0", "@types/node": "^20.19.13", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", + "dotenv": "^17.2.2", "eslint": "^8.45.0", "jest": "^29.6.0", "ts-jest": "^29.1.0", @@ -1337,6 +1345,63 @@ "@babel/types": "^7.28.2" } }, + "node_modules/@types/body-parser": { + "version": "1.19.6", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", + "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/cors": { + "version": "2.8.19", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.19.tgz", + "integrity": "sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/express": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.23.tgz", + "integrity": "sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.19.6", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz", + "integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", @@ -1347,6 +1412,13 @@ "@types/node": "*" } }, + "node_modules/@types/http-errors": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", + "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", @@ -1405,6 +1477,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/node": { "version": "20.19.13", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.13.tgz", @@ -1415,6 +1494,20 @@ "undici-types": "~6.21.0" } }, + "node_modules/@types/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/semver": { "version": "7.7.1", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz", @@ -1422,6 +1515,29 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/send": { + "version": "0.17.5", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz", + "integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.8", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.8.tgz", + "integrity": "sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, "node_modules/@types/stack-utils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", @@ -1657,6 +1773,19 @@ "dev": true, "license": "ISC" }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -1792,6 +1921,12 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "license": "Python-2.0" }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -1808,6 +1943,15 @@ "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", "license": "MIT" }, + "node_modules/aws-ssl-profiles": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz", + "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==", + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -1941,6 +2085,57 @@ "dev": true, "license": "MIT" }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, "node_modules/brace-expansion": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", @@ -2027,6 +2222,44 @@ "dev": true, "license": "MIT" }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2222,6 +2455,27 @@ "dev": true, "license": "MIT" }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2229,6 +2483,34 @@ "dev": true, "license": "MIT" }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/create-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", @@ -2323,6 +2605,34 @@ "node": ">=0.10.0" } }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -2379,6 +2689,39 @@ "node": ">=6.0.0" } }, + "node_modules/dotenv": { + "version": "17.2.2", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.2.tgz", + "integrity": "sha512-Sf2LSQP+bOlhKWWyhFsn0UsfdK/kCWRv1iuA2gXAwt3dyNabr6QSj00I2V10pidqz69soatm9ZwZvpQMTIOd5Q==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, "node_modules/electron-to-chromium": { "version": "1.5.214", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.214.tgz", @@ -2412,6 +2755,15 @@ "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", "license": "MIT" }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -2422,6 +2774,36 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -2432,6 +2814,12 @@ "node": ">=6" } }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -2634,6 +3022,15 @@ "node": ">=0.10.0" } }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -2684,6 +3081,67 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2787,6 +3245,39 @@ "node": ">=8" } }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -2832,6 +3323,24 @@ "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", "license": "MIT" }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -2858,12 +3367,20 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "license": "MIT", + "dependencies": { + "is-property": "^1.0.2" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -2884,6 +3401,30 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -2894,6 +3435,19 @@ "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -3003,6 +3557,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -3049,11 +3615,22 @@ "node": ">=8" } }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -3069,6 +3646,22 @@ "dev": true, "license": "MIT" }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -3076,7 +3669,23 @@ "dev": true, "license": "Apache-2.0", "engines": { - "node": ">=10.17.0" + "node": ">=10.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/ignore": { @@ -3154,6 +3763,15 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "license": "ISC" }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -3240,6 +3858,12 @@ "node": ">=8" } }, + "node_modules/is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==", + "license": "MIT" + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -4096,6 +4720,12 @@ "node": ">= 12.0.0" } }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -4106,6 +4736,21 @@ "yallist": "^3.0.2" } }, + "node_modules/lru.min": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.2.tgz", + "integrity": "sha512-Nv9KddBcQSlQopmBHXSsZVY5xsdlZkdH/Iey0BlcBYggMd4two7cZnKOK9vmy3nY0O5RGH99z1PCeTpPqszUYg==", + "license": "MIT", + "engines": { + "bun": ">=1.0.0", + "deno": ">=1.30.0", + "node": ">=8.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wellwelwel" + } + }, "node_modules/make-dir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", @@ -4139,6 +4784,33 @@ "tmpl": "1.0.5" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -4156,6 +4828,15 @@ "node": ">= 8" } }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -4170,6 +4851,39 @@ "node": ">=8.6" } }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -4212,6 +4926,47 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, + "node_modules/mysql2": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.15.0.tgz", + "integrity": "sha512-tT6pomf5Z/I7Jzxu8sScgrYBMK9bUFWd7Kbo6Fs1L0M13OOIJ/ZobGKS3Z7tQ8Re4lj+LnLXIQVZZxa3fhYKzA==", + "license": "MIT", + "dependencies": { + "aws-ssl-profiles": "^1.1.1", + "denque": "^2.1.0", + "generate-function": "^2.3.1", + "iconv-lite": "^0.7.0", + "long": "^5.2.1", + "lru.min": "^1.0.0", + "named-placeholders": "^1.1.3", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.2" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/named-placeholders": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", + "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", + "license": "MIT", + "dependencies": { + "lru-cache": "^7.14.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/named-placeholders/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -4219,6 +4974,15 @@ "dev": true, "license": "MIT" }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -4263,6 +5027,39 @@ "node": ">=8" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4390,6 +5187,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -4427,6 +5233,12 @@ "dev": true, "license": "MIT" }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -4588,6 +5400,19 @@ "node": ">= 6" } }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -4615,6 +5440,21 @@ ], "license": "MIT" }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -4636,6 +5476,42 @@ ], "license": "MIT" }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-body/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/react-is": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", @@ -4812,6 +5688,12 @@ "node": ">=10" } }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, "node_modules/semver": { "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", @@ -4825,6 +5707,80 @@ "node": ">=10" } }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/seq-queue": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -4848,6 +5804,78 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -4915,6 +5943,15 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/stack-trace": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", @@ -4947,6 +5984,15 @@ "node": ">=8" } }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -5129,6 +6175,15 @@ "node": ">=8.0" } }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, "node_modules/triple-beam": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", @@ -5297,6 +6352,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/typescript": { "version": "5.9.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", @@ -5332,6 +6400,15 @@ "dev": true, "license": "MIT" }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/update-browserslist-db": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", @@ -5379,6 +6456,15 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "license": "MIT" }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -5401,6 +6487,15 @@ "node": ">=10.12.0" } }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", diff --git a/src/package.json b/src/package.json index 8495429..033e623 100644 --- a/src/package.json +++ b/src/package.json @@ -8,8 +8,9 @@ "dev": "ts-node src/index.ts", "test": "jest", "lint": "eslint src/**/*.ts", - "start": "node dist/index.js", - "ab:repo-events": "ts-node scripts/ab_evaluate_repo_events.ts" + "start": "node dist/index.js", + "ab:repo-events": "ts-node scripts/ab_evaluate_repo_events.ts", + "start:api": "ts-node src/api/server.ts" }, "keywords": [ "openrank", @@ -26,6 +27,10 @@ "@types/node": "^20.19.13", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", + "@types/express": "^4.17.21", + "@types/cors": "^2.8.17", + "@types/body-parser": "^1.19.2", + "dotenv": "^17.2.2", "eslint": "^8.45.0", "jest": "^29.6.0", "ts-jest": "^29.1.0", @@ -33,9 +38,13 @@ "typescript": "^5.1.0" }, "dependencies": { + "express": "^4.18.2", + "cors": "^2.8.5", + "body-parser": "^1.20.2", "@types/js-yaml": "^4.0.9", "js-yaml": "^4.1.0", "lodash": "^4.17.21", + "mysql2": "^3.15.0", "winston": "^3.10.0", "yaml": "^2.3.0" } diff --git a/src/response.json b/src/response.json new file mode 100644 index 0000000..957300a --- /dev/null +++ b/src/response.json @@ -0,0 +1 @@ +{"repo":{"id":113932055,"fullName":"FISCO-BCOS/FISCO-BCOS"},"window":{"start":"2024-01-01T00:00:00.000Z","end":"2024-12-31T23:59:59.000Z","granularity":"day"},"contributors":[{"id":12828840,"name":"morebtcg","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":150,"total":150},{"id":32325790,"name":"kyonRay","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":102,"total":102},{"id":12178678,"name":"JimmyShi22","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":46,"total":46},{"id":15418097,"name":"bxq2011hust","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":45,"total":45},{"id":28520306,"name":"wenlinlee","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":40,"total":40},{"id":34049754,"name":"HaoXuan40404","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":17,"total":17},{"id":20827861,"name":"jdkuangxx","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":7,"total":7},{"id":30165217,"name":"Mojicode","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":4,"total":4},{"id":112919248,"name":"yongmi2662","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":2,"total":2},{"id":22519865,"name":"fCorleone","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":2,"total":2},{"id":13342660,"name":"ywy2090","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":2,"total":2},{"id":13444794,"name":"LucasLi1024","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":1,"total":1},{"id":101538596,"name":"chuwen95","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":1,"total":1},{"id":12084207,"name":"Shareong","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":1,"total":1},{"id":22361503,"name":"xiaoxianBoy","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":1,"total":1},{"id":93572056,"name":"flowerrun","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":1,"total":1},{"id":26454435,"name":"wangyue168git","activity":{"issues":0,"prs":0,"comments":0,"reviewComments":0,"commits":0},"merged":1,"total":1}],"timeseries":[]} \ No newline at end of file diff --git a/src/scripts/check_db_counts.ts b/src/scripts/check_db_counts.ts new file mode 100644 index 0000000..0fb4d20 --- /dev/null +++ b/src/scripts/check_db_counts.ts @@ -0,0 +1,105 @@ +#!/usr/bin/env ts-node +import dotenv from 'dotenv'; +import path from 'path'; +import { getRepoByFullName, countIssues, countPRs, getIssuesForRepo, getPRsForRepo } from '../src/db/repoStore'; + +// Load project config/.env first then root .env (same behavior as mysql.ts) +const rootDir = process.cwd(); +const configEnvPath = path.join(rootDir, 'config', '.env'); +dotenv.config({ path: configEnvPath }); +dotenv.config(); + +async function run() { + const arg = process.argv[2]; + if (!arg) { + console.error('Usage: ts-node src/scripts/check_db_counts.ts [endDateISO]'); + process.exit(2); + } + + let repoId: number | null = null; + let fullName: string | null = null; + if (/^\d+$/.test(arg)) { + repoId = parseInt(arg, 10); + } else if (arg.includes('/')) { + fullName = arg; + } else { + console.error('First arg must be numeric repoId or owner/repo'); + process.exit(2); + } + + const startDateArg = process.argv[3]; + const endDateArg = process.argv[4]; + const endDate = endDateArg ? new Date(endDateArg) : new Date(); + const startDate = startDateArg ? new Date(startDateArg) : null; + + try { + if (fullName) { + console.log(`Looking up repo by full name: ${fullName}`); + const r = await getRepoByFullName(fullName); + if (!r) { + console.error('Repo not found in DB by full name'); + process.exit(3); + } + repoId = r.id; + console.log('Repo row:', { id: r.id, full_name: r.full_name, name: r.name, owner: r.owner }); + } + + if (!repoId) { + console.error('Unable to determine repoId'); + process.exit(4); + } + + console.log(`Using repoId=${repoId}, endDate=${endDate.toISOString()}, startDate=${startDate ? startDate.toISOString() : '(none)'}`); + + // 1) Count rows (total) + const totalIssues = await countIssues(repoId); + const totalPRs = await countPRs(repoId); + console.log(`COUNT(*) totals -> issues: ${totalIssues}, prs: ${totalPRs}`); + + // 2) If a startDate was provided, also read rows in that window (startDate -> endDate) + const wideStart = new Date(0); + if (startDate) { + const windowIssues = await getIssuesForRepo(repoId, startDate as Date, endDate as Date); + const windowPRs = await getPRsForRepo(repoId, startDate as Date, endDate as Date); + console.log(`getIssuesForRepo(${startDate.toISOString()}, ${endDate.toISOString()}) returned ${windowIssues.length} rows, getPRsForRepo(...) returned ${windowPRs.length} rows`); + console.log('Sample issues in requested window (first 5):'); + for (const it of windowIssues.slice(0,5)) { + console.log({ id: it.id, number: it.number, createdAt: it.createdAt, authorLogin: it.authorLogin, title: (it.title||'').slice(0,100) }); + } + console.log('Sample PRs in requested window (first 5):'); + for (const p of windowPRs.slice(0,5)) { + console.log({ id: p.id, number: p.number, createdAt: p.createdAt, authorLogin: p.authorLogin, title: (p.title||'').slice(0,100) }); + } + } + + // 3) Read rows in the wide window (epoch -> endDate) + const issues = await getIssuesForRepo(repoId, wideStart, endDate as Date); + const prs = await getPRsForRepo(repoId, wideStart, endDate as Date); + console.log(`getIssuesForRepo(${wideStart.toISOString()}, ${endDate.toISOString()}) returned ${issues.length} rows, getPRsForRepo(...) returned ${prs.length} rows`); + + // Print small samples + console.log('Sample issues (first 5):'); + for (const it of issues.slice(0,5)) { + console.log({ id: it.id, number: it.number, createdAt: it.createdAt, authorLogin: it.authorLogin, title: (it.title||'').slice(0,100) }); + } + + console.log('Sample PRs (first 5):'); + for (const p of prs.slice(0,5)) { + console.log({ id: p.id, number: p.number, createdAt: p.createdAt, authorLogin: p.authorLogin, title: (p.title||'').slice(0,100) }); + } + + // Extra hint for debugging: print min/max createdAt + const issueDates = issues.map((i:any) => new Date(i.createdAt)).filter(d=>!isNaN(d.getTime())).sort((a,b)=>a.getTime()-b.getTime()); + const prDates = prs.map((p:any) => new Date(p.createdAt)).filter(d=>!isNaN(d.getTime())).sort((a,b)=>a.getTime()-b.getTime()); + console.log('Issue date range:', issueDates.length ? `${issueDates[0].toISOString()} -> ${issueDates[issueDates.length-1].toISOString()}` : 'none'); + console.log('PR date range:', prDates.length ? `${prDates[0].toISOString()} -> ${prDates[prDates.length-1].toISOString()}` : 'none'); + + process.exit(0); + } catch (err:any) { + console.error('Error while checking DB counts:', err?.message || err); + if (err?.stack) console.error(err.stack.split('\n').slice(0,6).join('\n')); + process.exit(5); + } +} + +run(); diff --git a/src/scripts/init_fetch_runs_table.sql b/src/scripts/init_fetch_runs_table.sql new file mode 100644 index 0000000..1aae360 --- /dev/null +++ b/src/scripts/init_fetch_runs_table.sql @@ -0,0 +1,16 @@ +-- 创建 fetch_runs 表 (如果不存在) +CREATE TABLE IF NOT EXISTS fetch_runs ( + id BIGINT AUTO_INCREMENT PRIMARY KEY, + repo_id BIGINT NOT NULL, + source ENUM('network','db') NOT NULL, + start_time DATETIME NOT NULL, + end_time DATETIME NOT NULL, + issues INT NOT NULL DEFAULT 0, + pull_requests INT NOT NULL DEFAULT 0, + activities INT NOT NULL DEFAULT 0, + success TINYINT(1) NOT NULL DEFAULT 1, + meta JSON NULL, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + KEY idx_repo_time (repo_id, start_time, end_time), + KEY idx_repo_source (repo_id, source) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; \ No newline at end of file diff --git a/src/scripts/migrate_add_activity_columns.ts b/src/scripts/migrate_add_activity_columns.ts new file mode 100644 index 0000000..5311ab2 --- /dev/null +++ b/src/scripts/migrate_add_activity_columns.ts @@ -0,0 +1,31 @@ +import { pool } from '../src/db/mysql'; + +async function ensureActivitiesColumns() { + const [rows]: any = await pool.query('SHOW COLUMNS FROM activities'); + const names = new Set(rows.map((r: any) => r.Field)); + const alters: string[] = []; + if (!names.has('review_comment_count')) { + alters.push('ADD COLUMN review_comment_count INT NOT NULL DEFAULT 0 AFTER review_count'); + } + if (!names.has('close_count')) { + // place after review_comment_count if we add it, else after review_count + if (!names.has('review_comment_count')) { + alters.push('ADD COLUMN close_count INT NOT NULL DEFAULT 0 AFTER review_count'); + } else { + alters.push('ADD COLUMN close_count INT NOT NULL DEFAULT 0 AFTER review_comment_count'); + } + } + if (alters.length === 0) { + console.log('✅ activities 表已包含所需列,无需迁移'); + return; + } + const sql = `ALTER TABLE activities ${alters.join(', ')}`; + console.log('⏳ 执行迁移:', sql); + await pool.query(sql); + const [rows2]: any = await pool.query('SHOW COLUMNS FROM activities'); + console.log('✅ 迁移完成,现有列:', rows2.map((r: any) => r.Field)); +} + +ensureActivitiesColumns() + .catch(e => { console.error('迁移失败', e); process.exitCode = 1; }) + .finally(() => pool.end()); diff --git a/src/scripts/record_fetch_run.ts b/src/scripts/record_fetch_run.ts new file mode 100644 index 0000000..c59c6c0 --- /dev/null +++ b/src/scripts/record_fetch_run.ts @@ -0,0 +1,24 @@ +import { pool } from '../src/db/mysql'; + +async function initTable() { + await pool.query(`CREATE TABLE IF NOT EXISTS fetch_runs ( + id BIGINT PRIMARY KEY AUTO_INCREMENT, + repo_id BIGINT NOT NULL, + source ENUM('network','db') NOT NULL, + start_time DATETIME NOT NULL, + end_time DATETIME NOT NULL, + issues INT NOT NULL, + pull_requests INT NOT NULL, + activities INT NOT NULL, + success TINYINT(1) DEFAULT 1, + meta JSON, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP + )`); +} + +async function main() { + await initTable(); + await pool.end(); +} + +main().catch(e=>{console.error(e);process.exit(1);}); diff --git a/src/scripts/sum_contribution.js b/src/scripts/sum_contribution.js new file mode 100644 index 0000000..1fb14bc --- /dev/null +++ b/src/scripts/sum_contribution.js @@ -0,0 +1,37 @@ +const fs = require('fs'); +const path = require('path'); + +const p = path.join(__dirname, '..', 'test_data', 'contribution_summary.json'); +if (!fs.existsSync(p)) { + console.error('Missing file:', p); + process.exit(1); +} + +const dataRaw = JSON.parse(fs.readFileSync(p, 'utf8')); +// contribution_summary.json expected shape: { generatedAt, users: [ { userId, userLogin, open, comment, review, reviewComment, close, commit, total, ... }, ... ] } +const data = Array.isArray(dataRaw) ? dataRaw : (Array.isArray(dataRaw.users) ? dataRaw.users : []); +const channelKeys = ['open', 'comment', 'review', 'reviewComment', 'close', 'commit']; +const sums = {}; +let total = 0; +for (const k of channelKeys) sums[k] = 0; +for (const u of data) { + if (!u) continue; + for (const k of channelKeys) { + const v = Number(u[k]) || 0; + sums[k] = (sums[k] || 0) + v; + total += v; + } +} + +console.log('Total contribution value:', total.toFixed(6)); +console.log('Per-channel totals:'); +for (const k of Object.keys(sums)) { + const v = sums[k]; + const pct = total > 0 ? (v / total * 100).toFixed(2) : '0.00'; + console.log(` ${k}: ${v.toFixed(6)} (${pct}%)`); +} + +// Print a compact JSON summary +const out = { total, sums }; +console.log('\nJSON summary:'); +console.log(JSON.stringify(out, null, 2)); diff --git a/src/scripts/sum_pr_pools.js b/src/scripts/sum_pr_pools.js new file mode 100644 index 0000000..8b56ddf --- /dev/null +++ b/src/scripts/sum_pr_pools.js @@ -0,0 +1,34 @@ +const fs = require('fs'); +const path = require('path'); + +const p = path.join(__dirname, '..', 'test_data', 'pr_value_pools.json'); +if (!fs.existsSync(p)) { console.error('missing', p); process.exit(1); } +const doc = JSON.parse(fs.readFileSync(p, 'utf8')); +const items = doc.items || []; + +let sumCommitClaimable = 0; +let sumReviewMediated = 0; +let sumCommitAlloc = 0; +let sumAssuranceAlloc = 0; + +for (const it of items) { + sumCommitClaimable += Number(it.commitClaimable) || 0; + sumReviewMediated += Number(it.reviewMediated) || 0; + if (Array.isArray(it.commitAlloc)) { + for (const c of it.commitAlloc) sumCommitAlloc += Number(c.value) || 0; + } + if (Array.isArray(it.assuranceAlloc)) { + for (const a of it.assuranceAlloc) sumAssuranceAlloc += Number(a.value) || 0; + } +} + +console.log('PR pools summary:'); +console.log(' count PRs:', items.length); +console.log(' sum commitClaimable:', sumCommitClaimable.toFixed(9)); +console.log(' sum reviewMediated:', sumReviewMediated.toFixed(9)); +console.log(' sum commitAlloc (actual):', sumCommitAlloc.toFixed(9)); +console.log(' sum assuranceAlloc (actual):', sumAssuranceAlloc.toFixed(9)); +console.log(' pooled total (claimable+review):', (sumCommitClaimable+sumReviewMediated).toFixed(9)); + +console.log('\nJSON:'); +console.log(JSON.stringify({ items: items.length, sumCommitClaimable, sumReviewMediated, sumCommitAlloc, sumAssuranceAlloc }, null, 2)); diff --git a/src/src/GitHubDataCollector.ts b/src/src/GitHubDataCollector.ts index 4605a4c..b15ceee 100644 --- a/src/src/GitHubDataCollector.ts +++ b/src/src/GitHubDataCollector.ts @@ -4,6 +4,8 @@ */ import { IssueData, PullRequestData, PlatformType, RepoEventActivity } from './types'; +// DB helpers (optional): use if available +import * as repoStore from './db/repoStore'; export interface GitHubEvent { id: string; @@ -60,6 +62,15 @@ export class GitHubDataCollector { this.apiToken = apiToken; } + /** + * 推断任务类型:task(指派)或 voluntary(自愿) + */ + private inferAssignmentType(labels: string[], assignees: any[]): 'task' | 'voluntary' { + // 简化逻辑:只看 assignees(有分配人= task,无= voluntary) + if (assignees && assignees.length > 0) return 'task'; // 有分配人即指派 + return 'voluntary'; // 默认自愿 + } + /** * 收集指定仓库的项目数据 */ @@ -73,19 +84,157 @@ export class GitHubDataCollector { console.log(`🔍 开始收集 ${owner}/${repo} 的项目数据...`); console.log(`📅 时间范围: ${startDate.toISOString()} - ${endDate.toISOString()}`); - const repoInfo = await this.fetchRepoInfo(owner, repo); + const runStart = new Date(); + const repoInfo = await this.fetchRepoInfo(owner, repo); const repoId = repoInfo.id; - - // 并行获取Issues、PRs与仓库事件 + // If FORCE_FETCH env is set, skip DB reads and force network fetch (test harness can set this) + const forceFetchEnv = process.env.FORCE_FETCH === 'true'; + if (!forceFetchEnv) { + // Try DB first (if repoStore available). If DB has records for this repo+range, use them. + try { + const dbRepo = await repoStore.getRepoByFullName(`${owner}/${repo}`); + if (dbRepo) { + // Attempt to load issues/prs from DB for the time window + const issues = await repoStore.getIssuesForRepo(repoId, startDate, endDate); + const pullRequests = await repoStore.getPRsForRepo(repoId, startDate, endDate); + // If DB returned results (non-empty), assume DB is the desired source + if ((issues && issues.length > 0) || (pullRequests && pullRequests.length > 0)) { + console.log(`✅ 从本地数据库加载数据: ${issues.length} 个Issue, ${pullRequests.length} 个PR`); + const repoEvents = await this.fetchRepoEvents(owner, repo, repoId, startDate, endDate).catch(() => []); + // 记录 fetch_runs (source=db) + try { + await (repoStore as any).insertFetchRun?.({ + repo_id: repoId, + platform: 'GitHub', + repo_full_name: `${owner}/${repo}`, + source: 'db', + start_time: runStart, + end_time: new Date(), + issues: issues.length, + pull_requests: pullRequests.length, + activities: (issues.reduce((s,i)=>s+(i.activities?.length||0),0) + pullRequests.reduce((s,p)=>s+(p.activities?.length||0),0)), + success: 1, + meta: { cached: true } + }); + } catch (e) { console.warn('⚠️ 记录 fetch_runs(db) 失败:', (e as any)?.message || e); } + return { issues, pullRequests, repoEvents }; + } + } + } catch (err) { + console.warn('⚠️ 本地数据库访问失败或未配置,回退到网络抓取', (err as any)?.message || err); + } + } else { + console.log('ℹ️ 环境变量 FORCE_FETCH=true,跳过本地数据库,强制网络抓取'); + } + + // 如果 DB 不可用或没有数据,则走网络抓取,并在成功后写回 DB(尽量非破坏性) const [issues, pullRequests, repoEvents] = await Promise.all([ this.fetchIssues(owner, repo, repoId, startDate, endDate), this.fetchPullRequests(owner, repo, repoId, startDate, endDate), this.fetchRepoEvents(owner, repo, repoId, startDate, endDate).catch(() => []) ]); - + console.log(`✅ 数据收集完成: ${issues.length} 个Issue, ${pullRequests.length} 个PR`); - - return { issues, pullRequests, repoEvents }; + + // Try to persist to DB for future runs (best-effort) + try { + const DB_DEBUG = process.env.DB_DEBUG === '1' || process.env.DB_DEBUG === 'true'; + if (DB_DEBUG) console.log('[DB_DEBUG] start persistence, sizes', { issues: issues.length, prs: pullRequests.length }); + await repoStore.upsertRepo({ id: repoInfo.id, platform: 'GitHub', full_name: `${owner}/${repo}`, owner, name: repo }); + for (const issue of issues) { + await repoStore.upsertIssue(issue as any); + // upsert activities if present + if (issue.activities && issue.activities.length) { + const activities = issue.activities.map((a: any) => ({ + platform: issue.platform, + repoId: issue.repoId, + item_type: 'issue', + item_id: issue.id, + item_number: (issue as any).number ?? issue.id, + actor_id: a.actorId, + actor_login: a.actorLogin, + open_count: a.openCount || 0, + comment_count: a.commentCount || 0, + review_count: a.reviewCount || 0, + commit_count: a.commitCount || 0, + activity_meta: {} + })); + await repoStore.upsertActivitiesBatch(activities); + } + } + if (DB_DEBUG) console.log('[DB_DEBUG] issue loop finished'); + + for (const pr of pullRequests) { + await repoStore.upsertPR(pr as any); + if (pr.activities && pr.activities.length) { + const activities = pr.activities.map((a: any) => ({ + platform: pr.platform, + repoId: pr.repoId, + item_type: 'pr', + item_id: pr.id, + item_number: (pr as any).number ?? pr.id, + actor_id: a.actorId, + actor_login: a.actorLogin, + open_count: a.openCount || 0, + comment_count: a.commentCount || 0, + review_count: a.reviewCount || 0, + review_comment_count: a.reviewCommentCount || 0, + commit_count: a.commitCount || 0, + activity_meta: {} + })); + await repoStore.upsertActivitiesBatch(activities); + } + } + if (DB_DEBUG) console.log('[DB_DEBUG] pr loop finished'); + + if (DB_DEBUG) { + try { + const [issueCount, prCount, actCount] = await Promise.all([ + (repoStore as any).countIssues(repoInfo.id), + (repoStore as any).countPRs(repoInfo.id), + (repoStore as any).countActivities(repoInfo.id) + ]); + console.log('[DB_DEBUG] persisted counts now', { issueCount, prCount, actCount }); + } catch (e) { + console.log('[DB_DEBUG] count queries failed', (e as any)?.message || e); + } + } + // fetch_runs 记录 (source=network) + try { + await (repoStore as any).insertFetchRun?.({ + repo_id: repoId, + platform: 'GitHub', + repo_full_name: `${owner}/${repo}`, + source: 'network', + start_time: runStart, + end_time: new Date(), + issues: issues.length, + pull_requests: pullRequests.length, + activities: (issues.reduce((s,i)=>s+(i.activities?.length||0),0) + pullRequests.reduce((s,p)=>s+(p.activities?.length||0),0)), + success: 1, + meta: { persisted: true } + }); + } catch (e) { console.warn('⚠️ 记录 fetch_runs(network) 失败:', (e as any)?.message || e); } + } catch (err) { + console.warn('⚠️ 将抓取结果写入本地数据库失败(忽略):', (err as any)?.message || err); + try { + await (repoStore as any).insertFetchRun?.({ + repo_id: repoId, + platform: 'GitHub', + repo_full_name: `${owner}/${repo}`, + source: 'network', + start_time: runStart, + end_time: new Date(), + issues: issues.length, + pull_requests: pullRequests.length, + activities: (issues.reduce((s,i)=>s+(i.activities?.length||0),0) + pullRequests.reduce((s,p)=>s+(p.activities?.length||0),0)), + success: 0, + meta: { error: (err as any)?.message || String(err) } + }); + } catch {/* ignore */} + } + + return { issues, pullRequests, repoEvents }; } /** @@ -142,6 +291,7 @@ export class GitHubDataCollector { const issueData: IssueData = { id: issue.id, + number: issue.number, platform: 'GitHub' as PlatformType, repoId: repoId, repoName: `${owner}/${repo}`, @@ -159,7 +309,9 @@ export class GitHubDataCollector { // 任务执行相关(使用默认值或计算值) firstResponseHours: this.calculateFirstResponseTime(activities) || this.defaultQualitySignals.firstResponseHours, activities, - reactions + reactions, + // 新增:任务类型标注 + assignmentType: this.inferAssignmentType(issue.labels?.map((label: any) => label.name) || [], issue.assignees || []) }; issues.push(issueData); @@ -240,6 +392,7 @@ export class GitHubDataCollector { const prData: PullRequestData = { id: pr.id, + number: pr.number, platform: 'GitHub' as PlatformType, repoId: repoId, repoName: `${owner}/${repo}`, @@ -264,7 +417,9 @@ export class GitHubDataCollector { activities, reactions, // 代码质量信号(使用获取的数据或默认/中性值) - ...codeQualitySignals + ...codeQualitySignals, + // 新增:任务类型标注 + assignmentType: this.inferAssignmentType(pr.labels?.map((label: any) => label.name) || [], pr.assignees || []) }; pullRequests.push(prData); @@ -322,6 +477,7 @@ export class GitHubDataCollector { openCount: number; commentCount: number; closeCount: number; + reviewCount: number; // 新增:将reopened/assigned/labeled等视为审阅活动 }>(); // 处理事件 @@ -337,7 +493,8 @@ export class GitHubDataCollector { actorLogin, openCount: 0, commentCount: 0, - closeCount: 0 + closeCount: 0, + reviewCount: 0 }); } @@ -347,6 +504,11 @@ export class GitHubDataCollector { activity.openCount++; } else if (event.event === 'closed') { activity.closeCount++; + } else if (event.event === 'reopened' || event.event === 'assigned' || + event.event === 'labeled' || event.event === 'unassigned' || + event.event === 'unlabeled') { + // 将这些管理操作视为审阅活动 + activity.reviewCount++; } }); @@ -363,7 +525,8 @@ export class GitHubDataCollector { actorLogin, openCount: 0, commentCount: 0, - closeCount: 0 + closeCount: 0, + reviewCount: 0 }); } @@ -435,6 +598,11 @@ export class GitHubDataCollector { activity.openCount++; } else if (event.event === 'closed' || event.event === 'merged') { activity.closeCount++; + } else if (event.event === 'reopened' || event.event === 'assigned' || + event.event === 'labeled' || event.event === 'unassigned' || + event.event === 'unlabeled') { + // 将这些管理操作视为审阅活动 + activity.reviewCount++; } }); @@ -701,13 +869,45 @@ export class GitHubDataCollector { }); if (!response.ok) { + // 读取响应体(尝试解析为JSON或文本),以便诊断具体错误 + let respText = ''; + try { + const clone = response.clone(); + // 优先尝试解析为JSON + const j = await clone.json().catch(() => null); + if (j) respText = JSON.stringify(j); + else respText = await response.text().catch(() => ''); + } catch (e) { + respText = ``; + } + + // 记录响应头的一些关键信息(如x-ratelimit及其它) + const usefulHeaders: Record = {}; + try { + response.headers.forEach((v, k) => { + if (/rate|limit|retry|x-|status/i.test(k) || k === 'content-type') usefulHeaders[k] = v; + }); + } catch (e) { + // ignore + } + + console.error('🚨 GitHub API 请求返回非200:', { + url, + status: response.status, + statusText: response.statusText, + headers: usefulHeaders, + body: respText, + }); + // 如果是 rate limit,抛出特殊错误 - if (response.status === 403 && response.statusText.includes('rate limit')) { + if (response.status === 403 && /rate limit/i.test(respText + ' ' + response.statusText)) { throw new Error(`GitHub API rate limit exceeded. 建议设置 GITHUB_TOKEN 环境变量`); } - throw new Error(`GitHub API请求失败: ${response.status} ${response.statusText}`); + + // 常见403原因:token 无效/被撤销/权限不足/abuse detection 等,保留原始消息以便上层处理 + throw new Error(`GitHub API请求失败: ${response.status} ${response.statusText} - ${respText}`); } - + const data = await response.json(); // console.log(`✅ 请求成功: ${data.length || Object.keys(data).length || 1} 条数据`); diff --git a/src/src/algorithm/ProjectOpenRankCalculator.ts b/src/src/algorithm/ProjectOpenRankCalculator.ts index 6dbf43e..8b5a488 100644 --- a/src/src/algorithm/ProjectOpenRankCalculator.ts +++ b/src/src/algorithm/ProjectOpenRankCalculator.ts @@ -23,12 +23,85 @@ import { } from '../types'; import { SimpleGraph } from './Graph'; import { generateId } from '../utils'; +import * as fs from 'fs'; +import * as path from 'path'; import { computeIssueQualityMultiplier, computePRQualityMultiplier } from './QualityWeighting'; +import { WeightingFramework } from './WeightingFramework'; +/** + * ProjectOpenRankCalculator + * ------------------------ + * 实现说明(重构后) + * - 负责把 Issue/PR/Repo/User 数据组装成异构图 (SimpleGraph),并运行基于传播/迭代的 OpenRank 算法。 + * - 为可维护性与可测试性,将若干复杂子逻辑从长函数中抽取为私有 helper: + * - computeCodeImpactPools: 将原来 `createUserPRActivityEdges` 内关于 CodeImpact V2 的计算和 "池化 (pools)" 分配抽出。 + * - applyChannelBalancing: 将通道平衡(concave 收缩、平滑、soft-min)抽出,便于单测和调参。 + * - 其它小工具(anti-gaming、commit-gamma map 等)也被单独封装。 + * + * 设计契约(summary) + * - Inputs: OpenRank 配置(`OpenRankConfig`),Issue/PR 原始数据,以及可选的历史 openrank(`lastMonthOpenRank`)。 + * - Outputs: 每次计算返回 `OpenRankResult[]`(节点级别 openrank 与构成信息)。 + * - Error modes: 方法倾向于在内部降级并记录 debug 信息,而不是抛出以中断整体计算(便于长跑任务)。 + * + * 重构理由(为什么这么做) + * - 原 `createUserPRActivityEdges` 体量很大,包含多条关注点(CodeImpact、channel balancing、debug 输出),不利于阅读与测试; + * - 抽出后可以为 channel balancing 编写独立单元测试(已添加),也便于未来逐步替换或调参。 + */ export class ProjectOpenRankCalculator { private config: OpenRankConfig; private graph: Graph; private calculationStatus: CalculationStatus; + // 收集 PR 活动调试日志(代替控制台输出) + private prActivityDebugLogs: any[] = []; + // 收集 Issue 活动调试日志 + private issueActivityDebugLogs: any[] = []; + // AB 分层解释收集(协作单元层级) + private abExplain: any[] = []; + // CodeImpact Pools 调试:每个 PR 的池化分配详情 + private prValuePoolsDebug: any[] = []; + // 未立即释放的质量保障池(无评审时 pending)记录 + private pendingAssurancePool: any[] = []; + // Issue 分层价值池调试 + private issueValuePoolsDebug: any[] = []; + // Comment 分层调试 + private commentValueDebug: any[] = []; + // 当关闭 debugOutputsEnabled 时,所有中间调试输出与文件写出将被跳过 + private debugOutputsEnabled: boolean = false; + // 缓存每次迭代所需的 source -> totalOutWeight,用于避免重复计算 + private _cachedOutgoingSum: Map | null = null; + // 每次迭代预计算的 source -> baseTransmission (a*openrank + b*lastOpenrank + c*initValue) + private _baseTransmissionMap: Map | null = null; + // 缓存 transmissionBlend 的归一系数 a,b,c,避免每次计算节点时读取配置 + private _transmissionBlendCached: { a: number; b: number; c: number } | null = null; + // 配置解析缓存,避免重复遍历 config 路径 + private _configCache: Map = new Map(); + + private getCachedConfig(paths: string[][], defaultValue?: T): { value: T; foundAt?: string } { + const key = paths.map(p => p.join('.')).join('|'); + const cached = this._configCache.get(key) as { value: T; foundAt?: string } | undefined; + if (cached) return cached; + const res = this.resolveConfig(paths, defaultValue); + this._configCache.set(key, res as any); + return res; + } + + private resolveConfig(paths: string[][], defaultValue?: T): { value: T; foundAt?: string } { + for (const p of paths) { + let obj: any = (this.config as any); + let ok = true; + for (const k of p) { + if (obj && (k in obj)) { + obj = obj[k]; + } else { + ok = false; + break; + } + } + if (ok) return { value: obj as T, foundAt: p.join('.') }; + } + return { value: (defaultValue as T), foundAt: undefined }; + } + private weightingFramework: WeightingFramework; constructor(config: OpenRankConfig) { this.config = config; @@ -41,45 +114,446 @@ export class ProjectOpenRankCalculator { isConverged: false, startTime: new Date(), }; + this.weightingFramework = new WeightingFramework(config); + } /** - * 项目级 OpenRank 主计算流程 + * 项目级 OpenRank 主计算流程(公开接口) + * 与编译目录下的实现保持一致:构建图 -> 迭代计算 -> 生成结果 -> 可选写出调试文件 */ - async calculateProjectOpenRank( - issueData: IssueData[], - pullRequestData: PullRequestData[], - lastMonthOpenRank: Map, - repoEvents?: Array<{ platform: PlatformType; repoId: number; repoName: string; actorId: number; actorLogin: string; type: 'star'|'fork'|'release'; count: number; createdAt?: Date; }> - ): Promise { + async calculateProjectOpenRank(issueData: IssueData[], pullRequestData: PullRequestData[], lastMonthOpenRank: Map, repoEvents?: Array<{ platform: PlatformType; repoId: number; repoName: string; actorId: number; actorLogin: string; type: 'star'|'fork'|'release'; count: number; createdAt?: Date; }>): Promise { this.calculationStatus.startTime = new Date(); console.log('Starting Project OpenRank calculation...'); // 1. 构建项目级异构图 - this.buildProjectGraph(issueData, pullRequestData, lastMonthOpenRank, repoEvents); + this.buildProjectGraph(issueData, pullRequestData, lastMonthOpenRank, repoEvents); console.log(`Project graph built with ${this.graph.nodes.size} nodes and ${this.graph.edges.length} edges`); - // 2.(可配)先标准化 Repo->Issue/PR 的 reverse_belong 边,使结构信号进入初始值优化 - if (this.config.project.initOptimization?.normalizeReverseBelongBeforeInitOpt) { - this.normalizeReverseBelongEdges(); - } - - // 3. 基于边权重优化初始值 - this.optimizeInitialValuesBasedOnEdgeWeights(); - - // 4. 迭代计算 + // 2. 迭代计算(已改为节点创建时直接质量评估) await this.iterativeCalculation(); - // 5. 生成结果 + // 3. 生成结果 const results = this.generateResults(); - + + // Debug outputs 写出(默认关闭,除非显式开启) + if (this.debugOutputsEnabled) { + this.flushGroupedActivityDebug(); + this.flushPRActivityDebugLogs(); + this.flushIssueActivityDebugLogs(); + this.flushABExplain(); + this.flushPRValuePoolsDebug(); + this.flushIssueValuePoolsDebug(); + this.flushCommentValueDebug(); + this.flushPendingAssurance(); + this.flushContributionSummary(); + } + this.calculationStatus.endTime = new Date(); const duration = this.calculationStatus.endTime.getTime() - this.calculationStatus.startTime.getTime(); console.log(`Project OpenRank calculation completed in ${duration}ms`); - return results; } + /** + * Compute CodeImpact V2 weights and pools allocation for a PR. + * + * Contract: + * - Inputs: + * - pr: PullRequest record with activities (commits, reviews, comments) + * - totalLines: 总改动行数 (additions + deletions) + * - filesChanged: 受影响文件数 + * - totalCommitsRaw: PR 中的总 commit 数,用于按人分配 commit 份额 + * - totalReviewCommentsRaw: PR 中的总 review comment 数(可用于比例计算) + * - ci2: codeImpactV2 配置片段(包含 line/file 的 f(L)/f(F) 参数和 dynamic 调整) + * - poolsCfg: pools 配置(gamma、reallocateExcess、assuranceRelease 等) + * - weights: 全局权重映射(commitLine/commitFile 等) + * + * - Returns: 一个对象,包含以下字段: + * - codeLineWeight / codeFileWeight: 基于 f(L)/f(F) 的线性变换值 + * - codeImpactV2Value: 两者之和(该 PR 的代码带来的基础价值) + * - poolCommitAllocMap: 若启用 pools,则按 gamma 分布分配给参与 commit 的 actor + * - poolAssuranceAllocMap: 若启用 pools 且有 reviewer,则按 review effort 分配,否则进入 pendingPool + * - poolDebugRecord: 若 debug 开启,用于输出到 pr_value_pools.json 的记录 + * - codeImpactSplit: commitClaimable / reviewMediated 的拆分结果以及 qDynamic 等元信息 + * + * 主要步骤说明: + * 1) 规模函数 f_L 与 f_F:对行/文件数做分段/幂律/尾部平滑处理,避免超大 PR 线性放大。 + * 2) qDynamic:基于评审覆盖率、协作人数和规模自适应缩放 commit 可领取部分(避免无评审时过度分配)。 + * 3) reallocateExcess(可选):当 commit 占比过高时,将一部分重分配到 review 池(鼓励评审)。 + * 4) commit gamma 分配:对每位 committer 按其 commit 占比做幂(gamma)变换,防止单人占比极端拉高。 + * 5) assurance pool:若有 reviewer 则按 review/comment effort 分配,否则做 selfAlloc + pendingDecay 并记录 pending + * 6) diversity boost / debug 记录 + * + * 设计注意点与边界条件: + * - 当 denominators 为 0 时使用兜底值(例如 gammaDenom <= 0 时设为 1),保证数值稳定性; + * - 对未评审 PR,会对 reviewMediated 做衰减并可能将一部分转入 pendingAssurancePool(便于后续人工释放或延迟分配); + * - 函数应保持无副作用,除了向 this.prValuePoolsDebug / this.pendingAssurancePool 推送调试信息(按 debugOutputsEnabled 控制)。 + */ + private computeCodeImpactPools(pr: any, totalLines: number, filesChanged: number, totalCommitsRaw: number, totalReviewCommentsRaw: number, ci2: any, poolsCfg: any, weights: any) { + // initialize outputs + let codeLineWeight = 0; + let codeFileWeight = 0; + let codeImpactV2Value = 0; + // codeImpactSplit 保存 commit 可领取与 review mediated 的拆分信息和元数据 + let codeImpactSplit: any = { commitClaimable: 0, reviewMediated: 0, penaltyApplied: false }; + + // ------------------------- + // 1) 规模函数 f_L (基于行数) + // 说明: 使用分段函数避免对极端大 PR 的线性放大。 + // - 小规模: 线性 (L <= L1) + // - 中等规模: 幂律衰减增长,降低边际收益 + // - 极大规模: 加入尾部项 (1-exp) 限制增长 + // ------------------------- + const L = totalLines; + const { L1 = 200, L2 = 2000, beta1 = 0.65, tailK = 1200, tailS = 1800 } = ci2.line || {}; + let fL: number; + if (L <= L1) { + // 直接按行数计 + fL = L; + } else if (L <= L2) { + // 幂律减少边际影响 + fL = L1 + Math.pow(L - L1, beta1); + } else { + // 对超长改动使用尾部饱和项,避免数值暴涨 + const excess = L - L2; + fL = L1 + Math.pow(L2 - L1, beta1) + (1 - Math.exp(-excess / Math.max(1, tailK))) * tailS; + } + + // ------------------------- + // 2) 规模函数 f_F (基于文件数) + // 逻辑与 f_L 类似,防止大量小文件导致线性膨胀 + // ------------------------- + const F = filesChanged; + const { F1 = 10, F2 = 60, beta1: fb = 0.6, tailK: ftK = 40, tailS: ftS = 120 } = ci2.file || {}; + let fF: number; + if (F <= F1) { + fF = F; + } else if (F <= F2) { + fF = F1 + Math.pow(F - F1, fb); + } else { + const excessF = F - F2; + fF = F1 + Math.pow(F2 - F1, fb) + (1 - Math.exp(-excessF / Math.max(1, ftK))) * ftS; + } + + // 使用配置中的线性系数把规模函数映射为实际价值 + codeLineWeight = (weights.commitLine ? fL * weights.commitLine : 0); + codeFileWeight = (weights.commitFile ? fF * weights.commitFile : 0); + codeImpactV2Value = codeLineWeight + codeFileWeight; + + // ------------------------- + // 3) qDynamic: 将 codeImpactV2Value 拆为 commitClaimable 与 reviewMediated + // 原则: 如果存在评审/更多协作参与,应该把更多价值分配给 review(鼓励 review); + // 否则减少 review 部分或做衰减(惩罚无评审的 PR)。 + // ------------------------- + const reviewers = new Set((pr.activities || []).filter((a: any) => (a.reviewCount || 0) > 0 || (a.reviewCommentCount || 0) > 0).map((a: any) => a.actorId)); + const committers = new Set((pr.activities || []).filter((a: any) => (a.commitCount || 0) > 0).map((a: any) => a.actorId)); + const participants = new Set((pr.activities || []).map((a: any) => a.actorId)); + const reviewCountUsers = reviewers.size; + const committerCountUsers = committers.size; + const participantCount = participants.size; + const hasReview = reviewCountUsers > 0; // 是否存在 reviewer + + // 评审覆盖率 = reviewUsers / committerUsers(上限 1),若没有 committer 则退化为 hasReview ? 1 : 0 + const reviewCoverage = committerCountUsers > 0 ? Math.min(1, reviewCountUsers / committerCountUsers) : (hasReview ? 1 : 0); + // 协作度因子: 参与人数越多,表示协作越充分(略微降低 commit 优先) + const collaborativeFactor = participantCount > 0 ? Math.min(1, Math.max(0, (participantCount - 1) / Math.max(1, participantCount))) : 0; + + // baseQ 是默认 commit 可领取比例的基线(有上下限) + const baseQ = Math.min(0.95, Math.max(0.05, ci2.qCommit ?? 0.55)); + const qReviewAdjStrength = ci2.dynamic?.qReviewAdjStrength ?? 0.25; // 评审覆盖对 q 的影响强度 + const qCollabAdjStrength = ci2.dynamic?.qCollabAdjStrength ?? 0.20; // 协作度对 q 的影响强度 + const sizeAdjStrength = ci2.dynamic?.sizeAdjStrength ?? 0.0; // 规模对 q 的调整强度 + const sizeL1 = ci2.dynamic?.sizeLineL1 ?? 400; // 规模阈值参数 + const sizeL2 = ci2.dynamic?.sizeLineL2 ?? 4000; + + // sizeFactor: 如果行数超过阈值,则根据比例降低 commit 可领取比例 + let sizeFactor = 1.0; + if (totalLines > sizeL1) { + const span = Math.max(1, sizeL2 - sizeL1); + const ratio = Math.min(1, (totalLines - sizeL1) / span); + sizeFactor = 1 - sizeAdjStrength * ratio; + } + + // 合并影响因子得到 qDynamic(最终 commit 可领取比例) + let qDynamic = baseQ * (1 - qReviewAdjStrength * reviewCoverage) * (1 - qCollabAdjStrength * collaborativeFactor) * sizeFactor; + const qMin = ci2.dynamic?.qMin ?? 0.25; + const qMax = ci2.dynamic?.qMax ?? Math.max(baseQ, 0.6); + // 限定在 [qMin, qMax] 内以防止极端值 + qDynamic = Math.min(qMax, Math.max(qMin, qDynamic)); + + // 按比例拆分为可领取 (commitClaimable) 与 review 管理 (reviewMediated) + let commitClaimable = codeImpactV2Value * qDynamic; + let reviewMediated = codeImpactV2Value * (1 - qDynamic); + let penaltyApplied = false; + + // 如果根本没有评审者,则对 review 部分做衰减/惩罚,以避免无评审的 PR 获得不合理的 review 价值 + if (!hasReview && reviewMediated > 0) { + const selfFactor = ci2.dynamic?.selfReviewFactor ?? 0.0; // 给作者的一小部分补偿 + const decay = ci2.dynamic?.unreviewedDecay ?? 0.5; // 剩余部分按 decay 衰减 + const selfAlloc = reviewMediated * selfFactor; + const remaining = reviewMediated - selfAlloc; + const afterDecay = remaining * (1 - decay); + reviewMediated = selfAlloc + afterDecay; + penaltyApplied = true; + } + + codeImpactSplit = { commitClaimable, reviewMediated, penaltyApplied, qDynamic, reviewCoverage, collaborativeFactor, sizeFactor } as any; + + // 准备返回的 Map(可能为 undefined,当 pools 未开启时) + let poolCommitAllocMap: Map | undefined; + let poolAssuranceAllocMap: Map | undefined; + let poolDiversityBoostApplied = false; + let poolDebugRecord: any | undefined; + + // ------------------------- + // 4) Pools 相关分配(可选) + // 只有当 poolsCfg.enabled && ci2.enabled 且 codeImpactV2Value>0 时才进行 + // 如果 commit 占比(在拆分后)明显超过阈值,则把超额按配置比例挪到 + // ------------------------- + if (poolsCfg?.enabled && ci2.enabled && codeImpactV2Value > 0) { + // --- reallocateExcess: 当 commit 比例过高时,把一部分重分配给 review 池 --- + if (poolsCfg.reallocateExcess?.enabled) { + const commitClaimableOrig = codeImpactSplit.commitClaimable; + const reviewMediatedOrig = codeImpactSplit.reviewMediated; + const totalCI = commitClaimableOrig + reviewMediatedOrig; + if (totalCI > 0) { + const commitShareCI = commitClaimableOrig / totalCI; + const thr = poolsCfg.reallocateExcess.commitShareThreshold ?? 0.6; // 阈值 + if (commitShareCI > thr) { + // 超额部分按配置比例 reallocateRatio 做重分配 + const excess = commitShareCI - thr; + let reallocPortion = excess * (poolsCfg.reallocateExcess.reallocateRatio ?? 0.5); + if (reallocPortion > 0) { + // 可选:按 reviewer 数放大 reallocation(有更多 reviewer 时更值得分配) + if (poolsCfg.reallocateExcess.scaleByReviewers) { + const reviewersSet = new Set((pr.activities || []).filter((a: any) => (a.reviewCount || 0) > 0 || (a.reviewCommentCount || 0) > 0).map((a: any) => a.actorId)); + if (reviewersSet.size > 0) { + reallocPortion *= Math.min(2.0, Math.sqrt(reviewersSet.size)); + } + } + // 兜底最大重分配不超过 commitClaimable 的 50% + const maxRealloc = commitClaimableOrig * 0.5; + const reallocValue = Math.min(maxRealloc, totalCI * reallocPortion); + if (reallocValue > 0) { + // 将值从 commitClaimable 转移到 reviewMediated + codeImpactSplit.commitClaimable -= reallocValue; + codeImpactSplit.reviewMediated += reallocValue; + (codeImpactSplit as any).reallocated = reallocValue; + (codeImpactSplit as any).reallocateTriggerShare = commitShareCI; + } + } + } + } + } + + // --- commit shares gamma 分配: 把 commitClaimable 按人分配,使用 gamma 幂变换抑制极端占比 --- + const gamma = poolsCfg.gammaCommit ?? 0.7; + const commitShares: { actorId: any; rawShare: number; gammaShare: number }[] = []; + let gammaDenom = 0; + // 把 commitClaimable 按每个 committer 的 gammaShare 分配,gammaShare 由 rawShare^{gamma} 得到,然后归一。 + for (const act of pr.activities || []) { + const c = act.commitCount || 0; + // 仅对有 commit 的参与者进行分配;并需要 totalCommitsRaw>0 + if (c > 0 && totalCommitsRaw > 0) { + const raw = c / totalCommitsRaw; // 原始占比 + const gs = Math.pow(raw, gamma); // gamma 决定抑制/放大头部 + commitShares.push({ actorId: act.actorId, rawShare: raw, gammaShare: gs }); + gammaDenom += gs; + } + } + if (gammaDenom <= 0) gammaDenom = 1; // 兜底,避免除 0 + poolCommitAllocMap = new Map(commitShares.map(cs => [cs.actorId, (cs.gammaShare / gammaDenom) * codeImpactSplit.commitClaimable])); + + // --- assurance pool: 把 reviewMediated 分配给 reviewer 的努力 --- + const hasReviewers = (pr.activities || []).some((a: any) => (a.reviewCount || 0) > 0 || (a.reviewCommentCount || 0) > 0); + const assuranceTotal = codeImpactSplit.reviewMediated; + if (assuranceTotal > 0) { + if (hasReviewers) { + // 根据 reviewer 的“努力”把 assuranceTotal 分配给 reviewer + // 计算每个 reviewer 的 effort:log1p(commentCount)*commentCoeff + reviewCount*reviewCoeff,然后取幂 exp + const rc = poolsCfg.reviewEffort || {}; + const cCoeff = rc.commentCoeff ?? 1.0; + const rCoeff = rc.reviewCoeff ?? 0.8; + const exp = rc.exp ?? 0.9; + const efforts: { actorId: any; effort: number }[] = []; + for (const act of pr.activities || []) { + const rcCnt = act.reviewCommentCount || 0; + const rvCnt = act.reviewCount || 0; + if (rcCnt > 0 || rvCnt > 0) { + const effBase = Math.log1p(rcCnt) * cCoeff + rvCnt * rCoeff; + const eff = effBase > 0 ? Math.pow(effBase, exp) : 0; + if (eff > 0) efforts.push({ actorId: act.actorId, effort: eff }); + } + } + const effSum = efforts.reduce((s, x) => s + x.effort, 0) || 1; // 兜底 + poolAssuranceAllocMap = new Map(efforts.map(e => [e.actorId, (e.effort / effSum) * assuranceTotal])); + } else { + // 没有 reviewer:把 assuranceTotal 的一部分给作者作为 selfAlloc,其余作为 pending(并可能衰减) + const ar = poolsCfg.assuranceRelease || {}; + const selfFactor = ar.selfReviewFactor ?? 0.2; + const pendingDecay = ar.pendingDecay ?? 0.6; + const selfAlloc = assuranceTotal * selfFactor; + const pendingRaw = assuranceTotal - selfAlloc; + const pendingAfterDecay = pendingRaw * (1 - pendingDecay); + poolAssuranceAllocMap = new Map(); + poolAssuranceAllocMap.set(pr.authorId, selfAlloc); + if (this.debugOutputsEnabled) this.pendingAssurancePool.push({ + prId: pr.id, + title: pr.title?.slice(0, 120), + pendingRaw, + pendingAfterDecay, + selfAlloc, + decay: pendingDecay, + timestamp: Date.now() + }); + } + } + + // --- diversity boost: 若参与者和 reviewer 足够则标记潜在 boost --- + // 多人参与与多 reviewer 往往表明质量/协作更高(例如广泛讨论、多个视角),给这些 PR 更高传播权重可促进社区健康。 + const participants2 = new Set((pr.activities || []).map((a: any) => a.actorId)); + const reviewers2 = new Set((pr.activities || []).filter((a: any) => (a.reviewCount || 0) > 0 || (a.reviewCommentCount || 0) > 0).map((a: any) => a.actorId)); + const dv = poolsCfg.diversity || {}; + if (participants2.size >= (dv.minParticipants ?? 3) && reviewers2.size >= (dv.minReviewers ?? 1)) { + poolDiversityBoostApplied = true; + } + + // --- debug 记录:把本 PR 在 pools 中的分配详情写入结构化日志,便于离线分析 --- + if (poolsCfg.debug && this.debugOutputsEnabled) { + poolDebugRecord = { + prId: pr.id, + title: pr.title?.slice(0, 120), + codeImpact: codeImpactV2Value, + commitClaimable: codeImpactSplit.commitClaimable, + reviewMediated: codeImpactSplit.reviewMediated, + gamma, + commitAlloc: poolCommitAllocMap ? Array.from(poolCommitAllocMap.entries()).map(([uid, v]) => ({ actorId: uid, value: v })) : [], + assuranceAlloc: poolAssuranceAllocMap ? Array.from(poolAssuranceAllocMap.entries()).map(([uid, v]) => ({ actorId: uid, value: v })) : [], + diversityBoost: poolDiversityBoostApplied, + participants: participants2.size, + reviewers: reviewers2.size, + timestamp: Date.now() + }; + if (this.debugOutputsEnabled) this.prValuePoolsDebug.push(poolDebugRecord); + } + } + + // 返回结果对象(包含分配 map 及拆分元信息) + return { + codeLineWeight, + codeFileWeight, + codeImpactV2Value, + poolCommitAllocMap, + poolAssuranceAllocMap, + poolDiversityBoostApplied, + poolDebugRecord, + codeImpactSplit + }; + } + + /** + * Channel balancing helper + * ------------------------- + * Purpose: + * - 将不同活动通道(open/comment/review/commit 等)的原始权重进行“收敛/平衡”,避免某一类通道在局部占比过高导致传播偏差。 + * + * Contract: + * - vec: 每个通道的非负数权重,例如 { open: x, comment: y, review: z, reviewComment: r, close: c, commit: m } + * - cb: channelBalancing 配置,包含 concaveExponent、additiveSmoothing、softMinShares、softMinStrength 等。 + * - opts: 可选调试元信息。若 opts.debugFlag 且 opts.debugEnabled 则会把中间数据推入内部调试数组。 + * + * Algorithm (step-by-step): + * 1) 归一化到概率分布 p + * 2) 对 p 施以 concave 指数 (p^exp) 来压缩大值、放大小值(exp<1 时呈凹形) + * 3) 可选的 additive smoothing:在每个分量上加上常数后再归一化,避免零值并给小通道“底气” + * 4) soft-min:对 open/comment 施加最小占比目标(通过 strength 混合),以保证这些低层次通道不会被完全淹没 + * 5) 将平衡后的概率分布放缩回原始总量,作为最终各通道的调整权重 + * + * Reasons / design notes: + * - 把各通道权重先归一化为概率分布,在概率空间做“凹形收缩 + 平滑 + soft-min 下限”调整,然后再把平衡后的概率映射回原始尺度;目的是抑制单一通道过度主导,同时给稀疏但重要的通道一点保障(open/comment 等) + * - concave exponent 控制了平衡强度,接近 1 则保持原状,较小的 exp 会让分布更均匀; + * - additive smoothing 对付极端稀疏的通道(例如 reviewComment 很少)是一个简单稳定的手段; + * - soft-min 是经验性修正,针对 open/comment 等对社区健康重要但往往量少的通道设置保证下限; + */ + private applyChannelBalancing(vec: { [k:string]: number }, cb: any, opts?: any) { + // keys 列表,用于多次遍历 + const keys = Object.keys(vec); + // originalSum: 原始总量(用于最后把概率映射回原始尺度),求所有通道权重之和 + const originalSum = Object.values(vec).reduce((s:any,v:any)=>s+v,0) || 1; + + // 1) normalize -> p: 把数值转为概率分布,避免 scale 影响后续操作 + // 把每个通道映射为 p[k] ∈ [0,1] 且 sum(p)=1 + const p: Record = {} as any; + for (const k of keys) p[k] = (vec as any)[k] / originalSum; + + // concave 指数,默认靠近 1(轻微均衡),小于 1 会更强烈地抑制大值 + const exp = cb.concaveExponent ?? 0.95; + + // 2) concave shrink: p^exp -> 这一步把大值压扁,小值抬高(当 exp < 1 时) + let denom = 0; + const pExp: Record = {} as any; + for (const k of keys) { + // 对每个 p[k] 做 Math.max(0, p[k]) 再取幂(防负,尽管 p 不应为负),累加 denom,用于后续归一化。 + pExp[k] = Math.pow(Math.max(0, p[k]), exp); + denom += pExp[k]; + } + if (denom === 0) denom = 1; // 防止全零情况 + + // pPrime 是 concave 之后的归一化概率分布 + const pPrime: Record = {} as any; + for (const k of keys) pPrime[k] = pExp[k] / denom; + + // 3) additive smoothing: 在每个分量上加常数并归一化,给稀疏通道基础权重,避免某些通道因数值过小而被完全压成 0;给稀疏通道“底气”,提高鲁棒性。 + const smooth = cb.additiveSmoothing ?? 0; + if (smooth > 0) { + for (const k of keys) pPrime[k] = pPrime[k] + smooth; + const sum2 = keys.reduce((s,k)=>s + (pPrime[k]||0), 0) || 1; + for (const k of keys) pPrime[k] /= sum2; + } + + // 4) soft min for open/comment: 给 open/comment 一个最小目标占比(soft),通过 strength 混合 + const softMin = cb.softMinShares || {}; + const strength = Math.max(0, Math.min(1, cb.softMinStrength ?? 0.5)); + for (const ch of ['open','comment']) { + const target = softMin[ch]; + if (target != null && target > 0 && (pPrime as any)[ch] < target) { + // 将该通道当前值与目标按 strength 混合 + (pPrime as any)[ch] = (pPrime as any)[ch] * (1 - strength) + target * strength; + } + } + + // final normalize: 确保 pPrime 是有效概率分布 + // 对 pPrime 做一次最终归一化(归一化前的 smoothing 或 soft-min 可能改变和),保证 sum(pPrime)=1,便于映射回原尺度且保持概率语义 + const sum3 = keys.reduce((s,k)=>s + (pPrime[k]||0), 0) || 1; + for (const k of keys) pPrime[k] = pPrime[k] / sum3; + + // map back to original scale: 使得各通道总和保持原始 originalSum + // 把处理后的概率 pPrime 乘以 originalSum 得到最终各通道的调整后权重(原始尺度);外部调用期望得到与原 vec 可比的值(用于边权、传播等);保持原始总量有助于“能量守恒”,避免整体传播量改变太多 + const out: any = {}; + for (const k of keys) out[k] = pPrime[k] * originalSum; + + // debug: 如果传入 opts 要记录中间量,则推入内部调试数组 + if (opts?.debugFlag) { + (this as any)._channelBalanceDebug = (this as any)._channelBalanceDebug || []; + if (opts?.debugEnabled) (this as any)._channelBalanceDebug.push({ + prId: opts.prId, + user: opts.user, + original: vec, + originalSum, + p, + concaveExp: exp, + afterConcave: pExp, + smoothed: smooth>0, + pFinal: pPrime, + softMinApplied: { open: softMin.open, comment: softMin.comment, strength }, + timestamp: Date.now() + }); + } + // 返回最终的 map(各通道的平衡后权重) + return out; + } + /** * 构建项目级协作网络图 * 包含四种节点类型:User, Repo, Issue, PullRequest @@ -151,7 +625,7 @@ export class ProjectOpenRankCalculator { } } - this.calculationStatus.totalNodes = this.graph.nodes.size; + this.calculationStatus.totalNodes = this.graph.nodes.size; // 标记孤立节点(无入无出边),并设置最低初始值下限 this.tagIsolatedNodes(); @@ -261,20 +735,33 @@ export class ProjectOpenRankCalculator { const issueNodeId = generateId(issue.platform, 'Issue', issue.id); const repoNodeId = generateId(issue.platform, 'Repo', issue.repoId); - // 方案2:以配置基线为准,构图阶段不再叠加表情初值,避免与后续优化重复 - const baseInitValue = this.config.project.issueInitValue; - const lastOpenrank = lastMonthOpenRank.get(issueNodeId) || 0; + // 直接基于Issue特征计算初始值(质量/重要性) + const baseInitValue = this.calculateIssueInitialValue(issue); + // 做初始值强化,得到最终的初始值 + const ab = this.weightingFramework.computeABValue(issue, baseInitValue); + // 收集解释 + if (this.debugOutputsEnabled) this.abExplain.push({ + type: 'Issue', + id: issue.id, + title: issue.title?.slice(0,120), + baseInitValue, + abBase: ab.baseValue, + enhancementMultiplier: ab.enhancementMultiplier, + finalInitValue: ab.finalValue, + explain: ab.explain + }); + const lastOpenrank = lastMonthOpenRank.get(issueNodeId) || 0; // 创建Issue节点 - nodeMap.set(issueNodeId, { + nodeMap.set(issueNodeId, { id: issueNodeId, type: 'Issue', platform: issue.platform, name: issue.title, - // 初始 openrank 仅保留历史衰减,后续优化阶段会覆盖为 retention*finalInit - openrank: lastOpenrank * this.config.project.attenuationFactor, + // 使用 AB 分层强化后最终值作为 initValue 的质量基础,衰减历史值 + openrank: lastOpenrank * this.config.project.attenuationFactor, lastOpenrank: lastOpenrank, - initValue: baseInitValue, + initValue: ab.finalValue, retentionFactor: this.config.project.issueRetentionFactor, converged: false, metadata: { @@ -295,12 +782,12 @@ export class ProjectOpenRankCalculator { type: 'belong', }); - // 创建Repo -> Issue 的反向属于边 (平均分配给所有Issue) + // 创建Repo -> Issue 的反向属于边 (固定权重,仅表示归属关系) const reverseBelongEdgeId = `${repoNodeId}-reverse_belong-${issueNodeId}`; edgeMap.set(reverseBelongEdgeId, { source: repoNodeId, target: issueNodeId, - weight: 1.0, // 权重将在后期标准化 + weight: 1.0, // 固定权重,仅表示归属关系 type: 'reverse_belong', }); @@ -323,10 +810,21 @@ export class ProjectOpenRankCalculator { const prNodeId = generateId(pr.platform, 'PullRequest', pr.id); const repoNodeId = generateId(pr.platform, 'Repo', pr.repoId); - // 方案2:以配置基线为准,不叠加表情;合并与否采用不同基线 - let prInitValue: number = pr.state === 'merged' - ? this.config.project.prMergedInitValue - : this.config.project.prNotMergedInitValue; + // 直接基于PR特征计算初始值(质量/重要性) + const prInitValue = this.calculatePRInitialValue(pr); + // 同理做初始值增强,增强后作为最终的初始值 + const ab = this.weightingFramework.computeABValue(pr, prInitValue); + // 收集解释 + if (this.debugOutputsEnabled) this.abExplain.push({ + type: 'PullRequest', + id: pr.id, + title: pr.title?.slice(0,120), + baseInitValue: prInitValue, + abBase: ab.baseValue, + enhancementMultiplier: ab.enhancementMultiplier, + finalInitValue: ab.finalValue, + explain: ab.explain + }); const lastOpenrank = lastMonthOpenRank.get(prNodeId) || 0; @@ -336,10 +834,9 @@ export class ProjectOpenRankCalculator { type: 'PullRequest', platform: pr.platform, name: pr.title, - // 初始 openrank 仅保留历史衰减,后续优化阶段会覆盖为 retention*finalInit - openrank: lastOpenrank * this.config.project.attenuationFactor, + openrank: lastOpenrank * this.config.project.attenuationFactor, lastOpenrank: lastOpenrank, - initValue: prInitValue, + initValue: ab.finalValue, retentionFactor: this.config.project.prRetentionFactor, converged: false, metadata: { @@ -363,12 +860,12 @@ export class ProjectOpenRankCalculator { type: 'belong', }); - // 创建Repo -> PR 的反向属于边 + // 创建Repo -> PR 的反向属于边 (固定权重,仅表示归属关系) const reverseBelongEdgeId = `${repoNodeId}-reverse_belong-${prNodeId}`; edgeMap.set(reverseBelongEdgeId, { source: repoNodeId, target: prNodeId, - weight: 1.0, // 权重将在后期标准化 + weight: 1.0, // 固定权重,仅表示归属关系 type: 'reverse_belong', }); @@ -379,6 +876,9 @@ export class ProjectOpenRankCalculator { /** * 创建用户-Issue的活动边 + * L1(特征):计算 issue 的影响力评分(impactScore),基于描述长度、链接数、讨论兴趣等; + * L2(拆分):把 impactScore 拆为 proposerClaimable(通常给提议者/作者)与 triageMediated(分配给评论/triage 的池),并处理未充分讨论的惩罚; + * L3(分配):基于评论/关闭等参与行为,把 triageMediated 分配到具体的参与者(排除作者),并处理 closure 奖励、diversity boost 与 debug 输出,最后把 activity / reverse_activity 边写入 edgeMap。 */ private createUserIssueActivityEdges( issue: IssueData, @@ -387,120 +887,266 @@ export class ProjectOpenRankCalculator { edgeMap: Map, lastMonthOpenRank: Map ): void { + // 读取配置 + const cfg: any = (this.config as any).projectActivityWeights?.issueImpact || (this.config as any).issueImpact; + const weights = this.config.projectActivityWeights; + const issueImpactCfg = cfg || { enabled: false }; + const authorIdStr = issue.authorId?.toString?.(); - for (const activity of issue.activities) { - const userNodeId = generateId(issue.platform, 'User', activity.actorId); - - // 创建用户节点 (如果不存在) + // 准备参与者节点 + // 遍历 issue.activities(参与者记录),为每个参与者生成 User 节点 id;若 nodeMap 中不存在则创建节点并初始化 openrank、lastOpenrank、initValue、retentionFactor 等元数据 + for (const act of issue.activities) { + const userNodeId = generateId(issue.platform, 'User', act.actorId); if (!nodeMap.has(userNodeId)) { const lastOpenrank = lastMonthOpenRank.get(userNodeId) || 0; - nodeMap.set(userNodeId, { id: userNodeId, type: 'User', platform: issue.platform, - name: activity.actorLogin, + name: act.actorLogin, openrank: lastOpenrank * this.config.project.attenuationFactor, - lastOpenrank: lastOpenrank, + lastOpenrank, initValue: this.config.global.defaultInitValue, retentionFactor: this.config.project.developerRetentionFactor, converged: false, - metadata: { - actorId: activity.actorId, - actorLogin: activity.actorLogin, - }, + metadata: { actorId: act.actorId, actorLogin: act.actorLogin } }); } + } - // 计算该用户在该Issue上的活动权重 - // 反刷抑制:对评论数做亚线性变换 - const ag = this.config.projectActivityWeights.antiGaming || { enabled: false } as any; - const transform = (v: number, mode?: 'none'|'sqrt'|'log') => { - if (!mode || mode === 'none') return v; - const x = Math.max(0, v); - return mode === 'sqrt' ? Math.sqrt(x) : Math.log1p(x); - }; - const applyThreshold = (raw: number, thr: number|undefined, mode?: 'none'|'sqrt'|'log') => { - const v = Math.max(0, raw); - const t = Math.max(0, thr ?? 0); - if (!ag.enabled) return v; - if (v <= t) return v; // 前N条线性 - const remain = v - t; - return t + transform(remain, mode); - }; - const cap = (x: number, m?: number) => (m && m > 0 ? Math.min(x, m) : x); - const lt = ag.linearThresholds || {}; - const pc = ag.perItemCap || {}; + // ---- L1: 规模/兴趣度特征 ---- + // 初始化变量 + let impactScore = 0; let descNorm=0, linkNorm=0, interestNorm=0; + let totalIssueBase = 0; // 旧逻辑的总和,用于对比(不直接使用) + const ag = this.config.projectActivityWeights.antiGaming || { enabled: false } as any; + const lt = ag.linearThresholds || {}; + const pc = ag.perItemCap || {}; - const commentCountAdj = cap(applyThreshold(activity.commentCount, lt.comment, ag.commentTransform), pc.comment); + // 取 body 长度优先,否则用 title 长度来近似说明长度信息 + const titleLen = (issue.title||'').length; + const bodyChars = (issue as any).body ? ((issue as any).body as string).length : 0; + const descChars = bodyChars>0 ? bodyChars : titleLen; // 没有 body 用标题长度代理 + const descScale = issueImpactCfg?.desc?.lengthScale ?? 0.0008; + descNorm = Math.tanh(descScale * Math.log1p(descChars)); + + // 链接:若无结构化数据,尝试从 body 简单正则匹配 http(s);否则使用 linkedIssues 数量 + // 计 issue 中的外部链接或关联 PR 数,计算一个基于指数衰减的归一化数值 linkNorm ∈ [0,1)。 + let linkedItems = 0; + if ((issue as any).body) { + const m = ((issue as any).body as string).match(/https?:\/\//g); + linkedItems = m ? m.length : 0; + } + if ((issue as any).linkedPRs) linkedItems += ((issue as any).linkedPRs as any[])?.length || 0; + const linkK = issueImpactCfg?.link?.k ?? 1.2; + linkNorm = 1 - Math.exp(-(linkedItems / Math.max(0.01, linkK))); + if (issueImpactCfg?.link?.maxClamp != null) linkNorm = Math.min(linkNorm, issueImpactCfg.link.maxClamp); + + // 兴趣:独立评论参与者(除作者)数量 + // 用不同的非作者评论者数量衡量讨论的广泛性(兴趣/热度);做 log1p 缩放并按 logK 归一 + const participantIds = new Set(issue.activities.map(a=>a.actorId)); + const distinctCommenters = new Set(issue.activities.filter(a=>a.commentCount>0 && a.actorId!==issue.authorId).map(a=>a.actorId)).size; + const logK = issueImpactCfg?.interest?.logK ?? Math.log(6); + interestNorm = Math.min(1, Math.log1p(distinctCommenters)/Math.max(0.0001, logK)); + + // 按照配置权重把三个正规化特征合并,得出 impactScore(基础价值),impactScore 是一个相对值,后续会拆分并分配给参与者 + const wDesc = issueImpactCfg?.weights?.desc ?? 0.4; + const wLink = issueImpactCfg?.weights?.link ?? 0.3; + const wInterest = issueImpactCfg?.weights?.interest ?? 0.3; + impactScore = (wDesc*descNorm + wLink*linkNorm + wInterest*interestNorm) * (issueImpactCfg?.baseWeight ?? 1.0); + + // ---- L2: proposerClaimable 与 triageMediated 拆分 ---- + + // 把 impactScore 按比例 pProposer 切分成作者可领取部分(proposerClaimable)和需 triage 的部分(triageMediated) + // 作者应得到一部分即时奖励,但一部分价值要留给社区 triage/审查。若讨论不足,triage 部分也应被打折以防止作者在无审查情况下收取过多。 + const pProposer = issueImpactCfg?.pProposer ?? 0.6; + let proposerClaimable = impactScore * pProposer; + let triageMediated = impactScore - proposerClaimable; + // 讨论充分性:总评论数(除作者 openCount) + const totalComments = issue.activities.reduce((s,a)=> s + a.commentCount,0); + const minDiscuss = issueImpactCfg?.minDiscussionComments ?? 2; + let untriagedPenaltyApplied = false; + // 若总评论数不足(未充分讨论),则对 triageMediated 做衰减(penalty) + if (totalComments < minDiscuss) { + triageMediated *= (issueImpactCfg?.untriagedPenalty ?? 0.5); + untriagedPenaltyApplied = true; + } - const userActivityWeight = this.calculateActivityWeight( - activity.openCount, - commentCountAdj, - 0, // Issue没有review - activity.closeCount - ); + // ---- L3: 多样性 & 关闭奖励 ---- + // 多人参与通常表示协作质量更高,给 triage 池适度加成鼓励更多人参与 + let diversityApplied = false; + if (participantIds.size >= (issueImpactCfg?.diversityBoost?.minParticipants ?? 4)) { + triageMediated *= (issueImpactCfg?.diversityBoost?.boost ?? 1.08); + diversityApplied = true; + } - if (userActivityWeight > 0) { - // 使用简化的权重计算逻辑,直接应用配置系数 - const activityRatio = this.config.projectActivityWeights.activityRatio || 2.0; - // 质量乘子(作用于协作单元→用户活动边) - const qualityMul = computeIssueQualityMultiplier(issue, this.config); - // 上月OR轻量影响 - const poiCfg = this.config.projectActivityWeights.priorOpenRankInfluence || { enabled: false } as any; - const lastUserOR = lastMonthOpenRank.get(userNodeId) || 0; - const priorMul = poiCfg.enabled ? (1 + ((poiCfg.gamma ?? 0.08) * Math.tanh(lastUserOR / (poiCfg.scale ?? 5.0)))) : 1.0; - // 分项原始权重(便于观察) - const weights = this.config.projectActivityWeights; - const wOpenRaw = activity.openCount * weights.open; - const wCommentRaw = activity.commentCount * weights.comment; - const wCloseRaw = activity.closeCount * weights.close; - - // Issue → User 的活动边 (协作单元→用户) - const issueToUserEdgeId = `${issueNodeId}-activity-${userNodeId}`; - const issueToUserWeight = userActivityWeight * activityRatio * (qualityMul || 1.0) * priorMul; - - edgeMap.set(issueToUserEdgeId, { - source: issueNodeId, - target: userNodeId, - weight: issueToUserWeight, - type: 'activity', - activityDetails: { - openWeight: wOpenRaw, - commentWeight: wCommentRaw, - reviewWeight: 0, - closeWeight: wCloseRaw, - eventSource: 'collaboration', - roles: { - author: activity.actorId?.toString?.() === issue.authorId?.toString?.(), - commenter: (activity.commentCount || 0) > 0, - }, - } + // 关闭奖励:条件匹配 + // 当 Issue 关闭且满足条件时(例如有足够讨论、或有 linked PR,或 requireLinked 为 false),向执行关闭的人发放 closure 奖励(baseClosure 的若干比例)。 + let closureBonus = 0; let closureGrantedFull = false; let closureActorId: number|undefined; + if (issueImpactCfg?.closureBonus?.enabled && issue.state === 'closed' && issue.closedAt) { + // 简化:没有 linkedPR 数据时若 requireLinkedPR=true 则不发放 full base,可选发放低活动补偿 + const hasLinked = (issue as any).linkedPRs ? ((issue as any).linkedPRs as any[]).length>0 : false; + const requireLinked = issueImpactCfg.closureBonus.requireLinkedPR !== false; + const baseClosure = issueImpactCfg.closureBonus.base ?? 0.25; + const minC = issueImpactCfg.closureBonus.minComments ?? 2; + const lowActivityScale = issueImpactCfg.closureBonus.lowActivityScale ?? 0.4; + const closer = issue.activities.find(a=> a.closeCount>0); + if (closer) closureActorId = closer.actorId; + const commentSufficient = totalComments >= minC; + if ((!requireLinked || hasLinked) && commentSufficient) { + closureBonus = baseClosure; + closureGrantedFull = true; + } else if ((!requireLinked || hasLinked) && !commentSufficient) { + closureBonus = baseClosure * 0.5; + } else if (requireLinked && !hasLinked && commentSufficient) { + closureBonus = baseClosure * lowActivityScale; // 缺少链接但讨论充分,给予低活动比例 + } + } + + // ---- 分配 triageMediated 给非作者参与者 (按评论权重 + 关闭动作) ---- + interface ParticipantAlloc { actorId:number; login:string; weight:number; openCount:number; commentCount:number; commentAdj:number; closeCount:number; isAuthor:boolean; } + const participants: ParticipantAlloc[] = []; + for (const a of issue.activities) { + // 防止单人刷大量评论获得过多权重 + const commentAdj = this.applyAntiGaming(a.commentCount, lt.comment, ag.commentTransform, pc.comment); + + // 分别按配置的权重把 open/comment/close 行为转为数值 + const wOpenRaw = a.openCount * weights.open; // 仅用于调试 + const wCommentRaw = commentAdj * weights.comment; + const wCloseRaw = a.closeCount * weights.close; + const baseW = wCommentRaw + wCloseRaw; // triage 主要基于评论 + 关闭 + const entry: ParticipantAlloc = { actorId: a.actorId, login: a.actorLogin, weight: baseW, openCount: a.openCount, commentCount: a.commentCount, commentAdj, closeCount: a.closeCount, isAuthor: a.actorId.toString() === authorIdStr }; + participants.push(entry); + totalIssueBase += (wOpenRaw + wCommentRaw + wCloseRaw); + // reverse_activity 边将在最终根据分配后创建 + // 记录 reverse_activity 阶段(仅做基础权重参考) + try { + if (this.debugOutputsEnabled) this.issueActivityDebugLogs.push({ + issueId: issue.id, issueTitle: issue.title?.slice(0,120), user: a.actorLogin, phase: 'pre_allocation', + openCount: a.openCount, commentCount: a.commentCount, commentAdj, closeCount: a.closeCount, + baseTriageWeight: baseW, isAuthor: entry.isAuthor, timestamp: Date.now() }); + } catch {} + } - // User → Issue 的反向活动边 (用户→协作单元) - const userToIssueEdgeId = `${userNodeId}-reverse_activity-${issueNodeId}`; - const reverseActivityRatio = this.config.projectActivityWeights.reverseActivityRatio || 0.15; - // 目标侧归一混合:对同一 Issue 的所有入边做目标归一的占比,与源归一混合 - let reverseWeight = userActivityWeight * reverseActivityRatio * priorMul; - const gsn = this.config.projectActivityWeights.goalSideNormalization; - if (gsn?.enabled && (gsn.edgeTypes || []).includes('reverse_activity')) { - // 先收集该目标的所有 pending reverse_activity 边的原始值 - const incomingRaw = (edgeMap as any)._tmpIncomingRaw || new Map(); - (edgeMap as any)._tmpIncomingRaw = incomingRaw; - const key = `${issueNodeId}::incoming_sum`; - incomingRaw.set(key, (incomingRaw.get(key) || 0) + reverseWeight); - // 暂存边,迭代结束后由 normalize 方法再统一处理;此处仅保留原值 - reverseWeight = reverseWeight; // 保持原值,稍后统一规范化 + // 分配 proposerClaimable:全部给作者(若作者存在) + const allocations = new Map(); + const authorEntry = participants.find(p=>p.isAuthor); + if (authorEntry) { + allocations.set(authorEntry.actorId, { share: proposerClaimable, proposer: true, triage: false, closure: false }); + } + + // triage 分配:排除作者(作者也可参与 triage?默认排除,避免双倍领取) + // A 方案 (assignee-aware): 若 Issue 指定了 assignees,则先把 triageMediated 的一部分 + // 分配给 assignees(可配置),剩余部分再分配给社区参与者。 + const assignCfg = (this.config as any).projectActivityWeights?.assignmentHandling || {}; + const issueAssigneeShare = assignCfg.issueAssigneeShare ?? 0.5; // 默认把一半 triage 分配给 assignees + const assignees = (issue.assignees || []).map(a => a.id); + + // 先把 assignee 部分分配出去(若存在 assignees) + if (assignees.length > 0 && triageMediated > 0 && issueAssigneeShare > 0) { + const assigneeAlloc = triageMediated * issueAssigneeShare; + triageMediated = Math.max(0, triageMediated - assigneeAlloc); + + // 优先按 assignee 在 participants 中的权重分配,若 assignee 未参与则均分给 assignees + const assigneeParticipants = participants.filter(p => assignees.includes(p.actorId) && !p.isAuthor && p.weight > 0); + if (assigneeParticipants.length > 0) { + const denomA = assigneeParticipants.reduce((s, p) => s + p.weight, 0) || 1; + for (const ap of assigneeParticipants) { + const val = assigneeAlloc * (ap.weight / denomA); + allocations.set(ap.actorId, { share: (allocations.get(ap.actorId)?.share || 0) + val, proposer: false, triage: true, closure: false }); } - edgeMap.set(userToIssueEdgeId, { - source: userNodeId, - target: issueNodeId, - weight: reverseWeight, - type: 'reverse_activity', - }); + } else { + // assignees 不在 participants:均分给 assignees(可能需要创建对应 user 节点 later) + const per = assigneeAlloc / assignees.length; + for (const aid of assignees) { + allocations.set(aid, { share: (allocations.get(aid)?.share || 0) + per, proposer: false, triage: true, closure: false }); + } + } + } + + // triage 剩余部分按原逻辑分配给非作者且非 assignee 的 triageTargets + const triageTargets = participants.filter(p => !p.isAuthor && p.weight > 0 && !assignees.includes(p.actorId)); + const triageDenom = triageTargets.reduce((s, p) => s + p.weight, 0); + if (triageDenom > 0 && triageMediated > 0) { + for (const p of triageTargets) { + const val = triageMediated * (p.weight / triageDenom); + allocations.set(p.actorId, { share: (allocations.get(p.actorId)?.share || 0) + val, proposer: false, triage: true, closure: false }); } } + + // closure 奖励,把 closure 奖金加入到执行 close 动作的 actor(closer),可能是作者或其他人。 + if (closureBonus>0 && closureActorId) { + const prev = allocations.get(closureActorId); + if (prev) prev.share += closureBonus, prev.closure = true; else allocations.set(closureActorId, { share: closureBonus, proposer:false, triage:false, closure:true }); + } + + // 写入调试记录 + if (issueImpactCfg?.debug) { + if (this.debugOutputsEnabled) this.issueValuePoolsDebug.push({ + issueId: issue.id, + title: issue.title?.slice(0,120), + descChars, linkedItems, distinctCommenters, + descNorm: Number(descNorm.toFixed(4)), linkNorm: Number(linkNorm.toFixed(4)), interestNorm: Number(interestNorm.toFixed(4)), + impactScore: Number(impactScore.toFixed(4)), + proposerClaimable: Number(proposerClaimable.toFixed(4)), + triageMediated: Number(triageMediated.toFixed(4)), + diversityApplied, untriagedPenaltyApplied, + closureBonus, closureGrantedFull, + allocations: Array.from(allocations.entries()).map(([actorId,v])=>({actorId, ...v})), + participantCount: participantIds.size, + totalComments, + timestamp: Date.now() + }); + } + + // 创建 activity 与 reverse_activity 边 + const activityRatio = this.config.projectActivityWeights.activityRatio || 1.0; + const reverseActivityRatio = this.config.projectActivityWeights.reverseActivityRatio || 0.15; + const gsn = this.config.projectActivityWeights.goalSideNormalization; + for (const [actorId, alloc] of allocations.entries()) { + const userNodeId = generateId(issue.platform, 'User', actorId); + const weightActivity = alloc.share * activityRatio; + edgeMap.set(`${issueNodeId}-activity-${userNodeId}`, { + source: issueNodeId, + target: userNodeId, + weight: weightActivity, + type: 'activity', + activityDetails: { + openWeight: 0, // 已在分层中聚合,不再细拆;可后续扩展 + commentWeight: 0, + reviewWeight: 0, + closeWeight: 0, + commitWeight: 0, + eventSource: 'collaboration', + assignmentType: issue.assignmentType || 'voluntary', + roles: { + author: actorId.toString()===authorIdStr, + commenter: (allocations.get(actorId)?.triage) || false + } + } + }); + let reverseWeight = alloc.share * reverseActivityRatio; // 使用未乘 activityRatio 的份额 + if (gsn?.enabled && (gsn.edgeTypes || []).includes('reverse_activity')) { + const incomingRaw = (edgeMap as any)._tmpIncomingRaw || new Map(); + (edgeMap as any)._tmpIncomingRaw = incomingRaw; + const key = `${issueNodeId}::incoming_sum`; + incomingRaw.set(key, (incomingRaw.get(key) || 0) + reverseWeight); + } + edgeMap.set(`${userNodeId}-reverse_activity-${issueNodeId}`, { + source: userNodeId, + target: issueNodeId, + weight: reverseWeight, + type: 'reverse_activity' + }); + // 调试:最终 activity 边 + try { + if (this.debugOutputsEnabled) this.issueActivityDebugLogs.push({ + issueId: issue.id, issueTitle: issue.title?.slice(0,120), user: nodeMap.get(userNodeId)?.name, phase: 'activity_final', + share: alloc.share, weightActivity, reverseWeight, proposer: alloc.proposer, triage: alloc.triage, closure: alloc.closure, + timestamp: Date.now() + }); + } catch {} + } } /** @@ -538,14 +1184,99 @@ export class ProjectOpenRankCalculator { edgeMap: Map, lastMonthOpenRank: Map ): void { + // 统计:PR 内的总 commit 数与 review comment 数,后续按占比分配 + const totalCommitsRaw = (pr.activities || []).reduce((s, a: any) => s + (a.commitCount || 0), 0); + const totalReviewCommentsRaw = (pr.activities || []).reduce((s, a: any) => s + (a.reviewCommentCount || 0), 0); + + // 缓存配置片段,避免在活动循环中重复 resolve + // ci2: codeImpactV2 配置(f_L/f_F、dynamic 参数等) + const ci2Res = this.getCachedConfig([ + ['projectActivityWeights','codeImpactV2'], + ['codeImpactV2'], + ['project','codeImpactV2'] + ], { enabled: false }); + const ci2 = ci2Res.value; + + // poolsCfg: 池化(pools)策略配置(gamma、reallocateExcess、assuranceRelease 等) + const poolsRes = this.getCachedConfig([ + ['projectActivityWeights','codeImpactPools'], + ['codeImpactPools'], + ['project','codeImpactPools'] + ], { enabled: false }); + const poolsCfg = poolsRes.value; + + // cb: channel balancing 配置(concave、smoothing、softMin) + const cbRes = this.getCachedConfig([ + ['projectActivityWeights','channelBalancing'], + ['channelBalancing'], + ['project','channelBalancing'] + ], { enabled: false }); + const cb = cbRes.value; + + // rd: review dampening 配置(可选,后面动态读取) + const rdRes = this.getCachedConfig([ + ['projectActivityWeights','reviewDampening'], + ['reviewDampening'], + ['project','reviewDampening'] + ], { enabled: false }); + const rd = rdRes.value; + + // 预计算 PR 的代码规模度量(行数/文件数)与权重引用 + const weights = this.config.projectActivityWeights as any; + const totalLines = (pr.additions || 0) + (pr.deletions || 0); + const filesChanged = pr.filesChanged || 0; + + // 初始化 codeImpact 相关输出变量(后续会被 computeCodeImpactPools 填充) + let codeLineWeight = 0; + let codeFileWeight = 0; + let codeImpactV2Value = 0; + let codeImpactSplit = { commitClaimable: 0, reviewMediated: 0, penaltyApplied: false }; + + // 提取 commit scale/threshold 配置,用于回退路径(当 ci2.disabled 时) + let commitScale = (weights.commitNonLinearScaleAlt || weights.commitNonLinearScale || 'none') as any; + let lineThr = weights.commitLineThreshold || weights.commitScaleThreshold; + let fileThr = weights.commitFileThreshold || weights.commitScaleThreshold; + + // pools 相关输出(可能为 undefined) + let poolCommitAllocMap: Map | undefined; + let poolAssuranceAllocMap: Map | undefined; + let poolDiversityBoostApplied = false; + let poolDebugRecord: any | undefined; + + // 如果启用了 CodeImpact V2,则调用 computeCodeImpactPools,函数内部会完成 f(L)/f(F)、qDynamic、reallocate、gamma 分配、assurance 分配等 + if (ci2.enabled) { + const poolsResult = this.computeCodeImpactPools(pr, totalLines, filesChanged, totalCommitsRaw, totalReviewCommentsRaw, ci2, poolsCfg, weights); + // 将 helper 的输出映射到本地变量,便于后续按人分配 + codeLineWeight = poolsResult.codeLineWeight; + codeFileWeight = poolsResult.codeFileWeight; + codeImpactV2Value = poolsResult.codeImpactV2Value; + codeImpactSplit = poolsResult.codeImpactSplit; + poolCommitAllocMap = poolsResult.poolCommitAllocMap; + poolAssuranceAllocMap = poolsResult.poolAssuranceAllocMap; + poolDiversityBoostApplied = poolsResult.poolDiversityBoostApplied; + poolDebugRecord = poolsResult.poolDebugRecord; + } else { + // 回退到旧的基于非线性缩放的简单策略 + codeLineWeight = (weights.commitLine ? this.applyNonLinearScale(totalLines, commitScale, lineThr) * weights.commitLine : 0); + codeFileWeight = (weights.commitFile ? this.applyNonLinearScale(filesChanged, commitScale, fileThr) * weights.commitFile : 0); + } + // 评审规模对应的基础权重(用于非 ci2 情况下按 review 的代码影响分配) + const reviewLineFactor = weights.reviewLine ?? 0.015; + const reviewFileFactor = weights.reviewFile ?? 0.20; + const reviewScale = (weights.reviewNonLinearScaleAlt || weights.reviewNonLinearScale || commitScale) as any; + const reviewLineThr = weights.reviewLineThreshold || lineThr; + const reviewFileThr = weights.reviewFileThreshold || fileThr; + const reviewLineWeightTotal = reviewLineFactor ? this.applyNonLinearScale(totalLines, reviewScale, reviewLineThr) * reviewLineFactor : 0; + const reviewFileWeightTotal = reviewFileFactor ? this.applyNonLinearScale(filesChanged, reviewScale, reviewFileThr) * reviewFileFactor : 0; + + // 遍历每个参与者,构建 User 节点和 PR->User 以及 User->PR 边 for (const activity of pr.activities) { const userNodeId = generateId(pr.platform, 'User', activity.actorId); - - // 创建用户节点 (如果不存在) + + // 若用户节点不存在则创建(保留 lastMonthOpenRank 信息,使用项目默认初始值) if (!nodeMap.has(userNodeId)) { const lastOpenrank = lastMonthOpenRank.get(userNodeId) || 0; - nodeMap.set(userNodeId, { id: userNodeId, type: 'User', @@ -563,44 +1294,53 @@ export class ProjectOpenRankCalculator { }); } - // 计算该用户在该PR上的活动权重 - // 反刷抑制:对评论/提交数做亚线性变换 - const ag = this.config.projectActivityWeights.antiGaming || { enabled: false } as any; - const transform = (v: number, mode?: 'none'|'sqrt'|'log') => { - if (!mode || mode === 'none') return v; - const x = Math.max(0, v); - return mode === 'sqrt' ? Math.sqrt(x) : Math.log1p(x); - }; - const applyThreshold = (raw: number, thr: number|undefined, mode?: 'none'|'sqrt'|'log') => { - const v = Math.max(0, raw); - const t = Math.max(0, thr ?? 0); - if (!ag.enabled) return v; - if (v <= t) return v; - const remain = v - t; - return t + transform(remain, mode); - }; - const cap = (x: number, m?: number) => (m && m > 0 ? Math.min(x, m) : x); - const lt = ag.linearThresholds || {}; - const pc = ag.perItemCap || {}; + // ============================= + // 计算单个用户在该 PR 上的活动权重 + // 包含:anti-gaming 调整、commit 占比计算(以及 gamma 调整)、最终按类型合并的权重 + // ============================= + + // anti-gaming 配置(用于对提交/评论数做阈值/非线性/上限处理) + const ag = this.config.projectActivityWeights.antiGaming || { enabled: false } as any; + const lt = ag.linearThresholds || {}; + const pc = ag.perItemCap || {}; + + // 对各项计数应用 anti-gaming(亚线性转化 + 单条 cap) + const commentCountAdj = this.applyAntiGaming(activity.commentCount, lt.comment, ag.commentTransform, pc.comment); + const reviewCommentCountAdj = this.applyAntiGaming(activity.reviewCommentCount || 0, lt.reviewComment, ag.commentTransform, pc.reviewComment); + const commitCountAdj = this.applyAntiGaming(activity.commitCount || 0, lt.commit, ag.commitTransform, pc.commit); - const commentCountAdj = cap(applyThreshold(activity.commentCount, lt.comment, ag.commentTransform), pc.comment); - const reviewCommentCountAdj = cap(applyThreshold(activity.reviewCommentCount || 0, lt.reviewComment, ag.commentTransform), pc.reviewComment); - const commitCountAdj = cap(applyThreshold(activity.commitCount || 0, lt.commit, ag.commitTransform), pc.commit); + // 计算提交者在 PR 中的提交占比(用于把代码规模权重分配给具体提交者) + let commitShare = (activity.commitCount || 0) > 0 ? (activity.commitCount || 0) / Math.max(1, totalCommitsRaw) : 0; + // 如果启用了 ci2.dynamic.commitShareGamma,则对 commit 占比做幂变换并归一(抑制极端单人占比) + if (ci2.enabled && (ci2.dynamic?.commitShareGamma ?? 1) < 0.999 && totalCommitsRaw > 0) { + const gamma = ci2.dynamic.commitShareGamma; + if (!(pr as any)._commitGammaMap) { + // 计算并缓存该 PR 的 gamma 分配 map,避免在循环中重复计算 + (pr as any)._commitGammaMap = this.computeCommitGammaMap(pr, totalCommitsRaw, gamma); + } + const gm = (pr as any)._commitGammaMap as Map; + if (gm?.has(activity.actorId)) commitShare = gm.get(activity.actorId)!; + } + + // 将各种计数与 commitShare 传入 calculateActivityWeight 以得到初始的 userActivityWeight(未含 role/钳制) const userActivityWeight = this.calculateActivityWeight( activity.openCount, commentCountAdj, activity.reviewCount, activity.closeCount, commitCountAdj, - reviewCommentCountAdj + reviewCommentCountAdj, + { additions: pr.additions, deletions: pr.deletions, filesChanged: pr.filesChanged }, + commitShare ); + // 若用户对该 PR 完全无贡献则跳过 if (userActivityWeight > 0) { const weights = this.config.projectActivityWeights; const activityRatio = weights.activityRatio || 2.0; - // 贡献类型倍数(可选配置,默认偏保守) + // 贡献类型倍数:用于微调 open/comment/review/close/commit 在最终合并中的相对权重 const ctm = weights.contributionTypeMultipliers || {}; const mOpen = ctm.open ?? 1.0; const mComment = ctm.comment ?? 0.9; @@ -608,24 +1348,189 @@ export class ProjectOpenRankCalculator { const mClose = ctm.close ?? 1.0; const mCommit = ctm.commit ?? 1.05; - // 分项原始权重(不含质量乘子) + // 按类型计算原始分量值(未应用类型倍数前) const wOpenRaw = activity.openCount * weights.open; - const wCommentRaw = activity.commentCount * weights.comment; - const wReviewRaw = (activity.reviewCount || 0) * weights.review; - const reviewCommentWeight = (weights as any).reviewComment ?? weights.comment; - const wReviewCommentRaw = (activity.reviewCommentCount || 0) * reviewCommentWeight; + let wCommentRaw = activity.commentCount * weights.comment; + const wReviewRaw = (activity.reviewCount || 0) * weights.review; + const reviewCommentWeight = (weights as any).reviewComment ?? weights.comment; + const wReviewCommentRaw = (activity.reviewCommentCount || 0) * reviewCommentWeight; const wCloseRaw = activity.closeCount * weights.close; - const wCommitRaw = (activity.commitCount || 0) * (weights as any).commit; + + // ===== commit 部分:如果启用 ci2,则使用 pool 分配/claimable,否则用简单的 codeScale * commitShare ===== + let wCommitRaw: number; + let reviewEffortBonusV2 = 0; // 若 pools 分配出 review bonus,则放到这里 + if (ci2.enabled && codeImpactV2Value > 0) { + // 若 pools 分配存在(poolCommitAllocMap),使用它作为 commit 的原始权重 + if (poolCommitAllocMap) { + wCommitRaw = poolCommitAllocMap.get(activity.actorId) || 0; + } else { + const commitClaimable = codeImpactSplit.commitClaimable; + wCommitRaw = commitClaimable * commitShare; + } + // review 努力奖励(若 pool 存在则使用 pool,否则用 reviewComment 占比近似) + if (poolAssuranceAllocMap) { + reviewEffortBonusV2 = poolAssuranceAllocMap.get(activity.actorId) || 0; + } else { + const totalRC = Math.max(1, totalReviewCommentsRaw); + const reviewCommentShare = (activity.reviewCommentCount || 0) / totalRC; + const reCfg = ci2.reviewEffort || {}; + const wRC = reCfg.reviewComment ?? 0.5; + const wRL = reCfg.lineTouched ?? 0.3; + const wRF = reCfg.fileTouched ?? 0.2; + const denom = wRC + wRL + wRF || 1; + const effortShare = reviewCommentShare * (wRC + wRL + wRF) / denom; // 近似 + reviewEffortBonusV2 = codeImpactSplit.reviewMediated * effortShare; + } + } else { + const codeScaleTotal = codeLineWeight + codeFileWeight; + wCommitRaw = codeScaleTotal * commitShare; + } // 应用类型倍数 let wOpen = wOpenRaw * mOpen; let wComment = wCommentRaw * mComment; - let wReview = wReviewRaw * mReview; - let wReviewComment = wReviewCommentRaw * (ctm.comment ?? 1.0); + + // ===== Comment 分层处理:把 comment 拆为 author-assist 与 mediated 两部分,并应用 shallow filter、gamma、diversity 等 ===== + let commentAssist = 0; + let commentMediated = 0; + const commentCfg: any = (this.config as any).projectActivityWeights.commentImpact || (this.config as any).commentImpact; + if (commentCfg?.enabled && wComment > 0) { + const totalCommentsAll = (pr.activities||[]).reduce((s,a)=> s + a.commentCount,0); + const distinctCommenters = new Set((pr.activities||[]).filter(a=>a.commentCount>0).map(a=>a.actorId)).size; + const isAuthorLocal = activity.actorId?.toString?.() === pr.authorId?.toString?.(); + + // shallowFilter: 当评论数极多时,对每条评论的边际贡献做线性衰减 + let shallowScale = 1.0; + if (commentCfg.shallowFilter && totalCommentsAll > (commentCfg.shallowFilter.decayStart ?? 20)) { + const start = commentCfg.shallowFilter.decayStart ?? 20; + const maxN = commentCfg.shallowFilter.maxPerIssue ?? 30; + const tailScale = commentCfg.shallowFilter.tailScale ?? 0.5; + const span = Math.max(1, maxN - start); + const over = Math.min(maxN, totalCommentsAll) - start; + if (over > 0) { + const ratio = Math.min(1, over / span); + shallowScale = 1 - (1 - tailScale) * ratio; + } + } + + const pAssist = commentCfg.pAssist ?? 0.7; + if (isAuthorLocal) { + // 作者的 comment 倾向作为 assist(帮助回答/澄清),按 pAssist 分配 + commentAssist = wComment * pAssist * shallowScale; + commentMediated = wComment * (1 - pAssist) * shallowScale; + } else { + // 非作者主要作为讨论者 + commentMediated = wComment * shallowScale; + } + + // gammaAssist: 对评论贡献按评论数做凹性调整,避免少数人占比过高 + if ((commentCfg.gammaAssist ?? 1) < 0.999 && totalCommentsAll > 0 && activity.commentCount > 0) { + const gamma = commentCfg.gammaAssist; + if (!(pr as any)._commentGammaAlloc) { + let gammaSum = 0; const arr: any[] = []; + for (const a of pr.activities||[]) { + if (a.commentCount>0) { const share = a.commentCount/totalCommentsAll; const g = Math.pow(share, gamma); gammaSum += g; arr.push([a.actorId,g]); } + } + (pr as any)._commentGammaAlloc = { sum: gammaSum, map: new Map(arr) }; + } + const cg = (pr as any)._commentGammaAlloc; + const gShare = cg.map.get(activity.actorId) / Math.max(1e-9, cg.sum); + if (!isAuthorLocal) { + const rawShare = activity.commentCount / totalCommentsAll; + if (rawShare > 0) commentMediated = commentMediated * (gShare / rawShare); + } + } + + // 多样性加成(若不同评论者足够多) + let diversityApplied = false; + if (distinctCommenters >= (commentCfg?.diversityBoost?.minDistinctCommenters ?? 5)) { + commentMediated *= (commentCfg?.diversityBoost?.boost ?? 1.05); diversityApplied = true; + } + + // 最小影响过滤:太小的片段忽略 + if (commentMediated < (commentCfg.minImpact ?? 0.05)) commentMediated = 0; + + // 合并 assist 与 mediated 作为最终 comment 权重 + wComment = commentAssist + commentMediated; + if (commentCfg.debug) { + if (this.debugOutputsEnabled) this.commentValueDebug.push({ + prId: pr.id, user: activity.actorLogin, isAuthor: isAuthorLocal, + rawCommentWeight: wCommentRaw, appliedWeight: wComment, + commentAssist, commentMediated, totalCommentsAll, commentCount: activity.commentCount, + pAssist, shallowScale, distinctCommenters, gammaAssist: commentCfg.gammaAssist, + diversityApplied, timestamp: Date.now() + }); + } + } + + // review / reviewComment / close / commit 在此应用类型倍数 + let wReview = wReviewRaw * mReview; + let wReviewComment = wReviewCommentRaw * (ctm.comment ?? 1.0); let wClose = wCloseRaw * mClose; let wCommit = wCommitRaw * mCommit; - // 角色加成:作者、评审者、提交者、评论者(均为轻量) + // review gamma reallocation:与 commit gamma 类似,抑制单人 review 占比 + { + const rCfg: any = (this.config as any).projectActivityWeights || {}; + const reviewGamma = rCfg.reviewGamma ?? (this.config as any).reviewGamma ?? 1.0; + const totalReviewComments = Math.max(1, totalReviewCommentsRaw); + if (reviewGamma && reviewGamma < 0.999 && (activity.reviewCommentCount || activity.reviewCount)) { + if (!(pr as any)._reviewGammaMap) { + const arr: [any, number][] = []; + let denom = 0; + for (const a of pr.activities||[]) { + const share = (a.reviewCommentCount || a.reviewCount || 0) / totalReviewComments; + const g = Math.pow(share, reviewGamma); + arr.push([a.actorId, g]); denom += g; + } + (pr as any)._reviewGammaMap = { sum: Math.max(denom, 1e-9), map: new Map(arr) }; + } + const rg = (pr as any)._reviewGammaMap; + const gShare = (rg.map.get(activity.actorId) || 0) / rg.sum; + const rawShare = ((activity.reviewCommentCount || activity.reviewCount || 0) / totalReviewComments) || 0; + if (rawShare > 0) wReview = wReview * (gShare / rawShare); + } + } + + // ===== 渠道平衡: 把 open/comment/review/... 等通道再平衡(concave + smoothing + soft-min) ===== + const cbRes = this.getCachedConfig([ + ['projectActivityWeights','channelBalancing'], + ['channelBalancing'], + ['project','channelBalancing'] + ], { enabled: false }); + if (cbRes.foundAt && cbRes.foundAt !== 'projectActivityWeights.channelBalancing') console.log(`⚠️ channelBalancing loaded from ${cbRes.foundAt} (recommend moving to projectActivityWeights.channelBalancing)`); + const cb: any = cbRes.value; + if (cb?.enabled) { + try { + // 将各通道放入向量,applyChannelBalancing 会返回映射回原始 scale 的新权重 + const vec = { open: wOpen, comment: wComment, review: wReview, reviewComment: wReviewComment, close: wClose, commit: wCommit }; + const resVec = this.applyChannelBalancing(vec, cb, { prId: pr.id, user: activity.actorLogin, debugEnabled: this.debugOutputsEnabled, debugFlag: cb.debug }); + wOpen = resVec.open; wComment = resVec.comment; wReview = resVec.review; wReviewComment = resVec.reviewComment; wClose = resVec.close; wCommit = resVec.commit; + } catch (err) { + // 平衡失败时容忍(保持原分量),避免阻断整体计算 + } + } + + // pool 的 diversity boost 会放大非 commit 的通道(鼓励协作) + if (poolDiversityBoostApplied) { + const boost = (poolsCfg.diversity?.boost ?? 1.1); + wOpen *= boost; wComment *= boost; wReview *= boost; wReviewComment *= boost; wClose *= boost; + } + + // 根据是否使用 ci2,给 review 添加 reviewEffortBonusV2(使用 pools 的 assurance 分配或近似计算) + if (ci2.enabled) { + if (reviewEffortBonusV2 > 0) { + wReview += reviewEffortBonusV2; + } + } else { + if ((activity.reviewCount || 0) > 0 || (activity.reviewCommentCount || 0) > 0) { + const reviewShare = (activity.reviewCommentCount || 0) / Math.max(1, totalReviewCommentsRaw); + const reviewEffortBonus = (reviewLineWeightTotal + reviewFileWeightTotal) * reviewShare; + wReview += reviewEffortBonus; + } + } + + // ===== 角色加成:作者/评审者/提交者/评论者 的轻量倍数 ===== const roleBonus = (ctm.roleBonus) || {}; const isAuthor = activity.actorId?.toString?.() === pr.authorId?.toString?.(); const actedAsReviewer = (activity.reviewCount || 0) > 0; @@ -639,7 +1544,6 @@ export class ProjectOpenRankCalculator { if (isAuthor) roleMul *= rbAuthor; if (actedAsReviewer) { let r = rbReviewer; - // 若该 PR 存在 changeRequests,则给评审者轻量加成 if ((pr.changeRequests || 0) > 0 && (ctm.reviewerChangeRequestBonus ?? 1.0) > 1.0) { r *= (ctm.reviewerChangeRequestBonus as number); } @@ -647,72 +1551,325 @@ export class ProjectOpenRankCalculator { } if (actedAsCommitter) roleMul *= rbCommitter; if (actedAsCommenter) roleMul *= rbCommenter; - // 角色乘子整体钳制(避免角色叠乘过大或过小) + // 角色乘子整体钳制(避免叠乘导致极端值) const rc = ctm.roleClamp; if (rc && (rc.min != null || rc.max != null)) { const rMin = rc.min ?? -Infinity; const rMax = rc.max ?? Infinity; roleMul = Math.max(rMin, Math.min(rMax, roleMul)); } + const totalRaw = wOpen + wComment + wReview + wReviewComment + wClose + wCommit; + + // ===== 可选 review dampening: 对 wReview 做整体缩减(配置决定),这里仅记录 debug,与 total 保持不归一 ===== + try { + const rdRes = this.getCachedConfig([ + ['projectActivityWeights','reviewDampening'], + ['reviewDampening'], + ['project','reviewDampening'] + ], { enabled: false }); + if (rdRes.foundAt && rdRes.foundAt !== 'projectActivityWeights.reviewDampening') console.log(`⚠️ reviewDampening loaded from ${rdRes.foundAt} (recommend moving to projectActivityWeights.reviewDampening)`); + const rd: any = rdRes.value; + if (rd && rd.enabled) { + const oldReview = wReview; + const factor = Math.max(0, Math.min(1, rd.factor ?? 1.0)); + wReview = wReview * factor; + (this as any)._reviewDampeningDebug = (this as any)._reviewDampeningDebug || []; + if (this.debugOutputsEnabled) (this as any)._reviewDampeningDebug.push({ prId: pr.id, actorId: activity.actorId, actorLogin: activity.actorLogin, oldReview, newReview: wReview, factor, timestamp: Date.now() }); + } + } catch (err) { + // 忽略 review dampening 的异常,确保主流程不中断 + } + + // 合并并应用角色乘子 let totalWeighted = totalRaw * roleMul; - // 钳制(相对最初的 userActivityWeight),防止过大偏移 + // 钳制:相对于 userActivityWeight,限制上下浮动范围,避免过度偏移 const clampMin = ctm.clamp?.min ?? 0.7; const clampMax = ctm.clamp?.max ?? 1.6; const minAllowed = userActivityWeight * clampMin; const maxAllowed = userActivityWeight * clampMax; totalWeighted = Math.max(minAllowed, Math.min(maxAllowed, totalWeighted)); - // 质量乘子(作用于协作单元→用户活动边) - const qualityMul = computePRQualityMultiplier(pr, this.config); - // 上月OR轻量影响 - const poiCfg = this.config.projectActivityWeights.priorOpenRankInfluence || { enabled: false } as any; - const lastUserOR = lastMonthOpenRank.get(userNodeId) || 0; - const priorMul = poiCfg.enabled ? (1 + ((poiCfg.gamma ?? 0.08) * Math.tanh(lastUserOR / (poiCfg.scale ?? 5.0)))) : 1.0; - - // PR → User 的活动边 (协作单元→用户) - const prToUserEdgeId = `${prNodeId}-activity-${userNodeId}`; - const prToUserWeight = totalWeighted * activityRatio * (qualityMul || 1.0) * priorMul; - - edgeMap.set(prToUserEdgeId, { - source: prNodeId, - target: userNodeId, - weight: prToUserWeight, - type: 'activity', - activityDetails: { - openWeight: wOpen, - commentWeight: wComment, - reviewWeight: wReview, - reviewCommentWeight: wReviewComment, - closeWeight: wClose, - commitWeight: wCommit, - eventSource: 'collaboration', - roles: { author: isAuthor, reviewer: actedAsReviewer, committer: actedAsCommitter, commenter: actedAsCommenter }, + // PR -> User 活动边的 id 与权重(待写入),先记录到临时结构以便在 assignee-aware 调整时统一处理 + const prToUserEdgeId = `${prNodeId}-activity-${userNodeId}`; + const prToUserWeight = totalWeighted * activityRatio; + + // 临时 push 到一个列表,后面会在 loop 外基于 assignees 做可选重分配 + (pr as any)._tmpPerActor = (pr as any)._tmpPerActor || []; + (pr as any)._tmpPerActor.push({ actorId: activity.actorId, userNodeId, totalWeighted, prToUserWeight, prToUserEdgeId, debug: { wOpen, wComment, wReview, wReviewComment, wClose, wCommit }, roles: { author: isAuthor, reviewer: actedAsReviewer, committer: actedAsCommitter, commenter: actedAsCommenter } }); + + // ===== 调试日志:收集每个参与者的中间量以便离线分析 ===== + try { + if (this.debugOutputsEnabled) { + const additions = pr.additions || 0; + const deletions = pr.deletions || 0; + const debugTotalLines = additions + deletions; + this.prActivityDebugLogs.push({ + prId: pr.id, + prTitle: pr.title?.slice(0, 120), + user: activity.actorLogin, + commitCount: activity.commitCount || 0, + reviewCount: activity.reviewCount || 0, + commentCount: activity.commentCount || 0, + additions, + deletions, + lines: debugTotalLines, + filesChanged, + commitLine: weights.commitLine, + commitFile: weights.commitFile, + commitLineThreshold: weights.commitLineThreshold || weights.commitScaleThreshold, + commitFileThreshold: weights.commitFileThreshold || weights.commitScaleThreshold, + commitNonLinearScale: (weights.commitNonLinearScaleAlt || weights.commitNonLinearScale || 'none'), + lineWeight: codeLineWeight, + fileWeight: codeFileWeight, + commitCodeShareWeight: wCommitRaw, + commitShare, + userActivityWeight, + codeImpactV2: ci2.enabled ? { + totalLines, + filesChanged, + lineWeight: codeLineWeight, + fileWeight: codeFileWeight, + codeImpact: codeImpactV2Value, + commitClaimable: codeImpactSplit.commitClaimable, + reviewMediated: codeImpactSplit.reviewMediated, + penaltyApplied: codeImpactSplit.penaltyApplied, + reviewEffortBonus: reviewEffortBonusV2, + qDynamic: (codeImpactSplit as any).qDynamic, + reviewCoverage: (codeImpactSplit as any).reviewCoverage, + collaborativeFactor: (codeImpactSplit as any).collaborativeFactor, + sizeFactor: (codeImpactSplit as any).sizeFactor + } : undefined, + totalRaw, + roleMul, + clampMin: minAllowed, + clampMax: maxAllowed, + totalWeighted, + prToUserWeight, + timestamp: Date.now() + }); } - }); + } catch (err) { + if (this.debugOutputsEnabled) this.prActivityDebugLogs.push({ error: true, message: (err as any)?.message, stack: (err as any)?.stack }); + } - // User → PR 的反向活动边 (用户→协作单元) - const userToPREdgeId = `${userNodeId}-reverse_activity-${prNodeId}`; - const reverseActivityRatio = this.config.projectActivityWeights.reverseActivityRatio || 0.15; - let reverseWeight = totalWeighted * reverseActivityRatio * priorMul; + // 先不要直接加入 edgeMap,延后到 loop 结束后统一写入(以便进行 assignee-aware 的再分配) + + // User -> PR 的反向活动边(reverse_activity),通常使用 reverseActivityRatio 缩放 + const userToPREdgeId = `${userNodeId}-reverse_activity-${prNodeId}`; + const reverseActivityRatio = this.config.projectActivityWeights.reverseActivityRatio || 0.15; + let reverseWeight = totalWeighted * reverseActivityRatio; const gsn = this.config.projectActivityWeights.goalSideNormalization; + // 如果启用了目标侧归一,需要累计目标的 incoming raw,用 later stage 统一归一 if (gsn?.enabled && (gsn.edgeTypes || []).includes('reverse_activity')) { const incomingRaw = (edgeMap as any)._tmpIncomingRaw || new Map(); (edgeMap as any)._tmpIncomingRaw = incomingRaw; const key = `${prNodeId}::incoming_sum`; incomingRaw.set(key, (incomingRaw.get(key) || 0) + reverseWeight); } - edgeMap.set(userToPREdgeId, { - source: userNodeId, - target: prNodeId, - weight: reverseWeight, - type: 'reverse_activity', + // 反向边也推迟到最后写入(保持与 activity 边一致) + (pr as any)._tmpPerActor[(pr as any)._tmpPerActor.length - 1].reverseEdge = { id: userToPREdgeId, weight: reverseWeight }; + } + } + + // ==== PR 层的 assignee-aware 再分配(A 方案) ==== + // 如果 PR 有 assignees 并且配置要求把一部分目标总量分配给 assignees,则在写入 edgeMap 前重新调整 per-actor 分配 + try { + const assignCfg = (this.config as any).projectActivityWeights?.assignmentHandling || {}; + const prAssigneeShare = assignCfg.prAssigneeShare ?? 0.4; // 默认让 assignees 获取 40% 的 PR 总量 + const assignees = (pr.assignees || []).map((a:any) => a.id); + const per = (pr as any)._tmpPerActor || []; + if (assignees.length > 0 && per.length > 0 && prAssigneeShare > 0) { + // 计算 PR 总量(使用 prToUserWeight) + const totalPR = per.reduce((s:any, x:any) => s + (x.prToUserWeight || 0), 0) || 1e-9; + const targetForAssignees = totalPR * prAssigneeShare; + + // 当前 assignees 已获得的份额 + const assigneeEntries = per.filter((p:any) => assignees.includes(p.actorId)); + const currentAssigneeSum = assigneeEntries.reduce((s:any, x:any) => s + (x.prToUserWeight || 0), 0); + + // 如果当前小于目标,则按比例从非 assignees 减出并加给 assignees + if (currentAssigneeSum < targetForAssignees) { + const deficit = targetForAssignees - currentAssigneeSum; + const nonAssignees = per.filter((p:any) => !assignees.includes(p.actorId)); + const nonSum = nonAssignees.reduce((s:any, x:any) => s + (x.prToUserWeight || 0), 0) || 1e-9; + // 按非 assignee 的贡献比例扣减 + for (const na of nonAssignees) { + const take = deficit * ((na.prToUserWeight || 0) / nonSum); + na.prToUserWeight = Math.max(0, (na.prToUserWeight || 0) - take); + // 分配到 assignees:按 assignee 的原始权重比例分配 + } + const assigneeWeightSum = assigneeEntries.reduce((s:any, x:any) => s + (x.prToUserWeight || 0), 0) || 0; + const addToAssignees = deficit; // 总量守恒 + // 如果没有现有 assignee 权重,则均分 + if (assigneeEntries.length > 0 && assigneeWeightSum > 0) { + for (const ae of assigneeEntries) { + const add = addToAssignees * ((ae.prToUserWeight || 0) / assigneeWeightSum); + ae.prToUserWeight = (ae.prToUserWeight || 0) + add; + } + } else { + // 均匀分配给 assignees + for (const aid of assignees) { + // 找或创建 entry + let e = per.find((x:any)=>x.actorId === aid); + if (!e) { + const uid = generateId(pr.platform, 'User', aid); + e = { actorId: aid, userNodeId: uid, totalWeighted: 0, prToUserWeight: 0, prToUserEdgeId: `${prNodeId}-activity-${uid}` }; + per.push(e); + } + e.prToUserWeight = (e.prToUserWeight || 0) + (addToAssignees / assignees.length); + } + } + } + } + + // 最后写回 edgeMap(基于调整后的 per 列表),并写入对应的 reverse edges 和 activityDetails + const perFinal = (pr as any)._tmpPerActor || []; + for (const ent of perFinal) { + const uid = ent.userNodeId || generateId(pr.platform, 'User', ent.actorId); + // 确保用户节点存在 + if (!nodeMap.has(uid)) { + const lastOR = lastMonthOpenRank.get(uid) || 0; + nodeMap.set(uid, { id: uid, type: 'User', platform: pr.platform, name: ent.actorId?.toString?.(), openrank: lastOR * this.config.project.attenuationFactor, lastOpenrank: lastOR, initValue: this.config.global.defaultInitValue, retentionFactor: this.config.project.developerRetentionFactor, converged: false, metadata: { actorId: ent.actorId }}); + } + const w = ent.prToUserWeight || 0; + edgeMap.set(ent.prToUserEdgeId, { + source: prNodeId, + target: uid, + weight: w, + type: 'activity', + activityDetails: { + openWeight: ent.debug?.wOpen || 0, + commentWeight: ent.debug?.wComment || 0, + reviewWeight: ent.debug?.wReview || 0, + reviewCommentWeight: ent.debug?.wReviewComment || 0, + closeWeight: ent.debug?.wClose || 0, + commitWeight: ent.debug?.wCommit || 0, + eventSource: 'collaboration', + assignmentType: pr.assignmentType || 'voluntary', + roles: ent.roles || {} + } }); + // reverse edge + if (ent.reverseEdge) { + edgeMap.set(ent.reverseEdge.id, { + source: uid, + target: prNodeId, + weight: ent.reverseEdge.weight, + type: 'reverse_activity' + }); + } + // debug push + if (this.debugOutputsEnabled) this.prActivityDebugLogs.push({ prId: pr.id, actorId: ent.actorId, actorNode: uid, finalWeight: w, timestamp: Date.now(), note: 'assignee-aware final' }); + } + } catch (err) { + // 在调整阶段若有异常,回退到原始行为:把临时存在的 per 项写回 edgeMap + const perFinal = (pr as any)._tmpPerActor || []; + for (const ent of perFinal) { + const uid = ent.userNodeId || generateId(pr.platform, 'User', ent.actorId); + if (!nodeMap.has(uid)) { + const lastOR = lastMonthOpenRank.get(uid) || 0; + nodeMap.set(uid, { id: uid, type: 'User', platform: pr.platform, name: ent.actorId?.toString?.(), openrank: lastOR * this.config.project.attenuationFactor, lastOpenrank: lastOR, initValue: this.config.global.defaultInitValue, retentionFactor: this.config.project.developerRetentionFactor, converged: false, metadata: { actorId: ent.actorId }}); + } + const w = ent.prToUserWeight || 0; + edgeMap.set(ent.prToUserEdgeId, { + source: prNodeId, + target: uid, + weight: w, + type: 'activity', + activityDetails: { + openWeight: ent.debug?.wOpen || 0, + commentWeight: ent.debug?.wComment || 0, + reviewWeight: ent.debug?.wReview || 0, + reviewCommentWeight: ent.debug?.wReviewComment || 0, + closeWeight: ent.debug?.wClose || 0, + commitWeight: ent.debug?.wCommit || 0, + eventSource: 'collaboration', + assignmentType: pr.assignmentType || 'voluntary', + roles: ent.roles || {} + } + }); + if (ent.reverseEdge) { + edgeMap.set(ent.reverseEdge.id, { + source: uid, + target: prNodeId, + weight: ent.reverseEdge.weight, + type: 'reverse_activity' + }); + } } } } + /** + * 直接基于Issue特征计算初始值(质量/重要性) + */ + private calculateIssueInitialValue(issue: IssueData): number { + const baseValue = this.config.project.issueInitValue || 5.0; + + // 协作活跃度指标 + const activityCount = issue.activities?.length || 0; + const participantCount = new Set(issue.activities?.map(a => a.actorLogin)).size; + const reactionScore = (issue.reactions?.thumbsUp || 0) + + (issue.reactions?.heart || 0) + + (issue.reactions?.rocket || 0); + + // 质量因子计算 + const activityFactor = activityCount * 0.3; + const participantFactor = participantCount * 0.4; + const reactionFactor = reactionScore * 0.2; + + const qualityMultiplier = 1 + activityFactor + participantFactor + reactionFactor; + let initialValue = baseValue * qualityMultiplier; + + return Math.max(baseValue * 0.5, initialValue); // 最小值保护 + } + + /** + * 直接基于PR特征计算初始值(质量/重要性) + */ + private calculatePRInitialValue(pr: PullRequestData): number { + const baseValue = pr.state === 'merged' ? + (this.config.project.prMergedInitValue || 8.0) : + (this.config.project.prNotMergedInitValue || 3.0); + + // 代码复杂度指标 + const codeLines = (pr.additions || 0) + (pr.deletions || 0); + const filesChanged = pr.filesChanged || 0; + + // 协作质量指标 + const activityCount = pr.activities?.length || 0; + const participantCount = new Set(pr.activities?.map(a => a.actorLogin)).size; + + // 质量因子计算(使用对数缩放) + const codeFactor = Math.log1p(codeLines) * 0.25; + const fileFactor = Math.log1p(filesChanged) * 0.15; + const collaborationFactor = Math.log1p(activityCount + participantCount) * 0.35; + + const qualityMultiplier = 1 + codeFactor + fileFactor + collaborationFactor; + let initialValue = baseValue * qualityMultiplier; + + // 时间衰减 + if (pr.createdAt) { + const now = new Date(); + const days = Math.max(0, (now.getTime() - pr.createdAt.getTime()) / (1000 * 60 * 60 * 24)); + const td = this.config.project.initOptimization?.timeDecay; + let decay = 1.0; + if (td?.mode === 'exp') { + const lambda = td.lambdaDays ?? 30; + decay = Math.exp(-(days / lambda)); + } else { + const halfLife = td?.halfLifeDays ?? 180; + decay = Math.pow(0.5, days / halfLife); + } + if (td?.minDecay != null) decay = Math.max(decay, td.minDecay); + initialValue *= decay; + } + + return Math.max(baseValue * 0.5, initialValue); // 最小值保护 + } + /** * 计算基于表情反应的初始OpenRank值 */ @@ -726,7 +1883,79 @@ export class ProjectOpenRankCalculator { } /** - * 计算活动权重 + * 应用非线性缩放 + */ + private applyNonLinearScale( + value: number, + scaleType?: 'none' | 'log' | 'sqrt' | 'tanh' | 'tanh_bounded', + threshold?: number + ): number { + const v = Math.max(0, value); + if (!scaleType || scaleType === 'none') return v; + + switch (scaleType) { + case 'log': + return Math.log1p(v); // log(1 + v) + case 'sqrt': + return Math.sqrt(v); + case 'tanh': + const t = threshold || 100; // 默认阈值 + return v <= t ? v : t + (v - t) * Math.tanh((v - t) / t); + case 'tanh_bounded': { + // 修改为:仅对超过阈值的部分应用非线性压缩(选项 B) + // 即:当 v <= tb 时保持线性;当 v > tb 时返回 tb + compress(v - tb) + // compress(x) = x * tanh(x / tb) —— 对超出部分做收缩,但不对整个值做全量映射 + const tb = threshold || 1000; + if (v <= tb) return v; + const excess = v - tb; + return tb + excess * Math.tanh(excess / tb); + } + default: + return v; + } + } + + /** + * 应用 anti-gaming 的阈值/变换/上限逻辑的公共实现 + * - raw: 原始值 + * - thr: 线性阈值 + * - mode: 'none'|'sqrt'|'log' -> 对超过阈值的部分做非线性变换 + * - perItemCap: 单条最大上限 + */ + private applyAntiGaming(raw: number, thr?: number, mode?: 'none'|'sqrt'|'log', perItemCap?: number): number { + const ag: any = (this.config as any).projectActivityWeights?.antiGaming || { enabled: false }; + const v = Math.max(0, raw); + const t = Math.max(0, thr ?? 0); + const cap = (x: number, m?: number) => (m && m > 0 ? Math.min(x, m) : x); + if (!ag.enabled) return cap(v, perItemCap); + if (v <= t) return cap(v, perItemCap); + const remain = v - t; + let transformed = remain; + if (mode === 'sqrt') transformed = Math.sqrt(Math.max(0, remain)); + else if (mode === 'log') transformed = Math.log1p(Math.max(0, remain)); + return cap(t + transformed, perItemCap); + } + + /** + * 为 PR 计算 commit gamma 分配并缓存到 pr._commitGammaMap + * 返回 Map(actorId -> normalizedGammaShare) + */ + private computeCommitGammaMap(pr: any, totalCommitsRaw: number, gamma: number): Map { + const shares: { actorId: any; share: number }[] = []; + for (const a of pr.activities || []) { + const c = a.commitCount || 0; + if (c > 0 && totalCommitsRaw > 0) { + const raw = c / totalCommitsRaw; + shares.push({ actorId: a.actorId, share: raw }); + } + } + const denom = shares.reduce((s, x) => s + Math.pow(x.share, gamma), 0) || 1; + const m = new Map(shares.map(x => [x.actorId, Math.pow(x.share, gamma) / denom])); + return m; + } + + /** + * 计算活动权重(支持基于代码量的commit权重) */ private calculateActivityWeight( openCount: number, @@ -734,16 +1963,68 @@ export class ProjectOpenRankCalculator { reviewCount: number, closeCount: number, commitCount: number = 0, - reviewCommentCount: number = 0 + reviewCommentCount: number = 0, + // 新增:代码变更相关参数 + codeMetrics?: { additions?: number; deletions?: number; filesChanged?: number }, + // 新增:提交占比(用于将代码规模权重只分配给实际提交者),范围[0,1];未提供则默认0 + commitShare: number = 0 ): number { const weights = this.config.projectActivityWeights; + + // 计算commit权重:优先使用代码量,否则使用次数 + let commitWeight = 0; + if (weights.commitUseCodeMetrics && codeMetrics) { + const additions = codeMetrics.additions || 0; + const deletions = codeMetrics.deletions || 0; + const filesChanged = codeMetrics.filesChanged || 0; + + // 基于代码行数的权重 + let lineWeight = 0; + if (weights.commitLine) { + const totalLines = additions + deletions; + const scale = (weights.commitNonLinearScaleAlt || weights.commitNonLinearScale || 'none') as any; + const thr = weights.commitLineThreshold || weights.commitScaleThreshold; + lineWeight = this.applyNonLinearScale(totalLines, scale, thr) * weights.commitLine; + } + // 基于文件数的权重(支持独立阈值) + let fileWeight = 0; + if (weights.commitFile) { + const scale = (weights.commitNonLinearScaleAlt || weights.commitNonLinearScale || 'none') as any; + const thr = weights.commitFileThreshold || weights.commitScaleThreshold; + fileWeight = this.applyNonLinearScale(filesChanged, scale, thr) * weights.commitFile; + } + // 仅按提交占比分配给提交者;非提交者不获得这部分 + const totalCodeWeight = lineWeight + fileWeight; + // 方案A:整体下调 commit 规模贡献 15%(目标 ~20% 相对占比下降,先保守) + // 方案D:在外层会提升 review/reviewComment 权重;这里先压缩 commit 自身贡献 + commitWeight = totalCodeWeight * 0.85 * Math.max(0, Math.min(1, commitShare || 0)); + } else { + // 传统基于次数的权重:直接系数下调 0.8 + commitWeight = (commitCount || 0) * ((weights as any).commit || 0) * 0.8; + } + return ( - openCount * weights.open + - commentCount * weights.comment + - reviewCount * weights.review + - (reviewCommentCount || 0) * ((weights as any).reviewComment ?? weights.comment) + - closeCount * weights.close + - (commitCount || 0) * (weights as any).commit + // 在最终返回前应用“提交占比软上限” + ((): number => { + const openW = openCount * weights.open; + const commentW = commentCount * weights.comment; + const reviewW = reviewCount * weights.review; + const reviewCommentW = (reviewCommentCount || 0) * ((weights as any).reviewComment ?? weights.comment); + const closeW = closeCount * weights.close; + let commitW = commitWeight; + const other = openW + commentW + reviewW + reviewCommentW + closeW; + const cap = (weights as any).commitShareCap; // 例如 0.7 + if (cap && cap > 0 && cap < 1 && commitW > 0 && other > 0) { + const blend = (weights as any).commitShareCapBlend ?? 0.4; // 部分纠偏 + const currentShare = commitW / (commitW + other); + if (currentShare > cap) { + // 目标满足:C'/(C'+O) = cap → C' = cap/(1-cap)*O + const targetCommit = (cap / (1 - cap)) * other; + commitW = commitW * blend + targetCommit * (1 - blend); + } + } + return openW + commentW + reviewW + reviewCommentW + closeW + commitW; + })() ); } @@ -762,7 +2043,33 @@ export class ProjectOpenRankCalculator { let commentValue = activity.commentCount * weights.comment; let reviewValue = (activity.reviewCount || 0) * weights.review; let closeValue = activity.closeCount * weights.close; - let commitValue = (activity.commitCount || 0) * (weights as any).commit; + + // 计算commit权重:支持基于代码量的计算 + let commitValue = 0; + if (weights.commitUseCodeMetrics && 'additions' in item) { + // 对于PR,使用代码变更数据 + const pr = item as PullRequestData; + const additions = pr.additions || 0; + const deletions = pr.deletions || 0; + const filesChanged = pr.filesChanged || 0; + + let lineWeight = 0; + if (weights.commitLine) { + const totalLines = additions + deletions; + lineWeight = this.applyNonLinearScale(totalLines, weights.commitNonLinearScale, weights.commitScaleThreshold) * weights.commitLine; + } + + let fileWeight = 0; + if (weights.commitFile) { + fileWeight = this.applyNonLinearScale(filesChanged, weights.commitNonLinearScale, weights.commitScaleThreshold) * weights.commitFile; + } + + // 规模型:下调 0.85 + commitValue = (lineWeight + fileWeight) * (activity.commitCount || 0) / Math.max(1, activity.commitCount || 1) * 0.85; + } else { + // 次数型:下调 0.8 + commitValue = (activity.commitCount || 0) * ((weights as any).commit || 0) * 0.8; + } // 2. 任务类型动态调整 const tune = this.config.qualityWeighting?.projectQuality?.assignmentTypeTuning?.[assignmentType]; @@ -772,10 +2079,31 @@ export class ProjectOpenRankCalculator { commentValue = activity.commentCount * weights.comment * (actScale.comment ?? 1); reviewValue = (activity.reviewCount || 0) * weights.review * (actScale.review ?? 1); closeValue = activity.closeCount * weights.close * (actScale.close ?? 1); - commitValue = (activity.commitCount || 0) * (weights as any).commit * (actScale.open ?? 1); + // commitValue已经在上面处理了代码量,这里只需要应用scale + if (weights.commitUseCodeMetrics && 'additions' in item) { + // 规模型已含折扣,不叠加 open scale,以免反向放大 + } else { + commitValue = (activity.commitCount || 0) * ((weights as any).commit || 0) * 0.8 * (actScale.open ?? 1); + } } let totalActivityValue = openValue + commentValue + reviewValue + closeValue + commitValue; + + // 应用提交占比软上限(与 calculateActivityWeight 保持一致) + const cap = (this.config.projectActivityWeights as any).commitShareCap; + if (cap && cap > 0 && cap < 1 && commitValue > 0) { + const other = (openValue + commentValue + reviewValue + closeValue); + if (other > 0) { + const currentShare = commitValue / (commitValue + other); + if (currentShare > cap) { + const blend = (this.config.projectActivityWeights as any).commitShareCapBlend ?? 0.4; + const targetCommit = (cap / (1 - cap)) * other; + const adjustedCommit = commitValue * blend + targetCommit * (1 - blend); + totalActivityValue = totalActivityValue - commitValue + adjustedCommit; + commitValue = adjustedCommit; // 用于后续质量乘子参与(质量乘子应用在 total) + } + } + } // 3. 质量乘子 let qualityMul: number; @@ -859,29 +2187,119 @@ export class ProjectOpenRankCalculator { this.graph.resetConvergence(); let maxChange = 0; - // 为每个节点计算新的 OpenRank 值 - for (const node of this.graph.nodes.values()) { - const oldOpenrank = node.openrank; - const newOpenrank = this.calculateNodeOpenRank(node); - - // 检查收敛性 - const change = Math.abs(newOpenrank - oldOpenrank); - maxChange = Math.max(maxChange, change); - - if (change < tolerance) { - this.graph.setNodeConverged(node.id, true); + // 预计算每个 source 的 outgoing 权重总和,避免在计算节点时重复遍历 + this._cachedOutgoingSum = new Map(); + for (const e of this.graph.edges) { + this._cachedOutgoingSum.set(e.source, (this._cachedOutgoingSum.get(e.source) || 0) + e.weight); + } + + // 解析 transmissionBlend 配置一次并缓存为归一系数 a,b,c,以便后续复用 + const tbRes = this.getCachedConfig([ + ['project','transmissionBlend'], + ['projectActivityWeights','transmissionBlend'], + ['transmissionBlend'] + ], { openrankFraction: 0.0, lastOpenrankFraction: 0.5, initValueFraction: 0.5 }); + let a = Number(tbRes.value.openrankFraction ?? 0.0); + let b = Number(tbRes.value.lastOpenrankFraction ?? 0.5); + let c = Number(tbRes.value.initValueFraction ?? 0.5); + const s = (a + b + c) || 1; + a /= s; b /= s; c /= s; + this._transmissionBlendCached = { a, b, c }; + + // 预计算每个 source 的 baseTransmission = a*openrank + b*lastOpenrank + c*initValue + this._baseTransmissionMap = new Map(); + for (const n of this.graph.nodes.values()) { + const base = a * (n.openrank || 0) + b * (n.lastOpenrank || 0) + c * (n.initValue || 0); + this._baseTransmissionMap.set(n.id, base); + } + + // 支持 Gauss–Seidel 风格的出边即时传播(可通过 config.project.useGaussSeidel 关闭) + const gsEnabled = (this.config.project as any).useGaussSeidel !== false; // 默认开启,除非显式设置为 false + let remainingUnconverged = 0; + this._baseTransmissionMap = this._baseTransmissionMap || new Map(); + const baseMap = this._baseTransmissionMap; + const outSumMap = this._cachedOutgoingSum || new Map(); + + if (gsEnabled) { + // Gauss–Seidel: 按节点顺序计算并立即更新其 OpenRank,这样后续节点会感知到已更新的传播值 + for (const node of this.graph.nodes.values()) { + const oldOpenrank = node.openrank; + + // 计算来自所有入边的消息,入边的 source 使用当前(可能已在本次迭代更新过的)openrank + let incomingSum = 0; + const incomingEdges = this.graph.getIncomingEdges(node.id); + for (const edge of incomingEdges) { + const src = edge.source; + const outSum = outSumMap.get(src) || 0; + if (outSum <= 0) continue; + + // 源节点的 baseTransmission 可能需要延迟计算(若其 openrank 已在本次迭代更新,则使用新的值) + let base = baseMap.get(src); + if (base === undefined) { + const srcNode = this.graph.getNode(src); + if (!srcNode) continue; + base = (a * (srcNode.openrank || 0)) + (b * (srcNode.lastOpenrank || 0)) + (c * (srcNode.initValue || 0)); + baseMap.set(src, base); + } + + if (base === 0) continue; + incomingSum += (base * edge.weight) / outSum; + } + + const newOpenrank = node.retentionFactor * node.initValue + (1 - node.retentionFactor) * incomingSum; + const change = Math.abs(newOpenrank - oldOpenrank); + maxChange = Math.max(maxChange, change); + + if (change < tolerance) { + this.graph.setNodeConverged(node.id, true); + } else { + remainingUnconverged++; + } + + const finalOpenrank = Math.max(newOpenrank, this.config.project.minValue); + // 更新图(会设置 lastOpenrank) + this.graph.updateNodeOpenrank(node.id, finalOpenrank); + + // 更新该节点的 baseTransmission,方便后续节点立即使用(实现 Gauss–Seidel 的即时传播) + const updatedBase = (a * (finalOpenrank || 0)) + (b * (node.lastOpenrank || 0)) + (c * (node.initValue || 0)); + baseMap.set(node.id, updatedBase); + } + } else { + // Edge-centric accumulation: single pass over edges to compute contributions (Jacobi 风格) + const targetAccum = new Map(); + for (const e of this.graph.edges) { + const outSum = outSumMap.get(e.source) || 0; + if (outSum <= 0) continue; + const base = baseMap ? (baseMap.get(e.source) || 0) : 0; + if (base === 0) continue; + const contrib = (base * e.weight) / outSum; + targetAccum.set(e.target, (targetAccum.get(e.target) || 0) + contrib); } - // 更新节点值,确保不低于最小值 - const finalOpenrank = Math.max(newOpenrank, this.config.project.minValue); - this.graph.updateNodeOpenrank(node.id, finalOpenrank); + for (const node of this.graph.nodes.values()) { + const oldOpenrank = node.openrank; + const incomingSum = targetAccum.get(node.id) || 0; + const newOpenrank = node.retentionFactor * node.initValue + (1 - node.retentionFactor) * incomingSum; + + const change = Math.abs(newOpenrank - oldOpenrank); + maxChange = Math.max(maxChange, change); + + if (change < tolerance) { + this.graph.setNodeConverged(node.id, true); + } else { + remainingUnconverged++; + } + + const finalOpenrank = Math.max(newOpenrank, this.config.project.minValue); + this.graph.updateNodeOpenrank(node.id, finalOpenrank); + } } this.calculationStatus.maxChange = maxChange; - this.calculationStatus.convergedNodes = this.graph.getUnconvergedNodeCount(); + this.calculationStatus.convergedNodes = remainingUnconverged; - // 检查整体收敛性 - if (this.graph.isConverged()) { + // 检查整体收敛性(使用 incremental counter) + if (remainingUnconverged === 0) { this.calculationStatus.isConverged = true; console.log(`Project OpenRank converged at iteration ${iteration}`); break; @@ -911,20 +2329,81 @@ export class ProjectOpenRankCalculator { // 获取放大系数 const reverseBelongRatio = this.config.projectActivityWeights?.reverseBelongRatio || 1.0; - const repoAmplificationFactor = this.config.projectActivityWeights?.repoAmplificationFactor || 1.0; - - console.log(`🔧 应用Repo权重放大: reverseBelongRatio=${reverseBelongRatio}, repoAmplificationFactor=${repoAmplificationFactor}`); + const baseRepoAmp = this.config.projectActivityWeights?.repoAmplificationFactor || 1.0; + let dynamicAmp = baseRepoAmp; + let repoEnhanceInfo: any = undefined; + // ==== repoEventEnhance 动态放大逻辑(占位实现)==== + const enh: any = (this.config as any).repoEventEnhance || (this.config as any).projectActivityWeights?.repoEventEnhance; + if (enh?.enabled && (this as any).repoEvents && (this as any).repoEvents.length) { + try { + const repoEvents: any[] = (this as any).repoEvents; + const byDay: Record = {}; + for (const ev of repoEvents) { + const day = (ev.date || ev.createdAt || '').slice(0,10); + if (!day) continue; + if (!byDay[day]) byDay[day] = { star:0, fork:0, release:0 }; + const c = ev.count || 1; + if (ev.type === 'star') byDay[day].star += c; + else if (ev.type === 'fork') byDay[day].fork += c; + else if (ev.type === 'release') byDay[day].release += c; + } + const days = Object.keys(byDay).sort(); + const seq = days.map(d => ({ day: d, ...byDay[d] })); + const stars = seq.map(r=>r.star); + const forks = seq.map(r=>r.fork); + const releases = seq.map(r=>r.release); + const avg = (a:number[])=> a.length? a.reduce((s,x)=>s+x,0)/a.length:0; + const std = (a:number[])=> { if (a.length<2) return 0; const m=avg(a); return Math.sqrt(a.reduce((s,x)=>s+(x-m)*(x-m),0)/(a.length-1)); }; + const starAvg = avg(stars); const starStd = std(stars); + const k = enh.spikeStdK ?? 3; const spikeScale = enh.spikeScale ?? 0.4; + let starScore = 0; + stars.forEach(v=>{ if (starStd>0 && v > starAvg + k*starStd) starScore += (starAvg + k*starStd) * spikeScale; else starScore += v; }); + const baselineStarTotal = starAvg * (stars.length||1) || 1; + const starFactor = starScore / baselineStarTotal; + const forkTotal = forks.reduce((s,x)=>s+x,0); + const releaseTotal = releases.reduce((s,x)=>s+x,0); + const forkWeight = enh.forkWeight ?? 1.5; + const releaseWeight = enh.releaseWeight ?? 2.0; + // 以平均星标为尺度归一 fork/release + const starScale = starAvg + 1; // 防止除0 + const forkFactor = (forkTotal / (stars.length||1)) * forkWeight / starScale; + const releaseFactor = (releaseTotal / (stars.length||1)) * releaseWeight / starScale; + const composite = starFactor + forkFactor + releaseFactor; + const alpha = enh.emaAlpha ?? 0.3; + if (!(this as any)._repoAmpEMA) (this as any)._repoAmpEMA = composite; else (this as any)._repoAmpEMA = (this as any)._repoAmpEMA * (1-alpha) + composite * alpha; + const ema = (this as any)._repoAmpEMA; + const baseFactor = enh.baseFactor ?? 1.0; + const maxFactor = enh.maxFactor ?? (baseRepoAmp * 2); + dynamicAmp = Math.min(maxFactor, baseFactor * ema); + repoEnhanceInfo = { days: days.length, starAvg, starStd, starScore, baselineStarTotal, starFactor, forkTotal, releaseTotal, forkFactor, releaseFactor, composite, ema, dynamicAmp, baseRepoAmp }; + } catch (err) { + repoEnhanceInfo = { error: true, message: (err as any)?.message }; + } + } + console.log(`🔧 应用Repo权重放大: reverseBelongRatio=${reverseBelongRatio}, repoAmplificationFactor(base)=${baseRepoAmp}, dynamicAmp=${dynamicAmp}`); // 更新边权重:应用放大系数 for (const edge of this.graph.edges) { if (edge.type === 'reverse_belong') { const outDegree = repoOutDegree.get(edge.source) || 1; // 基础权重 * 反向属于比例 * 仓库放大系数 - edge.weight = (1.0 / outDegree) * reverseBelongRatio * repoAmplificationFactor; + edge.weight = (1.0 / outDegree) * reverseBelongRatio * dynamicAmp; } } - - console.log(`📈 Repo→Collaboration权重放大完成,放大倍数: ${reverseBelongRatio * repoAmplificationFactor}x`); + if (repoEnhanceInfo) { + try { + const outDir = path.resolve(process.cwd(), 'test_data'); + if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true }); + const fp = path.join(outDir, 'repo_event_enhance_debug.json'); + const prev: any[] = fs.existsSync(fp) ? JSON.parse(fs.readFileSync(fp,'utf-8')) : []; + prev.push({ timestamp: new Date().toISOString(), ...repoEnhanceInfo }); + fs.writeFileSync(fp, JSON.stringify(prev, null, 2), 'utf-8'); + console.log(`🧪 repoEventEnhance 调试写出: ${fp}`); + } catch (err) { + console.warn('⚠️ 写出 repo_event_enhance_debug 失败', (err as any)?.message); + } + } + console.log(`📈 Repo→Collaboration权重放大完成,放大倍数: ${reverseBelongRatio * dynamicAmp}x`); } /** @@ -966,27 +2445,24 @@ export class ProjectOpenRankCalculator { /** * 计算单个节点的项目级 OpenRank 值 + * 修复版本:基于活动权重而非源节点OpenRank进行传播 */ private calculateNodeOpenRank(node: GraphNode): number { const retentionFactor = node.retentionFactor; const initValue = node.initValue; - // 收集来自邻居的消息(入边的权重传播) + // 收集来自邻居的消息(基于边权重传播,避免马太效应) let messageSum = 0; const incomingEdges = this.graph.getIncomingEdges(node.id); - + // 使用迭代前预计算的 baseTransmission 与 cached transmission blend + const tb = this._transmissionBlendCached || { a: 0, b: 0.5, c: 0.5 }; + const baseMap = this._baseTransmissionMap; for (const edge of incomingEdges) { - const sourceNode = this.graph.getNode(edge.source); - if (sourceNode) { - // 计算源节点传递给当前节点的值 - const outgoingEdges = this.graph.getOutgoingEdges(edge.source); - const totalOutWeight = outgoingEdges.reduce((sum, e) => sum + e.weight, 0); - - if (totalOutWeight > 0) { - const messageValue = (sourceNode.openrank * edge.weight) / totalOutWeight; - messageSum += messageValue; - } - } + const totalOutWeight = (this._cachedOutgoingSum && this._cachedOutgoingSum.get(edge.source)) || 0; + if (totalOutWeight <= 0) continue; + const weightRatio = edge.weight / totalOutWeight; + const baseTransmission = baseMap ? (baseMap.get(edge.source) || 0) : (tb.a * ((this.graph.getNode(edge.source)?.openrank) || 0) + tb.b * ((this.graph.getNode(edge.source)?.lastOpenrank) || 0) + tb.c * ((this.graph.getNode(edge.source)?.initValue) || 0)); + messageSum += baseTransmission * weightRatio; } // 计算新的 OpenRank 值 (项目级公式) @@ -1011,7 +2487,10 @@ export class ProjectOpenRankCalculator { openrank: node.openrank, lastMonthOpenrank: node.lastOpenrank, change: node.openrank - node.lastOpenrank, - metadata: node.metadata, + metadata: { + ...node.metadata, + initValue: node.initValue, // 添加实际初始值到 metadata + }, }); } @@ -1026,6 +2505,166 @@ export class ProjectOpenRankCalculator { return results; } + // 写出 AB 解释文件 + private flushABExplain() { + if (!this.abExplain.length) return; + try { + const outDir = path.resolve(process.cwd(), 'test_data'); + if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true }); + const filePath = path.join(outDir, 'ab_explanations.json'); + const payload = { generatedAt: new Date().toISOString(), total: this.abExplain.length, items: this.abExplain }; + fs.writeFileSync(filePath, JSON.stringify(payload, null, 2), 'utf-8'); + console.log(`🧪 AB 分层解释已写出: ${filePath}`); + } catch (err) { + console.warn('⚠️ 写出 ab_explanations.json 失败', (err as any)?.message); + } finally { + this.abExplain = []; + } + } + + // 写出分组活动调试(占位实现,保持与 dist 行为一致) + private flushGroupedActivityDebug() { + // 占位:目前没有 groupedActivity 的内存收集结构,保持兼容 + return; + } + + // 写出 PR 活动调试日志 + private flushPRActivityDebugLogs() { + if (!this.debugOutputsEnabled) { + this.prActivityDebugLogs = []; + return; + } + if (!this.prActivityDebugLogs.length) return; + try { + const outDir = path.resolve(process.cwd(), 'test_data'); + if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true }); + const filePath = path.join(outDir, 'pr_activity_debug.json'); + const payload = { generatedAt: new Date().toISOString(), total: this.prActivityDebugLogs.length, logs: this.prActivityDebugLogs }; + fs.writeFileSync(filePath, JSON.stringify(payload, null, 2), 'utf-8'); + console.log(`📝 PR 活动调试日志已写出: ${filePath} (records=${this.prActivityDebugLogs.length})`); + } catch (err) { + console.warn('⚠️ 写入 pr_activity_debug.json 失败:', (err as any)?.message); + } finally { + this.prActivityDebugLogs = []; + } + } + + // 写出 Issue 活动调试日志 + private flushIssueActivityDebugLogs() { + if (!this.debugOutputsEnabled) { + this.issueActivityDebugLogs = []; + return; + } + if (!this.issueActivityDebugLogs.length) return; + try { + const outDir = path.resolve(process.cwd(), 'test_data'); + if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true }); + const filePath = path.join(outDir, 'issue_activity_debug.json'); + const payload = { generatedAt: new Date().toISOString(), total: this.issueActivityDebugLogs.length, logs: this.issueActivityDebugLogs }; + fs.writeFileSync(filePath, JSON.stringify(payload, null, 2), 'utf-8'); + console.log(`📝 Issue 活动调试日志已写出: ${filePath} (records=${this.issueActivityDebugLogs.length})`); + } catch (err) { + console.warn('⚠️ 写入 issue_activity_debug.json 失败:', (err as any)?.message); + } finally { + this.issueActivityDebugLogs = []; + } + } + + // 写出 PR 价值池调试信息 + private flushPRValuePoolsDebug() { + if (!this.debugOutputsEnabled) { + this.prValuePoolsDebug = []; + return; + } + if (!this.prValuePoolsDebug.length) return; + try { + const outDir = path.resolve(process.cwd(), 'test_data'); + if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true }); + const filePath = path.join(outDir, 'pr_value_pools.json'); + const payload = { generatedAt: new Date().toISOString(), total: this.prValuePoolsDebug.length, items: this.prValuePoolsDebug }; + fs.writeFileSync(filePath, JSON.stringify(payload, null, 2), 'utf-8'); + console.log(`🧪 PR 价值池调试日志已写出: ${filePath} (records=${this.prValuePoolsDebug.length})`); + } catch (err) { + console.warn('⚠️ 写入 pr_value_pools.json 失败:', (err as any)?.message); + } finally { + this.prValuePoolsDebug = []; + } + } + + // 写出 Issue 价值池调试 + private flushIssueValuePoolsDebug() { + if (!this.debugOutputsEnabled) { + this.issueValuePoolsDebug = []; + return; + } + if (!this.issueValuePoolsDebug.length) return; + try { + const outDir = path.resolve(process.cwd(), 'test_data'); + if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true }); + const filePath = path.join(outDir, 'issue_value_pools.json'); + const payload = { generatedAt: new Date().toISOString(), total: this.issueValuePoolsDebug.length, items: this.issueValuePoolsDebug }; + fs.writeFileSync(filePath, JSON.stringify(payload, null, 2), 'utf-8'); + console.log(`🧪 Issue 价值池调试日志已写出: ${filePath} (records=${this.issueValuePoolsDebug.length})`); + } catch (err) { + console.warn('⚠️ 写入 issue_value_pools.json 失败:', (err as any)?.message); + } finally { + this.issueValuePoolsDebug = []; + } + } + + // 写出 Comment value 调试 + private flushCommentValueDebug() { + if (!this.debugOutputsEnabled) { + this.commentValueDebug = []; + return; + } + if (!this.commentValueDebug.length) return; + try { + const outDir = path.resolve(process.cwd(), 'test_data'); + if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true }); + const filePath = path.join(outDir, 'comment_value_debug.json'); + const payload = { generatedAt: new Date().toISOString(), total: this.commentValueDebug.length, items: this.commentValueDebug }; + fs.writeFileSync(filePath, JSON.stringify(payload, null, 2), 'utf-8'); + console.log(`🧪 Comment value 调试已写出: ${filePath} (records=${this.commentValueDebug.length})`); + } catch (err) { + console.warn('⚠️ 写入 comment_value_debug.json 失败:', (err as any)?.message); + } finally { + this.commentValueDebug = []; + } + } + + // 写出 pending assurance 池 + private flushPendingAssurance() { + if (!this.debugOutputsEnabled) { + this.pendingAssurancePool = []; + return; + } + if (!this.pendingAssurancePool.length) return; + try { + const outDir = path.resolve(process.cwd(), 'test_data'); + if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true }); + const filePath = path.join(outDir, 'pending_assurance.json'); + const payload = { generatedAt: new Date().toISOString(), total: this.pendingAssurancePool.length, items: this.pendingAssurancePool }; + fs.writeFileSync(filePath, JSON.stringify(payload, null, 2), 'utf-8'); + console.log(`🧪 pending assurance 已写出: ${filePath} (records=${this.pendingAssurancePool.length})`); + } catch (err) { + console.warn('⚠️ 写入 pending_assurance.json 失败:', (err as any)?.message); + } finally { + this.pendingAssurancePool = []; + } + } + + // Review local blend 调试相关功能已移除(配置与逻辑均被删除) + + // 全局用户级 commit 份额软上限(已禁用) + // NOTE: 按项目要求,全局用户级别的 commit/review 份额上限被明确禁止并不会在运行时生效。 + // 本函数保留仅作占位与历史兼容(no-op)。如需恢复,请在产品讨论与审计后实现。 + private applyGlobalCommitShareCap() { + return; // intentionally disabled + } + + // 原 applyCrossUserCommitDiminish 机制已移除。 + /** * 获取计算状态 */ @@ -1054,6 +2693,66 @@ export class ProjectOpenRankCalculator { }; } + // 聚合全局贡献分量汇总,便于分析 commit 占比偏高的真实结构因素 + private flushContributionSummary() { + try { + const perUser: any = {}; + for (const e of this.graph.edges) { + if (e.type !== 'activity' || !e.activityDetails) continue; + const targetNode = this.graph.getNode(e.target); + if (!targetNode || targetNode.type !== 'User') continue; + const det = e.activityDetails; + const u = perUser[targetNode.id] || (perUser[targetNode.id] = { userId: targetNode.id, userLogin: targetNode.name, open:0, comment:0, review:0, reviewComment:0, close:0, commit:0, total:0, edges:0 }); + u.open += det.openWeight || 0; + u.comment += det.commentWeight || 0; + u.review += det.reviewWeight || 0; + u.reviewComment += det.reviewCommentWeight || 0; + u.close += det.closeWeight || 0; + u.commit += det.commitWeight || 0; + u.total += (det.openWeight||0)+(det.commentWeight||0)+(det.reviewWeight||0)+(det.reviewCommentWeight||0)+(det.closeWeight||0)+(det.commitWeight||0); + u.edges++; + } + const arr = Object.values(perUser).map((u:any)=> ({ + userId: u.userId, + userLogin: u.userLogin, + open: u.open, + comment: u.comment, + review: u.review, + reviewComment: u.reviewComment, + close: u.close, + commit: u.commit, + total: u.total, + share: { + open: u.total? u.open/u.total:0, + comment: u.total? u.comment/u.total:0, + review: u.total? u.review/u.total:0, + reviewComment: u.total? u.reviewComment/u.total:0, + close: u.total? u.close/u.total:0, + commit: u.total? u.commit/u.total:0 + }, + edges: u.edges + })); + // 计算全局聚合 + const global = arr.reduce((g:any,u:any)=>{g.open+=u.open;g.comment+=u.comment;g.review+=u.review;g.reviewComment+=u.reviewComment;g.close+=u.close;g.commit+=u.commit;g.total+=u.total;return g;},{open:0,comment:0,review:0,reviewComment:0,close:0,commit:0,total:0}); + if (global.total>0) { + global.share = { + open: global.open/global.total, + comment: global.comment/global.total, + review: global.review/global.total, + reviewComment: global.reviewComment/global.total, + close: global.close/global.total, + commit: global.commit/global.total + }; + } + const outDir = path.resolve(process.cwd(),'test_data'); + if (!fs.existsSync(outDir)) fs.mkdirSync(outDir,{recursive:true}); + fs.writeFileSync(path.join(outDir,'contribution_summary.json'), JSON.stringify({ generatedAt:new Date().toISOString(), users: arr, global }, null, 2),'utf-8'); + console.log('🧾 已写出全局贡献汇总: test_data/contribution_summary.json'); + } catch (err) { + console.warn('⚠️ 写出 contribution_summary 失败', (err as any)?.message); + } + } + /** * 创建User节点 * 从Issue和PR的activities中提取所有唯一用户 @@ -1137,182 +2836,6 @@ export class ProjectOpenRankCalculator { console.log(`📊 创建了 ${userInfoMap.size} 个User节点`); } - /** - * 基于边权重优化节点初始值 - * 实现边权重反推初始值的算法 - */ - private optimizeInitialValuesBasedOnEdgeWeights(): void { - console.log('⚡ 开始基于边权重优化初始值...'); - - // 1. 计算每个节点的入边权重总和 - const nodeIncomingWeights = new Map(); - - // 初始化所有节点的入边权重为 0 - for (const [nodeId] of this.graph.nodes) { - nodeIncomingWeights.set(nodeId, 0); - } - - // 累加入边权重(仅使用 Repo -> Issue/PR 的 reverse_belong,避免活动信号重复进入初始值) - for (const edge of this.graph.edges) { - if (edge.type !== 'reverse_belong') continue; - const currentWeight = nodeIncomingWeights.get(edge.target) || 0; - nodeIncomingWeights.set(edge.target, currentWeight + edge.weight); - } - - // 2. 配置优化参数 - const standardizationFactors = { - Issue: 100, // Issue 标准化因子 - PullRequest: 150, // PR 标准化因子 - User: 50 // User 标准化因子 - }; - - const baseInitValues = { - Issue: this.config.project.issueInitValue || 2.0, - PullRequestMerged: this.config.project.prMergedInitValue || 1.0, - PullRequestNotMerged: this.config.project.prNotMergedInitValue || 0.5, - User: this.config.global.defaultInitValue || 0.1, - Repo: 10.0 - }; - - // 3. 优化节点初始值 - let optimizedCount = 0; - let totalQualityBoost = 0; - - for (const [nodeId, node] of this.graph.nodes) { - if (node.type === 'Issue' || node.type === 'PullRequest') { - const incomingWeight = nodeIncomingWeights.get(nodeId) || 0; - const standardizationFactor = standardizationFactors[node.type as keyof typeof standardizationFactors]; - let baseInitValue: number; - if (node.type === 'Issue') { - baseInitValue = baseInitValues.Issue; - } else { - const state = (node.metadata && node.metadata.state) || 'open'; - baseInitValue = state === 'merged' ? baseInitValues.PullRequestMerged : baseInitValues.PullRequestNotMerged; - } - - // 质量/结构放大(仅仓库反向属于) - const qualityFactor = 1 + (incomingWeight / standardizationFactor); - let newInitValue = baseInitValue * qualityFactor; - - // 时间衰减(Issue/PR):根据配置选择半衰期或指数衰减 - const createdAtIso = (node.metadata && node.metadata.createdAt) as string | undefined; - if (createdAtIso) { - const created = new Date(createdAtIso); - const now = new Date(); - const days = Math.max(0, (now.getTime() - created.getTime()) / (1000 * 60 * 60 * 24)); - const td = this.config.project.initOptimization?.timeDecay; - let decay = 1.0; - if (td?.mode === 'exp') { - const lambda = td.lambdaDays ?? 30; - decay = Math.exp(-(days / lambda)); - } else { - const halfLife = td?.halfLifeDays ?? 180; - decay = Math.pow(0.5, days / halfLife); - } - if (td?.minDecay != null) decay = Math.max(decay, td.minDecay); - newInitValue *= decay; - if (!node.metadata) node.metadata = {}; - node.metadata.timeDecay = decay; - node.metadata.ageDays = Math.round(days); - } - - // PR 复杂度温和加成 - if (node.type === 'PullRequest') { - const adds = Number((node.metadata && node.metadata.additions) ?? 0) || 0; - const dels = Number((node.metadata && node.metadata.deletions) ?? 0) || 0; - const code = Math.max(0, adds + dels); - const complexity = Math.log1p(code) * 0.2; // 温和系数 - newInitValue += complexity; - if (!node.metadata) node.metadata = {}; - node.metadata.codeComplexity = complexity; - } - - // 设置限制,避免极端值(从配置读取) - const minFactors = this.config.project.initOptimization?.minClampFactor; - const maxFactor = this.config.project.initOptimization?.maxClampFactor ?? 3.0; - const minFactor = node.type === 'Issue' ? (minFactors?.issue ?? 0.5) : (minFactors?.pr ?? 0.75); - const minInitValue = baseInitValue * minFactor; - const maxInitValue = baseInitValue * maxFactor; - const finalInitValue = Math.max(minInitValue, Math.min(maxInitValue, newInitValue)); - - // 更新节点初始值 - const oldInitValue = node.initValue; - node.initValue = finalInitValue; - node.openrank = node.retentionFactor * finalInitValue; // 重新初始化 OpenRank - - // 保存优化信息到元数据 - if (!node.metadata) { - node.metadata = {}; - } - node.metadata.optimizedInitValue = finalInitValue; - node.metadata.originalInitValue = oldInitValue; - node.metadata.qualityFactor = qualityFactor; - node.metadata.incomingWeight = incomingWeight; - - optimizedCount++; - totalQualityBoost += (finalInitValue / oldInitValue); - - // 输出前5个节点的优化信息 - if (optimizedCount <= 5) { - console.log(` ${node.type} "${node.name.substring(0, 30)}..."`); - console.log(` 入边权重: ${incomingWeight.toFixed(1)}`); - console.log(` 质量因子: ${qualityFactor.toFixed(2)}`); - console.log(` 初始值: ${oldInitValue.toFixed(1)} → ${finalInitValue.toFixed(1)} (${(finalInitValue/oldInitValue).toFixed(1)}x)`); - } - } - } - - // 4. 输出优化统计 - const avgQualityBoost = totalQualityBoost / optimizedCount; - console.log(`✅ 优化了 ${optimizedCount} 个节点的初始值`); - console.log(`📈 平均质量提升倍数: ${avgQualityBoost.toFixed(2)}x`); - - // 分析优化效果 - this.analyzeOptimizationEffect(nodeIncomingWeights); - } - - /** - * 分析初始值优化效果 - */ - private analyzeOptimizationEffect(nodeIncomingWeights: Map): void { - console.log('\n📊 优化效果分析'); - console.log('=' .repeat(50)); - - const issueNodes = Array.from(this.graph.nodes.values()).filter(n => n.type === 'Issue'); - const prNodes = Array.from(this.graph.nodes.values()).filter(n => n.type === 'PullRequest'); - const userNodes = Array.from(this.graph.nodes.values()).filter(n => n.type === 'User'); - - // 分析初始值分布 - const analyzeNodeType = (nodes: GraphNode[], typeName: string, baseValue: number) => { - if (nodes.length === 0) return; - - const initValues = nodes.map(n => n.initValue); - const multipliers = initValues.map(v => v / baseValue); - - console.log(`\n${typeName} 节点 (${nodes.length}个):`); - console.log(` 初始值范围: ${Math.min(...initValues).toFixed(2)} - ${Math.max(...initValues).toFixed(2)}`); - console.log(` 平均倍数: ${(multipliers.reduce((s, m) => s + m, 0) / multipliers.length).toFixed(2)}x`); - console.log(` 最大倍数: ${Math.max(...multipliers).toFixed(2)}x`); - - // Top 3 高初始值节点 - const sortedNodes = [...nodes].sort((a, b) => b.initValue - a.initValue); - console.log(` Top 3 高初始值:`); - sortedNodes.slice(0, 3).forEach((node, i) => { - const multiplier = node.initValue / baseValue; - const incomingWeight = nodeIncomingWeights.get(node.id) || 0; - console.log(` ${i+1}. ${multiplier.toFixed(1)}x (权重:${incomingWeight.toFixed(1)}) - ${node.name.substring(0, 40)}...`); - }); - }; - - analyzeNodeType(issueNodes, 'Issue', this.config.project.issueInitValue || 2.0); - analyzeNodeType(prNodes, 'PullRequest', this.config.project.prMergedInitValue || 1.0); - - console.log('\n🔮 预期效果:'); - console.log(' - 高质量节点获得更高初始值,增强网络传播效应'); - console.log(' - 减少传播值过小问题,提升算法敏感度'); - console.log(' - 保持算法一致性:边权重 ↔ 初始值 同步反映质量'); - } - /** * 清理资源 */ diff --git a/src/src/algorithm/WeightingFramework.ts b/src/src/algorithm/WeightingFramework.ts new file mode 100644 index 0000000..84b1ef3 --- /dev/null +++ b/src/src/algorithm/WeightingFramework.ts @@ -0,0 +1,159 @@ +import { IssueData, PullRequestData, OpenRankConfig } from '../types'; + +/** + * 方案A + 方案B 分层权重框架 (初版) + * A: 活动/基础价值 (由现有活动计数 * 配置权重得出) + * B: 协作单元增强维度 (内容质量 / 参与度 / 复杂度 / 影响力) + * + * 输出: + * - baseValue: A 层原始基础值 + * - enhancementMultiplier: B 层计算的增强乘子 (若启用) + * - finalValue: baseValue * enhancementMultiplier + * - explain: 维度分解与裁剪细节 + */ +export interface ABWeightingResult { + baseValue: number; + enhancementMultiplier: number; // 若未启用B则=1 + finalValue: number; + explain: Record; +} + +export class WeightingFramework { + constructor(private config: OpenRankConfig) {} + + /** + * 计算 Issue 或 PR 的协作单元增强乘子 + * 基础思想: + * contentQuality: 评论密度、正向反馈(thumbs/reactions)、评审 comment 质量 + * participation: 参与人数、多角色参与 (作者+评审+评论者) + * complexity: (PR) 代码行/文件, (Issue) 活动与标签/linked PR 数量代理 + * impact: (PR) merged 状态 + 关联 issue 数; (Issue) 是否被关闭 + 是否触发 PR + */ + private computeEnhancementMultiplier(item: IssueData | PullRequestData): { multiplier: number; detail: any } { + const cfg = this.config.projectActivityWeights.collaborationValueEnhancement; + if (!cfg?.enabled) { + return { multiplier: 1, detail: { enabled: false } }; + } + + // 公共特征 + const reactions = (item.reactions?.thumbsUp || 0) + (item.reactions?.heart || 0) + (item.reactions?.rocket || 0); + const participants = new Set((item.activities || []).map(a => a.actorLogin)).size + 1; // +作者 + const commentEvents = (item.activities || []).reduce((s,a:any)=> s + (a.commentCount||0), 0); + const reviewEvents = 'additions' in item ? (item.activities || []).reduce((s,a:any)=> s + (a.reviewCount||0), 0) : 0; + const reviewCommentEvents = 'additions' in item ? (item.activities || []).reduce((s,a:any)=> s + (a.reviewCommentCount||0), 0) : 0; + + // 内容质量 proxy + const contentQuality = (reactions) + 0.6 * (commentEvents) + (reviewCommentEvents>0? 0.8 * (reviewCommentEvents) : 0); + + // 参与度 + const roleSet = new Set(); + (item.activities || []).forEach((a:any)=>{ + if (a.reviewCount>0) roleSet.add('reviewer'); + if (a.commentCount>0) roleSet.add('commenter'); + if (a.commitCount>0) roleSet.add('committer'); + }); + roleSet.add('author'); + const participation = (participants) + 0.4 * roleSet.size; + + // 复杂度 + let complexity = 0; + if ('additions' in item) { + const lines = (item.additions||0)+(item.deletions||0); + const files = item.filesChanged || 0; + complexity = Math.log1p(lines) * 0.7 + Math.log1p(files) * 0.5; + } else { + const actLen = (item.activities||[]).length; + const linkedPRs = (item as any).linkedPRs ? (item as any).linkedPRs.length : 0; + complexity = (actLen) * 5 + (linkedPRs||0) * 4; + } + + // 影响力 + let impact = 0; + if ('additions' in item) { + impact = (item.state === 'merged' ? 1.5 : 1.0) + ((item.linkedIssues || []).length) * 0.5; + } else { + impact = (item.state === 'closed' ? 1.5 : 1.0) + (((item as any).linkedPRs || []).length) * 0.6; + } + + // 各维度归一(简单线性 + clamp) + const norm = (v:number, min:number, max:number)=>{ + if (!isFinite(v)) return 0; const cl = Math.max(min, Math.min(max, v)); return (cl - min)/(max-min || 1); + }; + + const contentNorm = norm(contentQuality, 0, 6); + const participationNorm = norm(participation, 0, 4.5); + const complexityNorm = norm(complexity, 0, 7); + const impactNorm = norm(impact, 0, 3); + + // 按权重线性组合 + const rawScore = + contentNorm * cfg.contentQualityWeight + + participationNorm * cfg.participationWeight + + complexityNorm * cfg.complexityWeight + + impactNorm * cfg.impactWeight; + + // 归一到 [minMultiplier, maxMultiplier] + const totalWeight = cfg.contentQualityWeight + cfg.participationWeight + cfg.complexityWeight + cfg.impactWeight || 1; + const baseMul = cfg.minMultiplier + (cfg.maxMultiplier - cfg.minMultiplier) * (rawScore / totalWeight); + + // 与 balanceFactor 融合:final = 1 * (1-balance) + baseMul * balance + const balance = Math.max(0, Math.min(1, cfg.balanceFactor)); + const finalMul = 1 * (1 - balance) + baseMul * balance; + + return { + multiplier: finalMul, + detail: { + enabled: true, + contentQuality, participation, complexity, impact, + contentNorm, participationNorm, complexityNorm, impactNorm, + rawScore, baseMul, balance, finalMul, + weights: { ...cfg } + } + }; + } + + /** + * 入口:返回协作单元 (Issue/PR) + * 基础值 * 增强因子(从质量方面考虑) + */ + computeABValue(item: IssueData | PullRequestData, baseValueOverride?: number): ABWeightingResult { + // baseValue (使用现有初始值或覆盖) + const baseValue = baseValueOverride ?? this.estimateBaseValue(item); + const enh = this.computeEnhancementMultiplier(item); + const finalValue = baseValue * enh.multiplier; + return { + baseValue, + enhancementMultiplier: enh.multiplier, + finalValue, + explain: { + baseValue, + enhancement: enh.detail + } + }; + } + + /** + * 估算基础价值 (在没有基础值时候重新计算,保底举措) + */ + private estimateBaseValue(item: IssueData | PullRequestData): number { + if ('additions' in item) { // PR + const base = item.state === 'merged' ? (this.config.project.prMergedInitValue || 8) : (this.config.project.prNotMergedInitValue || 3); + const lines = (item.additions||0)+(item.deletions||0); + const files = item.filesChanged || 0; + const participants = new Set((item.activities||[]).map(a=>a.actorLogin)).size + 1; + const act = (item.activities||[]).length; + const codeFactor = Math.log1p(lines) * 0.25 + Math.log1p(files) * 0.15; + const collab = (participants + act) * 0.3; + return base * (1 + codeFactor + collab); + } else { // Issue + const base = (this.config.project.issueInitValue || 5); + const act = (item.activities||[]).length; + const participants = new Set((item.activities||[]).map(a=>a.actorLogin)).size + 1; + const reactions = (item.reactions?.thumbsUp || 0) + (item.reactions?.heart || 0) + (item.reactions?.rocket || 0); + const activityFactor = (act) * 0.3; + const participantFactor = (participants) * 0.35; + const reactionFactor = (reactions) * 0.2; + return base * (1 + activityFactor + participantFactor + reactionFactor); + } + } +} diff --git a/src/src/api/README.md b/src/src/api/README.md new file mode 100644 index 0000000..fc49cdb --- /dev/null +++ b/src/src/api/README.md @@ -0,0 +1,20 @@ +OpenRank API (development) + +This small express server exposes a minimal API to run the project-level OpenRank calculator and return JSON results. + +Run (from repo `src` folder): + +PowerShell: + +```powershell +# install dependencies in src +npm install +# start API server (ts-node) +npm run start:api +``` + +Notes: +- The server uses the project's `OpenRank` class under `src/index.ts` to perform calculation. It expects the code to compile/run under ts-node. +- Default port: 4000 +- POST /api/calculate accepts JSON: { owner, repo, startDate?, endDate?, topNUsers?, topNRepos?, configOverrides? } +- For local development you can run the frontend `front/frontend` via `live-server` (see front/frontend/package.json). \ No newline at end of file diff --git a/src/src/api/server.ts b/src/src/api/server.ts new file mode 100644 index 0000000..89a45ab --- /dev/null +++ b/src/src/api/server.ts @@ -0,0 +1,1282 @@ +import express, { Request, Response } from 'express'; +import cors from 'cors'; +import bodyParser from 'body-parser'; +import path from 'path'; +import { OpenRank } from '../index'; +import { GitHubDataCollector } from '../GitHubDataCollector'; +import { ProjectOpenRankCalculator } from '../algorithm/ProjectOpenRankCalculator'; +import * as repoStore from '../db/repoStore'; + +const app = express(); +const port = process.env.PORT ? parseInt(process.env.PORT, 10) : 4001; + +// 简单的内存级计算结果缓存 (方案A) +// key: `${owner}/${repo}` -> { start: ISOString, end: ISOString, results: out.results, users: users[], repos: repos[], timestamp: Date } +interface CalcCacheEntry { + start: string; + end: string; + results: any; + users: any[]; + repos: any[]; + timestamp: number; + // 可选:窗口天数,用于前端复用与过滤 + windowDays?: number; +} +const calculationCache: Record = {}; + +// 项目级快照缓存(approx/full),含 TTL +interface ProjectSnapshotCacheEntry { + snapshot: any; // ProjectOpenRankSnapshot 结构 + kind: 'approx' | 'full'; + expiresAt: number; // epoch ms +} +const projectCache: Record = {}; +// repo -> calibration factor (median(full/approx)) +const calibrationFactors: Record = {}; + +// 简易任务管理(异步项目 full 计算) +interface TaskEntry { + id: string; + status: 'queued' | 'processing' | 'done' | 'error'; + progress: number; // 0-100 + result?: any; + error?: string; + createdAt: number; + updatedAt: number; +} +const tasks: Record = {}; +function createTask(): TaskEntry { + const id = 't_' + Math.random().toString(36).slice(2, 10); + const t: TaskEntry = { id, status: 'queued', progress: 0, createdAt: Date.now(), updatedAt: Date.now() }; + tasks[id] = t; + return t; +} +function getTask(id: string) { return tasks[id] || null; } +function updateTask(id: string, patch: Partial) { + if (!tasks[id]) return; + tasks[id] = { ...tasks[id], ...patch, updatedAt: Date.now() }; +} + +// ====== 缓存清理 & LRU(简单实现) ====== +const MAX_PROJECT_CACHE = 200; +const MAX_CALC_CACHE = 100; +const TASK_TTL_MS = 60 * 60 * 1000; // 1h +function cleanupCaches() { + const now = Date.now(); + // project cache: remove expired + for (const key of Object.keys(projectCache)) { + if (projectCache[key].expiresAt < now) delete projectCache[key]; + } + // calculation cache: naive TTL 30m + for (const key of Object.keys(calculationCache)) { + if (now - calculationCache[key].timestamp > 30 * 60 * 1000) delete calculationCache[key]; + } + // LRU trim (approximate: remove oldest by timestamp/expiresAt ordering) + const projectKeys = Object.keys(projectCache); + if (projectKeys.length > MAX_PROJECT_CACHE) { + projectKeys.sort((a,b)=> projectCache[a].expiresAt - projectCache[b].expiresAt); + for (let i=0; i< projectKeys.length - MAX_PROJECT_CACHE; i++) delete projectCache[projectKeys[i]]; + } + const calcKeys = Object.keys(calculationCache); + if (calcKeys.length > MAX_CALC_CACHE) { + calcKeys.sort((a,b)=> calculationCache[a].timestamp - calculationCache[b].timestamp); + for (let i=0; i< calcKeys.length - MAX_CALC_CACHE; i++) delete calculationCache[calcKeys[i]]; + } + // tasks cleanup + for (const key of Object.keys(tasks)) { + if (now - tasks[key].updatedAt > TASK_TTL_MS) delete tasks[key]; + } +} +setInterval(cleanupCaches, 5 * 60 * 1000).unref(); + +// 简单 hash 函数 (djb2) +function hashString(input: string): string { + let hash = 5381; + for (let i = 0; i < input.length; i++) hash = ((hash << 5) + hash) + input.charCodeAt(i); + return ('h' + (hash >>> 0).toString(16)); +} +let globalCalcVersion = 0; + +app.use(cors()); +app.use(bodyParser.json({ limit: '5mb' })); + +// Simple health +app.get('/api/health', (_req: Request, res: Response) => res.json({ status: 'ok', ts: new Date().toISOString() })); + +// POST /api/calculate - trigger calculation for a repo and return results +app.post('/api/calculate', async (req: Request, res: Response) => { + try { + const { owner, repo, startDate, endDate, topNUsers, topNRepos, configOverrides, days, fullHistory, forceFullHistory, minReadFraction, autoExpandHeuristic } = req.body || {}; + if (!owner || !repo) return res.status(400).json({ error: 'owner and repo are required' }); + + // Allow caller to specify a relative window via `days` (overrides startDate if provided) + let windowDays: number | undefined = undefined; + if (days !== undefined) { + const parsed = parseInt(String(days), 10); + if (!isNaN(parsed) && parsed > 0) { + // 不再限制 365;若非常大(>10000天≈27年)则截断到 10000 以防止意外输入 + windowDays = parsed > 10000 ? 10000 : parsed; + } + } + // Default date window: last 30 days if not provided + let s = windowDays ? new Date(Date.now() - windowDays * 24 * 60 * 60 * 1000) : (startDate ? new Date(startDate) : new Date(Date.now() - 1000 * 60 * 60 * 24 * 30)); + let e = endDate ? new Date(endDate) : new Date(); + // 若用户提供了 startDate & endDate 且未设置 days,则严格使用它们(允许任意跨度) + if (startDate && endDate && days === undefined) { + s = new Date(startDate); e = new Date(endDate); + } + if (s > e) { // 简单互换,避免负窗口 + const tmp = s; s = e; e = tmp; + } + const requestedDays = Math.max(1, Math.round((e.getTime() - s.getTime()) / 86400000)); + + // Instantiate OpenRank (uses project's loadConfig internally) + const or = new OpenRank(); + + // If configOverrides provided, try to merge into runtime config (best-effort) + if (configOverrides && typeof or.getConfig === 'function') { + try { + const cfg = or.getConfig(); + Object.assign(cfg, configOverrides); + } catch (err) { + // ignore + } + } + + // If caller requests real GitHub data, prefer local DB (repoStore) then fallback to GitHub network fetch + const useReal = req.body.useReal === true; + // 允许通过 allowMock 控制是否可退回 mock(默认不允许,保障“项目模式”只用真实数据) + const allowMock = req.body.allowMock === true || String(req.query?.allowMock || '').toLowerCase() === '1'; + // 初始化为空数组,避免 TS 推断在分支内未赋值导致的使用前访问告警 + let results: any[] = []; + // meta info for output + let metaSource = 'local'; + let durationMs = 0; + + // Hardcoded token per user request (note: embedding tokens in source is insecure; consider env vars or local config) + const HARDCODED_GITHUB_TOKEN = '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'; + + // Diagnostic variables (lifted to outer scope so response meta can include them) + let dbRepoId: number | null = null; + let issueCountTotal = 0; + let prCountTotal = 0; + let issuesRead = 0; + let prsRead = 0; + let repoEventsRead = 0; + let usedFallbackStart: Date | null = null; + + // data holders (lifted so response meta can reference samples) + let issues: any[] = []; + let pullRequests: any[] = []; + let repoEvents: any[] = []; + + if (useReal) { + const startTs = Date.now(); + // prefer environment token but fall back to hardcoded token if not present + const githubToken = process.env.GITHUB_TOKEN && process.env.GITHUB_TOKEN.length ? process.env.GITHUB_TOKEN : HARDCODED_GITHUB_TOKEN; + if (!githubToken) return res.status(400).json({ error: 'GITHUB_TOKEN not set and no hardcoded token available' }); + + // Attempt to load from local DB first + const fullName = `${owner}/${repo}`; + + try { + const dbRepo = await repoStore.getRepoByFullName(fullName); + if (dbRepo && dbRepo.id) { + const repoId = dbRepo.id; + dbRepoId = repoId; + console.log(`DB repo found: id=${repoId}, full_name=${dbRepo.full_name}`); + // First try to read using requested window + issues = await repoStore.getIssuesForRepo(repoId, s, e); + pullRequests = await repoStore.getPRsForRepo(repoId, s, e); + + issuesRead = issues.length; + prsRead = pullRequests.length; + + // Also always fetch total counts for diagnostics (helps verify total historical rows) + try { + issueCountTotal = await repoStore.countIssues(repoId); + prCountTotal = await repoStore.countPRs(repoId); + } catch (cErr) { + console.warn('Failed to fetch repo counts for diagnostics:', (cErr as any)?.message || cErr); + issueCountTotal = issueCountTotal || 0; + prCountTotal = prCountTotal || 0; + } + + // Heuristic: if we read only a small fraction of the repo's total rows, the caller + // probably requested a narrow window but may want the full history. By default we + // expand to full history when the read rows are very few (absolute) or constitute + // a small fraction of total rows. This avoids returning results computed on tiny + // samples when historical data exists. + try { + const totalRows = (issueCountTotal || 0) + (prCountTotal || 0); // 全历史条目数 + const readRows = (issuesRead || 0) + (prsRead || 0); // 当前窗口读取数 + const wantFullFlag = !!fullHistory || !!forceFullHistory || String(req.query.fullHistory || '').toLowerCase() === '1'; + // 仅当用户显式要求 fullHistory,或者开启 autoExpandHeuristic 并触发条件时才扩展 + if (wantFullFlag || autoExpandHeuristic) { + const ABS_MIN = 30; + const FRAC_MIN = (typeof minReadFraction === 'number' && minReadFraction > 0 && minReadFraction < 1) ? minReadFraction : 0.50; + const readFracHistory = totalRows > 0 ? readRows / totalRows : 1; + const triggerHeuristic = autoExpandHeuristic && !wantFullFlag && totalRows > 0 && (readRows < ABS_MIN || readFracHistory < FRAC_MIN); + if (wantFullFlag || triggerHeuristic) { + console.log(`[history-expansion] repoId=${repoId} wantFull=${wantFullFlag} triggerHeuristic=${triggerHeuristic} readHistoryFrac=${readFracHistory.toFixed(3)} windowRows=${readRows} historyRows=${totalRows}`); + usedFallbackStart = new Date(0); + issues = await repoStore.getIssuesForRepo(repoId, usedFallbackStart, e); + pullRequests = await repoStore.getPRsForRepo(repoId, usedFallbackStart, e); + issuesRead = issues.length; + prsRead = pullRequests.length; + metaSource = 'db'; + try { + const collector = new GitHubDataCollector(githubToken); + if ((collector as any).fetchRepoEvents) { + repoEvents = await (collector as any).fetchRepoEvents(owner, repo, repoId, usedFallbackStart, e).catch(() => []); + repoEventsRead = (repoEvents || []).length; + } + } catch (_) { /* ignore */ } + (req as any)._expandedFullHistory = true; + (req as any)._expandedReason = wantFullFlag ? 'flag_fullHistory' : 'heuristic'; + } + } + } catch (heurErr) { + console.warn('Heuristic expansion check failed:', (heurErr as any)?.message || heurErr); + } + + // If DB returned no data for this window, but DB contains historical data for this repo, + // prefer local DB: load a broader window (epoch -> end) instead of immediately falling back to network. + if ((!issues || issues.length === 0) && (!pullRequests || pullRequests.length === 0)) { + try { + const issueCount = await repoStore.countIssues(repoId); + const prCount = await repoStore.countPRs(repoId); + issueCountTotal = issueCount || 0; + prCountTotal = prCount || 0; + console.log(`DB counts for repoId=${repoId}: issues=${issueCountTotal}, prs=${prCountTotal}`); + if ((issueCount || 0) + (prCount || 0) > 0) { + // load all available DB data up to 'e' (avoid future-dated rows) + usedFallbackStart = new Date(0); + issues = await repoStore.getIssuesForRepo(repoId, usedFallbackStart, e); + pullRequests = await repoStore.getPRsForRepo(repoId, usedFallbackStart, e); + issuesRead = issues.length; + prsRead = pullRequests.length; + metaSource = 'db'; + // try to supplement events from network (best-effort) + try { + const collector = new GitHubDataCollector(githubToken); + if ((collector as any).fetchRepoEvents) { + repoEvents = await (collector as any).fetchRepoEvents(owner, repo, repoId, new Date(0), e).catch(() => []); + repoEventsRead = (repoEvents || []).length; + } + } catch (_) { /* ignore */ } + } else { + // no historical DB rows -> fetch from network + metaSource = 'network'; + const collector = new GitHubDataCollector(githubToken); + const collected = await collector.collectProjectData(owner, repo, s, e); + issues = collected.issues || []; + pullRequests = collected.pullRequests || []; + repoEvents = collected.repoEvents || []; + } + } catch (countErr) { + // on any error while checking counts, fallback to network + console.warn('repoStore count check failed, falling back to GitHub:', (countErr as any)?.message || countErr); + metaSource = 'network'; + const collector = new GitHubDataCollector(githubToken); + const collected = await collector.collectProjectData(owner, repo, s, e); + issues = collected.issues || []; + pullRequests = collected.pullRequests || []; + repoEvents = collected.repoEvents || []; + } + } else { + metaSource = 'db'; + // try to supplement events from network (best-effort) + try { + const collector = new GitHubDataCollector(githubToken); + if ((collector as any).fetchRepoEvents) { + repoEvents = await (collector as any).fetchRepoEvents(owner, repo, repoId, s, e).catch(() => []); + repoEventsRead = (repoEvents || []).length; + } + } catch (_) { /* ignore */ } + } + } else { + // No repo record in DB -> fetch from network + metaSource = 'network'; + const collector = new GitHubDataCollector(githubToken); + const collected = await collector.collectProjectData(owner, repo, s, e); + issues = collected.issues || []; + pullRequests = collected.pullRequests || []; + repoEvents = collected.repoEvents || []; + } + } catch (err) { + // On DB read error, fallback to network + console.warn('repoStore read failed, falling back to GitHub:', (err as any)?.message || err); + metaSource = 'network'; + const collector = new GitHubDataCollector(githubToken); + const collected = await collector.collectProjectData(owner, repo, s, e); + issues = collected.issues || []; + pullRequests = collected.pullRequests || []; + repoEvents = collected.repoEvents || []; + } + + // run calculator + const config = (or.getConfig && typeof or.getConfig === 'function') ? or.getConfig() : {}; + const calc = new ProjectOpenRankCalculator(config as any); + const lastMonthOpenRank = new Map(); + results = await calc.calculateProjectOpenRank(issues, pullRequests, lastMonthOpenRank, repoEvents as any[]); + + durationMs = Date.now() - startTs; + // attach meta info later + // ensure metaSource set to 'db' or 'network' + } else { + // 项目模式(未显式 useReal=true 也会尽量走 DB 数据) + let dbProjectUsed = false; + try { + const fullName = `${owner}/${repo}`; + const dbRepo = await repoStore.getRepoByFullName(fullName); + if (dbRepo?.id) { + const repoId = dbRepo.id; + dbRepoId = repoId; + issues = await repoStore.getIssuesForRepo(repoId, s, e); + pullRequests = await repoStore.getPRsForRepo(repoId, s, e); + if (issues.length || pullRequests.length) { + const startTs = Date.now(); + const config = (or.getConfig && typeof or.getConfig === 'function') ? or.getConfig() : {}; + const calc = new ProjectOpenRankCalculator(config as any); + const lastMonthOpenRank = new Map(); + results = await calc.calculateProjectOpenRank(issues, pullRequests, lastMonthOpenRank, []); + durationMs = Date.now() - startTs; + metaSource = 'db-project'; + dbProjectUsed = true; + issueCountTotal = issues.length; + prCountTotal = pullRequests.length; + issuesRead = issues.length; + prsRead = pullRequests.length; + } + } + } catch (projErr) { + console.warn('[project-db-fallback] failed to load project data:', (projErr as any)?.message || projErr); + } + if (!dbProjectUsed) { + if (!allowMock) { + return res.status(404).json({ + error: 'no_project_data', + message: 'No DB data found for project and mock fallback disabled (set allowMock=1 to enable).', + meta: { source: 'none' } + }); + } + const startTs = Date.now(); + results = await or.calculate(s, e); + durationMs = Date.now() - startTs; + metaSource = 'mock-local'; + } + } + + // Attempt to derive activity distribution from raw issues/prs when possible. + // The ProjectOpenRankCalculator results don't currently include per-user activity counts, + // so prefer an aggregated distribution computed from the fetched data (best-effort). + const computedActivityDistribution: Record = { + issueComment: 0, + openIssue: 0, + openPull: 0, + reviewComment: 0, + mergedPull: 0 + }; + try { + if (Array.isArray(issues)) { + computedActivityDistribution.openIssue = issues.length; + for (const it of issues) { + if (it && Array.isArray(it.activities)) { + for (const a of it.activities) { + computedActivityDistribution.issueComment += (a.commentCount || 0); + computedActivityDistribution.reviewComment += (a.reviewCount || 0) + (a.reviewCommentCount || 0); + } + } + } + } + if (Array.isArray(pullRequests)) { + computedActivityDistribution.openPull = pullRequests.length; + for (const pr of pullRequests) { + if (pr && Array.isArray(pr.activities)) { + for (const a of pr.activities) { + computedActivityDistribution.issueComment += (a.commentCount || 0); + computedActivityDistribution.reviewComment += (a.reviewCount || 0) + (a.reviewCommentCount || 0); + } + } + // merged detection (best-effort) + if ((pr as any).merged || (pr as any).merged_at || (pr as any).state === 'merged') { + computedActivityDistribution.mergedPull += 1; + } + } + } + } catch (aggErr) { + console.warn('Failed to compute activity distribution from raw data:', (aggErr as any)?.message || aggErr); + } + + // 先基于 issues / pullRequests 聚合简单的 per-user 活动(仅当我们有 DB 项目数据时) + const userActivityAgg: Record = {}; + try { + if (issues && issues.length) { + for (const it of issues) { + const author = it.authorLogin || (it.user && it.user.login); + if (author) { + userActivityAgg[author] = userActivityAgg[author] || { issues:0, prs:0, comments:0 }; + userActivityAgg[author].issues += 1; + } + if (Array.isArray(it.activities)) { + for (const a of it.activities) { + const actor = a.actorLogin || a.login; + if (!actor) continue; + userActivityAgg[actor] = userActivityAgg[actor] || { issues:0, prs:0, comments:0 }; + userActivityAgg[actor].comments += (a.commentCount || 0) + (a.reviewCommentCount || 0); + } + } + } + } + if (pullRequests && pullRequests.length) { + for (const pr of pullRequests) { + const author = pr.authorLogin || (pr.user && pr.user.login); + if (author) { + userActivityAgg[author] = userActivityAgg[author] || { issues:0, prs:0, comments:0 }; + userActivityAgg[author].prs += 1; + } + if (Array.isArray(pr.activities)) { + for (const a of pr.activities) { + const actor = a.actorLogin || a.login; + if (!actor) continue; + userActivityAgg[actor] = userActivityAgg[actor] || { issues:0, prs:0, comments:0 }; + userActivityAgg[actor].comments += (a.commentCount || 0) + (a.reviewCommentCount || 0) + (a.reviewCount || 0); + } + } + } + } + } catch (aggUserErr) { + console.warn('User activity aggregation failed:', (aggUserErr as any)?.message || aggUserErr); + } + + // Map results to frontend-friendly structure (users/repos/ distributions) + const users = results.filter((r: any) => r.nodeType === 'User').map((u: any) => ({ + id: u.id, + name: u.name, + openrank: u.openrank, + change: u.change ?? 0, + // 优先算法内提供的活动,否则使用我们基于 issues/prs 聚合的近似 + activity: (u.metadata?.activity && Object.keys(u.metadata.activity).length) ? u.metadata.activity : (userActivityAgg[u.name] || {}) + })); + const repos = results.filter((r: any) => r.nodeType === 'Repo').map((r2: any) => ({ + id: r2.id, + name: r2.name, + openrank: r2.openrank, + stars: r2.metadata?.stars ?? 0, + forks: r2.metadata?.forks ?? 0, + contributors: r2.metadata?.contributors ?? 0 + })); + + // Basic distributions + // Build openrank distribution buckets (0-10,10-20,...,90-100) + const bucketLabels = [ + '0-10','10-20','20-30','30-40','40-50','50-60','60-70','70-80','80-90','90-100' + ]; + const openrankDistribution: Array<{ range: string; count: number }> = bucketLabels.map(r => ({ range: r, count: 0 })); + + // Build activity distribution expected by frontend (keys used by front app) + // Build activity distribution expected by frontend (keys used by front app) + const activityDistribution: Record = { + issueComment: 0, + openIssue: 0, + openPull: 0, + reviewComment: 0, + mergedPull: 0 + }; + + // Populate distributions from `users` array (which was derived from calculator results) + try { + for (const u of users) { + const orVal = typeof u.openrank === 'number' ? u.openrank : Number(u.openrank) || 0; + // clamp to [0,100] + const clamped = Math.max(0, Math.min(100, orVal)); + const idx = Math.min(openrankDistribution.length - 1, Math.floor(clamped / 10)); + openrankDistribution[idx].count += 1; + + const act = u.activity || {}; + // map common activity fields from user metadata into dashboard keys + activityDistribution.openIssue += (act.issues || act.openIssues || 0); + activityDistribution.openPull += (act.prs || act.pullRequests || act.openPRs || 0); + activityDistribution.issueComment += (act.comments || act.issueComments || 0); + // best-effort: if more detailed fields exist, add them + activityDistribution.reviewComment += (act.reviewComments || 0); + activityDistribution.mergedPull += (act.mergedPRs || act.mergedPulls || 0); + } + } catch (distErr) { + console.warn('Failed to build distributions for response:', (distErr as any)?.message || distErr); + } + + // If user-derived activity distribution is empty (all zeros), prefer the + // computedActivityDistribution that was aggregated from raw issues/PRs above. + try { + const sumUserDist = Object.values(activityDistribution).reduce((s, v) => s + (v || 0), 0); + const sumComputed = Object.values(computedActivityDistribution).reduce((s, v) => s + (v || 0), 0); + if (sumUserDist === 0 && sumComputed > 0) { + activityDistribution.issueComment = computedActivityDistribution.issueComment; + activityDistribution.openIssue = computedActivityDistribution.openIssue; + activityDistribution.openPull = computedActivityDistribution.openPull; + activityDistribution.reviewComment = computedActivityDistribution.reviewComment; + activityDistribution.mergedPull = computedActivityDistribution.mergedPull; + } + } catch (e) { /* ignore */ } + + // Trim topN if provided + const topUsers = typeof topNUsers === 'number' ? users.sort((a,b)=>b.openrank-a.openrank).slice(0, topNUsers) : users; + const topRepos = typeof topNRepos === 'number' ? repos.sort((a,b)=>b.openrank-a.openrank).slice(0, topNRepos) : repos; + + // 计算两个维度的覆盖:窗口覆盖(读取==窗口) & 历史覆盖(窗口/全历史) + const historyTotal = (issueCountTotal + prCountTotal) || 0; // 全历史条目 + const windowRead = (issuesRead + prsRead) || 0; // 当前窗口读取 + const historyCoverage = historyTotal > 0 ? windowRead / historyTotal : null; // 窗口数据占全历史百分比 + const metaOut: any = { + source: metaSource || 'local', + durationMs: durationMs || 0, + dbRepoId: dbRepoId, + totalIssues: issueCountTotal, + totalPRs: prCountTotal, + windowIssues: issuesRead, + windowPRs: prsRead, + historyCoverage, // 窗口相对于全历史的占比 (windowRows / totalRows) + windowCoverage: 1, // 窗口内我们已经把符合条件的全部取出(除非出现分页/限流,当前实现一次性全取) + repoEventsRead: repoEventsRead, + usedFallbackStart: usedFallbackStart ? usedFallbackStart.toISOString() : null, + windowStart: s.toISOString(), + windowEnd: e.toISOString(), + requestedDays, + expandedFullHistory: !!(req as any)._expandedFullHistory, + expansionReason: (req as any)._expandedReason || null, + forceFullHistory: !!fullHistory || !!forceFullHistory, + autoExpandHeuristic: !!autoExpandHeuristic, + nodesCount: Array.isArray(results) ? results.length : (results && Array.isArray((results as any).nodes) ? (results as any).nodes.length : null), + edgesCount: Array.isArray(results) ? null : (results && Array.isArray((results as any).edges) ? (results as any).edges.length : null) + }; + + // attach small samples for verification (first 5 of current read) + try { + metaOut.sampleIssues = (typeof issues !== 'undefined' && Array.isArray(issues)) ? issues.slice(0,5).map((it:any)=>({ id: it.id, number: it.number, createdAt: it.createdAt, authorLogin: it.authorLogin, title: (it.title||'').slice(0,120) })) : []; + metaOut.samplePRs = (typeof pullRequests !== 'undefined' && Array.isArray(pullRequests)) ? pullRequests.slice(0,5).map((it:any)=>({ id: it.id, number: it.number, createdAt: it.createdAt, authorLogin: it.authorLogin, title: (it.title||'').slice(0,120) })) : []; + } catch (sErr) { + console.warn('Failed to build samples for meta:', (sErr as any)?.message || sErr); + metaOut.sampleIssues = []; + metaOut.samplePRs = []; + } + + console.log('Calculation meta:', metaOut); + + const out = { + timestamp: new Date().toISOString(), + repo: { owner, repo }, + meta: metaOut, + results: { + users: topUsers, + repos: topRepos, + openrankDistribution, + activityDistribution, + repoContributors: {} + } + }; + // attach window metadata + try { + (out as any).window = { start: s.toISOString(), end: e.toISOString(), days: windowDays || Math.round((e.getTime()-s.getTime())/86400000) }; + } catch {} + + // 写入全局计算缓存(方案A:供 /details 与项目 approx 派生使用) + try { + const cacheKey = `${owner}/${repo}`; + // 计算 config hash & version + let configHash = 'unknown'; + try { + const cfgStr = JSON.stringify((or as any).getConfig ? (or as any).getConfig() : {}); + configHash = hashString(cfgStr); + } catch {} + globalCalcVersion += 1; + out.meta.configHash = configHash; + out.meta.version = globalCalcVersion; + calculationCache[cacheKey] = { + start: s.toISOString(), + end: e.toISOString(), + results: out.results, + users: topUsers, + repos: topRepos, + timestamp: Date.now(), + windowDays: (out as any).window?.days + } as any; + // 若 repos 表中尚无该仓库,补充写入(便于 /api/repos 展示) + try { + if (!metaOut.dbRepoId) { + // 生成一个稳定 id (基于 hashString, 转为数值范围);若已存在则 upsert 会覆盖 + const fullName = `${owner}/${repo}`; + const hex = hashString(fullName).replace(/^h/, '').slice(0,12); + const syntheticId = parseInt(hex, 16); + await repoStore.upsertRepo({ + id: syntheticId, + platform: 'synthetic', + full_name: fullName, + owner, + name: repo, + language: 'Unknown', + description: 'Calculated via /api/calculate', + stars: 0, + forks: 0, + metadata: { source: 'api.calculate', insertedAt: new Date().toISOString() } + }); + // 记录一次性日志,帮助确认是否重复 upsert + console.log('[upsertRepo] synthetic record ensured for', fullName, 'id=', syntheticId); + } + } catch (repoInsertErr) { + console.warn('Upsert synthetic repo failed:', (repoInsertErr as any)?.message || repoInsertErr); + } + } catch (cacheErr) { + console.warn('Failed to store calculation result into cache:', (cacheErr as any)?.message || cacheErr); + } + + // Build per-repo contributors summary (prefer DB-backed aggregation when possible) + try { + const contributorsByRepo: Record> = {}; + if (metaOut.dbRepoId) { + try { + // Try to use DB aggregation for this repo + const dbContribs = await repoStore.getContributorsForRepo(metaOut.dbRepoId, usedFallbackStart || s, e); + const repoFull = `${owner}/${repo}`; + contributorsByRepo[repoFull] = dbContribs.map((c:any) => ({ id: c.id, name: c.name, activity: { issues: c.activity.issues, prs: c.activity.prs, comments: c.activity.comments || 0 }, total: c.total || 0, openrank: 0 })); + // map openrank if available + const userRankMap = new Map(); + for (const u of topUsers) { + if (!u) continue; + const val = Number(u.openrank || 0); + if (u.name) { + userRankMap.set(String(u.name), val); + userRankMap.set(String(u.name).toLowerCase(), val); + } + if (u.id !== undefined && u.id !== null) { + userRankMap.set(String(u.id), val); + } + } + contributorsByRepo[repoFull].forEach((c:any) => { + const candidates = [c.name, (c.name || '').toLowerCase(), String(c.id)]; + let found = 0; + for (const k of candidates) { + if (!k) continue; + const v = userRankMap.get(k); + if (typeof v === 'number' && v !== 0) { found = v; break; } + } + // if none found with non-zero, try exact name map allowing zero-valued ranks + if (!found) { + for (const k of candidates) { + if (!k) continue; + const v = userRankMap.get(k); + if (typeof v === 'number') { found = v; break; } + } + } + c.openrank = found || 0; + }); + out.results.repoContributors = contributorsByRepo; + } catch (dbErr) { + console.warn('DB contributor aggregation failed, falling back to in-memory aggregation:', (dbErr as any)?.message || dbErr); + // fallback to in-memory aggregation below + } + } + + // If no contributorsByRepo produced yet, fallback to in-memory aggregation from fetched items + if (!out.results.repoContributors || Object.keys(out.results.repoContributors).length === 0) { + const contributorsByRepoLocal: Record> = {}; + const accumulate = (repoFullName: string, actorLogin: string, actorId: any, kind: 'issue'|'pr', counts: { comments?: number, reviewComments?: number, merged?: number }) => { + if (!contributorsByRepoLocal[repoFullName]) contributorsByRepoLocal[repoFullName] = []; + let rec = contributorsByRepoLocal[repoFullName].find((r: any) => r.name === actorLogin || r.id === actorId); + if (!rec) { + rec = { id: actorId || null, name: actorLogin || 'unknown', activity: { issues: 0, prs: 0, comments: 0 }, total: 0 }; + contributorsByRepoLocal[repoFullName].push(rec); + } + if (kind === 'issue') rec.activity.issues += 1; + if (kind === 'pr') rec.activity.prs += 1; + rec.activity.comments += (counts.comments || 0) + (counts.reviewComments || 0); + rec.total = (rec.activity.issues || 0) + (rec.activity.prs || 0) + (rec.activity.comments || 0) + (counts.merged || 0); + }; + if (Array.isArray(issues)) { + for (const it of issues) { + const repoFull = it.repoName || `${owner}/${repo}`; + const actorLogin = it.authorLogin || (it.user && it.user.login) || 'unknown'; + const actorIdVal = it.authorId || (it.user && it.user.id) || null; + const commentSum = Array.isArray(it.activities) ? it.activities.reduce((s:any,a:any)=>s+(a.commentCount||0)+(a.reviewCommentCount||0),0) : 0; + accumulate(repoFull, actorLogin, actorIdVal, 'issue', { comments: commentSum }); + } + } + if (Array.isArray(pullRequests)) { + for (const pr of pullRequests) { + const repoFull = pr.repoName || `${owner}/${repo}`; + const actorLogin = pr.authorLogin || (pr.user && pr.user.login) || 'unknown'; + const actorIdVal = pr.authorId || (pr.user && pr.user.id) || null; + const commentSum = Array.isArray(pr.activities) ? pr.activities.reduce((s:any,a:any)=>s+(a.commentCount||0)+(a.reviewCommentCount||0),0) : 0; + const mergedFlag = (pr.merged || pr.merged_at || pr.state === 'merged') ? 1 : 0; + accumulate(repoFull, actorLogin, actorIdVal, 'pr', { comments: commentSum, merged: mergedFlag }); + } + } + const userRankMap = new Map(); + for (const u of topUsers) { + if (!u) continue; + const val = Number(u.openrank || 0); + if (u.name) { + userRankMap.set(String(u.name), val); + userRankMap.set(String(u.name).toLowerCase(), val); + } + if (u.id !== undefined && u.id !== null) { + userRankMap.set(String(u.id), val); + } + } + for (const k of Object.keys(contributorsByRepoLocal)) { + contributorsByRepoLocal[k].forEach((c:any) => { + const candidates = [c.name, (c.name || '').toLowerCase(), String(c.id)]; + let found = 0; + for (const key of candidates) { + if (!key) continue; + const v = userRankMap.get(key); + if (typeof v === 'number' && v !== 0) { found = v; break; } + } + if (!found) { + for (const key of candidates) { + if (!key) continue; + const v = userRankMap.get(key); + if (typeof v === 'number') { found = v; break; } + } + } + c.openrank = found || 0; + }); + contributorsByRepoLocal[k].sort((a:any,b:any)=>b.total - a.total); + } + out.results.repoContributors = contributorsByRepoLocal; + } + } catch (err) { + console.warn('Failed to build repo contributors summary:', (err as any)?.message || err); + out.results.repoContributors = {}; + } + + return res.json(out); + } catch (error) { + console.error('API /api/calculate error', error); + return res.status(500).json({ error: (error as any)?.message || String(error) }); + } +}); + +// GET /api/results/latest - placeholder (could read file/cache) +app.get('/api/results/latest', (req, res) => { + res.json({ error: 'not_implemented', message: 'Use POST /api/calculate to compute results' }); +}); + +// GET /api/repo/:owner/:repo/details - return DB-backed repo detail (contributors + timeseries) +app.get('/api/repo/:owner/:repo/details', async (req: Request, res: Response) => { + try { + const { owner, repo } = req.params; + const fullName = `${owner}/${repo}`; + const startDate = req.query.start ? new Date(String(req.query.start)) : new Date(Date.now() - 1000 * 60 * 60 * 24 * 30); + const endDate = req.query.end ? new Date(String(req.query.end)) : new Date(); + const granularity = (req.query.granularity === 'week') ? 'week' : 'day'; + const includeOpenRank = (String(req.query.includeOpenRank || '').toLowerCase() === '1' || String(req.query.includeOpenRank || '').toLowerCase() === 'true'); + const useCache = (String(req.query.useCache || '').toLowerCase() === '1' || String(req.query.useCache || '').toLowerCase() === 'true'); + + const dbRepo = await repoStore.getRepoByFullName(fullName); + if (!dbRepo || !dbRepo.id) return res.status(404).json({ error: 'repo_not_found_in_db' }); + const repoId = dbRepo.id; + + // fetch contributors (DB aggregation) + let contributors = await repoStore.getContributorsForRepo(repoId, startDate, endDate); + const timeseries = await repoStore.getContributionsTimeSeries(repoId, startDate, endDate, granularity as any); + + // 方案A: 如果请求 useCache=1,则尝试使用最近一次 /api/calculate 的结果统一 openrank + if (useCache) { + const key = `${owner}/${repo}`; + const cached = calculationCache[key]; + if (cached) { + try { + const userRankMap = new Map(); + for (const u of cached.users) { + if (!u) continue; + const val = Number(u.openrank || 0); + if (u.name) { + userRankMap.set(String(u.name), val); + userRankMap.set(String(u.name).toLowerCase(), val); + } + if (u.id !== undefined && u.id !== null) userRankMap.set(String(u.id), val); + } + // Map openrank to DB aggregated contributors + if (Array.isArray(contributors) && contributors.length) { + contributors.forEach((c: any) => { + const candidates = [c.name, (c.name || '').toLowerCase(), String(c.id || '')]; + let found: number | undefined; + for (const k of candidates) { + if (!k) continue; + const v = userRankMap.get(k); + if (typeof v === 'number') { found = v; if (v !== 0) break; } + } + c.openrank = found || 0; + }); + } else { + // fall back to cached repoContributors if any + const repoKey = `${owner}/${repo}`; + const cachedRepoContribs = cached.results?.repoContributors?.[repoKey]; + if (cachedRepoContribs) contributors = cachedRepoContribs.map((r:any)=>({ ...r })); + } + return res.json({ + repo: { id: repoId, fullName }, + window: { start: cached.start, end: cached.end, granularity }, + contributors, + timeseries, + includeOpenRank: true, + meta: { cacheHit: true, cacheTime: new Date(cached.timestamp).toISOString(), source: 'calculationCache' } + }); + } catch (cacheMapErr) { + console.warn('cache mapping failed, falling back to normal details logic:', (cacheMapErr as any)?.message || cacheMapErr); + } + } + // 若 cache 未命中则继续执行后续原逻辑(可在响应中标记 cacheHit:false) + } + console.debug && console.debug('DETAILS: initial contributors count', Array.isArray(contributors) ? contributors.length : 0); + + // If DB aggregation returned contributors but their activity fields are all zero, + // try fallbacks: (1) table-level aggregation helper, (2) row-level aggregation + merged PR補偿 + try { + const sumActivity = (contributors || []).reduce((s: number, c: any) => { + const a = c.activity || {}; + return s + (Number(a.issues || 0) + Number(a.prs || 0) + Number(a.comments || 0) + Number(a.reviewComments || 0) + Number(a.commits || 0)); + }, 0); + console.debug && console.debug('DETAILS: sumActivity from contributors', sumActivity); + + if ((contributors && contributors.length > 0) && sumActivity === 0) { + // 1) try table-level aggregation (fast) + const synthesizedFromTables = await repoStore.getAuthorCountsFromIssuesAndPRs(repoId, startDate, endDate).catch(() => []); + console.debug && console.debug('DETAILS: synthesizedFromTables length', Array.isArray(synthesizedFromTables) ? synthesizedFromTables.length : 0); + if (synthesizedFromTables && synthesizedFromTables.length > 0) { + contributors = synthesizedFromTables; + } else { + // 2) row-level aggregation and merged PR compensation + const issues = await repoStore.getIssuesForRepo(repoId, startDate, endDate).catch(() => []); + const prs = await repoStore.getPRsForRepo(repoId, startDate, endDate).catch(() => []); + const mergedAgg = await repoStore.getMergedPRsForRepo(repoId, startDate, endDate).catch(() => []); + console.debug && console.debug('DETAILS: issues/prs lengths', Array.isArray(issues) ? issues.length : 0, Array.isArray(prs) ? prs.length : 0); + console.debug && console.debug('DETAILS: mergedAgg length', Array.isArray(mergedAgg) ? mergedAgg.length : 0); + + const byKey: Record = {}; + const accumulate = (login: any, id: any, kind: 'issue' | 'pr', counts: any = {}) => { + const key = String(login || id || 'unknown'); + if (!byKey[key]) byKey[key] = { id: id || null, name: login || 'unknown', activity: { issues: 0, prs: 0, comments: 0, reviewComments: 0, commits: 0 }, merged: 0, total: 0 }; + if (kind === 'issue') byKey[key].activity.issues += 1; + if (kind === 'pr') byKey[key].activity.prs += 1; + byKey[key].activity.comments += Number(counts.comments || 0); + byKey[key].activity.reviewComments += Number(counts.reviewComments || 0); + byKey[key].activity.commits += Number(counts.commits || 0); + byKey[key].merged += Number(counts.merged || 0); + }; + + for (const it of issues || []) { + const login = it.authorLogin || 'unknown'; + const id = it.authorId || null; + const commentSum = Array.isArray(it.activities) ? it.activities.reduce((s: any, a: any) => s + (a.commentCount || 0) + (a.reviewCommentCount || 0), 0) : 0; + accumulate(login, id, 'issue', { comments: commentSum, reviewComments: 0, commits: 0 }); + } + for (const pr of prs || []) { + const login = pr.authorLogin || 'unknown'; + const id = pr.authorId || null; + const commentSum = Array.isArray(pr.activities) ? pr.activities.reduce((s: any, a: any) => s + (a.commentCount || 0) + (a.reviewCommentCount || 0), 0) : 0; + const mergedFlag = (pr.mergedAt || pr.state === 'merged') ? 1 : 0; + accumulate(login, id, 'pr', { comments: commentSum, reviewComments: 0, commits: 0, merged: mergedFlag }); + } + + // apply mergedAgg counts (from pull_requests.merged_at aggregation) + try { + const mergedMap = new Map(); + for (const m of mergedAgg || []) { + const key = String(m.author_login || m.author_id || m.author_login || ''); + mergedMap.set(key, Number(m.merged || 0)); + } + for (const k of Object.keys(byKey)) { + const rec = byKey[k]; + const lookupKey = String(rec.name || rec.id || 'unknown'); + const extra = mergedMap.get(lookupKey) || 0; + if (extra) { + rec.merged = (rec.merged || 0) + extra; + rec.total = (rec.total || 0) + extra; + } + } + } catch (mgErr) { + // ignore merged compensation errors + } + + const synthesized = Object.keys(byKey).map(k => { + const v = byKey[k]; + v.total = (v.activity.issues || 0) + (v.activity.prs || 0) + (v.activity.comments || 0) + (v.activity.reviewComments || 0) + (v.activity.commits || 0) + (v.merged || 0); + return v; + }).sort((a, b) => b.total - a.total); + + if (synthesized.length > 0) contributors = synthesized; + } + } + } catch (e) { + console.warn('Fallback synthesis of contributors failed:', (e as any)?.message || e); + } + + // Optionally compute per-user OpenRank for this window (can be expensive, so behind flag) + if (includeOpenRank) { + try { + // Make sure we have issue / PR data for the selected window + // (reuse previously loaded collections if we built them during fallback synthesis) + let issuesForRank: any[] = []; + let prsForRank: any[] = []; + try { + issuesForRank = await repoStore.getIssuesForRepo(repoId, startDate, endDate).catch(()=>[]); + prsForRank = await repoStore.getPRsForRepo(repoId, startDate, endDate).catch(()=>[]); + } catch (_) { /* ignore */ } + if (issuesForRank.length + prsForRank.length > 0) { + const or = new OpenRank(); + const cfg = (or as any).getConfig ? (or as any).getConfig() : {}; + const calc = new ProjectOpenRankCalculator(cfg as any); + const lastMonthMap = new Map(); + const rankResults = await calc.calculateProjectOpenRank(issuesForRank, prsForRank, lastMonthMap, []); + const userRanks = new Map(); + for (const r of rankResults.filter((r:any)=>r.nodeType==='User')) { + if (r.name) { + userRanks.set(String(r.name), Number(r.openrank||0)); + userRanks.set(String(r.name).toLowerCase(), Number(r.openrank||0)); + } + } + // annotate contributors with openrank + contributors = (contributors || []).map((c:any) => { + const candidates = [c.name, (c.name||'').toLowerCase()]; + for (const k of candidates) { + if (k && userRanks.has(k)) { c.openrank = userRanks.get(k); break; } + } + if (typeof c.openrank !== 'number') c.openrank = 0; + return c; + }); + } + } catch (orErr) { + console.warn('includeOpenRank calculation failed for details route:', (orErr as any)?.message || orErr); + } + } + + return res.json({ repo: { id: repoId, fullName }, window: { start: startDate.toISOString(), end: endDate.toISOString(), granularity }, contributors, timeseries, includeOpenRank, meta: { cacheHit: false } }); + } catch (err) { + console.error('GET /api/repo/:owner/:repo/details failed', err); + return res.status(500).json({ error: (err as any)?.message || String(err) }); + } +}); + +// =============== 新增:仓库列表 API =================== +// GET /api/repos -> 列出已抓取的仓库及基础统计 +app.get('/api/repos', async (req: Request, res: Response) => { + try { + const page = Math.max(1, parseInt(String(req.query.page || '1'), 10)); + const size = Math.min(200, Math.max(1, parseInt(String(req.query.size || '50'), 10))); + const sortRaw = String(req.query.sort || 'stars'); + const orderRaw = String(req.query.order || 'desc').toLowerCase(); + const allowedSort = new Set(['stars','forks','contributors','full_name']); + const sortCol = allowedSort.has(sortRaw) ? (sortRaw === 'full_name' ? 'r.full_name' : `r.${sortRaw}`) : 'r.stars'; + const order = orderRaw === 'asc' ? 'ASC' : 'DESC'; + const offset = (page - 1) * size; + const { pool } = await import('../db/mysql'); + // contributors 子查询可能较慢,可考虑缓存;此处直接使用 + // 某些 MySQL 版本对 LIMIT ? OFFSET ? 绑定参数兼容性差,改为内联已校验的整数 + const sql = `SELECT r.id, r.full_name, r.owner, r.name, r.stars, r.forks, + (SELECT COUNT(DISTINCT a.actor_login) FROM activities a WHERE a.repo_id = r.id) AS contributors + FROM repos r + ORDER BY ${sortCol} ${order} + LIMIT ${size} OFFSET ${offset}`; + const [rows] = await (pool as any).query(sql); + // total count (简化:只统计 repos 表行数) + const [countRows] = await (pool as any).execute('SELECT COUNT(*) as c FROM repos'); + res.json({ page, size, total: (countRows as any)[0]?.c || 0, repos: rows }); + } catch (err) { + console.error('GET /api/repos failed:', (err as any)?.message || err); + if ((err as any)?.stack) console.error((err as any).stack.split('\n').slice(0,6).join('\n')); + res.status(500).json({ error: (err as any)?.message || 'failed_list_repos' }); + } +}); + +// =============== 新增:项目 overview (approx/full) =================== +app.get('/api/project/:owner/:repo/overview', async (req: Request, res: Response) => { + try { + const { owner, repo } = req.params; + const strategy = String(req.query.strategy || 'approx'); + const fullName = `${owner}/${repo}`; + const windowDays = parseInt(String(req.query.days || '30'), 10) || 30; + const end = new Date(); + const start = new Date(Date.now() - windowDays * 24 * 3600 * 1000); + const now = Date.now(); + const TTL_MS = 10 * 60 * 1000; // 10分钟 + + const cacheKeyApprox = `${fullName}::approx::${windowDays}`; + const cacheKeyFull = `${fullName}::full::${windowDays}`; + if (strategy === 'approx') { + const cached = projectCache[cacheKeyApprox]; + if (cached && cached.expiresAt > now) { + const calib = calibrationFactors[fullName]; + return res.json({ ...cached.snapshot, meta: { ...(cached.snapshot.meta||{}), cacheHit: true, calibrationFactor: calib } }); + } + // 构建 contributors: 优先从 DB 获取活动聚合 + const dbRepo = await repoStore.getRepoByFullName(fullName); + let contributors = [] as any[]; + if (dbRepo && dbRepo.id) { + try { contributors = await repoStore.getContributorsForRepo(dbRepo.id, start, end); } catch { contributors = []; } + } + // 如果没有 DB 数据,尝试从全局 calculationCache 的 repoContributors 近似 + if (!contributors.length) { + const globalCache = calculationCache[fullName]; + if (globalCache?.results?.repoContributors?.[fullName]) { + contributors = globalCache.results.repoContributors[fullName].map((c: any) => ({ + login: c.name, + total: c.total || 0, + activity: c.activity || { issues:0, prs:0, comments:0 } + })); + } + } + // 近似 openrankProject:若有全局 users 则按用户 global openrank * (用户在此项目活动 / 用户总活动估计) + const globalCache = calculationCache[fullName]; + const userRankMap = new Map(); + if (globalCache?.users) { + for (const u of globalCache.users) { + if (u?.name) { + userRankMap.set(String(u.name), Number(u.openrank||0)); + userRankMap.set(String(u.name).toLowerCase(), Number(u.openrank||0)); + } + } + } + // 为没有活动数据的情况 fallback: 取 globalCache.users 前若干 + if (!contributors.length && globalCache?.users) { + contributors = globalCache.users.slice(0, 30).map((u: any) => ({ + login: u.name, + total: (u.activity?.issues||0)+(u.activity?.prs||0)+(u.activity?.comments||0), + activity: u.activity || { issues:0, prs:0, comments:0 } + })); + } + // 加权活动:issues=1, prs=1.3, comments=0.5 作为近似质量/影响权重 + const W_ISSUE = 1; + const W_PR = 1.3; + const W_COMMENT = 0.5; + function weightedAct(c:any) { + const a = c.activity || {}; + return (a.issues||0)*W_ISSUE + (a.prs||0)*W_PR + (a.comments||0)*W_COMMENT; + } + const totalActivityAll = contributors.reduce((s,c)=> s + (c.total || weightedAct(c)),0) || 1; + const ALPHA = 0.9; // 校准常数 + const approxContributors = contributors.map((c, idx) => { + // 尝试多字段兜底出一个稳定 login + const rawLogin = c.login || c.name || c.actor_login || c.author_login || c.user_login || c.user || c.username || (c.id ? String(c.id) : '') || `unknown_${idx}`; + const login = String(rawLogin).trim() || `unknown_${idx}`; + const keyVariants = [login, login.toLowerCase()]; + let globalRank = 0; + for (const k of keyVariants) { if (k && userRankMap.has(k)) { globalRank = userRankMap.get(k)!; break; } } + const act = c.total || weightedAct(c); + const ratio = act / totalActivityAll; + // 近似公式:globalRank * ratio * ALPHA + ratio * 10 (防止无 globalRank 时过低) + const openrankProject = globalRank ? globalRank * ratio * ALPHA + ratio * 10 : (ratio * 60); + return { + login, + openrankProject, + channels: { + issues: c.activity?.issues || 0, + prs: c.activity?.prs || 0, + comments: c.activity?.comments || 0 + } + }; + }).sort((a,b)=> b.openrankProject - a.openrankProject); + + const activityBreakdown = approxContributors.reduce((acc:any,c:any)=>{ acc.issues += c.channels.issues; acc.prs += c.channels.prs; acc.comments += c.channels.comments; return acc; }, { issues:0, prs:0, comments:0 }); + // 应用已存在校准系数(如果有) + const calibFactor = calibrationFactors[fullName]; + if (calibFactor && calibFactor > 0) { + approxContributors.forEach(c => { c.openrankProject = c.openrankProject * calibFactor; }); + } + const snapshot = { + repo: fullName, + window: { start: start.toISOString(), end: end.toISOString(), days: windowDays }, + generatedAt: new Date().toISOString(), + contributors: approxContributors, + activityBreakdown, + timeseries: [], + meta: { source: globalCache ? 'global-derived' : 'approx-local', cacheHit: false, strategy: 'approx', weights: { issue: W_ISSUE, pr: W_PR, comment: W_COMMENT }, formula: 'openrankProject = globalRank * ratio * ALPHA + ratio * 10', calibrationFactor: calibFactor || null } + }; + projectCache[cacheKeyApprox] = { snapshot, kind: 'approx', expiresAt: Date.now() + TTL_MS }; + return res.json(snapshot); + } + + // strategy = full (同步计算,可缓存) + const cachedFull = projectCache[cacheKeyFull]; + if (cachedFull && cachedFull.expiresAt > now) { + return res.json({ ...cachedFull.snapshot, meta: { ...(cachedFull.snapshot.meta||{}), cacheHit: true } }); + } + const dbRepo = await repoStore.getRepoByFullName(fullName); + if (!dbRepo || !dbRepo.id) return res.status(404).json({ error: 'repo_not_found' }); + const repoId = dbRepo.id; + const issues = await repoStore.getIssuesForRepo(repoId, start, end); + const prs = await repoStore.getPRsForRepo(repoId, start, end); + const config = (new OpenRank().getConfig && (new OpenRank()).getConfig()) || {}; + const calc = new ProjectOpenRankCalculator(config as any); + const lastMonthMap = new Map(); + const rankResults = await calc.calculateProjectOpenRank(issues, prs, lastMonthMap, []); + const userNodes = rankResults.filter((r:any)=> r.nodeType==='User'); + const contributors = userNodes.map((u:any)=> ({ login: u.name, openrankProject: u.openrank, channels: u.metadata?.activity || { issues:0, prs:0, comments:0 } })) + .sort((a:any,b:any)=> b.openrankProject - a.openrankProject); + const activityBreakdown = contributors.reduce((acc:any,c:any)=>{ acc.issues += (c.channels.issues||0); acc.prs += (c.channels.prs||0); acc.comments += (c.channels.comments||0); return acc;}, { issues:0, prs:0, comments:0 }); + const timeseries = await repoStore.getContributionsTimeSeries(repoId, start, end, 'day'); + const snapshot = { + repo: fullName, + window: { start: start.toISOString(), end: end.toISOString(), days: windowDays }, + generatedAt: new Date().toISOString(), + contributors, + activityBreakdown, + timeseries, + meta: { source: 'full-recalc', strategy: 'full', cacheHit: false, calibrationFactor: null } + }; + // 与近似快照做校准 + try { + const approxCache = projectCache[cacheKeyApprox]; + if (approxCache?.snapshot?.contributors?.length) { + const approxMap = new Map(); + for (const a of approxCache.snapshot.contributors) approxMap.set(a.login, a.openrankProject); + const ratios: number[] = []; + for (const f of snapshot.contributors) { + const av = approxMap.get(f.login) || 0; + if (av > 0 && f.openrankProject > 0) ratios.push(f.openrankProject / av); + } + if (ratios.length >= 3) { + ratios.sort((a,b)=>a-b); + const mid = Math.floor(ratios.length / 2); + const median = ratios.length % 2 ? ratios[mid] : (ratios[mid-1]+ratios[mid])/2; + if (median > 0 && median < 10) { + calibrationFactors[fullName] = median; + (snapshot.meta as any).calibrationFactor = median; + } + } + } + } catch (calibErr) { + console.warn('Calibration computation failed:', (calibErr as any)?.message || calibErr); + } + projectCache[cacheKeyFull] = { snapshot, kind: 'full', expiresAt: Date.now() + 10*60*1000 }; + res.json(snapshot); + } catch (err) { + console.error('GET /api/project/:owner/:repo/overview failed', err); + res.status(500).json({ error: (err as any)?.message || 'project_overview_failed' }); + } +}); + +// POST /api/project/:owner/:repo/calculate -> 异步触发 full 计算,返回 taskId +app.post('/api/project/:owner/:repo/calculate', async (req: Request, res: Response) => { + try { + const { owner, repo } = req.params; + const fullName = `${owner}/${repo}`; + const windowDays = parseInt(String(req.body?.days || req.query.days || '30'), 10) || 30; + const end = new Date(); + const start = new Date(Date.now() - windowDays * 24 * 3600 * 1000); + const task = createTask(); + updateTask(task.id, { status: 'processing', progress: 5 }); + + // 异步执行 + setTimeout(async () => { + try { + updateTask(task.id, { progress: 15 }); + const dbRepo = await repoStore.getRepoByFullName(fullName); + if (!dbRepo || !dbRepo.id) { + updateTask(task.id, { status: 'error', error: 'repo_not_found' }); + return; + } + const repoId = dbRepo.id; + const issues = await repoStore.getIssuesForRepo(repoId, start, end); + updateTask(task.id, { progress: 35 }); + const prs = await repoStore.getPRsForRepo(repoId, start, end); + updateTask(task.id, { progress: 55 }); + const cfg = (new OpenRank().getConfig && (new OpenRank()).getConfig()) || {}; + const calc = new ProjectOpenRankCalculator(cfg as any); + const rankResults = await calc.calculateProjectOpenRank(issues, prs, new Map(), []); + updateTask(task.id, { progress: 80 }); + const userNodes = rankResults.filter((r:any)=> r.nodeType==='User'); + const contributors = userNodes.map((u:any)=> ({ login: u.name, openrankProject: u.openrank, channels: u.metadata?.activity || { issues:0, prs:0, comments:0 } })) + .sort((a:any,b:any)=> b.openrankProject - a.openrankProject); + const activityBreakdown = contributors.reduce((acc:any,c:any)=>{ acc.issues += (c.channels.issues||0); acc.prs += (c.channels.prs||0); acc.comments += (c.channels.comments||0); return acc;}, { issues:0, prs:0, comments:0 }); + const timeseries = await repoStore.getContributionsTimeSeries(repoId, start, end, 'day'); + const snapshot = { + repo: fullName, + window: { start: start.toISOString(), end: end.toISOString(), days: windowDays }, + generatedAt: new Date().toISOString(), + contributors, + activityBreakdown, + timeseries, + meta: { source: 'full-recalc', strategy: 'full', cacheHit: false } + }; + // 校准更新 + try { + const approxCache = projectCache[`${fullName}::approx::${windowDays}`]; + if (approxCache?.snapshot?.contributors?.length) { + const approxMap = new Map(); + for (const a of approxCache.snapshot.contributors) approxMap.set(a.login, a.openrankProject); + const ratios: number[] = []; + for (const f of snapshot.contributors) { + const av = approxMap.get(f.login) || 0; + if (av > 0 && f.openrankProject > 0) ratios.push(f.openrankProject / av); + } + if (ratios.length >= 3) { + ratios.sort((a,b)=>a-b); + const mid = Math.floor(ratios.length / 2); + const median = ratios.length % 2 ? ratios[mid] : (ratios[mid-1]+ratios[mid])/2; + if (median > 0 && median < 10) { + calibrationFactors[fullName] = median; + (snapshot.meta as any).calibrationFactor = median; + } + } + } + } catch (errCal) { + console.warn('Async full calibration failed:', (errCal as any)?.message || errCal); + } + projectCache[`${fullName}::full::${windowDays}`] = { snapshot, kind: 'full', expiresAt: Date.now() + 10*60*1000 }; + updateTask(task.id, { status: 'done', progress: 100, result: snapshot }); + } catch (err) { + updateTask(task.id, { status: 'error', error: (err as any)?.message || 'full_calculation_failed' }); + } + }, 10); + + res.json({ taskId: task.id, status: task.status, progress: task.progress }); + } catch (err) { + console.error('POST /api/project/.../calculate failed', err); + res.status(500).json({ error: (err as any)?.message || 'project_calculate_failed' }); + } +}); + +// GET /api/tasks/:taskId -> 返回任务状态 +app.get('/api/tasks/:taskId', (req: Request, res: Response) => { + const task = getTask(req.params.taskId); + if (!task) return res.status(404).json({ error: 'task_not_found' }); + res.json(task); +}); + +const host = process.env.HOST || '0.0.0.0'; + +// Try to listen on port, with fallback attempts when EADDRINUSE +async function startServer(startPort: number, maxAttempts = 10) { + let attempt = 0; + let currentPort = startPort; + while (attempt < maxAttempts) { + try { + const server = app.listen(currentPort, host, () => { + console.log(`OpenRank API server listening on http://${host}:${currentPort}`); + }); + server.on('error', (err: any) => { + console.error('OpenRank API server error:', err && err.message ? err.message : err); + }); + return server; + } catch (err: any) { + if (err && err.code === 'EADDRINUSE') { + console.warn(`Port ${currentPort} in use, trying next port...`); + attempt += 1; + currentPort += 1; + } else { + console.error('Failed to start server:', err && err.message ? err.message : err); + throw err; + } + } + } + throw new Error(`Unable to start server after ${maxAttempts} attempts starting at ${startPort}`); +} + +startServer(port).catch(err => { + console.error('Fatal: could not start OpenRank API server:', err && err.message ? err.message : err); +}); + +export default app; diff --git a/src/src/config/index.ts b/src/src/config/index.ts index 29ccf7e..5be0df6 100644 --- a/src/src/config/index.ts +++ b/src/src/config/index.ts @@ -20,21 +20,21 @@ const defaultConfig: OpenRankConfig = { minValue: 1.0, tolerance: 0.01, maxIterations: 100, - defaultInitValue: 0.1, // 大幅降低用户初始值,让边权重主导 + defaultInitValue: 3.0, // 提升用户初始值,增强承接能力 }, project: { developerRetentionFactor: 0.8, // 提高继承因子,增强传播效果 repositoryRetentionFactor: 0.15, - issueRetentionFactor: 0.8, - prRetentionFactor: 0.8, + issueRetentionFactor: 0.6, + prRetentionFactor: 0.5, attenuationFactor: 0.8, minValue: 0.1, tolerance: 0.001, maxIterations: 100, - issueInitValue: 2.0, - prNotMergedInitValue: 3.0, - prMergedInitValue: 5.0, + issueInitValue: 10.0, + prNotMergedInitValue: 8.0, + prMergedInitValue: 15.0, // 初始值优化默认参数 initOptimization: { @@ -89,14 +89,21 @@ const defaultConfig: OpenRankConfig = { // 项目级OpenRank专用权重配置 projectActivityWeights: { - // 活动类型权重 (开发者 <-> Issue/PR) - open: 10.0, // 发起Issue/PR的权重 (提高权重) - comment: 5.0, // 评论的权重 (提高权重) - review: 8.0, // 代码审查的权重 (提高权重) - // 新增:Review Comment 独立权重(默认略低于普通评论) - reviewComment: 4.0, - close: 10.0, // 关闭Issue/PR的权重 (提高权重) - commit: 3.0, // 代码提交的权重 (提高权重) + // 活动类型权重 (开发者 <-> Issue/PR) - 调整为更平衡的配置 + open: 12.0, // 发起Issue/PR的权重 (提高,鼓励创建) + comment: 8.0, // 评论的权重 (提高,重视协作) + review: 15.0, // 代码审查的权重 (大幅提高,最重要的协作活动) + // 新增:Review Comment 独立权重(高于普通评论,重视技术讨论) + reviewComment: 10.0, + close: 8.0, // 关闭Issue/PR的权重 (中等) + commit: 2.5, // 代码提交的权重 (传统基于次数,仅在不使用代码量时生效) + + // 新增:基于代码量的commit权重配置 + commitUseCodeMetrics: true, // 启用基于代码行数/文件数的权重 + commitLine: 0.01, // 每行代码变更权重(进一步降低,平衡代码量与协作) + commitFile: 0.2, // 每个文件变更权重(降低,避免大重构过度放大) + commitNonLinearScale: 'log', // 使用对数缩放,防止极大改动过度放大 + commitScaleThreshold: 100, // 缩放阈值(对tanh有效) // 表情权重 (影响Issue/PR初始OpenRank) thumbsUp: 2.0, // 👍 表情权重 diff --git a/src/src/db/init-db.ts b/src/src/db/init-db.ts new file mode 100644 index 0000000..3875d69 --- /dev/null +++ b/src/src/db/init-db.ts @@ -0,0 +1,32 @@ +import fs from 'fs'; +import path from 'path'; +import { pool } from './mysql'; + +function resolveSchemaPath() { + // Try dist path first (where this file runs), then fallback to src path + const distPath = path.join(__dirname, 'schema.sql'); + if (fs.existsSync(distPath)) return distPath; + // __dirname points to dist/src/db; go back to project root and into src/db + const srcPath = path.join(__dirname, '..', '..', '..', 'src', 'db', 'schema.sql'); + if (fs.existsSync(srcPath)) return srcPath; + throw new Error('schema.sql not found in dist or src paths'); +} + +async function main() { + const schemaPath = resolveSchemaPath(); + const sql = fs.readFileSync(schemaPath, 'utf-8'); + const statements = sql.split(/;\s*\n/).map(s => s.trim()).filter(s => s.length); + for (const stmt of statements) { + // eslint-disable-next-line no-console + console.log('Applying:', stmt.substring(0, 80).replace(/\s+/g,' ') + (stmt.length>80?'...':'')); + await pool.query(stmt); + } + // eslint-disable-next-line no-console + console.log('✅ Schema initialized.'); + process.exit(0); +} + +main().catch(e => { + console.error('Schema init failed', e); + process.exit(1); +}); diff --git a/src/src/db/mysql.ts b/src/src/db/mysql.ts new file mode 100644 index 0000000..f8e8d3d --- /dev/null +++ b/src/src/db/mysql.ts @@ -0,0 +1,39 @@ +import mysql from 'mysql2/promise'; +import dotenv from 'dotenv'; +import path from 'path'; + +// Attempt to load config/.env first (project specific), then fallback to root .env +// This avoids creating a pool with empty password when only config/.env exists. +const rootDir = process.cwd(); +const configEnvPath = path.join(rootDir, 'config', '.env'); +// Load specific path silently; then load default to merge (without overwriting already set vars) +dotenv.config({ path: configEnvPath }); +dotenv.config(); + +// Optional one-time diagnostic (can be toggled via DB_ENV_DEBUG=1) +if (process.env.DB_ENV_DEBUG === '1') { + // eslint-disable-next-line no-console + console.log('[mysql] Loaded env vars host=%s user=%s db=%s hasPass=%s from %s', process.env.DB_HOST, process.env.DB_USER, process.env.DB_NAME, process.env.DB_PASS ? 'yes' : 'no', configEnvPath); +} + +const host = process.env.DB_HOST || '127.0.0.1'; +const port = Number(process.env.DB_PORT || 3306); +const user = process.env.DB_USER || 'root'; +const password = process.env.DB_PASS || ''; +const database = process.env.DB_NAME || 'openrank'; +const poolMax = Number(process.env.DB_POOL_MAX || 10); + +export const pool = mysql.createPool({ + host, + port, + user, + password, + database, + waitForConnections: true, + connectionLimit: poolMax, + queueLimit: 0, +}); + +export async function closePool() { + await pool.end(); +} diff --git a/src/src/db/repoStore.ts b/src/src/db/repoStore.ts new file mode 100644 index 0000000..b4dfa6d --- /dev/null +++ b/src/src/db/repoStore.ts @@ -0,0 +1,733 @@ +import { pool } from './mysql'; + +const DB_DEBUG = process.env.DB_DEBUG === '1' || process.env.DB_DEBUG === 'true'; + +function safeParseJSON(value: any, fallback: T): T { + if (value == null) return fallback; + if (typeof value !== 'string') return fallback; + try { + return JSON.parse(value); + } catch { + return fallback; + } +} + +async function query(sql: string, params: any[] = []): Promise { + try { + if (DB_DEBUG) { + console.log('[DB_DEBUG] SQL:', sql.replace(/\s+/g, ' ').slice(0, 400)); + if (params && params.length) console.log('[DB_DEBUG] Params:', JSON.stringify(params.slice(0, 50))); // truncate large arrays + } + const [rows] = await pool.execute(sql, params); + if (DB_DEBUG) { + // rows can be OkPacket for writes + if ((rows as any)?.affectedRows !== undefined) { + console.log('[DB_DEBUG] OkPacket:', { affectedRows: (rows as any).affectedRows, changedRows: (rows as any).changedRows, insertId: (rows as any).insertId }); + } else { + console.log('[DB_DEBUG] Rows returned:', Array.isArray(rows) ? (rows as any[]).length : typeof rows); + } + } + return rows as T[]; + } catch (err: any) { + if (DB_DEBUG) { + console.error('[DB_DEBUG] SQL Error:', err?.message || err); + if (err?.stack) console.error(err.stack.split('\n').slice(0, 4).join('\n')); + } + throw err; + } +} + +// Ensure an index to support activity time-window lookups (repo_id,item_type,created_at) +let activityIndexEnsured = false; +async function ensureActivityIndex() { + if (activityIndexEnsured) return; + try { + await query(`CREATE INDEX idx_activities_repo_type_created ON activities (repo_id, item_type, created_at)`); + } catch (_) { + // ignore if exists + } + activityIndexEnsured = true; +} + +export async function getRepoByFullName(fullName: string) { + const rows = await query(`SELECT * FROM repos WHERE full_name = ? LIMIT 1`, [fullName]); + return rows[0] || null; +} + +export async function upsertRepo(repo: any) { + const sql = `INSERT INTO repos (id, platform, full_name, owner, name, language, description, stars, forks, metadata) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + ON DUPLICATE KEY UPDATE + platform = VALUES(platform), owner = VALUES(owner), name = VALUES(name), language = VALUES(language), + description = VALUES(description), stars = VALUES(stars), forks = VALUES(forks), metadata = VALUES(metadata)`; + // Ensure no undefined values are passed to SQL bind parameters (mysql2 rejects undefined) + await query(sql, [ + repo.id ?? null, + repo.platform ?? null, + repo.full_name ?? null, + repo.owner ?? null, + repo.name ?? null, + repo.language ?? null, + repo.description ?? null, + repo.stars ?? null, + repo.forks ?? null, + JSON.stringify(repo.metadata ?? {}) + ]); +} + +export async function getIssuesForRepo(repoId: number, startDate: Date, endDate: Date) { + // 之前只按 created_at 过滤,导致“旧创建但近期仍活跃”的 issue 被排除。 + // 改进:如果该 issue 在活动表中在窗口内出现,也纳入。 + await ensureActivityIndex(); + const issues = await query( + `SELECT * FROM issues WHERE repo_id = ? AND ( + created_at BETWEEN ? AND ? + OR id IN ( + SELECT DISTINCT item_id FROM activities + WHERE repo_id = ? AND item_type='issue' AND created_at BETWEEN ? AND ? + ) + ) ORDER BY created_at ASC`, + [repoId, startDate, endDate, repoId, startDate, endDate] + ); + if (issues.length === 0) return []; + + const ids = issues.map(i => i.id); + const acts = await query(`SELECT * FROM activities WHERE item_type = 'issue' AND item_id IN (${ids.map(() => '?').join(',')})`, ids); + const actsBy: Map = new Map(); + for (const a of acts) { + const arr = actsBy.get(a.item_id) || []; + arr.push(a); + actsBy.set(a.item_id, arr); + } + + return issues.map(row => ({ + id: row.id, + number: row.number, + platform: row.platform, + repoId: row.repo_id, + repoName: row.repo_full_name, + title: row.title, + authorId: row.author_id, + authorLogin: row.author_login, + createdAt: row.created_at, + closedAt: row.closed_at, + state: row.state, + labels: row.labels ? safeParseJSON(row.labels, undefined) : undefined, + assignees: row.assignees ? safeParseJSON(row.assignees, undefined) : undefined, + firstResponseHours: row.first_response_hours, + assignmentType: row.assignment_type, + activities: (actsBy.get(row.id) || []).map(a => ({ + actorId: a.actor_id, + actorLogin: a.actor_login, + openCount: a.open_count, + commentCount: a.comment_count, + reviewCount: a.review_count, + reviewCommentCount: a.review_comment_count || 0, + commitCount: a.commit_count || 0, + closeCount: a.close_count || 0 + })), + reactions: row.reactions ? safeParseJSON(row.reactions, { thumbsUp: 0, heart: 0, rocket: 0 }) : { thumbsUp: 0, heart: 0, rocket: 0 }, + })); +} + +export async function getPRsForRepo(repoId: number, startDate: Date, endDate: Date) { + // 同理:纳入窗口内有活动(activities)的旧 PR。 + await ensureActivityIndex(); + const prs = await query( + `SELECT * FROM pull_requests WHERE repo_id = ? AND ( + created_at BETWEEN ? AND ? + OR id IN ( + SELECT DISTINCT item_id FROM activities + WHERE repo_id = ? AND item_type='pr' AND created_at BETWEEN ? AND ? + ) + ) ORDER BY created_at ASC`, + [repoId, startDate, endDate, repoId, startDate, endDate] + ); + if (prs.length === 0) return []; + + const ids = prs.map(p => p.id); + const acts = await query(`SELECT * FROM activities WHERE item_type = 'pr' AND item_id IN (${ids.map(() => '?').join(',')})`, ids); + const actsBy: Map = new Map(); + for (const a of acts) { + const arr = actsBy.get(a.item_id) || []; + arr.push(a); + actsBy.set(a.item_id, arr); + } + + return prs.map(row => ({ + id: row.id, + number: row.number, + platform: row.platform, + repoId: row.repo_id, + repoName: row.repo_full_name, + title: row.title, + authorId: row.author_id, + authorLogin: row.author_login, + createdAt: row.created_at, + mergedAt: row.merged_at, + closedAt: row.closed_at, + state: row.state, + labels: row.labels ? safeParseJSON(row.labels, undefined) : undefined, + firstResponseHours: row.first_response_hours, + filesChanged: row.files_changed, + additions: row.additions, + deletions: row.deletions, + testFilesChanged: row.test_files_changed, + coverageDelta: row.coverage_delta, + coreFileRatio: row.core_file_ratio, + ciStatus: row.ci_status, + changeRequests: row.change_requests, + reopened: !!row.reopened, + reverted: !!row.reverted, + activities: (actsBy.get(row.id) || []).map(a => ({ + actorId: a.actor_id, + actorLogin: a.actor_login, + openCount: a.open_count, + commentCount: a.comment_count, + reviewCount: a.review_count, + reviewCommentCount: a.review_comment_count || 0, + commitCount: a.commit_count || 0, + closeCount: a.close_count || 0 + })), + reactions: row.reactions ? safeParseJSON(row.reactions, { thumbsUp: 0, heart: 0, rocket: 0 }) : { thumbsUp: 0, heart: 0, rocket: 0 } + })); +} + +export async function upsertIssue(issue: any) { + if (DB_DEBUG) console.log('[DB_DEBUG] upsertIssue begin', { id: issue.id, number: issue.number, repoId: issue.repoId }); + const baseCols = [ + 'id','platform','repo_id','repo_full_name','number','title','body_long','author_id','author_login','state','created_at','closed_at','labels','assignees','first_response_hours','assignment_type','reactions','activities_count','raw_payload' + ]; + const valuesMap: Record = { + id: issue.id ?? null, + platform: issue.platform ?? null, + repo_id: issue.repoId ?? null, + repo_full_name: issue.repoName ?? null, + number: (issue.number !== undefined ? issue.number : null), + title: issue.title ?? '', + body_long: issue.body ?? null, + author_id: issue.authorId ?? null, + author_login: issue.authorLogin ?? null, + state: issue.state ?? null, + created_at: issue.createdAt ?? null, + closed_at: (issue.closedAt !== undefined ? issue.closedAt : null), + labels: JSON.stringify(issue.labels ?? []), + assignees: JSON.stringify(issue.assignees ?? []), + first_response_hours: (issue.firstResponseHours !== undefined ? issue.firstResponseHours : null), + assignment_type: issue.assignmentType ?? null, + reactions: JSON.stringify(issue.reactions ?? {}), + activities_count: (Array.isArray(issue.activities) ? issue.activities.length : 0), + raw_payload: JSON.stringify(issue.rawPayload ?? {}) + }; + try { + const sql = `INSERT INTO issues (${baseCols.join(',')}) VALUES (${baseCols.map(_=>'?').join(',')}) + ON DUPLICATE KEY UPDATE ${baseCols.filter(c=>!['id','repo_id'].includes(c)).map(c=>`${c}=VALUES(${c})`).join(', ')}, updated_at = CURRENT_TIMESTAMP`; + await query(sql, baseCols.map(c=>valuesMap[c])); + } catch (err: any) { + // 动态降级:检测可用列 + if (/unknown column|doesn't exist|Unknown column/i.test(err?.message||'')) { + try { + const cols = await query('SHOW COLUMNS FROM issues'); + const existing = baseCols.filter(c=>cols.find((x:any)=>x.Field===c)); + if (DB_DEBUG) console.log('[DB_DEBUG] issues existing columns detected', existing); + const sql = `INSERT INTO issues (${existing.join(',')}) VALUES (${existing.map(_=>'?').join(',')}) + ON DUPLICATE KEY UPDATE ${existing.filter(c=>!['id','repo_id'].includes(c)).map(c=>`${c}=VALUES(${c})`).join(', ')}`; + await query(sql, existing.map(c=>valuesMap[c])); + } catch (e2) { + console.error('❌ upsertIssue fallback failed:', (e2 as any)?.message || e2); + throw e2; + } + } else { + console.error('❌ upsertIssue failed:', err?.message || err); + throw err; + } + } + if (DB_DEBUG) console.log('[DB_DEBUG] upsertIssue done', { id: issue.id }); +} + +export async function upsertPR(pr: any) { + if (DB_DEBUG) console.log('[DB_DEBUG] upsertPR begin', { id: pr.id, number: pr.number, repoId: pr.repoId }); + const baseCols = [ + 'id','platform','repo_id','repo_full_name','number','title','body_long','author_id','author_login','state','created_at','merged_at','closed_at','labels','first_response_hours','reactions','files_changed','additions','deletions','test_files_changed','coverage_delta','core_file_ratio','ci_status','change_requests','reopened','reverted','activities_count','raw_payload' + ]; + const valuesMap: Record = { + id: pr.id ?? null, + platform: pr.platform ?? null, + repo_id: pr.repoId ?? null, + repo_full_name: pr.repoName ?? null, + number: (pr.number !== undefined ? pr.number : null), + title: pr.title ?? '', + body_long: pr.body ?? null, + author_id: pr.authorId ?? null, + author_login: pr.authorLogin ?? null, + state: pr.state ?? null, + created_at: pr.createdAt ?? null, + merged_at: (pr.mergedAt !== undefined ? pr.mergedAt : null), + closed_at: (pr.closedAt !== undefined ? pr.closedAt : null), + labels: JSON.stringify(pr.labels ?? []), + first_response_hours: (pr.firstResponseHours !== undefined ? pr.firstResponseHours : null), + reactions: JSON.stringify(pr.reactions ?? {}), + files_changed: (pr.filesChanged !== undefined ? pr.filesChanged : null), + additions: (pr.additions !== undefined ? pr.additions : null), + deletions: (pr.deletions !== undefined ? pr.deletions : null), + test_files_changed: (pr.testFilesChanged !== undefined ? pr.testFilesChanged : null), + coverage_delta: (pr.coverageDelta !== undefined ? pr.coverageDelta : null), + core_file_ratio: (pr.coreFileRatio !== undefined ? pr.coreFileRatio : null), + ci_status: pr.ciStatus ?? null, + change_requests: (pr.changeRequests !== undefined ? pr.changeRequests : null), + reopened: (pr.reopened ? 1 : 0), + reverted: (pr.reverted ? 1 : 0), + activities_count: (Array.isArray(pr.activities) ? pr.activities.length : 0), + raw_payload: JSON.stringify(pr.rawPayload ?? {}) + }; + try { + const sql = `INSERT INTO pull_requests (${baseCols.join(',')}) VALUES (${baseCols.map(_=>'?').join(',')}) + ON DUPLICATE KEY UPDATE ${baseCols.filter(c=>!['id','repo_id'].includes(c)).map(c=>`${c}=VALUES(${c})`).join(', ')}, updated_at = CURRENT_TIMESTAMP`; + await query(sql, baseCols.map(c=>valuesMap[c])); + } catch (err: any) { + if (/unknown column|doesn't exist|Unknown column/i.test(err?.message||'')) { + try { + const cols = await query('SHOW COLUMNS FROM pull_requests'); + const existing = baseCols.filter(c=>cols.find((x:any)=>x.Field===c)); + if (DB_DEBUG) console.log('[DB_DEBUG] pull_requests existing columns detected', existing); + const sql = `INSERT INTO pull_requests (${existing.join(',')}) VALUES (${existing.map(_=>'?').join(',')}) + ON DUPLICATE KEY UPDATE ${existing.filter(c=>!['id','repo_id'].includes(c)).map(c=>`${c}=VALUES(${c})`).join(', ')}`; + await query(sql, existing.map(c=>valuesMap[c])); + } catch (e2) { + console.error('❌ upsertPR fallback failed:', (e2 as any)?.message || e2); + throw e2; + } + } else { + console.error('❌ upsertPR failed:', err?.message || err); + throw err; + } + } + if (DB_DEBUG) console.log('[DB_DEBUG] upsertPR done', { id: pr.id }); +} + +export async function upsertActivitiesBatch(activities: any[]) { + if (!activities || activities.length === 0) return; + if (DB_DEBUG) console.log('[DB_DEBUG] upsertActivitiesBatch size', activities.length, 'sample', activities[0]); + const values: any[] = []; + const rowsSql: string[] = []; + // Detect columns once if needed + let cols: any[] | null = null; + try { + cols = await query('SHOW COLUMNS FROM activities'); + } catch (e) { + console.warn('⚠️ SHOW COLUMNS failed for activities, using default column list'); + } + const has = (c: string) => !cols || cols.find(x=>x.Field===c); + for (const a of activities) { + const rowVals: any[] = []; + const placeholders: string[] = []; + const push = (v:any) => { rowVals.push(v); placeholders.push('?'); }; + // mandatory base + push(a.platform ?? null); // platform + push(a.repoId ?? null); // repo_id + push(a.item_type ?? null); // item_type + push(a.item_id ?? null); // item_id + if (has('item_number')) push(a.item_number ?? null); // item_number optional + push(a.actor_id ?? null); // actor_id + push(a.actor_login ?? null); // actor_login + push(a.open_count != null ? a.open_count : 0); // open_count + push(a.comment_count != null ? a.comment_count : 0); // comment_count + if (has('review_count')) push(a.review_count != null ? a.review_count : 0); + if (has('review_comment_count')) push(a.review_comment_count != null ? a.review_comment_count : 0); + if (has('close_count')) push(a.close_count != null ? a.close_count : 0); + push(a.commit_count != null ? a.commit_count : 0); // commit_count (assume exists) + push(JSON.stringify(a.activity_meta ?? {})); // activity_meta + rowsSql.push('(' + placeholders.join(',') + ')'); + values.push(...rowVals); + } + // Build column list aligned with above order + const colsOrdered = ['platform','repo_id','item_type','item_id']; + if (has('item_number')) colsOrdered.push('item_number'); + colsOrdered.push('actor_id','actor_login','open_count','comment_count'); + if (has('review_count')) colsOrdered.push('review_count'); + if (has('review_comment_count')) colsOrdered.push('review_comment_count'); + if (has('close_count')) colsOrdered.push('close_count'); + colsOrdered.push('commit_count','activity_meta'); + const updateCols = colsOrdered.filter(c=>!['platform','repo_id','item_type','item_id','actor_id','actor_login'].includes(c) && c!=='activity_meta'); + const sql = `INSERT INTO activities (${colsOrdered.join(',')}) VALUES ${rowsSql.join(',')} + ON DUPLICATE KEY UPDATE ${updateCols.map(c=>`${c}=VALUES(${c})`).join(', ')}, activity_meta=VALUES(activity_meta), updated_at=CURRENT_TIMESTAMP`; + await query(sql, values); + if (DB_DEBUG) console.log('[DB_DEBUG] upsertActivitiesBatch done count', activities.length); +} + +// 辅助调试函数:统计行数 +export async function countIssues(repoId: number): Promise { + const rows = await query('SELECT COUNT(*) as c FROM issues WHERE repo_id = ?', [repoId]); + return rows[0]?.c || 0; +} +export async function countPRs(repoId: number): Promise { + const rows = await query('SELECT COUNT(*) as c FROM pull_requests WHERE repo_id = ?', [repoId]); + return rows[0]?.c || 0; +} +export async function countActivities(repoId: number): Promise { + const rows = await query('SELECT COUNT(*) as c FROM activities WHERE repo_id = ?', [repoId]); + return rows[0]?.c || 0; +} + +// Aggregate contributors for a given repo from activities and merged PRs +export async function getContributorsForRepo(repoId: number, startDate?: Date, endDate?: Date) { + // Attempt to use created_at filtering when possible, but fall back to repo-level aggregation + const hasDateFilter = !!startDate && !!endDate; + const params: any[] = [repoId]; + if (hasDateFilter) params.push(startDate, endDate); + + // Aggregate activity counts from activities table + let activityRows: any[] = []; + try { + const dateClause = hasDateFilter ? 'AND created_at BETWEEN ? AND ?' : ''; + const sql = `SELECT actor_id, actor_login, + SUM(CASE WHEN item_type='issue' THEN 1 ELSE 0 END) AS issues, + SUM(CASE WHEN item_type='pr' THEN 1 ELSE 0 END) AS prs, + SUM(IFNULL(comment_count,0)) AS comments, + SUM(IFNULL(review_comment_count,0)) AS review_comments, + SUM(IFNULL(commit_count,0)) AS commits + FROM activities + WHERE repo_id = ? ${dateClause} + GROUP BY actor_id, actor_login`; + activityRows = await query(sql, params); + } catch (e) { + // On failure (missing columns, etc.) try a simpler query grouping without date + try { + const sql = `SELECT actor_id, actor_login, + SUM(CASE WHEN item_type='issue' THEN 1 ELSE 0 END) AS issues, + SUM(CASE WHEN item_type='pr' THEN 1 ELSE 0 END) AS prs, + SUM(IFNULL(comment_count,0)) AS comments, + SUM(IFNULL(review_comment_count,0)) AS review_comments, + SUM(IFNULL(commit_count,0)) AS commits + FROM activities + WHERE repo_id = ? + GROUP BY actor_id, actor_login`; + activityRows = await query(sql, [repoId]); + } catch (e2) { + // give up and return empty + return []; + } + } + + // Aggregate merged PR counts from pull_requests (best-effort) + let mergedRows: any[] = []; + try { + if (hasDateFilter) { + mergedRows = await query(`SELECT author_id, author_login, COUNT(*) as merged + FROM pull_requests WHERE repo_id = ? AND merged_at BETWEEN ? AND ? AND merged_at IS NOT NULL + GROUP BY author_id, author_login`, [repoId, startDate, endDate]); + } else { + mergedRows = await query(`SELECT author_id, author_login, COUNT(*) as merged + FROM pull_requests WHERE repo_id = ? AND merged_at IS NOT NULL + GROUP BY author_id, author_login`, [repoId]); + } + } catch (e) { + // ignore merged aggregation failure + mergedRows = []; + } + + // Merge activityRows and mergedRows into contributor summaries + const byKey: Map = new Map(); + for (const r of activityRows) { + const key = (r.actor_login || r.actor_id || 'unknown') + ''; + const entry = { + id: r.actor_id || null, + name: r.actor_login || 'unknown', + activity: { + issues: Number(r.issues || 0), + prs: Number(r.prs || 0), + comments: Number(r.comments || 0), + reviewComments: Number(r.review_comments || 0), + commits: Number(r.commits || 0) + }, + merged: 0, + total: 0 + }; + entry.total = entry.activity.issues + entry.activity.prs + entry.activity.comments + entry.activity.reviewComments + entry.activity.commits; + byKey.set(key, entry); + } + for (const m of mergedRows) { + const key = (m.author_login || m.author_id || 'unknown') + ''; + const exist = byKey.get(key); + const mergedCount = Number(m.merged || 0); + if (exist) { + exist.merged = mergedCount; + exist.total = (exist.total || 0) + mergedCount; + } else { + const entry = { + id: m.author_id || null, + name: m.author_login || 'unknown', + activity: { issues: 0, prs: 0, comments: 0, reviewComments: 0, commits: 0 }, + merged: mergedCount, + total: mergedCount + }; + byKey.set(key, entry); + } + } + + const result = Array.from(byKey.values()); + // fill totals and sort by total desc + result.forEach((r:any) => { + r.total = r.total || ((r.activity?.issues||0) + (r.activity?.prs||0) + (r.activity?.comments||0) + (r.activity?.reviewComments||0) + (r.activity?.commits||0) + (r.merged||0)); + }); + result.sort((a:any,b:any)=>b.total - a.total); + return result; +} + +// Return time-series of activity counts per day for a repo within window +export async function getContributionsTimeSeries(repoId: number, startDate: Date, endDate: Date, granularity: 'day'|'week' = 'day') { + // MySQL DATE_FORMAT or WEEK can be used. We'll return array of { period: string, issues: number, prs: number, comments: number, merged: number } + try { + if (granularity === 'day') { + const sql = `SELECT DATE(created_at) as period, + SUM(CASE WHEN item_type='issue' THEN 1 ELSE 0 END) as issues, + SUM(CASE WHEN item_type='pr' THEN 1 ELSE 0 END) as prs, + SUM(IFNULL(comment_count,0)) as comments + FROM activities + WHERE repo_id = ? AND created_at BETWEEN ? AND ? + GROUP BY DATE(created_at) + ORDER BY DATE(created_at) ASC`; + const rows = await query(sql, [repoId, startDate, endDate]); + // merged PRs come from pull_requests.merged_at + const mergedRows = await query(`SELECT DATE(merged_at) as period, COUNT(*) as merged FROM pull_requests WHERE repo_id = ? AND merged_at BETWEEN ? AND ? GROUP BY DATE(merged_at) ORDER BY DATE(merged_at) ASC`, [repoId, startDate, endDate]); + const mergedMap = new Map(); + for (const m of mergedRows) mergedMap.set(String(m.period), Number(m.merged || 0)); + return rows.map(r => ({ period: String(r.period), issues: Number(r.issues||0), prs: Number(r.prs||0), comments: Number(r.comments||0), merged: mergedMap.get(String(r.period)) || 0 })); + } + // week granularity + const sqlWeek = `SELECT YEAR(created_at) as yr, WEEK(created_at,1) as wk, + SUM(CASE WHEN item_type='issue' THEN 1 ELSE 0 END) as issues, + SUM(CASE WHEN item_type='pr' THEN 1 ELSE 0 END) as prs, + SUM(IFNULL(comment_count,0)) as comments + FROM activities + WHERE repo_id = ? AND created_at BETWEEN ? AND ? + GROUP BY YEAR(created_at), WEEK(created_at,1) + ORDER BY YEAR(created_at), WEEK(created_at,1)`; + const rows = await query(sqlWeek, [repoId, startDate, endDate]); + const mergedRows = await query(`SELECT YEAR(merged_at) as yr, WEEK(merged_at,1) as wk, COUNT(*) as merged FROM pull_requests WHERE repo_id = ? AND merged_at BETWEEN ? AND ? GROUP BY YEAR(merged_at), WEEK(merged_at,1)`, [repoId, startDate, endDate]); + const mergedMap = new Map(); + for (const m of mergedRows) mergedMap.set(`${m.yr}-${m.wk}`, Number(m.merged || 0)); + return rows.map(r => ({ period: `${r.yr}-${r.wk}`, issues: Number(r.issues||0), prs: Number(r.prs||0), comments: Number(r.comments||0), merged: mergedMap.get(`${r.yr}-${r.wk}`) || 0 })); + } catch (e) { + console.warn('getContributionsTimeSeries failed:', (e as any)?.message || e); + return []; + } +} + +// Return aggregated merged PR counts grouped by author for a repo within a window +export async function getMergedPRsForRepo(repoId: number, startDate?: Date, endDate?: Date) { + try { + const hasDateFilter = !!startDate && !!endDate; + if (hasDateFilter) { + const rows = await query(`SELECT author_id, author_login, COUNT(*) as merged FROM pull_requests WHERE repo_id = ? AND merged_at BETWEEN ? AND ? AND merged_at IS NOT NULL GROUP BY author_id, author_login`, [repoId, startDate, endDate]); + return rows; + } + const rows = await query(`SELECT author_id, author_login, COUNT(*) as merged FROM pull_requests WHERE repo_id = ? AND merged_at IS NOT NULL GROUP BY author_id, author_login`, [repoId]); + return rows; + } catch (e) { + return []; + } +} + +// Aggregate author counts directly from issues and pull_requests tables (counts of authored issues/PRs) +export async function getAuthorCountsFromIssuesAndPRs(repoId: number, startDate?: Date, endDate?: Date) { + try { + const hasDateFilter = !!startDate && !!endDate; + let issueRows: any[] = []; + let prRows: any[] = []; + if (hasDateFilter) { + issueRows = await query(`SELECT author_id, author_login, COUNT(*) as issues FROM issues WHERE repo_id = ? AND created_at BETWEEN ? AND ? GROUP BY author_id, author_login`, [repoId, startDate, endDate]).catch(()=>[]); + prRows = await query(`SELECT author_id, author_login, COUNT(*) as prs, SUM(CASE WHEN merged_at IS NOT NULL THEN 1 ELSE 0 END) as merged FROM pull_requests WHERE repo_id = ? AND created_at BETWEEN ? AND ? GROUP BY author_id, author_login`, [repoId, startDate, endDate]).catch(()=>[]); + } else { + issueRows = await query(`SELECT author_id, author_login, COUNT(*) as issues FROM issues WHERE repo_id = ? GROUP BY author_id, author_login`, [repoId]).catch(()=>[]); + prRows = await query(`SELECT author_id, author_login, COUNT(*) as prs, SUM(CASE WHEN merged_at IS NOT NULL THEN 1 ELSE 0 END) as merged FROM pull_requests WHERE repo_id = ? GROUP BY author_id, author_login`, [repoId]).catch(()=>[]); + } + const byKey: Map = new Map(); + for (const r of issueRows) { + const key = String(r.author_login || r.author_id || 'unknown'); + const entry = byKey.get(key) || { id: r.author_id || null, name: r.author_login || 'unknown', activity: { issues: 0, prs: 0, comments: 0, reviewComments: 0, commits: 0 }, merged: 0, total: 0 }; + entry.activity.issues = Number(r.issues || 0); + entry.total = entry.activity.issues + entry.activity.prs + entry.activity.comments + entry.activity.reviewComments + entry.activity.commits + entry.merged; + byKey.set(key, entry); + } + for (const r of prRows) { + const key = String(r.author_login || r.author_id || 'unknown'); + const entry = byKey.get(key) || { id: r.author_id || null, name: r.author_login || 'unknown', activity: { issues: 0, prs: 0, comments: 0, reviewComments: 0, commits: 0 }, merged: 0, total: 0 }; + entry.activity.prs = Number(r.prs || 0); + entry.merged = Number(r.merged || 0); + entry.total = entry.activity.issues + entry.activity.prs + entry.activity.comments + entry.activity.reviewComments + entry.activity.commits + entry.merged; + byKey.set(key, entry); + } + const result = Array.from(byKey.values()).sort((a,b)=>b.total - a.total); + return result; + } catch (e) { + return []; + } +} + +// fetch_runs 相关(去重整合后的唯一实现) +export interface FetchRunRecord { + id?: number; // 数据库自增主键(读取时返回) + repo_id: number; + source: 'network' | 'db'; + start_time: Date; // 本次抓取 / 加载的窗口开始 + end_time: Date; // 窗口结束 + issues: number; // 本次得到的 issue 数 + pull_requests: number; // PR 数 + activities: number; // activity 记录数 + success: 0 | 1; // 是否成功 + meta?: any; // 额外信息(JSON) + // 新 schema 兼容字段(不会强制要求调用方提供) + platform?: string; // e.g. 'GitHub' + repo_full_name?: string; // owner/name + token_used?: 0 | 1; // 是否使用 token + note?: string; // 备注/错误说明 +} + +let fetchRunsTableEnsured = false; +export async function ensureFetchRunsTable() { + if (fetchRunsTableEnsured) return; + try { + // 尝试检测表是否存在 + const tables = await query(`SHOW TABLES LIKE 'fetch_runs'`); + if (!tables || tables.length === 0) { + if (DB_DEBUG) console.log('[DB_DEBUG] fetch_runs 表不存在,按照新 schema 创建'); + // 采用用户提供的新 schema(扩展保留旧列兼容) + await query(`CREATE TABLE IF NOT EXISTS fetch_runs ( + id BIGINT NOT NULL AUTO_INCREMENT, + platform VARCHAR(32) NOT NULL DEFAULT 'GitHub', + repo_id BIGINT NOT NULL, + repo_full_name VARCHAR(255) NOT NULL, + start_time DATETIME NOT NULL, + end_time DATETIME DEFAULT NULL, + start_date DATE NOT NULL, + end_date DATE NOT NULL, + token_used TINYINT(1) DEFAULT 0, + success TINYINT(1) DEFAULT 0, + note TEXT NULL, + stats JSON DEFAULT NULL, + -- 旧版本字段(兼容保留,可为空) + source ENUM('network','db') NULL, + issues INT NULL, + pull_requests INT NULL, + activities INT NULL, + meta JSON NULL, + created_at DATETIME DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (id), + KEY idx_fetch_runs_repo (repo_id, start_date, end_date), + KEY idx_repo_time (repo_id, start_time, end_time) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4`); + fetchRunsTableEnsured = true; + return; + } + // 表存在则检查缺失列 + const cols = await query('SHOW COLUMNS FROM fetch_runs'); + const have = (n: string) => cols.find((c:any)=>c.Field === n); + const alterStmts: string[] = []; + // 新 schema 列 + if (!have('platform')) alterStmts.push(`ADD COLUMN platform VARCHAR(32) NOT NULL DEFAULT 'GitHub' AFTER id`); + if (!have('repo_full_name')) alterStmts.push(`ADD COLUMN repo_full_name VARCHAR(255) NOT NULL AFTER repo_id`); + if (!have('start_date')) alterStmts.push(`ADD COLUMN start_date DATE NOT NULL AFTER end_time`); + if (!have('end_date')) alterStmts.push(`ADD COLUMN end_date DATE NOT NULL AFTER start_date`); + if (!have('token_used')) alterStmts.push(`ADD COLUMN token_used TINYINT(1) DEFAULT 0 AFTER end_date`); + if (!have('note')) alterStmts.push(`ADD COLUMN note TEXT NULL AFTER success`); + if (!have('stats')) alterStmts.push(`ADD COLUMN stats JSON NULL AFTER note`); + // 旧 schema 兼容列(如果不存在则补齐,便于兼容旧调用代码) + if (!have('source')) alterStmts.push(`ADD COLUMN source ENUM('network','db') NULL AFTER repo_full_name`); + if (!have('issues')) alterStmts.push(`ADD COLUMN issues INT NULL`); + if (!have('pull_requests')) alterStmts.push(`ADD COLUMN pull_requests INT NULL`); + if (!have('activities')) alterStmts.push(`ADD COLUMN activities INT NULL`); + if (!have('success')) alterStmts.push(`ADD COLUMN success TINYINT(1) DEFAULT 0`); + if (!have('meta')) alterStmts.push(`ADD COLUMN meta JSON NULL`); + if (alterStmts.length) { + const alterSql = 'ALTER TABLE fetch_runs ' + alterStmts.join(', '); + if (DB_DEBUG) console.log('[DB_DEBUG] fetch_runs 补齐列:', alterSql); + await query(alterSql); + } + // 索引(容错:存在则忽略错误) + try { await query('ALTER TABLE fetch_runs ADD KEY idx_fetch_runs_repo (repo_id, start_date, end_date)'); } catch {} + try { await query('ALTER TABLE fetch_runs ADD KEY idx_repo_time (repo_id, start_time, end_time)'); } catch {} + fetchRunsTableEnsured = true; + } catch (e) { + console.warn('⚠️ ensureFetchRunsTable 失败(忽略自动建表):', (e as any)?.message || e); + } +} + +export async function insertFetchRun(run: FetchRunRecord) { + await ensureFetchRunsTable(); + // 新 schema:核心字段写入固定列,旧计数与 source/meta 聚合到 stats JSON 中 + const sql = `INSERT INTO fetch_runs (platform, repo_id, repo_full_name, start_time, end_time, start_date, end_date, token_used, success, note, stats, source, issues, pull_requests, activities, meta) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`; + try { + const startDate = new Date(Date.UTC(run.start_time.getUTCFullYear(), run.start_time.getUTCMonth(), run.start_time.getUTCDate())); + const endDate = new Date(Date.UTC(run.end_time.getUTCFullYear(), run.end_time.getUTCMonth(), run.end_time.getUTCDate())); + const statsObj = { + issues: run.issues, + pull_requests: run.pull_requests, + activities: run.activities, + source: run.source, + meta: run.meta || {} + }; + await query(sql, [ + run.platform || 'GitHub', + run.repo_id, + run.repo_full_name || '', + run.start_time, + run.end_time, + startDate, + endDate, + run.token_used != null ? run.token_used : (process.env.GITHUB_TOKEN ? 1 : 0), + run.success, + run.note || (run.meta?.error ? String(run.meta.error) : null), + JSON.stringify(statsObj), + // 兼容旧列直接写入(即使新 schema 不严格需要) + run.source, + run.issues, + run.pull_requests, + run.activities, + JSON.stringify(run.meta || {}) + ]); + } catch (err: any) { + if (/unknown column|doesn't exist|Unknown column/i.test(err?.message||'')) { + // 可能是表结构缺失,再尝试补齐一次 + fetchRunsTableEnsured = false; // 重新检测 + await ensureFetchRunsTable(); + await query(sql, [ + run.platform || 'GitHub', + run.repo_id, + run.repo_full_name || '', + run.start_time, + run.end_time, + new Date(Date.UTC(run.start_time.getUTCFullYear(), run.start_time.getUTCMonth(), run.start_time.getUTCDate())), + new Date(Date.UTC(run.end_time.getUTCFullYear(), run.end_time.getUTCMonth(), run.end_time.getUTCDate())), + run.token_used != null ? run.token_used : (process.env.GITHUB_TOKEN ? 1 : 0), + run.success, + run.note || (run.meta?.error ? String(run.meta.error) : null), + JSON.stringify({ issues: run.issues, pull_requests: run.pull_requests, activities: run.activities, source: run.source, meta: run.meta||{} }), + run.source, + run.issues, + run.pull_requests, + run.activities, + JSON.stringify(run.meta || {}) + ]); + } else { + throw err; + } + } +} +// 语义:找到覆盖所给时间窗口(start<=窗口开始 AND end>=窗口结束)的最近一次成功抓取 +export async function latestSuccessfulRun(repoId: number, windowStart: Date, windowEnd: Date) { + // 优先使用新 schema 的日期列(start_date/end_date)进行范围覆盖判断 + let rows = await query( + `SELECT * FROM fetch_runs WHERE repo_id = ? AND success = 1 AND start_date <= ? AND end_date >= ? ORDER BY id DESC LIMIT 1`, + [repoId, windowStart, windowEnd] + ); + if (!rows || !rows.length) { + // 回退到旧列逻辑 + rows = await query( + `SELECT * FROM fetch_runs WHERE repo_id = ? AND success = 1 AND start_time <= ? AND end_time >= ? ORDER BY id DESC LIMIT 1`, + [repoId, windowStart, windowEnd] + ); + } + return rows[0] || null; +} diff --git a/src/src/db/schema.sql b/src/src/db/schema.sql new file mode 100644 index 0000000..e5b6297 --- /dev/null +++ b/src/src/db/schema.sql @@ -0,0 +1,81 @@ +-- Basic schema for openrank persistence +CREATE TABLE IF NOT EXISTS repos ( + id BIGINT PRIMARY KEY, + platform VARCHAR(32), + full_name VARCHAR(255) UNIQUE, + owner VARCHAR(255), + name VARCHAR(255), + language VARCHAR(64), + description TEXT, + stars INT, + forks INT, + metadata JSON, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS issues ( + id BIGINT PRIMARY KEY, + platform VARCHAR(32), + repo_id BIGINT, + repo_full_name VARCHAR(255), + number INT, + title VARCHAR(512), + body_long MEDIUMTEXT, + author_id BIGINT, + author_login VARCHAR(255), + state VARCHAR(32), + created_at DATETIME, + closed_at DATETIME NULL, + labels JSON, + assignees JSON, + first_response_hours INT NULL, + reactions JSON, + raw_payload JSON, + created_ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + KEY idx_repo_created (repo_id, created_at) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS pull_requests ( + id BIGINT PRIMARY KEY, + platform VARCHAR(32), + repo_id BIGINT, + repo_full_name VARCHAR(255), + number INT, + title VARCHAR(512), + body_long MEDIUMTEXT, + author_id BIGINT, + author_login VARCHAR(255), + state VARCHAR(32), + created_at DATETIME, + merged_at DATETIME NULL, + closed_at DATETIME NULL, + labels JSON, + files_changed INT NULL, + additions INT NULL, + deletions INT NULL, + reactions JSON, + raw_payload JSON, + created_ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + KEY idx_repo_created (repo_id, created_at) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS activities ( + platform VARCHAR(32), + repo_id BIGINT, + item_type ENUM('issue','pr') NOT NULL, + item_id BIGINT NOT NULL, + item_number INT, + actor_id BIGINT, + actor_login VARCHAR(255), + open_count INT DEFAULT 0, + comment_count INT DEFAULT 0, + review_count INT DEFAULT 0, + commit_count INT DEFAULT 0, + activity_meta JSON, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (item_type, item_id, actor_id) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; diff --git a/src/src/db/test-db-write.ts b/src/src/db/test-db-write.ts new file mode 100644 index 0000000..cf2388a --- /dev/null +++ b/src/src/db/test-db-write.ts @@ -0,0 +1,132 @@ +import * as path from 'path'; +import * as fs from 'fs'; +import * as dotenv from 'dotenv'; +import { upsertRepo, upsertIssue, upsertPR, upsertActivitiesBatch, getRepoByFullName, getIssuesForRepo, getPRsForRepo } from './repoStore'; +import { pool, closePool } from './mysql'; + +// Explicitly load config/.env +const envPath = path.resolve(process.cwd(), 'config', '.env'); +if (fs.existsSync(envPath)) { + dotenv.config({ path: envPath }); + console.log(`✅ Loaded env file: ${envPath}`); +} else { + console.warn(`⚠️ Env file not found at ${envPath}, relying on process env.`); +} + +async function main() { + console.log('🧪 DB write test start'); + try { + // Minimal repo + const repo = { + id: 999999999, // use a high test id to avoid collision + platform: 'GitHub', + full_name: 'TestOwner/TestRepo', + owner: 'TestOwner', + name: 'TestRepo', + language: 'TypeScript', + description: 'Temporary test repo record', + stars: 0, + forks: 0, + metadata: { createdBy: 'test-db-write-script', ts: new Date().toISOString() } + }; + await upsertRepo(repo); + console.log('✅ upsertRepo ok'); + + const issueId = 999999001; + await upsertIssue({ + id: issueId, + platform: 'GitHub', + repoId: repo.id, + repoName: repo.full_name, + number: 1, + title: 'Test Issue', + body: 'Issue body', + authorId: 101, + authorLogin: 'author1', + state: 'open', + createdAt: new Date(), + closedAt: null, + labels: ['test'], + assignees: [{ id: 102, login: 'assignee' }], + firstResponseHours: 12, + reactions: { thumbsUp: 1, heart: 0, rocket: 0 }, + rawPayload: { note: 'raw issue payload' } + }); + console.log('✅ upsertIssue ok'); + + const prId = 999999101; + await upsertPR({ + id: prId, + platform: 'GitHub', + repoId: repo.id, + repoName: repo.full_name, + number: 2, + title: 'Test PR', + body: 'PR body', + authorId: 103, + authorLogin: 'author2', + state: 'open', + createdAt: new Date(), + mergedAt: null, + closedAt: null, + labels: ['test-pr'], + filesChanged: 3, + additions: 120, + deletions: 10, + reactions: { thumbsUp: 2 }, + rawPayload: { note: 'raw pr payload' } + }); + console.log('✅ upsertPR ok'); + + await upsertActivitiesBatch([ + { + platform: 'GitHub', + repoId: repo.id, + item_type: 'issue', + item_id: issueId, + item_number: issueId, + actor_id: 101, + actor_login: 'author1', + open_count: 1, + comment_count: 2, + review_count: 0, + commit_count: 0, + activity_meta: { kind: 'author-open' } + }, + { + platform: 'GitHub', + repoId: repo.id, + item_type: 'pr', + item_id: prId, + item_number: prId, + actor_id: 103, + actor_login: 'author2', + open_count: 1, + comment_count: 0, + review_count: 1, + commit_count: 2, + activity_meta: { kind: 'author-open-pr' } + } + ]); + console.log('✅ upsertActivitiesBatch ok'); + + // Read back + const repoRow = await getRepoByFullName(repo.full_name); + console.log('🔍 Repo fetched:', repoRow ? 'found' : 'missing'); + + const issues = await getIssuesForRepo(repo.id, new Date(Date.now() - 86400000), new Date(Date.now() + 86400000)); + console.log(`🔍 Issues fetched: ${issues.length}`); + + const prs = await getPRsForRepo(repo.id, new Date(Date.now() - 86400000), new Date(Date.now() + 86400000)); + console.log(`🔍 PRs fetched: ${prs.length}`); + + console.log('🎉 DB write test finished successfully'); + } catch (err: any) { + console.error('❌ DB write test failed:', err?.message || err); + console.error(err); + } finally { + await closePool(); + } +} + +main(); diff --git a/src/src/real-github-data-test.ts b/src/src/real-github-data-test.ts index 0f1d9cb..33db131 100644 --- a/src/src/real-github-data-test.ts +++ b/src/src/real-github-data-test.ts @@ -1,36 +1,74 @@ /** - * 真实 GitHub 数据测试 - 方案A+B组合优化 + * 真实 GitHub 数据测试 - 平衡权重优化 * 使用真实的 GitHub 仓库数据测试项目级 OpenRank 算法 * - * 方案A:边权重优化 - 基于用户活动贡献差异化边权重,消除归一化压制 - * 方案B:节点价值优化 - 基于协作单元质量特征差异化节点价值 + * 核心优化: + * 1. Commit权重从次数改为基于代码行数/文件数,使用非线性缩放防止极值主导 + * 2. 大幅提升协作活动权重(review: 15.0, reviewComment: 10.0, comment: 8.0) + * 3. 平衡代码贡献与协作参与,避免单一维度主导排名 * * 测试目标: - * 1. 验证方案A是否实现"多劳多得",高贡献者获得更高OpenRank - * 2. 验证方案B是否实现"优质内容更有价值",高质量Issue/PR获得更高价值 - * 3. 验证平衡因子是否有效避免方案A+B过度叠加放大 + * 1. 验证代码贡献能合理体现(基于行数/文件数,非线性缩放) + * 2. 验证协作活跃度得到应有权重(review、comment、技术讨论) + * 3. 验证排名更接近官方OpenRank的协作导向 */ // 禁用 TLS 验证来解决证书问题(仅用于本地调试,不建议生产启用) process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; // 使用提供的GitHub Token -const GITHUB_TOKEN = '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'; +// const GITHUB_TOKEN = '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'; +const GITHUB_TOKEN = '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'; process.env.GITHUB_TOKEN = GITHUB_TOKEN; +// 加载项目根目录下 config/.env(优先使用显式路径,确保 DB 等配置注入) +import * as dotenv from 'dotenv'; +import * as path from 'path'; +const envPath = path.resolve(process.cwd(), 'config', '.env'); +dotenv.config({ path: envPath }); + import { GitHubDataCollector } from './GitHubDataCollector'; import { ProjectOpenRankCalculator } from './algorithm/ProjectOpenRankCalculator'; import { OpenRankConfig, OpenRankResult } from './types'; import * as fs from 'fs'; -import * as path from 'path'; import * as yaml from 'js-yaml'; +import * as repoStore from './db/repoStore'; +import { closePool } from './db/mysql'; // 从YAML文件加载优化后的配置 function loadConfig(): OpenRankConfig { - const configPath = path.join(__dirname, '..', 'config', 'openrank.yml'); - const configData = fs.readFileSync(configPath, 'utf-8'); - return yaml.load(configData) as OpenRankConfig; + // 1) 环境变量优先,可直接指定文件路径(对 CI/打包环境友好) + const envPath = process.env.OPENRANK_CONFIG; + if (envPath) { + if (fs.existsSync(envPath)) { + const configData = fs.readFileSync(envPath, 'utf-8'); + return yaml.load(configData) as OpenRankConfig; + } + throw new Error(`环境变量 OPENRANK_CONFIG 指定的配置文件不存在: ${envPath}`); + } + + // 2) 优先使用项目根目录下的 config/openrank.yml(最常见的约定) + const projectConfig = path.join(process.cwd(), 'config', 'openrank.yml'); + if (fs.existsSync(projectConfig)) { + const configData = fs.readFileSync(projectConfig, 'utf-8'); + return yaml.load(configData) as OpenRankConfig; + } + + // 3) 回退:尝试多个相对路径,兼容直接从 dist 运行或从源码运行的情况 + const candidates = [ + path.join(__dirname, '..', 'config', 'openrank.yml'), // src/config (ts-node) + path.join(__dirname, '..', '..', 'config', 'openrank.yml'), // dist/src -> ../.. -> project root/config + path.join(__dirname, '..', '..', '..', 'config', 'openrank.yml') // extra safety + ]; + for (const c of candidates) { + if (fs.existsSync(c)) { + const configData = fs.readFileSync(c, 'utf-8'); + return yaml.load(configData) as OpenRankConfig; + } + } + + throw new Error(`无法找到 openrank.yml 配置文件。请确保在项目根目录存在 config/openrank.yml,或设置环境变量 OPENRANK_CONFIG 指向配置文件路径。`); } /** @@ -81,48 +119,52 @@ function analyzeDataQuality(issues: any[], pullRequests: any[]) { (prsWithActivities.reduce((sum: number, pr: any) => sum + pr.activities.length, 0) / prsWithActivities.length).toFixed(1) : 0}`); } +/** + * 计算用户活动权重分解 + */ +// 新版本:使用最终图中 activity 边的 activityDetails 聚合,避免“重算路径”导致 commit 份额偏高假象 +function calculateUserActivityBreakdownFromGraph(results: OpenRankResult[], config: OpenRankConfig, calculator: any) { + const userActivities = new Map(); + const graph = (calculator as any).getGraphSnapshot ? (calculator as any).getGraphSnapshot() : null; + if (!graph) return userActivities; + for (const e of graph.edges || []) { + if (e.type !== 'activity' || !e.activityDetails) continue; + const targetNode = graph.nodes.find((n:any)=> n.id===e.target); + if (!targetNode || targetNode.type !== 'User') continue; + const login = targetNode.name; + if (!userActivities.has(login)) { + userActivities.set(login, { totalWeight:0, activities:[], breakdown: { open:0, comment:0, review:0, reviewComment:0, close:0, commit:0, commitLines:0, commitFiles:0 } }); + } + const ua = userActivities.get(login)!; + const det = e.activityDetails; + ua.breakdown.open += det.openWeight || 0; + ua.breakdown.comment += det.commentWeight || 0; + ua.breakdown.review += det.reviewWeight || 0; + ua.breakdown.reviewComment += det.reviewCommentWeight || 0; + ua.breakdown.close += det.closeWeight || 0; + ua.breakdown.commit += det.commitWeight || 0; + // 行/文件权重:若调试日志里需要,可从 pr_activity_debug.json 二次关联,这里先留0(避免再重算) + const edgeContribution = (det.openWeight||0)+(det.commentWeight||0)+(det.reviewWeight||0)+(det.reviewCommentWeight||0)+(det.closeWeight||0)+(det.commitWeight||0); + ua.totalWeight += edgeContribution; + ua.activities.push({ source: e.source, weight: edgeContribution }); + } + return userActivities; +} + /** * 方案A效果验证:对比归一化前后的差异 */ -function validatePlanAEffect(results: OpenRankResult[], issues: any[], pullRequests: any[], config: OpenRankConfig) { - console.log('\n🎯 方案A效果验证'); +function validatePlanAEffect(results: OpenRankResult[], userActivities: Map, config: OpenRankConfig) { + console.log('\n🎯 新算法效果验证(平衡代码量与协作)'); console.log('='.repeat(50)); const userResults = results.filter(r => r.nodeType === 'User').sort((a, b) => b.openrank - a.openrank); if (userResults.length < 2) { console.log('⚠️ 用户数量不足,无法进行方案A效果验证'); - return; } - // 计算用户的真实活动量 - const userActivities = new Map(); - - [...issues, ...pullRequests].forEach(item => { - if (item.activities) { - item.activities.forEach((activity: any) => { - const key = activity.actorLogin; - if (!userActivities.has(key)) { - userActivities.set(key, { totalWeight: 0, activities: [] }); - } - - // 计算活动权重(与方案A中的权重计算保持一致) - const weights = config.projectActivityWeights; - const activityWeight = - (activity.openCount || 0) * weights.open + - (activity.commentCount || 0) * weights.comment + - (activity.reviewCount || 0) * weights.review + - (activity.closeCount || 0) * weights.close + - (activity.commitCount || 0) * weights.commit!; - - const userData = userActivities.get(key)!; - userData.totalWeight += activityWeight; - userData.activities.push({ item: item.title, weight: activityWeight }); - }); - } - }); - - console.log('📊 方案A贡献度对比分析:'); + console.log('📊 新算法贡献度对比分析(平衡权重):'); console.log('用户名'.padEnd(20) + 'OpenRank'.padEnd(12) + '活动权重'.padEnd(12) + '权重排名'.padEnd(10) + 'OpenRank排名'); console.log('-'.repeat(70)); @@ -160,15 +202,15 @@ function validatePlanAEffect(results: OpenRankResult[], issues: any[], pullReque const correlation = (n * sumORW - sumOR * sumW) / Math.sqrt((n * sumOR2 - sumOR * sumOR) * (n * sumW2 - sumW * sumW)); - console.log(`\n📈 方案A效果评估:`); + console.log(`\n📈 新算法效果评估:`); console.log(` OpenRank与活动权重相关性: ${correlation.toFixed(3)}`); if (correlation > 0.7) { - console.log('✅ 方案A效果优秀:OpenRank与真实贡献度高度相关'); + console.log('✅ 新算法效果优秀:OpenRank与综合贡献度高度相关'); } else if (correlation > 0.4) { - console.log('⚠️ 方案A效果中等:存在一定相关性,但可能需要进一步优化'); + console.log('⚠️ 新算法效果中等:存在一定相关性,但可能需要进一步调参'); } else { - console.log('❌ 方案A效果有限:相关性较低,需要检查实现'); + console.log('❌ 新算法效果有限:相关性较低,需要检查权重配置'); } } @@ -192,19 +234,19 @@ function validatePlanAEffect(results: OpenRankResult[], issues: any[], pullReque console.log(` OpenRank比例: ${openrankRatio.toFixed(2)}:1`); if (openrankRatio >= weightRatio * 0.3) { - console.log('✅ 方案A成功:消除了归一化的压制效应,高贡献者获得应有认可'); + console.log('✅ 新算法成功:平衡了代码贡献与协作活跃度,高贡献者获得合理排名'); } else { - console.log('⚠️ 方案A效果不足:OpenRank差异仍然偏小'); + console.log('⚠️ 新算法仍需调优:OpenRank差异可能需要进一步平衡'); } } } } /** - * 分析 OpenRank 结果 - 方案A+B效果分析 + * 分析 OpenRank 结果 - 平衡权重效果分析 */ function analyzeOpenRankResults(results: OpenRankResult[]) { - console.log('\n🏆 方案A+B OpenRank 结果分析'); + console.log('\n🏆 平衡权重 OpenRank 结果分析'); console.log('='.repeat(60)); // 按类型分组 @@ -219,12 +261,12 @@ function analyzeOpenRankResults(results: OpenRankResult[]) { console.log(` Issue节点: ${issueResults.length}`); console.log(` PR节点: ${prResults.length}`); - // Top贡献者 - 方案A效果分析 + // Top贡献者 - 平衡权重效果分析 const topUsers = userResults .sort((a, b) => b.openrank - a.openrank) .slice(0, 10); - console.log(`\n👨‍💻 方案A效果 - Top 10 贡献者 (边权重优化):`); + console.log(`\n👨‍💻 平衡权重效果 - Top 10 贡献者 (协作+代码并重):`); topUsers.forEach((user, index) => { console.log(` ${index + 1}. ${user.name}: ${user.openrank.toFixed(3)}`); }); @@ -243,7 +285,7 @@ function analyzeOpenRankResults(results: OpenRankResult[]) { .sort((a, b) => b.openrank - a.openrank) .slice(0, 8); - console.log(`\n📋 方案B效果 - Top 8 Issues (协作单元价值区分度):`); + console.log(`\n📋 协作单元价值 - Top 8 Issues (质量区分度):`); topIssues.forEach((issue, index) => { const titlePreview = issue.name.length > 50 ? issue.name.substring(0, 47) + '...' : issue.name; console.log(` ${index + 1}. ${titlePreview}: ${issue.openrank.toFixed(3)}`); @@ -263,7 +305,7 @@ function analyzeOpenRankResults(results: OpenRankResult[]) { .sort((a, b) => b.openrank - a.openrank) .slice(0, 8); - console.log(`\n🔀 方案B效果 - Top 8 Pull Requests (协作单元价值区分度):`); + console.log(`\n🔀 协作单元价值 - Top 8 Pull Requests (质量区分度):`); topPRs.forEach((pr, index) => { const titlePreview = pr.name.length > 50 ? pr.name.substring(0, 47) + '...' : pr.name; console.log(` ${index + 1}. ${titlePreview}: ${pr.openrank.toFixed(3)}`); @@ -278,12 +320,12 @@ function analyzeOpenRankResults(results: OpenRankResult[]) { console.log(` 📈 PR价值分布: 最高 ${highest.toFixed(3)} / 最低 ${lowest.toFixed(3)} = ${ratio.toFixed(2)}:1`); } - // 方案A+B综合效果总结 - console.log(`\n🎯 方案A+B综合效果总结:`); - console.log(` ✅ 方案A: 基于活动贡献的边权重优化 - 实现"多劳多得"`); - console.log(` ✅ 方案B: 基于质量特征的节点价值区分 - 实现"优质内容更有价值"`); - console.log(` ✅ 平衡控制: 通过0.7平衡因子避免过度放大`); - console.log(` ✅ 区分度提升: 用户、Issue、PR都呈现明显的价值梯度`); + // 平衡权重算法综合效果总结 + console.log(`\n🎯 平衡权重算法综合效果总结:`); + console.log(` ✅ 代码贡献: 基于行数/文件数的非线性权重 - 合理体现代码工作量`); + console.log(` ✅ 协作活跃: 大幅提升review/comment权重 - 重视技术讨论与代码审查`); + console.log(` ✅ 防止极值: 对数缩放避免大改动主导 - 平衡不同贡献类型`); + console.log(` ✅ 综合排名: 用户、Issue、PR都体现代码质量与协作并重的价值`); } /** @@ -295,6 +337,20 @@ function analyzeOpenRankResults(results: OpenRankResult[]) { function printInitAndPropagation( results: OpenRankResult[], config: OpenRankConfig, + userActivities: Map, topN = 8 ) { console.log('\n🧪 节点初始值与传播值明细'); @@ -323,21 +379,63 @@ function printInitAndPropagation( const items = byType(type).sort((a, b) => b.openrank - a.openrank).slice(0, topN); const r = retentionFor(type); console.log(`\n• ${type} Top ${items.length}`); - items.forEach((n, i) => { - const meta = (n as any).metadata || {}; - let init = meta.optimizedInitValue ?? defaultInitFor(type); - if (type === 'PullRequest') { - const state = meta.state || 'open'; - if (meta.optimizedInitValue == null) { - init = state === 'merged' - ? (config as any).project?.prMergedInitValue ?? init - : (config as any).project?.prNotMergedInitValue ?? init; + + if (type === 'User') { + // 显示用户的详细权重组成 + items.forEach((n, i) => { + const meta = (n as any).metadata || {}; + let init = meta.initValue ?? defaultInitFor(type); // 使用实际的 initValue + const retained = r * init; + const propagation = n.openrank - retained; + + // 获取用户活动分解 + const userActivity = userActivities.get(n.name); + if (userActivity) { + const breakdown = userActivity.breakdown; + console.log(` ${i + 1}. ${n.name} | OpenRank=${n.openrank.toFixed(3)} | 初始=${init.toFixed(3)} | 保留=${retained.toFixed(3)} | 传播=${propagation.toFixed(3)}`); + + // 显示详细权重分解 + const totalActivity = breakdown.open + breakdown.comment + breakdown.review + + breakdown.reviewComment + breakdown.close + breakdown.commit; + if (totalActivity > 0) { + const percentages = { + open: (breakdown.open / totalActivity * 100).toFixed(1), + comment: (breakdown.comment / totalActivity * 100).toFixed(1), + review: (breakdown.review / totalActivity * 100).toFixed(1), + reviewComment: (breakdown.reviewComment / totalActivity * 100).toFixed(1), + close: (breakdown.close / totalActivity * 100).toFixed(1), + commit: (breakdown.commit / totalActivity * 100).toFixed(1) + }; + + console.log(` 📊 权重组成: Open=${percentages.open}% | Comment=${percentages.comment}% | Review=${percentages.review}% | ReviewComment=${percentages.reviewComment}% | Close=${percentages.close}% | Commit=${percentages.commit}%`); + + if (breakdown.commitLines > 0 || breakdown.commitFiles > 0) { + console.log(` 📝 代码详情: Lines权重=${breakdown.commitLines.toFixed(2)} | Files权重=${breakdown.commitFiles.toFixed(2)}`); + } + } + console.log(''); + } else { + console.log(` ${i + 1}. ${n.name} | OpenRank=${n.openrank.toFixed(3)} | 初始=${init.toFixed(3)} | 保留=${retained.toFixed(3)} | 传播=${propagation.toFixed(3)}`); } - } - const retained = r * init; - const propagation = n.openrank - retained; - console.log(` ${i + 1}. ${n.name} | OpenRank=${n.openrank.toFixed(3)} | 初始=${init.toFixed(3)} | 保留=${retained.toFixed(3)} | 传播=${propagation.toFixed(3)}`); - }); + }); + } else { + // 非用户节点保持原有显示格式 + items.forEach((n, i) => { + const meta = (n as any).metadata || {}; + let init = meta.initValue ?? defaultInitFor(type); // 使用实际的 initValue + if (type === 'PullRequest') { + const state = meta.state || 'open'; + if (meta.initValue == null) { // 如果没有实际 initValue,才使用默认值 + init = state === 'merged' + ? (config as any).project?.prMergedInitValue ?? init + : (config as any).project?.prNotMergedInitValue ?? init; + } + } + const retained = r * init; + const propagation = n.openrank - retained; + console.log(` ${i + 1}. ${n.name} | OpenRank=${n.openrank.toFixed(3)} | 初始=${init.toFixed(3)} | 保留=${retained.toFixed(3)} | 传播=${propagation.toFixed(3)}`); + }); + } }; printGroup('User'); @@ -574,14 +672,9 @@ async function runRealDataTest() { repo: 'FISCO-BCOS', // 改为FISCO-BCOS项目进行测试 }; - // 时间范围:有 Token 用最近 1 年;无 Token 缩短为最近 14 天以降低限流与等待时间 - const endDate = new Date(); - const startDate = new Date(); - if (githubToken) { - startDate.setFullYear(endDate.getFullYear() - 1); - } else { - startDate.setDate(endDate.getDate() - 14); - } + // 时间范围:固定为 2024-01-01 ~ 2024-12-31(UTC) + const startDate = new Date(Date.UTC(2024, 0, 1, 0, 0, 0)); + const endDate = new Date(Date.UTC(2024, 11, 31, 23, 59, 59)); console.log(`🎯 测试仓库: ${testRepo.owner}/${testRepo.repo}`); console.log(`📅 时间范围: ${startDate.toISOString().split('T')[0]} ~ ${endDate.toISOString().split('T')[0]}`); @@ -589,12 +682,50 @@ async function runRealDataTest() { try { // 1. 收集数据 console.log('\n📥 第一步: 收集数据...'); - const { issues, pullRequests, repoEvents } = await collector.collectProjectData( - testRepo.owner, - testRepo.repo, - startDate, - endDate - ); + const useDbOnly = (process.env.USE_DB_ONLY === 'true'); + const forceFetch = (process.env.FORCE_FETCH === 'true'); + + if (useDbOnly) console.log('ℹ️ 环境变量 USE_DB_ONLY=true,尝试仅使用本地数据库数据(不发起网络请求)'); + if (forceFetch) console.log('ℹ️ 环境变量 FORCE_FETCH=true,强制从网络抓取并写回本地数据库(若可用)'); + + let issues: any[] = []; + let pullRequests: any[] = []; + let repoEvents: any[] = []; + + if (useDbOnly) { + // 尝试直接从 repoStore 读取(DB-only 模式) + try { + const dbRepo = await repoStore.getRepoByFullName(`${testRepo.owner}/${testRepo.repo}`); + if (!dbRepo) throw new Error('本地数据库中未找到对应仓库记录'); + issues = await repoStore.getIssuesForRepo(dbRepo.id, startDate, endDate); + pullRequests = await repoStore.getPRsForRepo(dbRepo.id, startDate, endDate); + // 若没有数据则报错退出(DB-only 意味着必须存在) + if ((!issues || issues.length === 0) && (!pullRequests || pullRequests.length === 0)) { + throw new Error('USE_DB_ONLY 模式下,本地数据库未包含所需时间范围内的 issues 或 pull requests'); + } + // 对于 repoEvents 我们仍然尝试用网络拉取以补全;若失败则继续 + try { + repoEvents = await (collector as any).fetchRepoEvents(testRepo.owner, testRepo.repo, dbRepo.id, startDate, endDate).catch(() => []); + } catch { repoEvents = []; } + console.log(`✅ 从本地数据库加载: ${issues.length} 个Issue, ${pullRequests.length} 个PR`); + } catch (err) { + console.error('❌ USE_DB_ONLY 模式失败:', (err as any)?.message || err); + throw err; + } + } else { + // 非 DB-only:交由 collector 处理(collector 会根据 FORCE_FETCH 环境变量决定是否跳过 DB) + // 将 FORCE_FETCH 环境变量传递给 collector(collector 内部也会读取 process.env.FORCE_FETCH) + if (forceFetch) process.env.FORCE_FETCH = 'true'; + const res = await collector.collectProjectData( + testRepo.owner, + testRepo.repo, + startDate, + endDate + ); + issues = res.issues; + pullRequests = res.pullRequests; + repoEvents = res.repoEvents || []; + } // 检查是否收集到足够的数据 if (issues.length === 0 && pullRequests.length === 0) { @@ -612,22 +743,32 @@ async function runRealDataTest() { console.log(`💡 注意: 收集到的数据较少,可能是由于API限制。建议设置GITHUB_TOKEN环境变量以获取更多数据。`); } - // 3. 计算 OpenRank + // 3. 计算 OpenRank console.log('\n🧮 第二步: 计算项目级 OpenRank...'); const config = loadConfig(); // 加载优化后的配置 const calculator = new ProjectOpenRankCalculator(config); - + + // 开始计时(从调用 calculateProjectOpenRank 前开始计时) + const _openrankStart = Date.now(); const results = await calculator.calculateProjectOpenRank( issues, pullRequests, new Map(), // 没有历史数据 repoEvents ); + const _openrankDurationMs = Date.now() - _openrankStart; + console.log(`\n⏱️ OpenRank 计算耗时: ${_openrankDurationMs} ms (${(_openrankDurationMs/1000).toFixed(2)} s)`); console.log(`✅ 计算完成,共产生 ${results.length} 个节点的OpenRank值`); + // 计算用户活动权重分解 + const userActivities = calculateUserActivityBreakdownFromGraph(results, config, calculator); + + // 验证算法效果 + validatePlanAEffect(results, userActivities, config); + // 仅保留:打印初始值与传播值(Users/Issues/PRs) - printInitAndPropagation(results, config, 20); + printInitAndPropagation(results, config, userActivities, 20); // 构建并导出“初始/传播构成摘要” const composition = buildInitPropagationSummary(calculator, results, { User: 20, Issue: 15, PullRequest: 15 }); @@ -639,7 +780,7 @@ async function runRealDataTest() { fs.mkdirSync(outDir, { recursive: true }); } const resultPath = path.join(outDir, 'fisco_bcos_results.json'); - const usersOnly = results.filter(r => r.nodeType === 'User').sort((a, b) => b.openrank - a.openrank); + const usersOnly = (results.filter((r: any) => r.nodeType === 'User') as any[]).sort((a, b) => b.openrank - a.openrank); const fullResults = { timestamp: new Date().toISOString(), repoInfo: testRepo, @@ -654,6 +795,8 @@ async function runRealDataTest() { // 可选:导出每位用户的前K条贡献来源到 data/ 目录(便于复盘) exportTopContributionSources(calculator, usersOnly, 20, 8, path.resolve(process.cwd(), 'data')); console.log('\n🎉 测试完成!'); + // 主动关闭数据库连接池,避免进程悬挂 + try { await closePool(); } catch {} } catch (error) { console.error('❌ 测试失败:', error); @@ -673,7 +816,8 @@ if (require.main === module) { runRealDataTest().catch((error) => { console.error('测试执行失败:', error); console.error('错误堆栈:', error.stack); - process.exit(1); + // 确保失败时也关闭连接池 + closePool().finally(() => process.exit(1)); }); } diff --git a/src/src/types/index.ts b/src/src/types/index.ts index 4e291dd..06dbe2a 100644 --- a/src/src/types/index.ts +++ b/src/src/types/index.ts @@ -65,6 +65,9 @@ export interface IssueData { assignees?: { id: number; login: string }[]; reviewersRequested?: { id: number; login: string }[]; // Issue 一般无评审请求,保留对齐字段 + // 新增:任务类型标注 + assignmentType?: 'task' | 'voluntary'; + // 参与者活动统计 activities: { actorId: number; @@ -106,6 +109,9 @@ export interface PullRequestData { assignees?: { id: number; login: string }[]; reviewersRequested?: { id: number; login: string }[]; + // 新增:任务类型标注 + assignmentType?: 'task' | 'voluntary'; + // 参与者活动统计 activities: { actorId: number; @@ -286,6 +292,18 @@ export interface OpenRankConfig { close: number; // 关闭Issue/PR的权重 commit?: number; // PR中 commit 的权重(可选,若未提供使用默认) + // 新增:基于代码量的commit权重配置 + commitLine?: number; // 每行代码变更权重(additions + deletions) + commitFile?: number; // 每个文件变更权重(filesChanged) + commitUseCodeMetrics?: boolean; // 是否使用代码行数/文件数而非次数 + commitNonLinearScale?: 'none' | 'log' | 'sqrt' | 'tanh'; // 非线性缩放方式 + commitScaleThreshold?: number; // 缩放阈值(如tanh的分母) + // 可选:独立的行/文件阈值(若提供则覆盖 commitScaleThreshold) + commitLineThreshold?: number; // 行数饱和阈值(用于 tanh_bounded / tanh 模式) + commitFileThreshold?: number; // 文件数饱和阈值 + // 可选备用非线性模式(实验):若存在 *_Alt 优先于主字段 + commitNonLinearScaleAlt?: 'none' | 'log' | 'sqrt' | 'tanh' | 'tanh_bounded'; + // 表情权重 (影响Issue/PR初始OpenRank) thumbsUp: number; // 👍 表情权重 heart: number; // ❤️ 表情权重 @@ -296,12 +314,21 @@ export interface OpenRankConfig { activityRatio: number; // Issue/PR -> User 的OpenRank传递比例 openActivityRatio: number; // Issue/PR作者优先获得的价值比例 reverseEdgeRatio?: number; // 反向边权重比例 (User -> Issue/PR) + // 作者份额(Issue 活动边二次分配使用,PR 若未来接入同机制可复用) + authorShare?: number; // 网络结构优化配置 reverseBelongRatio?: number; // Repo -> Issue/PR 的反向属于边权重放大比例 reverseActivityRatio?: number; // User -> Issue/PR 的反向活动边权重比例 repoAmplificationFactor?: number; // 仓库权重放大系数 userParticipationWeight?: number; // 用户参与权重 + // 评审规模加权(与提交区分) + reviewLine?: number; // 评审按涉及行数的基准权重 + reviewFile?: number; // 评审按涉及文件数的基准权重 + reviewNonLinearScale?: 'none' | 'log' | 'sqrt' | 'tanh' | 'tanh_bounded'; + reviewLineThreshold?: number; // 评审行数阈值(tanh_bounded 上限) + reviewFileThreshold?: number; // 评审文件阈值 + reviewNonLinearScaleAlt?: 'none' | 'log' | 'sqrt' | 'tanh' | 'tanh_bounded'; // 方案B:协作单元价值区分度配置 collaborationValueEnhancement?: { diff --git a/src/src/utils/seededRandom.ts b/src/src/utils/seededRandom.ts new file mode 100644 index 0000000..c849ef9 --- /dev/null +++ b/src/src/utils/seededRandom.ts @@ -0,0 +1,46 @@ +/** + * Lightweight seedable PRNG using a 32-bit LCG. + * Not cryptographically secure — good enough for reproducible tests. + */ +export class SeededRandom { + private state: number; + + constructor(seed?: number) { + if (seed === undefined || seed === null) { + // use time-based seed if none provided + seed = Date.now() & 0xffffffff; + } + // LCG constants (Numerical Recipes) + this.state = seed >>> 0; + if (this.state === 0) this.state = 1; + } + + // returns float in [0,1) + random(): number { + // state = (a * state + c) mod m + this.state = (1664525 * this.state + 1013904223) >>> 0; + return (this.state & 0xffffffff) / 0x100000000; + } + + // integer in [0, max) + randInt(max: number): number { + return Math.floor(this.random() * max); + } + + // boolean with probability p + chance(p: number): boolean { + return this.random() < p; + } + + // choose random element from array + choice(arr: T[]): T { + if (!arr || arr.length === 0) throw new Error('choice: empty array'); + return arr[this.randInt(arr.length)]; + } +} + +// helpers for compatibility: create instance when seed provided, otherwise undefined +export function createPRNG(seed?: number): SeededRandom | undefined { + if (seed === undefined || seed === null) return undefined; + return new SeededRandom(seed); +} diff --git a/src/temp/comprehensive_analysis_report.js b/src/temp/comprehensive_analysis_report.js deleted file mode 100644 index f23432e..0000000 --- a/src/temp/comprehensive_analysis_report.js +++ /dev/null @@ -1,337 +0,0 @@ -/** - * OpenRank权重优化策略综合论证报告 - * - * 基于详细的可行性分析、技术方案和实验设计, - * 提供关于为何动态权重优化优于AHP的最终论证 - */ - -console.log('=== OpenRank权重优化策略综合论证报告 ===\n'); - -/** - * 执行摘要 - */ -function executiveSummary() { - console.log('📋 执行摘要\n'); - console.log('问题背景:'); - console.log(' 当前OpenRank使用AHP层次分析法确定的静态权重,存在适应性差、'); - console.log(' 精确性不足、无法反映时间和质量差异等局限性。'); - console.log(''); - console.log('解决方案:'); - console.log(' 提出时间衰减权重、质量感知权重、个人历史权重三维动态优化方案,'); - console.log(' 实现更精确、公平、自适应的OpenRank权重计算。'); - console.log(''); - console.log('核心优势:'); - console.log(' • 适应性: 权重随项目发展自动调整'); - console.log(' • 精确性: 考虑活动质量和个体差异'); - console.log(' • 公平性: 个性化权重反映真实贡献'); - console.log(' • 可解释性: 基于客观数据的透明计算'); - console.log(''); - console.log('预期效果:'); - console.log(' • 预测精度提升15%以上'); - console.log(' • 开发者满意度达到4.0+/5.0'); - console.log(' • 系统性能开销控制在20%以内'); -} - -/** - * 核心论点论证 - */ -function presentCoreArguments() { - console.log('\n\n🎯 核心论点论证\n'); - - console.log('论点1: AHP权重存在根本性局限'); - console.log('─'.repeat(35)); - console.log('理论依据:'); - console.log(' • 静态权重假设: AHP基于权重不变的假设,但软件开发是动态过程'); - console.log(' • 专家偏见: 依赖少数专家判断,可能存在认知偏差和经验局限'); - console.log(' • 情境忽略: 忽略项目阶段、团队规模、技术栈等情境因素'); - console.log(''); - console.log('实证支持:'); - console.log(' • 不同项目阶段的活动重要性确实不同 (初期重视open,成熟期重视review)'); - console.log(' • 质量差异显著影响贡献价值 (高质量review vs 低质量review)'); - console.log(' • 个体经验差异导致相同活动的价值不同 (资深 vs 新手开发者)'); - - console.log('\n论点2: 动态权重在理论上更优'); - console.log('─'.repeat(35)); - console.log('理论基础:'); - console.log(' • 信息论: 更多维度的信息导致更准确的评估'); - console.log(' • 行为经济学: 时间偏好和质量敏感性是人类决策的基本特征'); - console.log(' • 复杂系统理论: 软件开发是复杂自适应系统,需要动态建模'); - console.log(''); - console.log('数学优势:'); - console.log(' • 信息熵降低: 引入更多特征维度,减少不确定性'); - console.log(' • 拟合度提升: 更灵活的模型能够更好地拟合真实数据'); - console.log(' • 收敛性改善: 时间衰减有助于算法更快收敛到稳定状态'); - - console.log('\n论点3: 技术实现完全可行'); - console.log('─'.repeat(30)); - console.log('数据可获得性:'); - console.log(' • 时间数据: Git和GitHub原生提供完整时间戳'); - console.log(' • 质量数据: 可从PR状态、表情反应、回复链等获取'); - console.log(' • 历史数据: Git历史记录提供完整的贡献历史'); - console.log(''); - console.log('计算复杂度:'); - console.log(' • 时间复杂度: O(n + k×m) 仍为线性级别'); - console.log(' • 空间复杂度: 增量存储和缓存机制控制内存使用'); - console.log(' • 并行化: 不同维度的权重计算可以并行执行'); - - console.log('\n论点4: 验证方法科学严谨'); - console.log('─'.repeat(30)); - console.log('实验设计:'); - console.log(' • 对照实验: 与AHP和均等权重进行三组对比'); - console.log(' • 数据集多样性: 涵盖不同规模、类型、阶段的项目'); - console.log(' • 指标全面性: 定量指标+定性指标+统计显著性检验'); - console.log(''); - console.log('验证标准:'); - console.log(' • 预测准确性: 使用MAE、RMSE、MAPE等标准指标'); - console.log(' • 排序质量: 使用NDCG、Kendall-τ等排序评估指标'); - console.log(' • 用户接受度: 通过问卷和访谈收集开发者反馈'); -} - -/** - * 优势对比分析 - */ -function compareAdvantages() { - console.log('\n\n📊 详细优势对比分析\n'); - - console.log('维度1: 适应性对比'); - console.log('─'.repeat(25)); - console.log('AHP方案:'); - console.log(' × 权重固定,无法适应项目演化'); - console.log(' × 需要人工重新评估和调整'); - console.log(' × 调整周期长,响应滞后'); - console.log(''); - console.log('动态方案:'); - console.log(' ✓ 权重自动适应项目发展阶段'); - console.log(' ✓ 实时响应开发模式变化'); - console.log(' ✓ 无需人工干预的持续优化'); - console.log(''); - console.log('量化优势:'); - console.log(' • 适应性提升: 90% (基于时间衰减自动调整)'); - console.log(' • 响应速度: 实时 vs 月级别调整'); - console.log(' • 维护成本: 降低80% (自动化调整)'); - - console.log('\n维度2: 精确性对比'); - console.log('─'.repeat(25)); - console.log('AHP方案:'); - console.log(' × 粗粒度权重,忽略质量差异'); - console.log(' × 一刀切评估,无个体区分'); - console.log(' × 时间维度缺失'); - console.log(''); - console.log('动态方案:'); - console.log(' ✓ 质量感知的细粒度权重'); - console.log(' ✓ 个性化的个体权重调整'); - console.log(' ✓ 时间敏感的衰减机制'); - console.log(''); - console.log('量化优势:'); - console.log(' • 预测精度提升: 15-25%'); - console.log(' • 评估颗粒度: 从4维到12+维'); - console.log(' • 个体差异识别: 100% vs 0%'); - - console.log('\n维度3: 公平性对比'); - console.log('─'.repeat(25)); - console.log('AHP方案:'); - console.log(' × 统一权重可能不公平'); - console.log(' × 无法反映个体贡献差异'); - console.log(' × 新手和专家同等对待'); - console.log(''); - console.log('动态方案:'); - console.log(' ✓ 基于历史表现的个性化权重'); - console.log(' ✓ 质量驱动的公平评估'); - console.log(' ✓ 经验差异的合理体现'); - console.log(''); - console.log('量化优势:'); - console.log(' • 公平性评分: 4.2/5.0 vs 3.5/5.0'); - console.log(' • 个体满意度: 提升20%'); - console.log(' • 激励效果: 提升30%'); - - console.log('\n维度4: 可解释性对比'); - console.log('─'.repeat(30)); - console.log('AHP方案:'); - console.log(' × 专家黑盒,难以解释'); - console.log(' × 权重来源不透明'); - console.log(' × 开发者无法理解'); - console.log(''); - console.log('动态方案:'); - console.log(' ✓ 基于客观数据的透明计算'); - console.log(' ✓ 每个权重调整都有明确依据'); - console.log(' ✓ 开发者可以理解和验证'); - console.log(''); - console.log('量化优势:'); - console.log(' • 可解释性评分: 4.3/5.0 vs 2.8/5.0'); - console.log(' • 透明度: 100% vs 30%'); - console.log(' • 可验证性: 完全支持 vs 不支持'); -} - -/** - * 风险缓解和成功保障 - */ -function riskMitigationAndSuccess() { - console.log('\n\n🛡️ 风险缓解和成功保障\n'); - - console.log('主要风险及缓解策略:'); - console.log('─'.repeat(25)); - console.log('风险1: 计算复杂度过高'); - console.log(' 缓解: 增量计算 + 多级缓存 + 并行处理'); - console.log(' 保障: 性能基准测试,确保<20%开销'); - console.log(''); - console.log('风险2: 质量指标不准确'); - console.log(' 缓解: 多指标交叉验证 + 专家评审 + 持续校准'); - console.log(' 保障: A/B测试验证,确保有效性'); - console.log(''); - console.log('风险3: 开发者不接受'); - console.log(' 缓解: 渐进部署 + 充分沟通 + 反馈机制'); - console.log(' 保障: 用户研究,确保满意度>4.0'); - console.log(''); - console.log('风险4: 系统复杂度增加'); - console.log(' 缓解: 模块化设计 + 完善文档 + 自动化测试'); - console.log(' 保障: 代码质量控制,确保可维护性'); - - console.log('\n成功保障机制:'); - console.log('─'.repeat(20)); - console.log('技术保障:'); - console.log(' • 完整的测试覆盖 (单元+集成+端到端)'); - console.log(' • 持续集成/持续部署流水线'); - console.log(' • 实时监控和告警系统'); - console.log(' • 自动化性能基准测试'); - console.log(''); - console.log('质量保障:'); - console.log(' • 多轮代码审查和安全审计'); - console.log(' • A/B测试框架验证效果'); - console.log(' • 专家评审委员会评估'); - console.log(' • 用户反馈收集和快速响应'); - console.log(''); - console.log('项目保障:'); - console.log(' • 分阶段实施,降低风险'); - console.log(' • 关键节点门禁和评审'); - console.log(' • 回滚机制和应急预案'); - console.log(' • 跨团队协作和知识共享'); -} - -/** - * ROI和价值分析 - */ -function analyzeROI() { - console.log('\n\n💰 投资回报和价值分析\n'); - - console.log('实施成本估算:'); - console.log('─'.repeat(20)); - console.log('人力成本:'); - console.log(' • 核心开发: 2人 × 3个月 = 6人月'); - console.log(' • 算法优化: 1人 × 2个月 = 2人月'); - console.log(' • 测试验证: 1人 × 2个月 = 2人月'); - console.log(' • 总计: 10人月'); - console.log(''); - console.log('基础设施成本:'); - console.log(' • 计算资源: 预计增加20%'); - console.log(' • 存储资源: 预计增加15%'); - console.log(' • 运维成本: 预计增加10%'); - console.log(''); - console.log('总成本: ~50万人民币 (一次性投入)'); - - console.log('\n预期收益:'); - console.log('─'.repeat(15)); - console.log('直接收益:'); - console.log(' • 评估精度提升15%: 减少误判成本'); - console.log(' • 开发者满意度提升: 提高留存率'); - console.log(' • 自动化权重调整: 减少人工维护'); - console.log(''); - console.log('间接收益:'); - console.log(' • 社区活跃度提升: 吸引更多贡献者'); - console.log(' • 项目质量改善: 激励高质量贡献'); - console.log(' • 学术影响力: 潜在论文发表价值'); - console.log(''); - console.log('ROI分析:'); - console.log(' • 投资回收期: 6-12个月'); - console.log(' • 3年期ROI: 300-500%'); - console.log(' • 净现值: 显著为正'); - - console.log('\n战略价值:'); - console.log('─'.repeat(15)); - console.log('技术领先性:'); - console.log(' • 在OpenRank算法优化方面建立技术优势'); - console.log(' • 为开源社区评估提供新的标准和方法'); - console.log(' • 推动学术界对开源协作评估的研究'); - console.log(''); - console.log('生态影响:'); - console.log(' • 提升开源项目的健康度评估能力'); - console.log(' • 为企业开源策略提供更好的决策支持'); - console.log(' • 促进开源社区的可持续发展'); -} - -/** - * 结论和建议 - */ -function conclusionAndRecommendations() { - console.log('\n\n🎯 结论和建议\n'); - - console.log('核心结论:'); - console.log('─'.repeat(15)); - console.log('1. 理论优势明确'); - console.log(' 动态权重方案在适应性、精确性、公平性、可解释性四个'); - console.log(' 核心维度上全面优于静态AHP权重方案。'); - console.log(''); - console.log('2. 技术实现可行'); - console.log(' 基于现有技术栈,通过模块化设计和性能优化,可以'); - console.log(' 在可接受的成本下实现全部功能。'); - console.log(''); - console.log('3. 验证方法科学'); - console.log(' 通过多维度对比实验和严格的统计检验,可以客观'); - console.log(' 验证方案的有效性和优越性。'); - console.log(''); - console.log('4. 投资回报显著'); - console.log(' 一次性投入约50万,3年期ROI可达300-500%,'); - console.log(' 具有显著的经济价值和战略价值。'); - - console.log('\n实施建议:'); - console.log('─'.repeat(15)); - console.log('短期建议 (3个月):'); - console.log(' ✓ 立即启动项目,组建核心开发团队'); - console.log(' ✓ 完成架构设计和核心算法实现'); - console.log(' ✓ 在小规模数据集上进行初步验证'); - console.log(''); - console.log('中期建议 (6个月):'); - console.log(' ✓ 完成质量指标和历史追踪模块'); - console.log(' ✓ 执行大规模对比实验'); - console.log(' ✓ 进行参数调优和性能优化'); - console.log(''); - console.log('长期建议 (12个月):'); - console.log(' ✓ 部署到生产环境并持续监控'); - console.log(' ✓ 基于反馈进行迭代优化'); - console.log(' ✓ 总结经验并考虑学术发表'); - - console.log('\n成功关键因素:'); - console.log('─'.repeat(20)); - console.log(' • 严格按照实施计划执行,确保质量和进度'); - console.log(' • 重视开发者反馈,及时调整和优化'); - console.log(' • 建立完善的监控和告警机制'); - console.log(' • 保持与学术界和开源社区的紧密联系'); - console.log(' • 持续跟踪最新研究进展,保持技术领先性'); - - console.log('\n最终评价:'); - console.log('─'.repeat(15)); - console.log('基于以上全面论证,动态权重优化方案不仅在理论上'); - console.log('具有显著优势,在技术实现上完全可行,在经济效益'); - console.log('上具有显著回报,而且在战略价值上对OpenRank技术'); - console.log('发展具有重要推动作用。'); - console.log(''); - console.log('强烈建议立即启动此项目的实施工作。'); -} - -// 主函数执行 -function main() { - executiveSummary(); - presentCoreArguments(); - compareAdvantages(); - riskMitigationAndSuccess(); - analyzeROI(); - conclusionAndRecommendations(); - - console.log('\n' + '═'.repeat(60)); - console.log('📊 论证结论: 动态权重优化方案显著优于AHP权重方案'); - console.log('🚀 实施建议: 立即启动项目,按12个月计划执行'); - console.log('💰 投资价值: 50万投入,3年期ROI 300-500%'); - console.log('🎯 成功概率: 基于详细的风险缓解,成功概率>85%'); - console.log('═'.repeat(60)); -} - -main(); diff --git a/src/temp/practical_quality_weighting.js b/src/temp/practical_quality_weighting.js deleted file mode 100644 index 816c8f1..0000000 --- a/src/temp/practical_quality_weighting.js +++ /dev/null @@ -1,433 +0,0 @@ -/** - * 质量感知权重的实用性评估和优化方案 - * 关注可行性、性能效率、有效性等生产级要求 - */ - -console.log('=== 质量感知权重实用性评估和优化 ===\n'); - -/** - * 1. 当前方案的可行性分析 - */ -function analyzeFeasibility() { - console.log('📊 当前方案的可行性分析\n'); - - console.log('1.1 数据获取可行性'); - console.log('─'.repeat(25)); - console.log('GitHub API限制和挑战:'); - console.log(' ⚠️ API限流: 5000次/小时 (认证), 60次/小时 (未认证)'); - console.log(' ⚠️ GraphQL复杂查询: 计算点数限制'); - console.log(' ⚠️ 历史数据获取: 大量API调用'); - console.log(' ⚠️ Rate limiting: 大规模项目分析受限'); - console.log(''); - console.log('数据完整性挑战:'); - console.log(' ❌ 私有仓库访问权限限制'); - console.log(' ❌ 删除的评论和反应数据缺失'); - console.log(' ❌ 历史PR状态变更记录不完整'); - console.log(' ❌ CI/CD状态检查数据可能缺失'); - - console.log('\n1.2 计算复杂度分析'); - console.log('─'.repeat(25)); - console.log('当前方案的计算开销:'); - console.log('```typescript'); - console.log('// 每个活动需要的计算步骤'); - console.log('for (activity of activities) {'); - console.log(' // Review质量计算: O(n) - n为review数量'); - console.log(' if (activity.type === "review") {'); - console.log(' calculateAcceptanceRate(); // API调用'); - console.log(' calculateResponseSpeed(); // 时间计算'); - console.log(' calculateCodeCoverage(); // PR数据分析'); - console.log(' }'); - console.log(' '); - console.log(' // PR质量计算: O(m) - m为文件数量'); - console.log(' if (activity.type === "pullRequest") {'); - console.log(' calculateMergeSuccess(); // 状态检查'); - console.log(' calculateCISuccess(); // CI状态查询'); - console.log(' calculateCodeQuality(); // 文件分析'); - console.log(' calculateReviewReception(); // Review统计'); - console.log(' }'); - console.log(' '); - console.log(' // 总复杂度: O(n * m * k) - k为质量指标数量'); - console.log('}'); - console.log('```'); - - console.log('\n1.3 实际部署挑战'); - console.log('─'.repeat(25)); - console.log('生产环境问题:'); - console.log(' 🔴 高延迟: 大量API调用导致计算时间过长'); - console.log(' 🔴 高成本: API配额和服务器资源消耗'); - console.log(' 🔴 不稳定: 依赖外部API的可用性'); - console.log(' 🔴 维护复杂: 多维度指标的参数调优'); -} - -/** - * 2. 性能效率问题分析 - */ -function analyzePerformanceIssues() { - console.log('\n\n⚡ 性能效率问题分析\n'); - - console.log('2.1 API调用瓶颈'); - console.log('─'.repeat(20)); - console.log('当前方案的API调用估算:'); - console.log('```text'); - console.log('假设项目有1000个活动:'); - console.log(' • Review活动 (300个):'); - console.log(' - 获取PR详情: 300次API调用'); - console.log(' - 获取Review详情: 300次API调用'); - console.log(' - 获取Review comments: 300次API调用'); - console.log(' '); - console.log(' • PR活动 (400个):'); - console.log(' - 获取PR详情: 400次API调用'); - console.log(' - 获取文件列表: 400次API调用'); - console.log(' - 获取CI状态: 400次API调用'); - console.log(' - 获取Reviews: 400次API调用'); - console.log(' '); - console.log(' • Issue活动 (200个):'); - console.log(' - 获取Issue详情: 200次API调用'); - console.log(' - 获取标签信息: 200次API调用'); - console.log(' '); - console.log(' • Comment活动 (100个):'); - console.log(' - 获取反应数据: 100次API调用'); - console.log(''); - console.log('总计: ~3000次API调用'); - console.log('在5000次/小时限制下,处理一个中型项目需要40分钟'); - console.log('```'); - - console.log('\n2.2 内存和存储开销'); - console.log('─'.repeat(30)); - console.log('数据存储需求估算:'); - console.log('```typescript'); - console.log('interface QualityDataStorage {'); - console.log(' // 每个活动的质量数据'); - console.log(' activityQuality: {'); - console.log(' activityId: string; // 32 bytes'); - console.log(' qualityMetrics: { // ~200 bytes'); - console.log(' acceptanceRate?: number;'); - console.log(' responseSpeed?: number;'); - console.log(' codeCoverage?: number;'); - console.log(' mergeSuccess?: number;'); - console.log(' ciSuccess?: number;'); - console.log(' // ... 其他指标'); - console.log(' };'); - console.log(' rawData: { // ~500 bytes'); - console.log(' reviews?: ReviewData[];'); - console.log(' files?: FileData[];'); - console.log(' reactions?: ReactionData[];'); - console.log(' };'); - console.log(' }[];'); - console.log('}'); - console.log(''); - console.log('// 1000个活动约需要: 1000 * 732 bytes ≈ 732KB'); - console.log('// 大型项目(10万活动): 73MB 质量数据'); - console.log('// 缓存和索引开销: 2-3倍'); - console.log('```'); - - console.log('\n2.3 实时计算vs预计算权衡'); - console.log('─'.repeat(40)); - console.log('方案对比:'); - console.log(''); - console.log('🔴 实时计算方案:'); - console.log(' 优点: 数据最新,无存储开销'); - console.log(' 缺点: 响应时间长(分钟级),API限流风险'); - console.log(' 适用: 小型项目,低频查询'); - console.log(''); - console.log('🟡 混合方案:'); - console.log(' 核心数据预计算,补充数据实时获取'); - console.log(' 平衡响应时间和数据新鲜度'); - console.log(' 适用: 中型项目'); - console.log(''); - console.log('🟢 全预计算方案:'); - console.log(' 优点: 响应快速(秒级),稳定可靠'); - console.log(' 缺点: 存储开销大,数据更新延迟'); - console.log(' 适用: 大型项目,高频查询'); -} - -/** - * 3. 有效性验证和改进 - */ -function validateEffectiveness() { - console.log('\n\n🎯 有效性验证和改进\n'); - - console.log('3.1 质量指标的实际效果评估'); - console.log('─'.repeat(35)); - console.log('需要验证的假设:'); - console.log(' ❓ 高质量Review确实对项目更有价值'); - console.log(' ❓ CI通过率能有效反映PR质量'); - console.log(' ❓ 代码覆盖率与Review价值正相关'); - console.log(' ❓ 合并成功率是PR质量的好指标'); - console.log(''); - console.log('验证方法建议:'); - console.log('```typescript'); - console.log('// A/B测试框架'); - console.log('interface QualityValidationTest {'); - console.log(' testGroups: {'); - console.log(' control: "原始权重方案";'); - console.log(' treatment: "质量感知权重方案";'); - console.log(' };'); - console.log(' '); - console.log(' metrics: {'); - console.log(' // 开发者满意度'); - console.log(' developerSatisfaction: number;'); - console.log(' '); - console.log(' // OpenRank排名合理性'); - console.log(' rankingReasonableness: number;'); - console.log(' '); - console.log(' // 预测准确性'); - console.log(' futurePredictionAccuracy: number;'); - console.log(' };'); - console.log('}'); - console.log('```'); - - console.log('\n3.2 简化版质量指标设计'); - console.log('─'.repeat(35)); - console.log('基于可行性的简化原则:'); - console.log(' 1. 优先使用已有数据,减少额外API调用'); - console.log(' 2. 选择影响最大的关键指标'); - console.log(' 3. 使用近似算法,降低计算复杂度'); - console.log(' 4. 实现渐进式改进,避免一步到位'); -} - -/** - * 4. 实用化的质量感知权重方案 - */ -function proposePracticalSolution() { - console.log('\n\n🛠️ 实用化的质量感知权重方案\n'); - - console.log('4.1 三阶段实施策略'); - console.log('─'.repeat(25)); - console.log('阶段1: 基础质量指标 (MVP)'); - console.log(' 仅使用GitHub API基础数据'); - console.log(' 最小API调用,最大效果'); - console.log(' 实现简单,风险低'); - console.log(''); - console.log('阶段2: 增强质量指标'); - console.log(' 引入部分高价值的复杂指标'); - console.log(' 优化缓存和预计算'); - console.log(' 基于阶段1的效果评估'); - console.log(''); - console.log('阶段3: 完整质量体系'); - console.log(' 全面的质量评估体系'); - console.log(' 高度优化的性能方案'); - console.log(' 持续的效果监控和调优'); - - console.log('\n4.2 阶段1: MVP质量指标实现'); - console.log('─'.repeat(35)); - console.log('核心思想: 最小可行产品,最大投入产出比'); - console.log('```typescript'); - console.log('// 简化的质量评估 - 仅使用基础API数据'); - console.log('interface SimplifiedQualityMetrics {'); - console.log(' // Review质量 - 仅使用PR API基础数据'); - console.log(' review: {'); - console.log(' approvalRate: number; // approved / total reviews'); - console.log(' responseTime: number; // first_review - created_at'); - console.log(' // 移除: 代码覆盖率 (需要额外API调用)'); - console.log(' };'); - console.log(' '); - console.log(' // PR质量 - 使用PR API直接数据'); - console.log(' pullRequest: {'); - console.log(' mergeStatus: boolean; // merged vs closed'); - console.log(' changeSize: number; // additions + deletions'); - console.log(' reviewCount: number; // reviews.length'); - console.log(' // 移除: CI状态 (需要额外API调用)'); - console.log(' // 移除: 文件类型分析 (计算复杂)'); - console.log(' };'); - console.log(' '); - console.log(' // Issue质量 - 使用Issue API基础数据'); - console.log(' issue: {'); - console.log(' resolutionStatus: boolean; // state === "closed"'); - console.log(' labelCount: number; // labels.length'); - console.log(' // 移除: 标签规范性检查 (需要项目配置)'); - console.log(' };'); - console.log(' '); - console.log(' // Comment质量 - 使用反应API基础数据'); - console.log(' comment: {'); - console.log(' reactionScore: number; // positive - negative reactions'); - console.log(' // 移除: 技术内容分析 (NLP复杂度高)'); - console.log(' };'); - console.log('}'); - console.log('```'); - - console.log('\n4.3 性能优化策略'); - console.log('─'.repeat(25)); - console.log('API调用优化:'); - console.log('```typescript'); - console.log('// 批量获取策略'); - console.log('class OptimizedDataFetcher {'); - console.log(' async fetchProjectQualityData(projectId: string): Promise {'); - console.log(' // 1. 单次API调用获取所有PR/Issue基础数据'); - console.log(' const [prs, issues] = await Promise.all(['); - console.log(' this.github.pulls.list({ per_page: 100 }), // 批量获取'); - console.log(' this.github.issues.list({ per_page: 100 })'); - console.log(' ]);'); - console.log(' '); - console.log(' // 2. 本地计算所有质量指标'); - console.log(' const qualityMetrics = this.calculateQualityLocally(prs, issues);'); - console.log(' '); - console.log(' // 3. 缓存结果,避免重复计算'); - console.log(' await this.cache.set(`quality:${projectId}`, qualityMetrics, 3600);'); - console.log(' '); - console.log(' return qualityMetrics;'); - console.log(' }'); - console.log(' '); - console.log(' private calculateQualityLocally(prs: PR[], issues: Issue[]): QualityData {'); - console.log(' // 所有计算在本地进行,无额外API调用'); - console.log(' return {'); - console.log(' prQuality: prs.map(pr => ({'); - console.log(' id: pr.id,'); - console.log(' mergeStatus: pr.merged,'); - console.log(' changeSize: pr.additions + pr.deletions,'); - console.log(' reviewCount: pr.reviews?.length || 0'); - console.log(' })),'); - console.log(' issueQuality: issues.map(issue => ({'); - console.log(' id: issue.id,'); - console.log(' resolutionStatus: issue.state === "closed",'); - console.log(' labelCount: issue.labels.length'); - console.log(' }))'); - console.log(' };'); - console.log(' }'); - console.log('}'); - console.log('```'); - - console.log('\n4.4 增量更新策略'); - console.log('─'.repeat(25)); - console.log('避免全量重计算:'); - console.log('```typescript'); - console.log('class IncrementalQualityUpdater {'); - console.log(' async updateQualityMetrics(projectId: string, since: Date): Promise {'); - console.log(' // 1. 只获取since之后的新活动'); - console.log(' const newActivities = await this.getActivitiesSince(projectId, since);'); - console.log(' '); - console.log(' // 2. 只计算新活动的质量指标'); - console.log(' const newQualityData = this.calculateQuality(newActivities);'); - console.log(' '); - console.log(' // 3. 增量更新缓存'); - console.log(' await this.updateQualityCache(projectId, newQualityData);'); - console.log(' }'); - console.log(' '); - console.log(' // 智能缓存失效策略'); - console.log(' shouldUpdateCache(activityType: string, lastUpdate: Date): boolean {'); - console.log(' const hoursSinceUpdate = (Date.now() - lastUpdate.getTime()) / (1000 * 60 * 60);'); - console.log(' '); - console.log(' // 根据活动类型调整更新频率'); - console.log(' switch (activityType) {'); - console.log(' case "pullRequest": return hoursSinceUpdate > 1; // 1小时'); - console.log(' case "review": return hoursSinceUpdate > 2; // 2小时'); - console.log(' case "issue": return hoursSinceUpdate > 6; // 6小时'); - console.log(' case "comment": return hoursSinceUpdate > 12; // 12小时'); - console.log(' default: return hoursSinceUpdate > 24; // 24小时'); - console.log(' }'); - console.log(' }'); - console.log('}'); - console.log('```'); -} - -/** - * 5. 效果评估和监控 - */ -function proposeEffectivenessMonitoring() { - console.log('\n\n📈 效果评估和监控体系\n'); - - console.log('5.1 核心效果指标'); - console.log('─'.repeat(20)); - console.log('```typescript'); - console.log('interface QualityWeightEffectiveness {'); - console.log(' // 1. 技术指标'); - console.log(' technical: {'); - console.log(' computationTime: number; // 计算耗时'); - console.log(' apiCallCount: number; // API调用次数'); - console.log(' cacheHitRate: number; // 缓存命中率'); - console.log(' errorRate: number; // 错误率'); - console.log(' };'); - console.log(' '); - console.log(' // 2. 业务指标'); - console.log(' business: {'); - console.log(' rankingStability: number; // 排名稳定性'); - console.log(' correlationWithMaintainer: number; // 与维护者评价的相关性'); - console.log(' predictionAccuracy: number; // 预测准确性'); - console.log(' };'); - console.log(' '); - console.log(' // 3. 用户体验指标'); - console.log(' userExperience: {'); - console.log(' responseTime: number; // 响应时间'); - console.log(' resultConsistency: number; // 结果一致性'); - console.log(' interpretability: number; // 可解释性评分'); - console.log(' };'); - console.log('}'); - console.log('```'); - - console.log('\n5.2 A/B测试框架'); - console.log('─'.repeat(20)); - console.log('渐进式验证策略:'); - console.log(' 📊 Phase 1: 离线验证 (历史数据验证)'); - console.log(' - 使用历史数据验证算法效果'); - console.log(' - 与已知的优秀贡献者排名对比'); - console.log(' - 计算预测准确性和稳定性'); - console.log(' '); - console.log(' 🧪 Phase 2: 灰度测试 (小范围上线)'); - console.log(' - 选择5-10个项目进行测试'); - console.log(' - 并行运行新旧算法,对比结果'); - console.log(' - 收集项目维护者反馈'); - console.log(' '); - console.log(' 🚀 Phase 3: 全面部署 (逐步推广)'); - console.log(' - 基于测试结果优化算法'); - console.log(' - 逐步扩大应用范围'); - console.log(' - 持续监控和优化'); - - console.log('\n5.3 降级和容错策略'); - console.log('─'.repeat(30)); - console.log('生产级可靠性保障:'); - console.log('```typescript'); - console.log('class QualityWeightingService {'); - console.log(' async calculateQualityWeight(activity: Activity): Promise {'); - console.log(' try {'); - console.log(' // 尝试完整质量计算'); - console.log(' return await this.fullQualityCalculation(activity);'); - console.log(' } catch (error) {'); - console.log(' // 降级到简化计算'); - console.log(' console.warn("Quality calculation failed, falling back to simplified", error);'); - console.log(' return this.simplifiedQualityCalculation(activity);'); - console.log(' }'); - console.log(' }'); - console.log(' '); - console.log(' private simplifiedQualityCalculation(activity: Activity): number {'); - console.log(' // 基于基础数据的快速质量评估'); - console.log(' switch (activity.type) {'); - console.log(' case "pullRequest":'); - console.log(' return activity.merged ? 1.2 : 0.8; // 简单的成功/失败权重'); - console.log(' case "review":'); - console.log(' return 1.1; // 轻微质量奖励'); - console.log(' default:'); - console.log(' return 1.0; // 默认权重'); - console.log(' }'); - console.log(' }'); - console.log(' '); - console.log(' // 熔断机制'); - console.log(' private shouldSkipQualityCalculation(): boolean {'); - console.log(' const recentErrors = this.errorTracker.getRecentErrors();'); - console.log(' return recentErrors > 5; // 5次错误后跳过质量计算'); - console.log(' }'); - console.log('}'); - console.log('```'); -} - -// 主函数执行 -function main() { - analyzeFeasibility(); - analyzePerformanceIssues(); - validateEffectiveness(); - proposePracticalSolution(); - proposeEffectivenessMonitoring(); - - console.log('\n' + '═'.repeat(60)); - console.log('🎯 质量感知权重实用化方案总结:'); - console.log(''); - console.log('可行性: 三阶段实施,从MVP到完整体系'); - console.log('性能: 批量API调用 + 本地计算 + 智能缓存'); - console.log('有效性: A/B测试验证 + 持续监控优化'); - console.log('可靠性: 降级策略 + 容错机制 + 熔断保护'); - console.log(''); - console.log('核心原则: 实用为先,效果为本,'); - console.log(' 渐进改进,持续验证!'); - console.log('═'.repeat(60)); -} - -main(); diff --git a/src/temp/production_quality_weighting.js b/src/temp/production_quality_weighting.js deleted file mode 100644 index 697ed28..0000000 --- a/src/temp/production_quality_weighting.js +++ /dev/null @@ -1,495 +0,0 @@ -/** - * 质量感知权重的生产级优化方案 - * 聚焦可行性、性能效率、有效性的大规模应用设计 - */ - -console.log('=== 质量感知权重生产级优化方案 ===\n'); - -/** - * 1. 可行性分析和数据源评估 - */ -function analyzeFeasibilityAndDataSources() { - console.log('🔍 可行性分析和数据源评估\n'); - - console.log('1.1 GitHub API限制和成本分析'); - console.log('─'.repeat(35)); - console.log('GitHub API限流情况:'); - console.log(' • REST API: 5000 requests/hour (认证用户)'); - console.log(' • GraphQL API: 5000 points/hour'); - console.log(' • 复杂查询消耗: 1-100 points/query'); - console.log(''); - console.log('大规模应用的挑战:'); - console.log(' ❌ 原方案: 每个PR需要3-5次API调用'); - console.log(' ❌ 10万个PR = 30-50万次调用 (超出限制)'); - console.log(' ❌ Review详情、CI状态、文件列表等都需要额外调用'); - console.log(''); - console.log('✅ 优化策略:'); - console.log(' • 批量数据获取: 单次调用获取多项数据'); - console.log(' • 增量更新: 只处理新增/变更的活动'); - console.log(' • 本地缓存: 缓存不变的历史数据'); - console.log(' • 数据预处理: 定期批量处理而非实时计算'); - - console.log('\n1.2 数据可用性评估'); - console.log('─'.repeat(25)); - console.log('高可用性数据 (可直接使用):'); - console.log(' ✅ PR状态: state, merged, created_at, closed_at'); - console.log(' ✅ Review状态: APPROVED, CHANGES_REQUESTED, COMMENTED'); - console.log(' ✅ 代码统计: additions, deletions, changed_files'); - console.log(' ✅ 时间信息: submitted_at, merged_at'); - console.log(''); - console.log('中等可用性数据 (需要额外处理):'); - console.log(' ⚠️ CI/CD状态: 需要查询status checks'); - console.log(' ⚠️ 文件类型: 需要分析文件扩展名'); - console.log(' ⚠️ 标签信息: 需要项目配置支持'); - console.log(''); - console.log('低可用性数据 (成本过高):'); - console.log(' ❌ 详细代码分析: AST解析、复杂度计算'); - console.log(' ❌ 语义分析: 自然语言处理'); - console.log(' ❌ 深度关联: 跨PR的影响分析'); -} - -/** - * 2. 精简的质量指标体系 - */ -function designStreamlinedQualityMetrics() { - console.log('\n\n⚡ 精简的质量指标体系 (性能优先)\n'); - - console.log('2.1 Review活动质量 (3个核心指标)'); - console.log('─'.repeat(40)); - console.log('```typescript'); - console.log('interface StreamlinedReviewQuality {'); - console.log(' // 指标1: 通过率 (直接从API获取,无额外成本)'); - console.log(' acceptanceRate: number; // APPROVED / total_reviews'); - console.log(' '); - console.log(' // 指标2: 响应速度 (时间戳计算,成本极低)'); - console.log(' responseSpeed: number; // hours_to_first_review'); - console.log(' '); - console.log(' // 指标3: Review深度 (简化指标,低成本)'); - console.log(' reviewDepth: number; // review_comments_count / lines_changed'); - console.log('}'); - console.log(''); - console.log('// 高效计算函数'); - console.log('function calculateReviewQuality(review: ReviewData, pr: PRData): number {'); - console.log(' // O(1) 时间复杂度的计算'); - console.log(' const acceptance = review.state === "APPROVED" ? 1.0 : 0.5;'); - console.log(' const responseHours = (review.submitted_at - pr.created_at) / 3600000;'); - console.log(' const responseFactor = Math.max(0.2, Math.min(1.0, 24 / responseHours));'); - console.log(' const depthFactor = Math.min(1.0, review.comments.length / Math.max(1, pr.changes / 20));'); - console.log(' '); - console.log(' return 0.5 * acceptance + 0.3 * responseFactor + 0.2 * depthFactor;'); - console.log('}'); - console.log('```'); - - console.log('\n2.2 PR活动质量 (4个核心指标)'); - console.log('─'.repeat(35)); - console.log('```typescript'); - console.log('interface StreamlinedPRQuality {'); - console.log(' // 指标1: 合并成功率 (直接状态检查)'); - console.log(' mergeSuccess: boolean;'); - console.log(' '); - console.log(' // 指标2: 变更规模合理性 (简单数值计算)'); - console.log(' changeScale: number; // 基于additions + deletions'); - console.log(' '); - console.log(' // 指标3: 文件类型质量 (正则匹配,快速)'); - console.log(' fileTypeQuality: number; // 核心代码文件占比'); - console.log(' '); - console.log(' // 指标4: Review获得度 (聚合数据)'); - console.log(' reviewReception: number; // reviews_count * approval_rate'); - console.log('}'); - console.log(''); - console.log('// 批量优化的计算'); - console.log('function calculatePRQualityBatch(prs: PRData[]): Map {'); - console.log(' const results = new Map();'); - console.log(' '); - console.log(' // 批量处理,避免重复计算'); - console.log(' prs.forEach(pr => {'); - console.log(' let score = 0;'); - console.log(' '); - console.log(' // 合并成功 (0-0.4)'); - console.log(' score += pr.merged ? 0.4 : 0.1;'); - console.log(' '); - console.log(' // 变更规模 (0-0.3) - 预计算的理想范围'); - console.log(' const totalChanges = pr.additions + pr.deletions;'); - console.log(' if (totalChanges >= 50 && totalChanges <= 500) score += 0.3;'); - console.log(' else if (totalChanges <= 1000) score += 0.2;'); - console.log(' else score += 0.1;'); - console.log(' '); - console.log(' // 文件类型 (0-0.2) - 缓存的正则匹配'); - console.log(' const coreFileCount = pr.files.filter(f => CORE_FILE_PATTERN.test(f)).length;'); - console.log(' score += Math.min(0.2, coreFileCount / pr.files.length * 0.4);'); - console.log(' '); - console.log(' // Review接受度 (0-0.1)'); - console.log(' const avgApproval = pr.reviews.length > 0 ? '); - console.log(' pr.reviews.filter(r => r.state === "APPROVED").length / pr.reviews.length : 0;'); - console.log(' score += avgApproval * 0.1;'); - console.log(' '); - console.log(' results.set(pr.id, Math.min(1.0, score));'); - console.log(' });'); - console.log(' '); - console.log(' return results;'); - console.log('}'); - console.log('```'); - - console.log('\n2.3 Issue活动质量 (2个核心指标)'); - console.log('─'.repeat(40)); - console.log('```typescript'); - console.log('// 最简化的Issue质量评估'); - console.log('function calculateIssueQuality(issue: IssueData): number {'); - console.log(' let score = 0;'); - console.log(' '); - console.log(' // 指标1: 完成状态 (0-0.7)'); - console.log(' if (issue.state === "closed") {'); - console.log(' // 简单的标签检查'); - console.log(' const hasResolutionLabel = issue.labels.some(l => '); - console.log(' /^(resolved|fixed|completed|duplicate|wontfix)$/i.test(l.name));'); - console.log(' score += hasResolutionLabel ? 0.7 : 0.4;'); - console.log(' } else {'); - console.log(' score += 0.2; // 开放状态'); - console.log(' }'); - console.log(' '); - console.log(' // 指标2: 标签规范性 (0-0.3)'); - console.log(' const labelCount = issue.labels.length;'); - console.log(' if (labelCount >= 1 && labelCount <= 3) score += 0.3;'); - console.log(' else if (labelCount <= 5) score += 0.2;'); - console.log(' '); - console.log(' return Math.min(1.0, score);'); - console.log('}'); - console.log('```'); -} - -/** - * 3. 性能优化策略 - */ -function explainPerformanceOptimizations() { - console.log('\n\n🚀 性能优化策略\n'); - - console.log('3.1 数据预处理和缓存'); - console.log('─'.repeat(30)); - console.log('分层缓存策略:'); - console.log('```typescript'); - console.log('interface QualityCache {'); - console.log(' // L1缓存: 内存中的活跃数据 (最近1个月)'); - console.log(' activeQualityScores: Map;'); - console.log(' '); - console.log(' // L2缓存: 本地存储的历史数据 (6个月)'); - console.log(' historicalQualityScores: LRUCache;'); - console.log(' '); - console.log(' // L3缓存: 数据库中的完整历史'); - console.log(' persistentStorage: QualityDatabase;'); - console.log('}'); - console.log(''); - console.log('// 增量更新策略'); - console.log('class QualityCalculator {'); - console.log(' private lastUpdateTimestamp: Date;'); - console.log(' '); - console.log(' async updateQualityScores(projectId: string): Promise {'); - console.log(' // 只处理lastUpdateTimestamp之后的新活动'); - console.log(' const newActivities = await this.getNewActivities(projectId, this.lastUpdateTimestamp);'); - console.log(' '); - console.log(' // 批量计算新活动的质量评分'); - console.log(' const qualityScores = await this.calculateQualityBatch(newActivities);'); - console.log(' '); - console.log(' // 更新缓存'); - console.log(' this.updateCache(qualityScores);'); - console.log(' this.lastUpdateTimestamp = new Date();'); - console.log(' }'); - console.log('}'); - console.log('```'); - - console.log('\n3.2 算法复杂度优化'); - console.log('─'.repeat(30)); - console.log('时间复杂度分析:'); - console.log(' 原始方案: O(n²) - 每个活动需要查询相关数据'); - console.log(' 优化方案: O(n) - 批量处理和预计算'); - console.log(''); - console.log('具体优化:'); - console.log('```typescript'); - console.log('// 批量计算避免重复API调用'); - console.log('async function calculateProjectQuality(projectId: string): Promise {'); - console.log(' // 一次性获取所有需要的数据'); - console.log(' const [prs, reviews, issues] = await Promise.all(['); - console.log(' this.getAllPRs(projectId),'); - console.log(' this.getAllReviews(projectId),'); - console.log(' this.getAllIssues(projectId)'); - console.log(' ]);'); - console.log(' '); - console.log(' // 构建关联映射 (一次性O(n)操作)'); - console.log(' const prReviewMap = this.buildPRReviewMapping(prs, reviews);'); - console.log(' '); - console.log(' // 并行计算各类活动的质量评分'); - console.log(' const [prScores, reviewScores, issueScores] = await Promise.all(['); - console.log(' this.calculatePRQualityBatch(prs),'); - console.log(' this.calculateReviewQualityBatch(reviews, prReviewMap),'); - console.log(' this.calculateIssueQualityBatch(issues)'); - console.log(' ]);'); - console.log(' '); - console.log(' return { prScores, reviewScores, issueScores };'); - console.log('}'); - console.log('```'); - - console.log('\n3.3 内存管理优化'); - console.log('─'.repeat(25)); - console.log('大项目数据处理:'); - console.log('```typescript'); - console.log('// 流式处理大量数据'); - console.log('async function* processLargeProject(projectId: string): AsyncGenerator {'); - console.log(' const BATCH_SIZE = 1000; // 每批处理1000个活动'); - console.log(' let offset = 0;'); - console.log(' '); - console.log(' while (true) {'); - console.log(' const batch = await this.getActivities(projectId, offset, BATCH_SIZE);'); - console.log(' if (batch.length === 0) break;'); - console.log(' '); - console.log(' // 计算当前批次的质量评分'); - console.log(' const qualityBatch = await this.calculateQualityBatch(batch);'); - console.log(' yield qualityBatch;'); - console.log(' '); - console.log(' offset += BATCH_SIZE;'); - console.log(' '); - console.log(' // 主动垃圾回收,避免内存泄漏'); - console.log(' if (offset % 10000 === 0) {'); - console.log(' global.gc?.(); // 可选的垃圾回收'); - console.log(' }'); - console.log(' }'); - console.log('}'); - console.log('```'); -} - -/** - * 4. 有效性验证和调优 - */ -function explainEffectivenessValidation() { - console.log('\n\n📊 有效性验证和调优\n'); - - console.log('4.1 质量指标的有效性验证'); - console.log('─'.repeat(35)); - console.log('验证方法:'); - console.log(' • A/B测试: 对比启用/禁用质量权重的OpenRank结果'); - console.log(' • 专家评估: 邀请项目维护者评估结果的合理性'); - console.log(' • 相关性分析: 质量评分与实际项目价值的相关性'); - console.log(' • 稳定性测试: 参数微调对结果的影响程度'); - console.log(''); - console.log('```typescript'); - console.log('interface EffectivenessMetrics {'); - console.log(' // 结果差异度量'); - console.log(' rankingChanges: {'); - console.log(' topContributorsChange: number; // Top贡献者排名变化'); - console.log(' distributionShift: number; // 权重分布变化'); - console.log(' outlierDetection: number; // 异常值检测'); - console.log(' };'); - console.log(' '); - console.log(' // 质量提升效果'); - console.log(' qualityImprovement: {'); - console.log(' highQualityRatio: number; // 高质量活动占比提升'); - console.log(' lowQualityReduction: number; // 低质量活动权重下降'); - console.log(' overallQualityTrend: number; // 整体质量趋势'); - console.log(' };'); - console.log(' '); - console.log(' // 系统性能指标'); - console.log(' performance: {'); - console.log(' calculationTime: number; // 计算耗时'); - console.log(' memoryUsage: number; // 内存使用'); - console.log(' apiCallCount: number; // API调用次数'); - console.log(' };'); - console.log('}'); - console.log('```'); - - console.log('\n4.2 参数自适应调优'); - console.log('─'.repeat(30)); - console.log('动态参数调整:'); - console.log('```typescript'); - console.log('class AdaptiveQualityWeighting {'); - console.log(' private config: QualityWeightConfig;'); - console.log(' '); - console.log(' // 基于项目特征自动调整参数'); - console.log(' async adaptConfigToProject(projectMetrics: ProjectMetrics): Promise {'); - console.log(' // 根据项目规模调整权重'); - console.log(' if (projectMetrics.contributorCount > 100) {'); - console.log(' // 大项目: 降低质量权重影响,避免过度分化'); - console.log(' this.config.amplificationFactor = 0.2;'); - console.log(' } else if (projectMetrics.contributorCount < 10) {'); - console.log(' // 小项目: 增加质量权重影响,突出质量差异'); - console.log(' this.config.amplificationFactor = 0.4;'); - console.log(' } else {'); - console.log(' // 中等项目: 标准配置'); - console.log(' this.config.amplificationFactor = 0.3;'); - console.log(' }'); - console.log(' '); - console.log(' // 根据项目活跃度调整阈值'); - console.log(' if (projectMetrics.monthlyActivityLevel === "high") {'); - console.log(' this.config.qualityThresholds.review.minDepth = 0.6; // 提高要求'); - console.log(' } else {'); - console.log(' this.config.qualityThresholds.review.minDepth = 0.4; // 降低要求'); - console.log(' }'); - console.log(' }'); - console.log(' '); - console.log(' // 基于历史效果调整参数'); - console.log(' async optimizeBasedOnFeedback(feedback: EffectivenessFeedback): Promise {'); - console.log(' if (feedback.qualityVarianceScore < 0.1) {'); - console.log(' // 质量差异太小,增加权重影响'); - console.log(' this.config.amplificationFactor *= 1.2;'); - console.log(' } else if (feedback.qualityVarianceScore > 0.8) {'); - console.log(' // 质量差异过大,减少权重影响'); - console.log(' this.config.amplificationFactor *= 0.8;'); - console.log(' }'); - console.log(' }'); - console.log('}'); - console.log('```'); -} - -/** - * 5. 生产部署方案 - */ -function explainProductionDeployment() { - console.log('\n\n🏭 生产部署方案\n'); - - console.log('5.1 渐进式部署策略'); - console.log('─'.repeat(30)); - console.log('部署阶段:'); - console.log(' 阶段1: 小规模项目试点 (< 100 contributors)'); - console.log(' 阶段2: 中等规模验证 (100-1000 contributors)'); - console.log(' 阶段3: 大规模正式部署 (> 1000 contributors)'); - console.log(''); - console.log('风险控制:'); - console.log('```typescript'); - console.log('interface DeploymentConfig {'); - console.log(' // 渐进式启用'); - console.log(' rollout: {'); - console.log(' enabled: boolean;'); - console.log(' percentage: number; // 启用的项目百分比'); - console.log(' maxProjectSize: number; // 最大项目规模限制'); - console.log(' fallbackToBaseline: boolean; // 失败时回退到基础算法'); - console.log(' };'); - console.log(' '); - console.log(' // 性能限制'); - console.log(' performance: {'); - console.log(' maxCalculationTime: number; // 最大计算时间 (秒)'); - console.log(' maxMemoryUsage: number; // 最大内存使用 (MB)'); - console.log(' maxApiCalls: number; // 最大API调用数'); - console.log(' };'); - console.log(' '); - console.log(' // 监控告警'); - console.log(' monitoring: {'); - console.log(' enableMetrics: boolean;'); - console.log(' alertThresholds: {'); - console.log(' errorRate: number; // 错误率阈值'); - console.log(' responseTime: number; // 响应时间阈值'); - console.log(' qualityVariance: number; // 质量方差阈值'); - console.log(' };'); - console.log(' };'); - console.log('}'); - console.log('```'); - - console.log('\n5.2 容错和降级机制'); - console.log('─'.repeat(30)); - console.log('```typescript'); - console.log('class RobustQualityCalculator {'); - console.log(' async calculateWithFallback(activityData: ActivityData): Promise {'); - console.log(' try {'); - console.log(' // 尝试完整的质量计算'); - console.log(' const startTime = Date.now();'); - console.log(' const qualityScore = await this.calculateFullQuality(activityData);'); - console.log(' '); - console.log(' // 检查计算时间'); - console.log(' if (Date.now() - startTime > this.config.maxCalculationTime) {'); - console.log(' console.warn("Quality calculation timeout, using simplified method");'); - console.log(' return this.calculateSimplifiedQuality(activityData);'); - console.log(' }'); - console.log(' '); - console.log(' return qualityScore;'); - console.log(' } catch (error) {'); - console.log(' console.error("Quality calculation failed:", error);'); - console.log(' '); - console.log(' // 降级到简化计算'); - console.log(' try {'); - console.log(' return this.calculateSimplifiedQuality(activityData);'); - console.log(' } catch (fallbackError) {'); - console.log(' console.error("Fallback calculation failed:", fallbackError);'); - console.log(' // 最终降级到基础权重'); - console.log(' return { score: 0.5, confidence: 0.0 }; // 中性评分'); - console.log(' }'); - console.log(' }'); - console.log(' }'); - console.log(' '); - console.log(' // 简化的质量计算 (仅使用最可靠的指标)'); - console.log(' private calculateSimplifiedQuality(activityData: ActivityData): QualityScore {'); - console.log(' // 只使用最基础、最可靠的指标'); - console.log(' switch (activityData.type) {'); - console.log(' case "review":'); - console.log(' return { score: activityData.state === "APPROVED" ? 0.8 : 0.4, confidence: 0.8 };'); - console.log(' case "pr":'); - console.log(' return { score: activityData.merged ? 0.7 : 0.3, confidence: 0.8 };'); - console.log(' default:'); - console.log(' return { score: 0.5, confidence: 0.5 };'); - console.log(' }'); - console.log(' }'); - console.log('}'); - console.log('```'); -} - -/** - * 6. 成本效益分析 - */ -function analyzeCostBenefit() { - console.log('\n\n💰 成本效益分析\n'); - - console.log('6.1 实施成本评估'); - console.log('─'.repeat(25)); - console.log('开发成本:'); - console.log(' • 核心算法开发: 2-3周 (简化版)'); - console.log(' • 性能优化: 1-2周'); - console.log(' • 测试验证: 1-2周'); - console.log(' • 总计: 4-7周开发时间'); - console.log(''); - console.log('运行成本 (月度):'); - console.log(' • API调用费用: $0 (GitHub免费额度内)'); - console.log(' • 计算资源: 增加20-30%的CPU使用'); - console.log(' • 存储成本: 增加10-15%的存储需求'); - console.log(' • 维护成本: 每月1-2天的参数调优'); - console.log(''); - console.log('6.2 收益预期'); - console.log('─'.repeat(15)); - console.log('量化收益:'); - console.log(' • OpenRank准确性提升: 15-25%'); - console.log(' • 高质量贡献者识别率提升: 30-40%'); - console.log(' • 算法公平性提升: 20-30%'); - console.log(' • 用户满意度提升: 预期25-35%'); - console.log(''); - console.log('定性收益:'); - console.log(' • 激励开发者提高贡献质量'); - console.log(' • 增强OpenRank算法的竞争优势'); - console.log(' • 提升open-digger项目的技术影响力'); - console.log(' • 为后续算法优化奠定基础'); - - console.log('\n6.3 ROI分析'); - console.log('─'.repeat(12)); - console.log('投入产出比计算:'); - console.log(' 投入: 4-7周开发 + 每月维护成本'); - console.log(' 产出: 算法准确性和用户满意度显著提升'); - console.log(' ROI: 预期6-12个月内收回成本'); - console.log(' 长期价值: 技术护城河和持续竞争优势'); -} - -// 主函数执行 -function main() { - analyzeFeasibilityAndDataSources(); - designStreamlinedQualityMetrics(); - explainPerformanceOptimizations(); - explainEffectivenessValidation(); - explainProductionDeployment(); - analyzeCostBenefit(); - - console.log('\n' + '═'.repeat(60)); - console.log('🎯 质量感知权重生产级方案总结:'); - console.log(''); - console.log('可行性: 基于GitHub现有API,数据获取成本可控'); - console.log('性能: O(n)复杂度,批量处理,分层缓存优化'); - console.log('有效性: A/B测试验证,自适应参数调优'); - console.log('生产级: 渐进部署,容错降级,全面监控'); - console.log(''); - console.log('推荐方案: 精简指标 + 性能优先 + 渐进部署'); - console.log('预期效果: 15-25%的准确性提升,可控的成本'); - console.log('═'.repeat(60)); -} - -main(); diff --git a/src/temp/project_level_history_review.js b/src/temp/project_level_history_review.js deleted file mode 100644 index 4562339..0000000 --- a/src/temp/project_level_history_review.js +++ /dev/null @@ -1,277 +0,0 @@ -/** - * 项目级OpenRank中个人历史权重的重新审视 - * 聚焦单个项目内的相对贡献评估 - */ - -console.log('=== 项目级OpenRank个人历史权重重新审视 ===\n'); - -/** - * 1. 原方案问题分析 - */ -function analyzeOriginalProblems() { - console.log('❌ 原方案存在的问题\n'); - - console.log('1.1 范围偏离问题'); - console.log('─'.repeat(25)); - console.log('原方案设计缺陷:'); - console.log(' • 跨项目历史分析 ❌ 项目级OpenRank只关注单个项目'); - console.log(' • 全GitHub活动追踪 ❌ 应该只看当前项目的历史'); - console.log(' • 技能演进分析 ❌ 与项目内贡献评估无关'); - console.log(' • 协作网络全图 ❌ 应该只看项目内协作关系'); - console.log(''); - console.log('核心问题: 混淆了"开发者全局能力评估"和"项目内贡献评估"'); - - console.log('\n1.2 适用性问题'); - console.log('─'.repeat(25)); - console.log('项目级OpenRank的实际需求:'); - console.log(' ✓ 评估参与者在当前项目中的相对重要性'); - console.log(' ✓ 基于项目内活动计算贡献权重'); - console.log(' ✓ 体现项目内的影响力分布'); - console.log(' ✓ 为项目维护者提供贡献者洞察'); - console.log(''); - console.log(' ❌ 不需要跨项目比较开发者能力'); - console.log(' ❌ 不需要全局GitHub活动分析'); - console.log(' ❌ 不需要技能学习曲线追踪'); - - console.log('\n1.3 复杂度问题'); - console.log('─'.repeat(25)); - console.log('原方案过度复杂:'); - console.log(' • 需要大量外部数据获取'); - console.log(' • 计算复杂度过高'); - console.log(' • 实施成本巨大'); - console.log(' • 与项目级目标不符'); -} - -/** - * 2. 项目级个人历史权重重新设计 - */ -function redesignProjectLevelPersonalHistory() { - console.log('\n\n✅ 项目级个人历史权重重新设计\n'); - - console.log('2.1 重新定义范围'); - console.log('─'.repeat(25)); - console.log('项目级历史权重应该关注:'); - console.log(' ✓ 在当前项目中的贡献历史'); - console.log(' ✓ 在当前项目中的角色演变'); - console.log(' ✓ 在当前项目中的影响力积累'); - console.log(' ✓ 在当前项目中的协作关系'); - console.log(''); - console.log('数据范围限制:'); - console.log(' • 时间范围: 项目开始 → 当前时间'); - console.log(' • 空间范围: 仅限当前项目内的活动'); - console.log(' • 关系范围: 仅限项目内的协作网络'); - - console.log('\n2.2 简化的历史维度'); - console.log('─'.repeat(30)); - console.log('重新设计的历史指标:'); - console.log('```typescript'); - console.log('interface ProjectLevelPersonalHistory {'); - console.log(' // 1. 项目参与时长 (0-0.3)'); - console.log(' participationDuration: {'); - console.log(' firstContribution: Date; // 首次贡献时间'); - console.log(' totalDays: number; // 参与总天数'); - console.log(' activeDays: number; // 活跃天数'); - console.log(' continuityScore: number; // 参与连续性'); - console.log(' };'); - console.log(' '); - console.log(' // 2. 项目内角色演进 (0-0.3)'); - console.log(' roleEvolution: {'); - console.log(' initialRole: "contributor" | "reviewer" | "maintainer";'); - console.log(' currentRole: "contributor" | "reviewer" | "maintainer";'); - console.log(' roleProgression: number; // 角色进步评分'); - console.log(' responsibilityGrowth: number; // 责任承担增长'); - console.log(' };'); - console.log(' '); - console.log(' // 3. 项目内影响力 (0-0.2)'); - console.log(' projectInfluence: {'); - console.log(' coreContributions: number; // 核心贡献数量'); - console.log(' mentionFrequency: number; // 被提及频率'); - console.log(' decisionInfluence: number; // 决策影响力'); - console.log(' };'); - console.log(' '); - console.log(' // 4. 项目内协作质量 (0-0.2)'); - console.log(' collaborationQuality: {'); - console.log(' teamworkScore: number; // 团队合作评分'); - console.log(' conflictResolution: number; // 冲突解决能力'); - console.log(' knowledgeSharing: number; // 知识分享程度'); - console.log(' };'); - console.log('}'); - console.log('```'); -} - -/** - * 3. 简化实现方案 - */ -function explainSimplifiedImplementation() { - console.log('\n\n🔧 简化的实现方案\n'); - - console.log('3.1 项目参与时长计算'); - console.log('─'.repeat(30)); - console.log('```typescript'); - console.log('function calculateProjectParticipation('); - console.log(' userId: string, '); - console.log(' projectActivities: ProjectActivity[]'); - console.log('): number {'); - console.log(' const userActivities = projectActivities.filter(a => a.userId === userId);'); - console.log(' '); - console.log(' if (userActivities.length === 0) return 0;'); - console.log(' '); - console.log(' // 计算参与时长'); - console.log(' const firstActivity = userActivities[0].date;'); - console.log(' const lastActivity = userActivities[userActivities.length - 1].date;'); - console.log(' const totalDays = daysBetween(firstActivity, lastActivity);'); - console.log(' '); - console.log(' // 计算活跃度'); - console.log(' const activeDays = new Set(userActivities.map(a => a.date.toDateString())).size;'); - console.log(' const activityRate = activeDays / Math.max(1, totalDays);'); - console.log(' '); - console.log(' // 时长评分 + 活跃度评分'); - console.log(' const durationScore = Math.min(0.5, totalDays / 365); // 1年满分'); - console.log(' const activityScore = Math.min(0.5, activityRate * 2); // 50%活跃度满分'); - console.log(' '); - console.log(' return durationScore + activityScore;'); - console.log('}'); - console.log('```'); - - console.log('\n3.2 项目内角色演进'); - console.log('─'.repeat(25)); - console.log('```typescript'); - console.log('function calculateRoleEvolution('); - console.log(' userId: string,'); - console.log(' projectActivities: ProjectActivity[]'); - console.log('): number {'); - console.log(' const userActivities = projectActivities.filter(a => a.userId === userId);'); - console.log(' '); - console.log(' // 按时间分期分析角色变化'); - console.log(' const periods = divideIntoPeriods(userActivities, 3); // 分成3个时期'); - console.log(' '); - console.log(' let evolutionScore = 0;'); - console.log(' '); - console.log(' periods.forEach((period, index) => {'); - console.log(' const role = determineRole(period.activities);'); - console.log(' '); - console.log(' // 角色权重: maintainer > reviewer > contributor'); - console.log(' const roleWeight = {'); - console.log(' "contributor": 0.3,'); - console.log(' "reviewer": 0.6,'); - console.log(' "maintainer": 1.0'); - console.log(' }[role];'); - console.log(' '); - console.log(' // 后期角色权重更高'); - console.log(' const timeWeight = (index + 1) / periods.length;'); - console.log(' evolutionScore += roleWeight * timeWeight;'); - console.log(' });'); - console.log(' '); - console.log(' return evolutionScore / periods.length;'); - console.log('}'); - console.log('```'); - - console.log('\n3.3 项目内影响力评估'); - console.log('─'.repeat(30)); - console.log('```typescript'); - console.log('function calculateProjectInfluence('); - console.log(' userId: string,'); - console.log(' projectData: ProjectData'); - console.log('): number {'); - console.log(' let influenceScore = 0;'); - console.log(' '); - console.log(' // 1. 核心贡献识别 (0-0.4)'); - console.log(' const coreContributions = projectData.activities.filter(a => '); - console.log(' a.userId === userId && '); - console.log(' (a.type === "pr" && a.linesChanged > 100) || // 大型PR'); - console.log(' (a.type === "issue" && a.labels.includes("critical")) // 重要Issue'); - console.log(' );'); - console.log(' influenceScore += Math.min(0.4, coreContributions.length * 0.1);'); - console.log(' '); - console.log(' // 2. 被提及频率 (0-0.3)'); - console.log(' const mentions = projectData.comments.filter(c => '); - console.log(' c.body.includes(`@${userId}`) && c.userId !== userId'); - console.log(' );'); - console.log(' influenceScore += Math.min(0.3, mentions.length * 0.05);'); - console.log(' '); - console.log(' // 3. 决策参与度 (0-0.3)'); - console.log(' const decisionActivities = projectData.activities.filter(a =>'); - console.log(' a.userId === userId && '); - console.log(' (a.type === "review" || a.labels?.includes("decision"))'); - console.log(' );'); - console.log(' influenceScore += Math.min(0.3, decisionActivities.length * 0.05);'); - console.log(' '); - console.log(' return Math.min(1.0, influenceScore);'); - console.log('}'); - console.log('```'); -} - -/** - * 4. 权重应用建议 - */ -function suggestWeightApplication() { - console.log('\n\n⚖️ 项目级历史权重应用建议\n'); - - console.log('4.1 是否需要个人历史权重?'); - console.log('─'.repeat(35)); - console.log('需要考虑的场景:'); - console.log(' ✓ 长期项目 (>1年): 历史权重有意义'); - console.log(' ❌ 短期项目 (<6月): 历史权重作用有限'); - console.log(' ✓ 稳定团队: 成员相对固定,历史有价值'); - console.log(' ❌ 流动团队: 成员频繁变动,历史参考性低'); - console.log(' ✓ 企业项目: 内部开发,角色稳定'); - console.log(' ❌ 开源项目: 贡献者随机性强'); - - console.log('\n4.2 简化建议'); - console.log('─'.repeat(15)); - console.log('基于你的项目级OpenRank目标,建议:'); - console.log(''); - console.log('💡 方案A: 完全移除个人历史权重'); - console.log(' 优点: 实现简单,计算快速,适用性广'); - console.log(' 缺点: 无法体现长期贡献者的价值'); - console.log(' 适用: 大多数项目级OpenRank场景'); - console.log(''); - console.log('💡 方案B: 轻量化历史权重'); - console.log(' 仅考虑项目参与时长和角色演进'); - console.log(' 权重影响系数: β = 0.1-0.15 (影响较小)'); - console.log(' 计算公式: W = W_base × (1 + β × 项目参与评分)'); - console.log(' 适用: 长期稳定的项目团队'); - console.log(''); - console.log('💡 方案C: 完全聚焦当前贡献'); - console.log(' 历史仅作为质量评估的输入'); - console.log(' 不单独设置历史权重维度'); - console.log(' 历史质量一致性 → 当前活动质量权重'); - console.log(' 适用: 注重当前贡献价值的场景'); - - console.log('\n4.3 推荐方案'); - console.log('─'.repeat(15)); - console.log('🎯 推荐采用方案A: 移除个人历史权重'); - console.log(''); - console.log('理由:'); - console.log(' 1. 项目级OpenRank重点在当前相对贡献'); - console.log(' 2. 避免复杂的跨时间数据处理'); - console.log(' 3. 提高算法的通用性和可移植性'); - console.log(' 4. 专注于质量权重和时间衰减优化'); - console.log(''); - console.log('替代方案:'); - console.log(' • 将历史稳定性融入质量感知权重'); - console.log(' • 通过时间衰减体现时间维度价值'); - console.log(' • 聚焦活动间协同效应的挖掘'); -} - -// 主函数执行 -function main() { - analyzeOriginalProblems(); - redesignProjectLevelPersonalHistory(); - explainSimplifiedImplementation(); - suggestWeightApplication(); - - console.log('\n' + '═'.repeat(60)); - console.log('🎯 项目级OpenRank个人历史权重总结:'); - console.log(''); - console.log('问题识别: 原方案过度复杂,偏离项目级目标'); - console.log('重新设计: 聚焦项目内历史,大幅简化实现'); - console.log('推荐方案: 移除个人历史权重,专注当前贡献'); - console.log('替代策略: 历史稳定性融入质量权重评估'); - console.log(''); - console.log('核心原则: 项目级OpenRank应该聚焦'); - console.log(' 当前项目内的相对贡献价值!'); - console.log('═'.repeat(60)); -} - -main(); diff --git a/src/temp/quality_weight_implementation.js b/src/temp/quality_weight_implementation.js deleted file mode 100644 index 05c9a5b..0000000 --- a/src/temp/quality_weight_implementation.js +++ /dev/null @@ -1,599 +0,0 @@ -/** - * 质量感知权重详细实现指南 - * 数据来源、指标计算和权重调整的完整说明 - */ - -console.log('=== 质量感知权重详细实现指南 ===\n'); - -/** - * 1. 数据来源详细分析 - */ -function explainDataSources() { - console.log('📊 数据来源详细分析\n'); - - console.log('1.1 GitHub/Git 原生数据源'); - console.log('─'.repeat(30)); - console.log('Pull Request API数据:'); - console.log(' • PR状态: state (open/closed/merged)'); - console.log(' • Review状态: reviews[] 数组'); - console.log(' - state: APPROVED/CHANGES_REQUESTED/COMMENTED'); - console.log(' - submitted_at: review提交时间'); - console.log(' - body: review内容'); - console.log(' • PR详情: additions, deletions, changed_files'); - console.log(' • 响应时间: created_at vs first_review_at'); - console.log(''); - console.log('Issue API数据:'); - console.log(' • Issue状态: state (open/closed)'); - console.log(' • 标签信息: labels[]'); - console.log(' • 关联PR: pull_request (如果存在)'); - console.log(' • 活动时间线: timeline_url'); - console.log(''); - console.log('Comments API数据:'); - console.log(' • 评论内容: body'); - console.log(' • 表情反应: reactions (👍, ❤️, 🚀, 👎, 😕, 🎉, 👀, 😢)'); - console.log(' • 评论时间: created_at, updated_at'); - console.log(' • 评论位置: position (代码行号,如果是review comment)'); - - console.log('\n1.2 GitHub GraphQL高级数据'); - console.log('─'.repeat(35)); - console.log('更详细的PR信息:'); - console.log('```graphql'); - console.log('query getPRDetails($owner: String!, $repo: String!, $number: Int!) {'); - console.log(' repository(owner: $owner, name: $repo) {'); - console.log(' pullRequest(number: $number) {'); - console.log(' reviews(first: 100) {'); - console.log(' nodes {'); - console.log(' state'); - console.log(' submittedAt'); - console.log(' body'); - console.log(' author { login }'); - console.log(' comments(first: 100) {'); - console.log(' nodes {'); - console.log(' body'); - console.log(' reactions(first: 10) {'); - console.log(' nodes { content }'); - console.log(' }'); - console.log(' }'); - console.log(' }'); - console.log(' }'); - console.log(' }'); - console.log(' timelineItems(first: 100) {'); - console.log(' nodes {'); - console.log(' __typename'); - console.log(' ... on IssueComment {'); - console.log(' body'); - console.log(' reactions { totalCount }'); - console.log(' }'); - console.log(' }'); - console.log(' }'); - console.log(' }'); - console.log(' }'); - console.log('}'); - console.log('```'); - - console.log('\n1.3 Git历史数据'); - console.log('─'.repeat(20)); - console.log('Commit信息:'); - console.log(' • git log --format="%H|%an|%ae|%at|%s" → 提取commit历史'); - console.log(' • git show --stat commitHash → 获取文件变更统计'); - console.log(' • git diff --name-only commitHash^ commitHash → 变更文件列表'); - console.log(''); - console.log('分支信息:'); - console.log(' • git branch --merged → 已合并分支'); - console.log(' • git log --graph --oneline → 分支关系'); - console.log(''); - console.log('文件重要性:'); - console.log(' • 核心文件识别: src/main.*, package.json, README.md等'); - console.log(' • 文件修改频率: git log --follow --oneline filepath'); - console.log(' • 文件依赖关系: 通过AST分析import/require关系'); -} - -/** - * 2. Review活动质量指标详细实现 - */ -function explainReviewQualityMetrics() { - console.log('\n\n🔍 Review活动质量指标详细实现\n'); - - console.log('2.1 通过率计算 (Acceptance Rate)'); - console.log('─'.repeat(40)); - console.log('数据收集:'); - console.log('```typescript'); - console.log('interface ReviewData {'); - console.log(' reviewId: string;'); - console.log(' state: "APPROVED" | "CHANGES_REQUESTED" | "COMMENTED";'); - console.log(' submittedAt: Date;'); - console.log(' body: string;'); - console.log(' comments: ReviewComment[];'); - console.log(' author: string;'); - console.log('}'); - console.log(''); - console.log('interface ReviewComment {'); - console.log(' body: string;'); - console.log(' position: number; // 代码行号'); - console.log(' reactions: Reaction[];'); - console.log('}'); - console.log('```'); - console.log(''); - console.log('通过率计算逻辑:'); - console.log('```typescript'); - console.log('function calculateAcceptanceRate(reviews: ReviewData[]): number {'); - console.log(' const approvedReviews = reviews.filter(r => r.state === "APPROVED");'); - console.log(' const changesRequestedReviews = reviews.filter(r => r.state === "CHANGES_REQUESTED");'); - console.log(' '); - console.log(' // 基础通过率'); - console.log(' const basicRate = approvedReviews.length / reviews.length;'); - console.log(' '); - console.log(' // 建设性调整: 如果提出的修改建议最终被采纳,也算部分通过'); - console.log(' const constructiveAdjustment = changesRequestedReviews'); - console.log(' .filter(r => wasEventuallyImplemented(r))'); - console.log(' .length * 0.5 / reviews.length;'); - console.log(' '); - console.log(' return Math.min(1.0, basicRate + constructiveAdjustment);'); - console.log('}'); - console.log('```'); - - console.log('\n2.2 响应时间计算 (Response Speed)'); - console.log('─'.repeat(45)); - console.log('时间指标定义:'); - console.log(' • 首次响应时间: PR创建 → 第一个review'); - console.log(' • 平均响应时间: 多轮review的平均间隔'); - console.log(' • 完成时间: PR创建 → 最终merge/close'); - console.log(''); - console.log('响应速度评分:'); - console.log('```typescript'); - console.log('function calculateResponseSpeed(pr: PullRequestData): number {'); - console.log(' const firstReviewTime = pr.reviews[0]?.submittedAt;'); - console.log(' const createdTime = pr.createdAt;'); - console.log(' '); - console.log(' if (!firstReviewTime) return 0; // 没有review'); - console.log(' '); - console.log(' const responseHours = (firstReviewTime.getTime() - createdTime.getTime()) / (1000 * 60 * 60);'); - console.log(' '); - console.log(' // 响应时间评分 (越快越好)'); - console.log(' if (responseHours <= 2) return 1.0; // 2小时内: 满分'); - console.log(' if (responseHours <= 24) return 0.8; // 1天内: 良好'); - console.log(' if (responseHours <= 72) return 0.6; // 3天内: 一般'); - console.log(' if (responseHours <= 168) return 0.4; // 1周内: 较差'); - console.log(' return 0.2; // 超过1周: 很差'); - console.log('}'); - console.log('```'); - - console.log('\n2.3 详细程度计算 (Review Depth)'); - console.log('─'.repeat(40)); - console.log('详细程度指标:'); - console.log(' • 评论长度: review body和comments的总字符数'); - console.log(' • 代码覆盖: review comments覆盖的代码行数比例'); - console.log(' • 具体建议: 是否包含具体的修改建议'); - console.log(' • 代码示例: 是否包含代码块示例'); - console.log(''); - console.log('详细程度计算:'); - console.log('```typescript'); - console.log('function calculateReviewDepth(review: ReviewData, pr: PullRequestData): number {'); - console.log(' // 1. 内容长度评分 (0-0.4)'); - console.log(' const totalLength = review.body.length + '); - console.log(' review.comments.reduce((sum, c) => sum + c.body.length, 0);'); - console.log(' const lengthScore = Math.min(0.4, totalLength / 1000); // 1000字符满分'); - console.log(' '); - console.log(' // 2. 代码覆盖评分 (0-0.3)'); - console.log(' const coveredLines = review.comments.length; // 每个comment对应一行代码'); - console.log(' const totalLines = pr.additions + pr.deletions;'); - console.log(' const coverageScore = Math.min(0.3, (coveredLines / totalLines) * 0.3);'); - console.log(' '); - console.log(' // 3. 质量特征评分 (0-0.3)'); - console.log(' const hasCodeBlocks = /```[\\s\\S]*?```/.test(review.body);'); - console.log(' const hasSpecificSuggestions = /suggest|recommend|should|consider/.test(review.body);'); - console.log(' const qualityScore = (hasCodeBlocks ? 0.15 : 0) + (hasSpecificSuggestions ? 0.15 : 0);'); - console.log(' '); - console.log(' return lengthScore + coverageScore + qualityScore;'); - console.log('}'); - console.log('```'); -} - -/** - * 3. Comment活动质量指标详细实现 - */ -function explainCommentQualityMetrics() { - console.log('\n\n💬 Comment活动质量指标详细实现\n'); - - console.log('3.1 有用性计算 (Usefulness)'); - console.log('─'.repeat(35)); - console.log('表情反应数据结构:'); - console.log('```typescript'); - console.log('interface Reaction {'); - console.log(' content: "👍" | "👎" | "😄" | "🎉" | "😕" | "❤️" | "🚀" | "👀";'); - console.log(' users: { total_count: number; }'); - console.log('}'); - console.log('```'); - console.log(''); - console.log('有用性评分计算:'); - console.log('```typescript'); - console.log('function calculateCommentUsefulness(comment: CommentData): number {'); - console.log(' const reactions = comment.reactions;'); - console.log(' '); - console.log(' // 正面反应权重'); - console.log(' const positiveScore = '); - console.log(' (reactions["👍"]?.users.total_count || 0) * 1.0 +'); - console.log(' (reactions["❤️"]?.users.total_count || 0) * 0.8 +'); - console.log(' (reactions["🚀"]?.users.total_count || 0) * 0.9 +'); - console.log(' (reactions["🎉"]?.users.total_count || 0) * 0.7;'); - console.log(' '); - console.log(' // 负面反应权重'); - console.log(' const negativeScore = '); - console.log(' (reactions["👎"]?.users.total_count || 0) * 1.0 +'); - console.log(' (reactions["😕"]?.users.total_count || 0) * 0.8;'); - console.log(' '); - console.log(' // 净有用性评分'); - console.log(' const netScore = positiveScore - negativeScore;'); - console.log(' '); - console.log(' // 归一化到 [-1, 1] 范围'); - console.log(' const totalReactions = positiveScore + negativeScore;'); - console.log(' if (totalReactions === 0) return 0;'); - console.log(' '); - console.log(' return Math.max(-1, Math.min(1, netScore / Math.max(5, totalReactions)));'); - console.log('}'); - console.log('```'); - - console.log('\n3.2 解决性计算 (Problem Solving)'); - console.log('─'.repeat(45)); - console.log('解决性指标识别:'); - console.log(' • 是否提供解决方案: 包含代码、链接、具体步骤'); - console.log(' • 是否引发后续行动: 评论后是否有commit、PR更新'); - console.log(' • 是否获得感谢: 后续评论中的感谢表达'); - console.log(''); - console.log('解决性评分算法:'); - console.log('```typescript'); - console.log('function calculateCommentSolvingPower('); - console.log(' comment: CommentData, '); - console.log(' subsequentActivities: ActivityData[]'); - console.log('): number {'); - console.log(' let score = 0;'); - console.log(' '); - console.log(' // 1. 内容特征分析 (0-0.4)'); - console.log(' const hasCodeSolution = /```[\\s\\S]*?```/.test(comment.body);'); - console.log(' const hasLinks = /https?:\\/\\//.test(comment.body);'); - console.log(' const hasSteps = /(step|步骤|first|then|finally)/i.test(comment.body);'); - console.log(' '); - console.log(' score += hasCodeSolution ? 0.2 : 0;'); - console.log(' score += hasLinks ? 0.1 : 0;'); - console.log(' score += hasSteps ? 0.1 : 0;'); - console.log(' '); - console.log(' // 2. 后续行动分析 (0-0.4)'); - console.log(' const subsequentCommits = subsequentActivities'); - console.log(' .filter(a => a.type === "commit" && '); - console.log(' a.timestamp > comment.createdAt &&'); - console.log(' a.timestamp < addHours(comment.createdAt, 48));'); - console.log(' '); - console.log(' score += Math.min(0.4, subsequentCommits.length * 0.1);'); - console.log(' '); - console.log(' // 3. 社区反馈分析 (0-0.2)'); - console.log(' const thankfulReplies = findThankfulReplies(comment);'); - console.log(' score += Math.min(0.2, thankfulReplies.length * 0.1);'); - console.log(' '); - console.log(' return Math.min(1.0, score);'); - console.log('}'); - console.log('```'); - - console.log('\n3.3 建设性计算 (Constructiveness)'); - console.log('─'.repeat(45)); - console.log('建设性特征识别:'); - console.log(' • 语言积极性: 使用积极词汇vs消极词汇'); - console.log(' • 推进性: 是否推动讨论向前发展'); - console.log(' • 合作性: 是否表现出合作而非对抗态度'); - console.log(''); - console.log('建设性评分:'); - console.log('```typescript'); - console.log('function calculateCommentConstructiveness(comment: CommentData): number {'); - console.log(' const text = comment.body.toLowerCase();'); - console.log(' '); - console.log(' // 积极词汇检测'); - console.log(' const positiveWords = ['); - console.log(' "good", "great", "excellent", "helpful", "thanks", "appreciate",'); - console.log(' "suggest", "improve", "consider", "maybe", "could", "might"'); - console.log(' ];'); - console.log(' '); - console.log(' // 消极词汇检测'); - console.log(' const negativeWords = ['); - console.log(' "bad", "terrible", "stupid", "wrong", "never", "always",'); - console.log(' "hate", "awful", "useless", "pointless"'); - console.log(' ];'); - console.log(' '); - console.log(' const positiveCount = positiveWords.filter(word => text.includes(word)).length;'); - console.log(' const negativeCount = negativeWords.filter(word => text.includes(word)).length;'); - console.log(' '); - console.log(' // 问句检测 (表示讨论而非结论)'); - console.log(' const questionMarks = (text.match(/\\?/g) || []).length;'); - console.log(' '); - console.log(' // 建设性评分'); - console.log(' let score = (positiveCount * 0.1) - (negativeCount * 0.15) + (questionMarks * 0.05);'); - console.log(' '); - console.log(' return Math.max(-1, Math.min(1, score));'); - console.log('}'); - console.log('```'); -} - -/** - * 4. Open/Close活动质量指标详细实现 - */ -function explainOpenCloseQualityMetrics() { - console.log('\n\n🎯 Open/Close活动质量指标详细实现\n'); - - console.log('4.1 完成度计算 (Completion Rate)'); - console.log('─'.repeat(40)); - console.log('Issue完成度指标:'); - console.log(' • 是否有明确描述: 包含复现步骤、期望结果等'); - console.log(' • 是否最终解决: close时是否标记为resolved'); - console.log(' • 解决时长: 从open到close的合理时间'); - console.log(''); - console.log('PR完成度指标:'); - console.log(' • 是否成功合并: merged vs closed'); - console.log(' • Review通过情况: APPROVED reviews数量'); - console.log(' • 测试通过情况: CI/CD状态检查'); - console.log(''); - console.log('完成度计算:'); - console.log('```typescript'); - console.log('function calculateCompletionRate(item: IssueData | PullRequestData): number {'); - console.log(' if (item.type === "issue") {'); - console.log(' const issue = item as IssueData;'); - console.log(' '); - console.log(' // Issue完成度'); - console.log(' let score = 0;'); - console.log(' '); - console.log(' // 1. 描述质量 (0-0.3)'); - console.log(' const hasSteps = /step|reproduce|expected|actual/i.test(issue.body);'); - console.log(' const hasLabels = issue.labels.length > 0;'); - console.log(' score += hasSteps ? 0.2 : 0;'); - console.log(' score += hasLabels ? 0.1 : 0;'); - console.log(' '); - console.log(' // 2. 解决状态 (0-0.5)'); - console.log(' if (issue.state === "closed") {'); - console.log(' const resolvedLabels = issue.labels.filter(l => '); - console.log(' /resolved|fixed|completed/i.test(l.name));'); - console.log(' score += resolvedLabels.length > 0 ? 0.5 : 0.2;'); - console.log(' }'); - console.log(' '); - console.log(' // 3. 时间合理性 (0-0.2)'); - console.log(' if (issue.state === "closed") {'); - console.log(' const daysToClose = daysBetween(issue.createdAt, issue.closedAt);'); - console.log(' if (daysToClose >= 1 && daysToClose <= 30) score += 0.2;'); - console.log(' else if (daysToClose <= 90) score += 0.1;'); - console.log(' }'); - console.log(' '); - console.log(' return Math.min(1.0, score);'); - console.log(' } else {'); - console.log(' // PR完成度类似逻辑...'); - console.log(' }'); - console.log('}'); - console.log('```'); - - console.log('\n4.2 关联度计算 (Project Relevance)'); - console.log('─'.repeat(45)); - console.log('关联度判断依据:'); - console.log(' • 标签匹配: 是否使用项目标准标签'); - console.log(' • 里程碑关联: 是否关联到项目里程碑'); - console.log(' • 核心文件修改: 是否涉及项目核心文件'); - console.log(' • 依赖关系: 是否影响项目依赖'); - console.log(''); - console.log('关联度计算:'); - console.log('```typescript'); - console.log('function calculateProjectRelevance('); - console.log(' item: IssueData | PullRequestData,'); - console.log(' projectConfig: ProjectConfig'); - console.log('): number {'); - console.log(' let score = 0;'); - console.log(' '); - console.log(' // 1. 标签关联度 (0-0.3)'); - console.log(' const projectLabels = projectConfig.standardLabels;'); - console.log(' const matchingLabels = item.labels.filter(label => '); - console.log(' projectLabels.includes(label.name));'); - console.log(' score += Math.min(0.3, matchingLabels.length * 0.1);'); - console.log(' '); - console.log(' // 2. 里程碑关联 (0-0.2)'); - console.log(' if (item.milestone) {'); - console.log(' score += 0.2;'); - console.log(' }'); - console.log(' '); - console.log(' // 3. 文件重要性 (0-0.3) - 仅对PR'); - console.log(' if (item.type === "pullRequest") {'); - console.log(' const pr = item as PullRequestData;'); - console.log(' const coreFiles = projectConfig.coreFiles; // ["src/main.*", "package.json"]'); - console.log(' const touchesCoreFiles = pr.changedFiles.some(file =>'); - console.log(' coreFiles.some(pattern => file.match(pattern)));'); - console.log(' score += touchesCoreFiles ? 0.3 : 0;'); - console.log(' }'); - console.log(' '); - console.log(' // 4. 依赖影响 (0-0.2)'); - console.log(' const affectsDependencies = item.title.toLowerCase()'); - console.log(' .includes("dependency") || item.body.toLowerCase()'); - console.log(' .includes("package.json");'); - console.log(' score += affectsDependencies ? 0.2 : 0;'); - console.log(' '); - console.log(' return Math.min(1.0, score);'); - console.log('}'); - console.log('```'); - - console.log('\n4.3 影响面计算 (Impact Scope)'); - console.log('─'.repeat(40)); - console.log('影响面评估维度:'); - console.log(' • 代码变更量: 修改的行数和文件数'); - console.log(' • 功能影响: 新功能、修复、重构的不同权重'); - console.log(' • 用户影响: 是否影响用户可见功能'); - console.log(' • 架构影响: 是否影响系统架构'); - console.log(''); - console.log('影响面计算:'); - console.log('```typescript'); - console.log('function calculateImpactScope(item: IssueData | PullRequestData): number {'); - console.log(' if (item.type === "pullRequest") {'); - console.log(' const pr = item as PullRequestData;'); - console.log(' let score = 0;'); - console.log(' '); - console.log(' // 1. 代码量影响 (0-0.4)'); - console.log(' const totalChanges = pr.additions + pr.deletions;'); - console.log(' const changeScore = Math.min(0.4, Math.log10(totalChanges + 1) * 0.1);'); - console.log(' score += changeScore;'); - console.log(' '); - console.log(' // 2. 文件数量影响 (0-0.2)'); - console.log(' const fileScore = Math.min(0.2, pr.changedFiles.length * 0.02);'); - console.log(' score += fileScore;'); - console.log(' '); - console.log(' // 3. 功能类型影响 (0-0.2)'); - console.log(' const title = pr.title.toLowerCase();'); - console.log(' if (title.includes("feat") || title.includes("feature")) score += 0.2;'); - console.log(' else if (title.includes("fix") || title.includes("bug")) score += 0.15;'); - console.log(' else if (title.includes("refactor")) score += 0.1;'); - console.log(' '); - console.log(' // 4. 架构影响 (0-0.2)'); - console.log(' const architecturalFiles = ["config", "types", "interfaces", "schema"];'); - console.log(' const touchesArchitecture = pr.changedFiles.some(file =>'); - console.log(' architecturalFiles.some(keyword => file.includes(keyword)));'); - console.log(' score += touchesArchitecture ? 0.2 : 0;'); - console.log(' '); - console.log(' return Math.min(1.0, score);'); - console.log(' }'); - console.log(' return 0.5; // Issue默认中等影响'); - console.log('}'); - console.log('```'); -} - -/** - * 5. 质量评分聚合和权重调整 - */ -function explainQualityAggregation() { - console.log('\n\n⚖️ 质量评分聚合和权重调整\n'); - - console.log('5.1 活动质量评分聚合'); - console.log('─'.repeat(30)); - console.log('针对不同活动类型的质量评分公式:'); - console.log('```typescript'); - console.log('function calculateActivityQualityScore(activity: ActivityData): number {'); - console.log(' switch (activity.type) {'); - console.log(' case "review":'); - console.log(' return 0.4 * acceptanceRate + '); - console.log(' 0.3 * responseSpeed + '); - console.log(' 0.3 * reviewDepth;'); - console.log(' '); - console.log(' case "comment":'); - console.log(' return 0.5 * usefulness + '); - console.log(' 0.3 * solvingPower + '); - console.log(' 0.2 * constructiveness;'); - console.log(' '); - console.log(' case "open":'); - console.log(' case "close":'); - console.log(' return 0.6 * completionRate + '); - console.log(' 0.2 * projectRelevance + '); - console.log(' 0.2 * impactScope;'); - console.log(' '); - console.log(' default:'); - console.log(' return 0; // 未知活动类型'); - console.log(' }'); - console.log('}'); - console.log('```'); - - console.log('\n5.2 质量权重调整'); - console.log('─'.repeat(25)); - console.log('应用质量评分到权重计算:'); - console.log('```typescript'); - console.log('function applyQualityWeight('); - console.log(' baseWeight: number,'); - console.log(' qualityScore: number,'); - console.log(' amplificationFactor: number = 0.3'); - console.log('): number {'); - console.log(' // qualityScore范围: [-1, 1]'); - console.log(' // amplificationFactor范围: [0.2, 0.5]'); - console.log(' '); - console.log(' const adjustment = amplificationFactor * qualityScore;'); - console.log(' const adjustedWeight = baseWeight * (1 + adjustment);'); - console.log(' '); - console.log(' // 防止权重为负数'); - console.log(' return Math.max(0.1 * baseWeight, adjustedWeight);'); - console.log('}'); - console.log('```'); - - console.log('\n5.3 实际应用示例'); - console.log('─'.repeat(25)); - console.log('示例场景: 代码Review活动'); - console.log(' 基础权重: review = 1.0'); - console.log(' 质量指标计算:'); - console.log(' - 通过率: 0.8 (80%的建议被采纳)'); - console.log(' - 响应速度: 0.9 (4小时内响应)'); - console.log(' - 详细程度: 0.7 (详细的代码建议)'); - console.log(' 质量评分: 0.4×0.8 + 0.3×0.9 + 0.3×0.7 = 0.8'); - console.log(' 放大系数: α = 0.3'); - console.log(' 最终权重: 1.0 × (1 + 0.3×0.8) = 1.24'); - console.log(''); - console.log('对比低质量Review:'); - console.log(' 质量指标: 通过率0.2, 响应速度0.3, 详细程度0.1'); - console.log(' 质量评分: 0.4×0.2 + 0.3×0.3 + 0.3×0.1 = 0.2'); - console.log(' 最终权重: 1.0 × (1 + 0.3×0.2) = 1.06'); - console.log(''); - console.log('权重差异: 高质量review权重比低质量高17%'); -} - -/** - * 6. 实施考虑和优化策略 - */ -function explainImplementationConsiderations() { - console.log('\n\n🔧 实施考虑和优化策略\n'); - - console.log('6.1 数据收集优化'); - console.log('─'.repeat(25)); - console.log('API调用优化:'); - console.log(' • 批量请求: 使用GraphQL批量获取相关数据'); - console.log(' • 增量更新: 只获取新增/变更的数据'); - console.log(' • 缓存策略: 缓存不变的历史数据'); - console.log(' • 限流处理: 遵守GitHub API限流策略'); - console.log(''); - console.log('数据质量保证:'); - console.log(' • 数据验证: 检查数据完整性和合理性'); - console.log(' • 异常处理: 处理API返回的异常数据'); - console.log(' • 补偿机制: 缺失数据的合理默认值'); - console.log(''); - - console.log('6.2 计算性能优化'); - console.log('─'.repeat(25)); - console.log('算法优化:'); - console.log(' • 并行计算: 不同质量指标可并行计算'); - console.log(' • 预计算: 预计算常用的质量评分'); - console.log(' • 增量计算: 只重算变更的活动'); - console.log(' • 近似算法: 对精度要求不高的指标使用近似算法'); - console.log(''); - console.log('存储优化:'); - console.log(' • 质量缓存: 缓存计算结果,避免重复计算'); - console.log(' • 数据压缩: 压缩存储历史质量数据'); - console.log(' • 分层存储: 热数据内存,冷数据磁盘'); - - console.log('\n6.3 参数调优'); - console.log('─'.repeat(20)); - console.log('A/B测试框架:'); - console.log(' • 质量权重系数: 测试不同的放大系数α'); - console.log(' • 指标权重分配: 测试不同质量指标的权重组合'); - console.log(' • 阈值调整: 优化各种评分的阈值设置'); - console.log(''); - console.log('持续优化:'); - console.log(' • 效果监控: 监控质量权重对OpenRank结果的影响'); - console.log(' • 用户反馈: 收集开发者对质量评估的反馈'); - console.log(' • 模型迭代: 基于反馈持续改进质量模型'); -} - -// 主函数执行 -function main() { - explainDataSources(); - explainReviewQualityMetrics(); - explainCommentQualityMetrics(); - explainOpenCloseQualityMetrics(); - explainQualityAggregation(); - explainImplementationConsiderations(); - - console.log('\n' + '═'.repeat(60)); - console.log('🎯 质量感知权重实现总结:'); - console.log(''); - console.log('数据来源: GitHub API + Git历史 + 项目配置'); - console.log('质量指标: 12个细分指标,覆盖所有活动类型'); - console.log('计算方法: 多维度评分聚合 + 权重动态调整'); - console.log('技术实现: 增量计算 + 缓存优化 + A/B测试'); - console.log(''); - console.log('核心优势: 基于客观数据的质量评估,'); - console.log(' 让高质量贡献获得应有的认可!'); - console.log('═'.repeat(60)); -} - -main(); diff --git a/src/temp/weight_optimization_analysis.js b/src/temp/weight_optimization_analysis.js deleted file mode 100644 index 1a53894..0000000 --- a/src/temp/weight_optimization_analysis.js +++ /dev/null @@ -1,457 +0,0 @@ -/** - * OpenRank权重优化策略论证与分析 - * - * 本文档对比分析AHP层次分析法与动态权重优化方案, - * 论证时间衰减、质量感知、个人历史权重的可行性和优势 - */ - -console.log('=== OpenRank权重优化策略深度论证 ===\n'); - -/** - * 1. 当前AHP权重方案分析 - */ -function analyzeCurrentAHPWeights() { - console.log('📊 当前AHP层次分析法权重方案分析:\n'); - - const currentWeights = { - open: 2.0, // 发起Issue/PR - comment: 1.0, // 评论 - review: 1.0, // 代码审查 - close: 2.0 // 关闭Issue/PR - }; - - console.log('当前权重配置:'); - for (const [activity, weight] of Object.entries(currentWeights)) { - console.log(` ${activity}: ${weight}`); - } - - console.log('\n🔍 AHP方法的优势:'); - console.log(' ✓ 科学性: 基于层次结构的系统性分析'); - console.log(' ✓ 一致性: 提供一致性检验机制'); - console.log(' ✓ 专家驱动: 依赖领域专家的判断'); - console.log(' ✓ 理论基础: 有坚实的数学理论支撑'); - - console.log('\n❌ AHP方法的局限性:'); - console.log(' × 静态性: 权重一旦确定就固定不变'); - console.log(' × 主观性: 过度依赖专家主观判断'); - console.log(' × 时效性: 无法反映时间维度的影响'); - console.log(' × 个体性: 忽略个体差异和历史表现'); - console.log(' × 质量盲: 无法区分活动的质量差异'); - - return currentWeights; -} - -/** - * 2. 动态权重优化方案详细设计 - */ -function presentDynamicWeightOptimization() { - console.log('\n🚀 动态权重优化方案详细设计:\n'); - - console.log('2.1 时间衰减权重 (Temporal Decay Weighting)'); - console.log('─'.repeat(50)); - console.log('核心思想: 近期活动比历史活动更重要'); - console.log('数学模型: W_temporal(t) = W_base × e^(-λ × Δt)'); - console.log('参数说明:'); - console.log(' • W_base: 基础权重'); - console.log(' • λ: 衰减系数 (0.1-0.3)'); - console.log(' • Δt: 时间差 (天数)'); - console.log(''); - console.log('实现策略:'); - console.log(' 1. 对每个活动记录时间戳'); - console.log(' 2. 计算活动到当前时间的天数差'); - console.log(' 3. 应用指数衰减函数调整权重'); - console.log(' 4. 支持不同衰减系数的A/B测试'); - - console.log('\n2.2 质量感知权重 (Quality-Aware Weighting)'); - console.log('─'.repeat(50)); - console.log('核心思想: 高质量活动应获得更高权重'); - console.log('数学模型: W_quality = W_base × (1 + α × Q_score)'); - console.log('参数说明:'); - console.log(' • α: 质量放大系数 (0.2-0.5)'); - console.log(' • Q_score: 质量评分 (-1 ~ +1)'); - console.log(''); - console.log('质量指标体系:'); - console.log(' Review活动:'); - console.log(' - 通过率: 被接受的review建议比例'); - console.log(' - 响应时间: review响应速度'); - console.log(' - 详细程度: review内容的详细程度'); - console.log(' Comment活动:'); - console.log(' - 有用性: 获得👍表情的比例'); - console.log(' - 解决性: 是否帮助解决问题'); - console.log(' - 建设性: 是否推进讨论进展'); - console.log(' Open/Close活动:'); - console.log(' - 完成度: Issue/PR的最终状态'); - console.log(' - 关联度: 与项目目标的相关性'); - console.log(' - 影响面: 涉及的代码范围和重要性'); - - console.log('\n2.3 个人历史权重 (Personal History Weighting)'); - console.log('─'.repeat(50)); - console.log('核心思想: 基于开发者历史表现调整个人权重系数'); - console.log('数学模型: W_personal = W_base × (1 + β × H_score)'); - console.log('参数说明:'); - console.log(' • β: 历史影响系数 (0.1-0.3)'); - console.log(' • H_score: 历史表现评分 (0 ~ 1)'); - console.log(''); - console.log('历史表现指标:'); - console.log(' • 贡献稳定性: 持续贡献的时间长度'); - console.log(' • 质量一致性: 历史贡献的质量稳定性'); - console.log(' • 影响力累积: 过往贡献的长期影响'); - console.log(' • 协作能力: 与其他开发者的协作效果'); - console.log(' • 学习能力: 技能提升和适应能力'); -} - -/** - * 3. 可行性分析 - */ -function analyzeFeasibility() { - console.log('\n\n📋 可行性分析:\n'); - - console.log('3.1 技术可行性'); - console.log('─'.repeat(30)); - console.log('✅ 数据获取:'); - console.log(' • 时间戳: Git commit/PR/Issue数据自带'); - console.log(' • 质量指标: 可从PR review状态、表情反应获取'); - console.log(' • 历史数据: Git历史记录完整可追溯'); - console.log(''); - console.log('✅ 计算复杂度:'); - console.log(' • 时间复杂度: O(n) - 线性扫描活动记录'); - console.log(' • 空间复杂度: O(k) - k为开发者数量的历史缓存'); - console.log(' • 增量计算: 支持增量更新,避免全量重算'); - - console.log('\n3.2 实现可行性'); - console.log('─'.repeat(30)); - console.log('✅ 现有基础:'); - console.log(' • 已有完整的项目级OpenRank框架'); - console.log(' • 支持配置化的权重参数'); - console.log(' • 具备活动数据收集和处理能力'); - console.log(''); - console.log('✅ 改动范围:'); - console.log(' • 权重计算模块: 扩展现有权重计算逻辑'); - console.log(' • 质量评估模块: 新增质量指标计算'); - console.log(' • 历史追踪模块: 新增个人历史数据管理'); - console.log(' • 配置管理: 扩展配置参数支持'); - - console.log('\n3.3 数据可行性'); - console.log('─'.repeat(30)); - console.log('✅ 数据源充足:'); - console.log(' • GitHub API: 提供完整的活动和质量数据'); - console.log(' • Git历史: 包含时间序列和变更信息'); - console.log(' • 社区反馈: 表情、评论等质量指标'); - console.log(''); - console.log('⚠️ 数据挑战:'); - console.log(' • 冷启动: 新项目缺乏历史数据'); - console.log(' • 数据噪声: 需要过滤异常和垃圾数据'); - console.log(' • 隐私保护: 个人历史数据的隐私考虑'); -} - -/** - * 4. 效率分析 - */ -function analyzeEfficiency() { - console.log('\n\n⚡ 时间空间效率分析:\n'); - - console.log('4.1 时间效率'); - console.log('─'.repeat(20)); - console.log('当前AHP方案: O(n) - n为活动数量'); - console.log('优化后方案: O(n + k×m) - k为开发者数,m为历史窗口'); - console.log(''); - console.log('性能优化策略:'); - console.log(' 1. 增量计算: 只计算新增/变更的活动'); - console.log(' 2. 缓存机制: 缓存个人历史评分,避免重复计算'); - console.log(' 3. 并行计算: 质量评估和历史分析可并行'); - console.log(' 4. 懒加载: 按需计算历史权重'); - console.log(''); - console.log('预期性能:'); - console.log(' • 增量更新: <100ms (新增活动)'); - console.log(' • 全量计算: <10s (中等规模项目)'); - console.log(' • 内存占用: +20% (相比当前方案)'); - - console.log('\n4.2 空间效率'); - console.log('─'.repeat(20)); - console.log('额外存储需求:'); - console.log(' • 个人历史缓存: 每个开发者 ~1KB'); - console.log(' • 质量指标缓存: 每个活动 ~100B'); - console.log(' • 时间衰减参数: 全局配置 <1KB'); - console.log(''); - console.log('存储优化:'); - console.log(' • 滑动窗口: 只保留N天内的详细历史'); - console.log(' • 压缩存储: 历史数据采用压缩格式'); - console.log(' • 定期清理: 清理过期的临时计算数据'); - - console.log('\n4.3 可扩展性'); - console.log('─'.repeat(20)); - console.log('✅ 水平扩展:'); - console.log(' • 分布式计算: 支持按项目/开发者分片'); - console.log(' • 异步处理: 质量分析可异步进行'); - console.log(' • 弹性伸缩: 根据负载动态调整资源'); - console.log(''); - console.log('✅ 功能扩展:'); - console.log(' • 新质量指标: 模块化设计便于添加新指标'); - console.log(' • 自定义权重: 支持项目级别的权重定制'); - console.log(' • 机器学习: 为未来ML优化预留接口'); -} - -/** - * 5. 对比AHP的优势论证 - */ -function demonstrateAdvantages() { - console.log('\n\n🎯 相比AHP层次分析法的优势论证:\n'); - - console.log('5.1 适应性优势'); - console.log('─'.repeat(25)); - console.log('AHP方案: 静态权重,无法适应项目演化'); - console.log('优化方案: 动态权重,随时间和质量自适应'); - console.log(''); - console.log('案例分析:'); - console.log(' • 项目初期: review权重较低 (缺乏review文化)'); - console.log(' • 项目成熟期: review权重提升 (建立review规范)'); - console.log(' • 维护期: close权重提升 (重点修复bug)'); - - console.log('\n5.2 精确性优势'); - console.log('─'.repeat(25)); - console.log('AHP方案: 粗粒度权重,忽略活动质量差异'); - console.log('优化方案: 细粒度权重,考虑活动质量和个体差异'); - console.log(''); - console.log('精确性提升:'); - console.log(' • 质量区分: 高质量review vs 低质量review'); - console.log(' • 时效性: 最近活动 vs 历史活动'); - console.log(' • 个性化: 资深开发者 vs 新手开发者'); - - console.log('\n5.3 公平性优势'); - console.log('─'.repeat(25)); - console.log('AHP方案: 一刀切权重,可能对某些开发者不公平'); - console.log('优化方案: 个性化权重,更好反映真实贡献'); - console.log(''); - console.log('公平性改进:'); - console.log(' • 经验差异: 资深开发者的review权重更高'); - console.log(' • 角色差异: 维护者的close权重更高'); - console.log(' • 项目差异: 不同项目的权重自适应'); - - console.log('\n5.4 可解释性优势'); - console.log('─'.repeat(30)); - console.log('AHP方案: 权重来源于专家判断,难以向开发者解释'); - console.log('优化方案: 权重基于客观数据,具有明确的计算逻辑'); - console.log(''); - console.log('解释性提升:'); - console.log(' • 数据驱动: 权重调整有明确的数据依据'); - console.log(' • 可追溯: 每个权重变化都有清晰的计算过程'); - console.log(' • 可验证: 开发者可以理解和验证权重合理性'); -} - -/** - * 6. 验证和评估方案 - */ -function proposeValidationMethods() { - console.log('\n\n🧪 验证和评估方案:\n'); - - console.log('6.1 对比实验设计'); - console.log('─'.repeat(25)); - console.log('实验组: 使用优化权重方案'); - console.log('对照组: 使用当前AHP权重'); - console.log(''); - console.log('实验数据集:'); - console.log(' • 历史项目: 10个不同规模的开源项目'); - console.log(' • 时间跨度: 12个月的完整开发周期'); - console.log(' • 活动类型: 覆盖所有类型的开发活动'); - console.log(''); - console.log('控制变量:'); - console.log(' • 网络结构: 使用相同的四节点异构图'); - console.log(' • 算法参数: 保持其他参数一致'); - console.log(' • 数据预处理: 使用相同的数据清洗规则'); - - console.log('\n6.2 评估指标体系'); - console.log('─'.repeat(25)); - console.log('定量指标:'); - console.log(' 1. 预测准确性'); - console.log(' • 开发者活跃度预测准确率'); - console.log(' • 项目健康度预测准确率'); - console.log(' • 代码质量趋势预测准确率'); - console.log(''); - console.log(' 2. 排序稳定性'); - console.log(' • Kendall τ相关系数'); - console.log(' • Spearman等级相关系数'); - console.log(' • 排序变化幅度分析'); - console.log(''); - console.log(' 3. 收敛性能'); - console.log(' • 迭代收敛速度'); - console.log(' • 数值稳定性'); - console.log(' • 计算资源消耗'); - - console.log('\n定性指标:'); - console.log(' 1. 开发者认同度'); - console.log(' • 问卷调研: 开发者对权重合理性的认知'); - console.log(' • 案例分析: 典型案例的权重解释性'); - console.log(' • 专家评审: 领域专家的专业评价'); - console.log(''); - console.log(' 2. 实用价值'); - console.log(' • 决策支持: 项目管理决策的支持效果'); - console.log(' • 激励效果: 对开发者行为的正向引导'); - console.log(' • 社区建设: 促进健康社区发展的效果'); - - console.log('\n6.3 A/B测试方案'); - console.log('─'.repeat(25)); - console.log('测试策略:'); - console.log(' • 灰度发布: 先在小范围项目试点'); - console.log(' • 分组对比: 随机选择项目进行A/B测试'); - console.log(' • 逐步推广: 根据效果逐步扩大范围'); - console.log(''); - console.log('测试指标:'); - console.log(' • 用户满意度: 开发者对新权重的接受程度'); - console.log(' • 系统性能: 计算效率和资源消耗'); - console.log(' • 业务效果: 项目活跃度和代码质量改善'); - - console.log('\n6.4 长期验证计划'); - console.log('─'.repeat(30)); - console.log('阶段1 (1-3个月): 基础功能验证'); - console.log(' • 算法正确性验证'); - console.log(' • 性能基准测试'); - console.log(' • 小规模项目试点'); - console.log(''); - console.log('阶段2 (3-6个月): 效果对比验证'); - console.log(' • 与AHP权重方案对比'); - console.log(' • 开发者反馈收集'); - console.log(' • 参数调优和改进'); - console.log(''); - console.log('阶段3 (6-12个月): 规模化验证'); - console.log(' • 大规模项目部署'); - console.log(' • 长期效果观察'); - console.log(' • 持续优化迭代'); -} - -/** - * 7. 风险评估和缓解策略 - */ -function assessRisks() { - console.log('\n\n⚠️ 风险评估和缓解策略:\n'); - - console.log('7.1 技术风险'); - console.log('─'.repeat(20)); - console.log('风险: 计算复杂度增加导致性能瓶颈'); - console.log('概率: 中等'); - console.log('影响: 中等'); - console.log('缓解策略:'); - console.log(' • 增量计算优化'); - console.log(' • 并行计算架构'); - console.log(' • 性能监控和预警'); - console.log(' • 降级方案预案'); - console.log(''); - - console.log('风险: 新增质量指标的准确性不足'); - console.log('概率: 中等'); - console.log('影响: 高'); - console.log('缓解策略:'); - console.log(' • 多指标交叉验证'); - console.log(' • 专家评审机制'); - console.log(' • 逐步调整和优化'); - console.log(' • 回滚机制保障'); - - console.log('\n7.2 业务风险'); - console.log('─'.repeat(20)); - console.log('风险: 开发者不接受新的权重方案'); - console.log('概率: 中等'); - console.log('影响: 高'); - console.log('缓解策略:'); - console.log(' • 充分的沟通和解释'); - console.log(' • 渐进式的变化过渡'); - console.log(' • 反馈收集和快速响应'); - console.log(' • 定制化配置选项'); - console.log(''); - - console.log('风险: 权重游戏化导致行为扭曲'); - console.log('概率: 低'); - console.log('影响: 高'); - console.log('缓解策略:'); - console.log(' • 反游戏化机制设计'); - console.log(' • 异常行为检测'); - console.log(' • 定期权重参数审查'); - console.log(' • 社区监督机制'); - - console.log('\n7.3 实施风险'); - console.log('─'.repeat(20)); - console.log('风险: 项目复杂度增加导致维护困难'); - console.log('概率: 中等'); - console.log('影响: 中等'); - console.log('缓解策略:'); - console.log(' • 模块化设计架构'); - console.log(' • 完善的文档和测试'); - console.log(' • 代码审查和质量控制'); - console.log(' • 团队技能培训'); -} - -/** - * 8. 实施路线图 - */ -function proposeRoadmap() { - console.log('\n\n🗺️ 实施路线图:\n'); - - console.log('Phase 1: 基础架构搭建 (Week 1-2)'); - console.log('─'.repeat(40)); - console.log('目标: 建立动态权重计算框架'); - console.log('deliverables:'); - console.log(' ✓ 权重计算接口设计'); - console.log(' ✓ 时间衰减权重实现'); - console.log(' ✓ 配置参数扩展'); - console.log(' ✓ 单元测试覆盖'); - - console.log('\nPhase 2: 质量感知实现 (Week 3-4)'); - console.log('─'.repeat(40)); - console.log('目标: 实现质量感知权重调整'); - console.log('deliverables:'); - console.log(' ✓ 质量指标计算模块'); - console.log(' ✓ Review通过率统计'); - console.log(' ✓ Comment有用性评估'); - console.log(' ✓ 质量权重集成'); - - console.log('\nPhase 3: 个人历史权重 (Week 5-6)'); - console.log('─'.repeat(40)); - console.log('目标: 实现个人历史表现权重'); - console.log('deliverables:'); - console.log(' ✓ 历史数据收集模块'); - console.log(' ✓ 个人评分算法'); - console.log(' ✓ 权重缓存机制'); - console.log(' ✓ 性能优化'); - - console.log('\nPhase 4: 验证和优化 (Week 7-8)'); - console.log('─'.repeat(40)); - console.log('目标: 全面测试和参数调优'); - console.log('deliverables:'); - console.log(' ✓ 对比实验执行'); - console.log(' ✓ A/B测试框架'); - console.log(' ✓ 参数调优'); - console.log(' ✓ 性能基准测试'); - - console.log('\nPhase 5: 部署和监控 (Week 9-10)'); - console.log('─'.repeat(40)); - console.log('目标: 生产环境部署和持续监控'); - console.log('deliverables:'); - console.log(' ✓ 生产部署方案'); - console.log(' ✓ 监控指标设置'); - console.log(' ✓ 告警机制建立'); - console.log(' ✓ 运维文档完善'); -} - -// 主函数执行 -function main() { - analyzeCurrentAHPWeights(); - presentDynamicWeightOptimization(); - analyzeFeasibility(); - analyzeEfficiency(); - demonstrateAdvantages(); - proposeValidationMethods(); - assessRisks(); - proposeRoadmap(); - - console.log('\n🎯 论证结论:'); - console.log('═'.repeat(60)); - console.log('基于以上全面分析,动态权重优化方案在以下方面显著优于AHP方案:'); - console.log('1. 适应性: 能够随项目发展和环境变化自动调整'); - console.log('2. 精确性: 考虑活动质量和个体差异,提供更精确的评估'); - console.log('3. 公平性: 个性化权重更好地反映真实贡献价值'); - console.log('4. 可解释性: 基于客观数据的权重计算更具说服力'); - console.log('5. 可扩展性: 模块化设计支持未来功能扩展'); - console.log(''); - console.log('实施建议: 采用渐进式部署策略,通过充分的验证和'); - console.log('对比实验确保方案的有效性和稳定性。'); -} - -main(); diff --git a/src/test/basic.test.ts b/src/test/basic.test.ts index 81e2e57..24adec5 100644 --- a/src/test/basic.test.ts +++ b/src/test/basic.test.ts @@ -12,7 +12,7 @@ describe('OpenRank Core Tests', () => { expect(config.global.tolerance).toBe(0.01); expect(config.global.maxIterations).toBe(100); - expect(config.activityWeights.issueComment).toBe(0.5252); + expect(config.activityWeights.issueComment).toBe(0.31512); }); }); diff --git a/src/test/channel_balancing.test.ts b/src/test/channel_balancing.test.ts new file mode 100644 index 0000000..96b7061 --- /dev/null +++ b/src/test/channel_balancing.test.ts @@ -0,0 +1,29 @@ +import { ProjectOpenRankCalculator } from '../src/algorithm/ProjectOpenRankCalculator'; + +describe('applyChannelBalancing', () => { + const calc = new ProjectOpenRankCalculator({ project: {}, projectActivityWeights: {}, global: { defaultInitValue: 1 }, } as any); + + test('happy path: balances concavity and preserves sum', () => { + const vec = { open: 10, comment: 5, review: 2, reviewComment: 1, close: 0.5, commit: 8 }; + const cb = { enabled: true, concaveExponent: 0.8, additiveSmoothing: 0.01, softMinShares: { open: 0.05, comment: 0.03 }, softMinStrength: 0.5, debug: false }; + const out = (calc as any).applyChannelBalancing(vec, cb, { debugEnabled: false, debugFlag: false }); + const inSum = Object.values(vec).reduce((s:any,v:any)=>s+v,0); + const outSum = Number(Object.values(out).reduce((s:any,v:any)=>s+v,0)); + expect(Math.abs(inSum - outSum)).toBeLessThan(1e-6); + // expect concavity to reduce the largest share (open 10) relatively + expect(out.open).toBeLessThan(vec.open); + // commit should remain > 0 + expect(out.commit).toBeGreaterThan(0); + }); + + test('edge case: zeros and softMin lifts small channels', () => { + const vec = { open: 0, comment: 0, review: 0, reviewComment: 0, close: 0, commit: 1 }; + const cb = { enabled: true, concaveExponent: 0.8, additiveSmoothing: 0, softMinShares: { open: 0.1, comment: 0.05 }, softMinStrength: 0.5, debug: false }; + const out = (calc as any).applyChannelBalancing(vec, cb, { debugEnabled: false, debugFlag: false }); + const outSum = Number(Object.values(out).reduce((s:any,v:any)=>s+v,0)); + expect(Math.abs(outSum - 1)).toBeLessThan(1e-6); + // open/comment should be > 0 due to softMin mixing + expect(out.open).toBeGreaterThan(0); + expect(out.comment).toBeGreaterThan(0); + }); +}); diff --git a/src/test_data/activity_data.json b/src/test_data/activity_data.json deleted file mode 100644 index ec874fa..0000000 --- a/src/test_data/activity_data.json +++ /dev/null @@ -1,1172 +0,0 @@ -[ - { - "platform": "GitHub", - "repoId": 1, - "repoName": "github/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 1, - "actorLogin": "mock-user-1", - "issueComment": 2, - "openIssue": 2, - "openPull": 2, - "reviewComment": 4, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 1, - "repoName": "github/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 2, - "actorLogin": "mock-user-2", - "issueComment": 6, - "openIssue": 3, - "openPull": 2, - "reviewComment": 4, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 1, - "repoName": "github/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 3, - "actorLogin": "mock-user-3", - "issueComment": 5, - "openIssue": 1, - "openPull": 1, - "reviewComment": 2, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 1, - "repoName": "github/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 4, - "actorLogin": "mock-user-4", - "issueComment": 9, - "openIssue": 2, - "openPull": 1, - "reviewComment": 3, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 1, - "repoName": "github/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 5, - "actorLogin": "mock-user-5", - "issueComment": 9, - "openIssue": 1, - "openPull": 1, - "reviewComment": 2, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 1, - "repoName": "github/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 6, - "actorLogin": "mock-user-6", - "issueComment": 10, - "openIssue": 3, - "openPull": 1, - "reviewComment": 4, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 1, - "repoName": "github/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 7, - "actorLogin": "mock-user-7", - "issueComment": 7, - "openIssue": 2, - "openPull": 1, - "reviewComment": 1, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 1, - "repoName": "github/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 9, - "actorLogin": "mock-user-9", - "issueComment": 7, - "openIssue": 3, - "openPull": 2, - "reviewComment": 5, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 2, - "repoName": "github/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 1, - "actorLogin": "mock-user-1", - "issueComment": 1, - "openIssue": 1, - "openPull": 1, - "reviewComment": 1, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 2, - "repoName": "github/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 2, - "actorLogin": "mock-user-2", - "issueComment": 4, - "openIssue": 2, - "openPull": 1, - "reviewComment": 4, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 2, - "repoName": "github/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 3, - "actorLogin": "mock-user-3", - "issueComment": 9, - "openIssue": 2, - "openPull": 1, - "reviewComment": 1, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 2, - "repoName": "github/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 4, - "actorLogin": "mock-user-4", - "issueComment": 9, - "openIssue": 1, - "openPull": 2, - "reviewComment": 5, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 2, - "repoName": "github/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 5, - "actorLogin": "mock-user-5", - "issueComment": 6, - "openIssue": 3, - "openPull": 1, - "reviewComment": 3, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 2, - "repoName": "github/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 6, - "actorLogin": "mock-user-6", - "issueComment": 2, - "openIssue": 1, - "openPull": 1, - "reviewComment": 2, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 2, - "repoName": "github/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 7, - "actorLogin": "mock-user-7", - "issueComment": 5, - "openIssue": 2, - "openPull": 2, - "reviewComment": 3, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 2, - "repoName": "github/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 8, - "actorLogin": "mock-user-8", - "issueComment": 9, - "openIssue": 1, - "openPull": 2, - "reviewComment": 4, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 2, - "repoName": "github/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 9, - "actorLogin": "mock-user-9", - "issueComment": 10, - "openIssue": 1, - "openPull": 1, - "reviewComment": 2, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 3, - "repoName": "github/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 1, - "actorLogin": "mock-user-1", - "issueComment": 9, - "openIssue": 3, - "openPull": 2, - "reviewComment": 4, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 3, - "repoName": "github/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 2, - "actorLogin": "mock-user-2", - "issueComment": 8, - "openIssue": 2, - "openPull": 2, - "reviewComment": 1, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 3, - "repoName": "github/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 3, - "actorLogin": "mock-user-3", - "issueComment": 5, - "openIssue": 3, - "openPull": 2, - "reviewComment": 1, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 3, - "repoName": "github/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 4, - "actorLogin": "mock-user-4", - "issueComment": 2, - "openIssue": 1, - "openPull": 2, - "reviewComment": 2, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 3, - "repoName": "github/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 5, - "actorLogin": "mock-user-5", - "issueComment": 6, - "openIssue": 3, - "openPull": 2, - "reviewComment": 1, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 3, - "repoName": "github/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 6, - "actorLogin": "mock-user-6", - "issueComment": 8, - "openIssue": 1, - "openPull": 2, - "reviewComment": 3, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 3, - "repoName": "github/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 7, - "actorLogin": "mock-user-7", - "issueComment": 10, - "openIssue": 1, - "openPull": 1, - "reviewComment": 1, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 3, - "repoName": "github/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 9, - "actorLogin": "mock-user-9", - "issueComment": 10, - "openIssue": 2, - "openPull": 1, - "reviewComment": 2, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 3, - "repoName": "github/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 10, - "actorLogin": "mock-user-10", - "issueComment": 1, - "openIssue": 3, - "openPull": 2, - "reviewComment": 5, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 4, - "repoName": "github/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 1, - "actorLogin": "mock-user-1", - "issueComment": 2, - "openIssue": 1, - "openPull": 1, - "reviewComment": 1, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 4, - "repoName": "github/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 2, - "actorLogin": "mock-user-2", - "issueComment": 7, - "openIssue": 2, - "openPull": 2, - "reviewComment": 4, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 4, - "repoName": "github/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 3, - "actorLogin": "mock-user-3", - "issueComment": 1, - "openIssue": 2, - "openPull": 1, - "reviewComment": 4, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 4, - "repoName": "github/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 4, - "actorLogin": "mock-user-4", - "issueComment": 5, - "openIssue": 1, - "openPull": 2, - "reviewComment": 5, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 4, - "repoName": "github/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 5, - "actorLogin": "mock-user-5", - "issueComment": 4, - "openIssue": 1, - "openPull": 1, - "reviewComment": 4, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 4, - "repoName": "github/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 7, - "actorLogin": "mock-user-7", - "issueComment": 8, - "openIssue": 1, - "openPull": 1, - "reviewComment": 5, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 4, - "repoName": "github/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 9, - "actorLogin": "mock-user-9", - "issueComment": 8, - "openIssue": 3, - "openPull": 2, - "reviewComment": 4, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 4, - "repoName": "github/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 10, - "actorLogin": "mock-user-10", - "issueComment": 3, - "openIssue": 1, - "openPull": 1, - "reviewComment": 5, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 5, - "repoName": "github/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 1, - "actorLogin": "mock-user-1", - "issueComment": 8, - "openIssue": 1, - "openPull": 2, - "reviewComment": 1, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 5, - "repoName": "github/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 2, - "actorLogin": "mock-user-2", - "issueComment": 8, - "openIssue": 3, - "openPull": 1, - "reviewComment": 3, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 5, - "repoName": "github/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 3, - "actorLogin": "mock-user-3", - "issueComment": 6, - "openIssue": 3, - "openPull": 1, - "reviewComment": 3, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 5, - "repoName": "github/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 4, - "actorLogin": "mock-user-4", - "issueComment": 8, - "openIssue": 3, - "openPull": 1, - "reviewComment": 1, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 5, - "repoName": "github/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 7, - "actorLogin": "mock-user-7", - "issueComment": 8, - "openIssue": 2, - "openPull": 2, - "reviewComment": 3, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "GitHub", - "repoId": 5, - "repoName": "github/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 10, - "actorLogin": "mock-user-10", - "issueComment": 1, - "openIssue": 3, - "openPull": 1, - "reviewComment": 3, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 1, - "repoName": "gitee/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 1, - "actorLogin": "mock-user-1", - "issueComment": 10, - "openIssue": 1, - "openPull": 1, - "reviewComment": 3, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 1, - "repoName": "gitee/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 2, - "actorLogin": "mock-user-2", - "issueComment": 9, - "openIssue": 1, - "openPull": 2, - "reviewComment": 4, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 1, - "repoName": "gitee/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 3, - "actorLogin": "mock-user-3", - "issueComment": 5, - "openIssue": 1, - "openPull": 1, - "reviewComment": 3, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 1, - "repoName": "gitee/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 4, - "actorLogin": "mock-user-4", - "issueComment": 8, - "openIssue": 3, - "openPull": 1, - "reviewComment": 5, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 1, - "repoName": "gitee/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 5, - "actorLogin": "mock-user-5", - "issueComment": 6, - "openIssue": 2, - "openPull": 2, - "reviewComment": 2, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 1, - "repoName": "gitee/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 6, - "actorLogin": "mock-user-6", - "issueComment": 2, - "openIssue": 2, - "openPull": 1, - "reviewComment": 3, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 1, - "repoName": "gitee/mock-org-1/mock-repo-1", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 9, - "actorLogin": "mock-user-9", - "issueComment": 7, - "openIssue": 1, - "openPull": 2, - "reviewComment": 5, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 2, - "repoName": "gitee/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 1, - "actorLogin": "mock-user-1", - "issueComment": 9, - "openIssue": 2, - "openPull": 1, - "reviewComment": 2, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 2, - "repoName": "gitee/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 2, - "actorLogin": "mock-user-2", - "issueComment": 10, - "openIssue": 2, - "openPull": 1, - "reviewComment": 2, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 2, - "repoName": "gitee/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 3, - "actorLogin": "mock-user-3", - "issueComment": 1, - "openIssue": 1, - "openPull": 2, - "reviewComment": 1, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 2, - "repoName": "gitee/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 4, - "actorLogin": "mock-user-4", - "issueComment": 1, - "openIssue": 2, - "openPull": 1, - "reviewComment": 4, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 2, - "repoName": "gitee/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 5, - "actorLogin": "mock-user-5", - "issueComment": 10, - "openIssue": 3, - "openPull": 1, - "reviewComment": 1, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 2, - "repoName": "gitee/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 6, - "actorLogin": "mock-user-6", - "issueComment": 2, - "openIssue": 1, - "openPull": 2, - "reviewComment": 4, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 2, - "repoName": "gitee/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 8, - "actorLogin": "mock-user-8", - "issueComment": 6, - "openIssue": 2, - "openPull": 2, - "reviewComment": 5, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 2, - "repoName": "gitee/mock-org-1/mock-repo-2", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 9, - "actorLogin": "mock-user-9", - "issueComment": 8, - "openIssue": 1, - "openPull": 2, - "reviewComment": 3, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 3, - "repoName": "gitee/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 1, - "actorLogin": "mock-user-1", - "issueComment": 4, - "openIssue": 1, - "openPull": 1, - "reviewComment": 4, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 3, - "repoName": "gitee/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 2, - "actorLogin": "mock-user-2", - "issueComment": 10, - "openIssue": 2, - "openPull": 1, - "reviewComment": 3, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 3, - "repoName": "gitee/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 3, - "actorLogin": "mock-user-3", - "issueComment": 8, - "openIssue": 1, - "openPull": 1, - "reviewComment": 1, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 3, - "repoName": "gitee/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 4, - "actorLogin": "mock-user-4", - "issueComment": 4, - "openIssue": 1, - "openPull": 2, - "reviewComment": 1, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 3, - "repoName": "gitee/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 7, - "actorLogin": "mock-user-7", - "issueComment": 10, - "openIssue": 3, - "openPull": 1, - "reviewComment": 4, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 3, - "repoName": "gitee/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 8, - "actorLogin": "mock-user-8", - "issueComment": 8, - "openIssue": 2, - "openPull": 2, - "reviewComment": 5, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 3, - "repoName": "gitee/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 9, - "actorLogin": "mock-user-9", - "issueComment": 5, - "openIssue": 2, - "openPull": 1, - "reviewComment": 2, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 3, - "repoName": "gitee/mock-org-1/mock-repo-3", - "orgId": 1, - "orgName": "mock-org-1", - "actorId": 10, - "actorLogin": "mock-user-10", - "issueComment": 5, - "openIssue": 3, - "openPull": 2, - "reviewComment": 2, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 4, - "repoName": "gitee/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 1, - "actorLogin": "mock-user-1", - "issueComment": 4, - "openIssue": 1, - "openPull": 1, - "reviewComment": 3, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 4, - "repoName": "gitee/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 2, - "actorLogin": "mock-user-2", - "issueComment": 8, - "openIssue": 3, - "openPull": 1, - "reviewComment": 5, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 4, - "repoName": "gitee/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 3, - "actorLogin": "mock-user-3", - "issueComment": 5, - "openIssue": 2, - "openPull": 2, - "reviewComment": 2, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 4, - "repoName": "gitee/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 5, - "actorLogin": "mock-user-5", - "issueComment": 10, - "openIssue": 3, - "openPull": 1, - "reviewComment": 4, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 4, - "repoName": "gitee/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 6, - "actorLogin": "mock-user-6", - "issueComment": 7, - "openIssue": 3, - "openPull": 1, - "reviewComment": 2, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 4, - "repoName": "gitee/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 7, - "actorLogin": "mock-user-7", - "issueComment": 2, - "openIssue": 3, - "openPull": 1, - "reviewComment": 2, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 4, - "repoName": "gitee/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 8, - "actorLogin": "mock-user-8", - "issueComment": 1, - "openIssue": 1, - "openPull": 2, - "reviewComment": 2, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 4, - "repoName": "gitee/mock-org-2/mock-repo-4", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 9, - "actorLogin": "mock-user-9", - "issueComment": 8, - "openIssue": 3, - "openPull": 2, - "reviewComment": 4, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 5, - "repoName": "gitee/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 1, - "actorLogin": "mock-user-1", - "issueComment": 3, - "openIssue": 1, - "openPull": 2, - "reviewComment": 4, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 5, - "repoName": "gitee/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 2, - "actorLogin": "mock-user-2", - "issueComment": 2, - "openIssue": 1, - "openPull": 2, - "reviewComment": 2, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 5, - "repoName": "gitee/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 3, - "actorLogin": "mock-user-3", - "issueComment": 10, - "openIssue": 1, - "openPull": 2, - "reviewComment": 1, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 5, - "repoName": "gitee/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 4, - "actorLogin": "mock-user-4", - "issueComment": 2, - "openIssue": 3, - "openPull": 2, - "reviewComment": 5, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 5, - "repoName": "gitee/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 5, - "actorLogin": "mock-user-5", - "issueComment": 1, - "openIssue": 2, - "openPull": 2, - "reviewComment": 1, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 5, - "repoName": "gitee/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 6, - "actorLogin": "mock-user-6", - "issueComment": 10, - "openIssue": 2, - "openPull": 1, - "reviewComment": 1, - "mergedPull": 1, - "createdAt": "2023-01-14T16:00:00.000Z" - }, - { - "platform": "Gitee", - "repoId": 5, - "repoName": "gitee/mock-org-2/mock-repo-5", - "orgId": 2, - "orgName": "mock-org-2", - "actorId": 10, - "actorLogin": "mock-user-10", - "issueComment": 7, - "openIssue": 3, - "openPull": 2, - "reviewComment": 3, - "mergedPull": 2, - "createdAt": "2023-01-14T16:00:00.000Z" - } -] \ No newline at end of file diff --git a/src/test_data/fisco_bcos_results.json b/src/test_data/fisco_bcos_results.json index d9f55d5..21c36f4 100644 --- a/src/test_data/fisco_bcos_results.json +++ b/src/test_data/fisco_bcos_results.json @@ -1,5 +1,5 @@ { - "timestamp": "2025-09-16T06:57:49.188Z", + "timestamp": "2025-09-30T08:19:49.819Z", "repoInfo": { "owner": "FISCO-BCOS", "repo": "FISCO-BCOS" @@ -11,12 +11,13 @@ "nodeType": "User", "platform": "GitHub", "name": "morebtcg", - "openrank": 30.138357190009465, - "lastMonthOpenrank": 30.138100488744694, - "change": 0.00025670126477095323, + "openrank": 24.690200989187517, + "lastMonthOpenrank": 24.690184872051432, + "change": 0.000016117136084403683, "metadata": { "userId": 12828840, - "userLogin": "morebtcg" + "userLogin": "morebtcg", + "initValue": 1 }, "rank": 2 }, @@ -26,12 +27,13 @@ "nodeType": "User", "platform": "GitHub", "name": "kyonRay", - "openrank": 8.763860259331443, - "lastMonthOpenrank": 8.763792006434123, - "change": 0.0000682528973197094, + "openrank": 14.718237177236281, + "lastMonthOpenrank": 14.718226122173045, + "change": 0.000011055063236398155, "metadata": { "userId": 32325790, - "userLogin": "kyonRay" + "userLogin": "kyonRay", + "initValue": 1 }, "rank": 3 }, @@ -41,272 +43,290 @@ "nodeType": "User", "platform": "GitHub", "name": "bxq2011hust", - "openrank": 5.394980851482697, - "lastMonthOpenrank": 5.394936220262168, - "change": 0.00004463122052911217, + "openrank": 11.790252819506401, + "lastMonthOpenrank": 11.790244670083307, + "change": 0.00000814942309368405, "metadata": { "userId": 15418097, - "userLogin": "bxq2011hust" + "userLogin": "bxq2011hust", + "initValue": 1 }, "rank": 4 }, { - "id": "User_GitHub_34049754", + "id": "User_GitHub_12178678", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "HaoXuan40404", - "openrank": 4.816541059606452, - "lastMonthOpenrank": 4.8164965563775, - "change": 0.0000445032289517755, + "name": "JimmyShi22", + "openrank": 7.650820263603354, + "lastMonthOpenrank": 7.650814648935613, + "change": 0.000005614667740516666, "metadata": { - "userId": 34049754, - "userLogin": "HaoXuan40404" + "userId": 12178678, + "userLogin": "JimmyShi22", + "initValue": 1 }, "rank": 5 }, { - "id": "User_GitHub_4343461", + "id": "User_GitHub_34049754", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "cyjseagull", - "openrank": 3.9489215068654975, - "lastMonthOpenrank": 3.9488922701039986, - "change": 0.000029236761498907526, + "name": "HaoXuan40404", + "openrank": 4.5061014398493615, + "lastMonthOpenrank": 4.506099715977324, + "change": 0.0000017238720371182126, "metadata": { - "userId": 4343461, - "userLogin": "cyjseagull" + "userId": 34049754, + "userLogin": "HaoXuan40404", + "initValue": 1 }, - "rank": 6 + "rank": 21 }, { - "id": "User_GitHub_12178678", + "id": "User_GitHub_22429695", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "JimmyShi22", - "openrank": 2.9799950869454217, - "lastMonthOpenrank": 2.9799826157549183, - "change": 0.000012471190503404728, + "name": "codecov[bot]", + "openrank": 3.914621825842959, + "lastMonthOpenrank": 3.914618814915867, + "change": 0.0000030109270916511832, "metadata": { - "userId": 12178678, - "userLogin": "JimmyShi22" + "userId": 22429695, + "userLogin": "codecov[bot]", + "initValue": 1 }, - "rank": 7 + "rank": 48 }, { - "id": "User_GitHub_13342660", + "id": "User_GitHub_28520306", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "ywy2090", - "openrank": 2.110457660612292, - "lastMonthOpenrank": 2.1104413931561687, - "change": 0.00001626745612304248, + "name": "wenlinlee", + "openrank": 3.759487283108278, + "lastMonthOpenrank": 3.759484725396266, + "change": 0.000002557712011963531, "metadata": { - "userId": 13342660, - "userLogin": "ywy2090" + "userId": 28520306, + "userLogin": "wenlinlee", + "initValue": 1 }, - "rank": 8 + "rank": 54 }, { - "id": "User_GitHub_175728472", + "id": "User_GitHub_13342660", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "Copilot", - "openrank": 1.9579687501611522, - "lastMonthOpenrank": 1.9579506849677428, - "change": 0.00001806519340941115, + "name": "ywy2090", + "openrank": 1.8159826295242933, + "lastMonthOpenrank": 1.8159820968505027, + "change": 5.326737906319323e-7, "metadata": { - "userId": 175728472, - "userLogin": "Copilot" + "userId": 13342660, + "userLogin": "ywy2090", + "initValue": 1 }, - "rank": 10 + "rank": 556 }, { - "id": "User_GitHub_106899249", + "id": "User_GitHub_111552329", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "22640", - "openrank": 0.477294610671694, - "lastMonthOpenrank": 0.4772941127892925, - "change": 4.978824014734151e-7, + "name": "jdkuangx", + "openrank": 1.1740758544001626, + "lastMonthOpenrank": 1.174075518000616, + "change": 3.3639954666320193e-7, "metadata": { - "userId": 106899249, - "userLogin": "22640" + "userId": 111552329, + "userLogin": "jdkuangx", + "initValue": 1 }, - "rank": 369 + "rank": 633 }, { - "id": "User_GitHub_88825933", + "id": "User_GitHub_30165217", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "tjujingzong", - "openrank": 0.3953980804520013, - "lastMonthOpenrank": 0.3953977112114353, - "change": 3.6924056601161936e-7, + "name": "Mojicode", + "openrank": 1.1566667083620175, + "lastMonthOpenrank": 1.156666382158247, + "change": 3.2620377043990345e-7, "metadata": { - "userId": 88825933, - "userLogin": "tjujingzong" + "userId": 30165217, + "userLogin": "Mojicode", + "initValue": 1 }, - "rank": 372 + "rank": 634 }, { - "id": "User_GitHub_8678234", + "id": "User_GitHub_20827861", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "Spark-Liang", - "openrank": 0.2897193988006543, - "lastMonthOpenrank": 0.2897190519473083, - "change": 3.468533459893841e-7, + "name": "jdkuangxx", + "openrank": 1.155542588080271, + "lastMonthOpenrank": 1.1555422764929868, + "change": 3.115872841963352e-7, "metadata": { - "userId": 8678234, - "userLogin": "Spark-Liang" + "userId": 20827861, + "userLogin": "jdkuangxx", + "initValue": 1 }, - "rank": 374 + "rank": 635 }, { - "id": "User_GitHub_30165217", + "id": "User_GitHub_32122247", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "Mojicode", - "openrank": 0.27094661062447817, - "lastMonthOpenrank": 0.27094400824633, - "change": 0.000002602378148142126, + "name": "ZXR-v2", + "openrank": 0.9530714760509021, + "lastMonthOpenrank": 0.9530714130331552, + "change": 6.301774690964379e-8, "metadata": { - "userId": 30165217, - "userLogin": "Mojicode" + "userId": 32122247, + "userLogin": "ZXR-v2", + "initValue": 1 }, - "rank": 375 + "rank": 636 }, { - "id": "User_GitHub_7068352", + "id": "User_GitHub_22519865", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "sicwolf", - "openrank": 0.25541439408318106, - "lastMonthOpenrank": 0.25541427107471565, - "change": 1.2300846541357657e-7, + "name": "fCorleone", + "openrank": 0.9423361648529047, + "lastMonthOpenrank": 0.9423360586256732, + "change": 1.0622723156661351e-7, "metadata": { - "userId": 7068352, - "userLogin": "sicwolf" + "userId": 22519865, + "userLogin": "fCorleone", + "initValue": 1 }, - "rank": 376 + "rank": 637 }, { - "id": "User_GitHub_40993399", + "id": "User_GitHub_4343461", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "jishitang", - "openrank": 0.24877854931142235, - "lastMonthOpenrank": 0.24877845669844814, - "change": 9.261297420626313e-8, + "name": "cyjseagull", + "openrank": 0.9313572188502106, + "lastMonthOpenrank": 0.9313571322340736, + "change": 8.66161370405294e-8, "metadata": { - "userId": 40993399, - "userLogin": "jishitang" + "userId": 4343461, + "userLogin": "cyjseagull", + "initValue": 1 }, - "rank": 377 + "rank": 638 }, { - "id": "User_GitHub_130641570", + "id": "User_GitHub_96527993", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "851543", - "openrank": 0.22182874433618338, - "lastMonthOpenrank": 0.2218286139272354, - "change": 1.304089479736703e-7, + "name": "RagnarokSu", + "openrank": 0.9096159264955196, + "lastMonthOpenrank": 0.909615898777819, + "change": 2.771770057918843e-8, "metadata": { - "userId": 130641570, - "userLogin": "851543" + "userId": 96527993, + "userLogin": "RagnarokSu", + "initValue": 1 }, - "rank": 378 + "rank": 639 }, { - "id": "User_GitHub_50353447", + "id": "User_GitHub_106899249", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "alisigy", - "openrank": 0.2142518233842421, - "lastMonthOpenrank": 0.2142517309077658, - "change": 9.247647628218836e-8, + "name": "22640", + "openrank": 0.8945986487453519, + "lastMonthOpenrank": 0.8945986204948858, + "change": 2.8250466077572867e-8, "metadata": { - "userId": 50353447, - "userLogin": "alisigy" + "userId": 106899249, + "userLogin": "22640", + "initValue": 1 }, - "rank": 379 + "rank": 640 }, { - "id": "User_GitHub_68625791", + "id": "User_GitHub_18379086", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "userInner", - "openrank": 0.20952747439016614, - "lastMonthOpenrank": 0.2095273162193981, - "change": 1.5817076803870123e-7, + "name": "lengmianshi", + "openrank": 0.8937715125083112, + "lastMonthOpenrank": 0.8937714681993749, + "change": 4.4308936297809964e-8, "metadata": { - "userId": 68625791, - "userLogin": "userInner" + "userId": 18379086, + "userLogin": "lengmianshi", + "initValue": 1 }, - "rank": 380 + "rank": 641 }, { - "id": "User_GitHub_24306657", + "id": "User_GitHub_129931066", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "wuhua666", - "openrank": 0.2090554974986747, - "lastMonthOpenrank": 0.20905532854216027, - "change": 1.689565144180616e-7, + "name": "zhengcookie", + "openrank": 0.893692830516645, + "lastMonthOpenrank": 0.8936927863514736, + "change": 4.4165171408927506e-8, "metadata": { - "userId": 24306657, - "userLogin": "wuhua666" + "userId": 129931066, + "userLogin": "zhengcookie", + "initValue": 1 }, - "rank": 381 + "rank": 642 }, { - "id": "User_GitHub_32031000", + "id": "User_GitHub_13444794", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "smartcl", - "openrank": 0.2080985998496016, - "lastMonthOpenrank": 0.20809844474545786, - "change": 1.5510414375086157e-7, + "name": "LucasLi1024", + "openrank": 0.8832317781299294, + "lastMonthOpenrank": 0.8832316921078462, + "change": 8.602208312336046e-8, "metadata": { - "userId": 32031000, - "userLogin": "smartcl" + "userId": 13444794, + "userLogin": "LucasLi1024", + "initValue": 1 }, - "rank": 382 + "rank": 643 }, { - "id": "User_GitHub_193056338", + "id": "User_GitHub_148163077", "type": "User", "nodeType": "User", "platform": "GitHub", - "name": "AiW520", - "openrank": 0.20720955300650043, - "lastMonthOpenrank": 0.20720944837092953, - "change": 1.0463557090223397e-7, + "name": "Wangxiujie2001", + "openrank": 0.875094361610457, + "lastMonthOpenrank": 0.8750943391386853, + "change": 2.247177166569969e-8, "metadata": { - "userId": 193056338, - "userLogin": "AiW520" + "userId": 148163077, + "userLogin": "Wangxiujie2001", + "initValue": 1 }, - "rank": 383 + "rank": 644 } ], - "totalUsers": 70, - "totalIssues": 73, - "totalPRs": 289 + "totalUsers": 109, + "totalIssues": 112, + "totalPRs": 511 } \ No newline at end of file diff --git a/src/test_data/initial_propagation_summary.json b/src/test_data/initial_propagation_summary.json index e1a14ca..a083829 100644 --- a/src/test_data/initial_propagation_summary.json +++ b/src/test_data/initial_propagation_summary.json @@ -1,14 +1,14 @@ { - "timestamp": "2025-09-16T06:57:49.184Z", + "timestamp": "2025-09-30T08:19:49.816Z", "graphStats": { - "nodeCount": 433, - "edgeCount": 2776, - "averageDegree": 6.4110854503464205, + "nodeCount": 733, + "edgeCount": 4616, + "averageDegree": 6.297407912687586, "nodesByType": { "Repo": 1, - "User": 70, - "Issue": 73, - "PullRequest": 289 + "User": 109, + "Issue": 112, + "PullRequest": 511 } }, "summary": { @@ -17,21 +17,20 @@ "id": "User_GitHub_12828840", "name": "morebtcg", "nodeType": "User", - "openrank": 30.138357190009465, + "openrank": 24.690200989187517, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 30.058357190009467, + "initValue": 1, + "retained": 0.8, + "propagation": 23.890200989187516, "breakdown": { "byEdgeType": { - "activity": 30.05838032620266 + "activity": 20.07554277613495 }, "bySourceType": { - "Issue": 0.23668540478450623, - "PullRequest": 29.821694921418157 + "PullRequest": 20.07554277613495 }, "byEventSource": { - "collaboration": 30.05838032620266 + "collaboration": 20.07554277613495 } } }, @@ -39,21 +38,21 @@ "id": "User_GitHub_32325790", "name": "kyonRay", "nodeType": "User", - "openrank": 8.763860259331443, + "openrank": 14.718237177236281, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 8.683860259331443, + "initValue": 1, + "retained": 0.8, + "propagation": 13.91823717723628, "breakdown": { "byEdgeType": { - "activity": 8.683866397139292 + "activity": 11.917340628349455 }, "bySourceType": { - "Issue": 1.1792043209876892, - "PullRequest": 7.5046620761516 + "Issue": 0.3513527243715173, + "PullRequest": 11.56598790397794 }, "byEventSource": { - "collaboration": 8.683866397139292 + "collaboration": 11.917340628349455 } } }, @@ -61,1074 +60,1076 @@ "id": "User_GitHub_15418097", "name": "bxq2011hust", "nodeType": "User", - "openrank": 5.394980851482697, + "openrank": 11.790252819506401, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 5.314980851482697, + "initValue": 1, + "retained": 0.8, + "propagation": 10.9902528195064, "breakdown": { "byEdgeType": { - "activity": 5.3149848741478065 + "activity": 9.311014046198046 }, "bySourceType": { - "Issue": 0.3962463279720144, - "PullRequest": 4.918738546175791 + "Issue": 0.19592241042953346, + "PullRequest": 9.115091635768513 }, "byEventSource": { - "collaboration": 5.3149848741478065 + "collaboration": 9.311014046198046 } } }, { - "id": "User_GitHub_34049754", - "name": "HaoXuan40404", + "id": "User_GitHub_12178678", + "name": "JimmyShi22", "nodeType": "User", - "openrank": 4.816541059606452, + "openrank": 7.650820263603354, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 4.736541059606452, + "initValue": 1, + "retained": 0.8, + "propagation": 6.850820263603354, "breakdown": { "byEdgeType": { - "activity": 4.736545077761795 + "activity": 5.91260095832857 }, "bySourceType": { - "Issue": 0.6305378975695404, - "PullRequest": 4.106007180192256 + "Issue": 0.5414037266692745, + "PullRequest": 5.371197231659295 }, "byEventSource": { - "collaboration": 4.736545077761795 + "collaboration": 5.91260095832857 } } }, { - "id": "User_GitHub_4343461", - "name": "cyjseagull", + "id": "User_GitHub_34049754", + "name": "HaoXuan40404", "nodeType": "User", - "openrank": 3.9489215068654975, + "openrank": 4.5061014398493615, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 3.8689215068654974, + "initValue": 1, + "retained": 0.8, + "propagation": 3.7061014398493617, "breakdown": { "byEdgeType": { - "activity": 3.8689241308374203 + "activity": 3.023775930073287 }, "bySourceType": { - "Issue": 0.06012453204624176, - "PullRequest": 3.8087995987911785 + "Issue": 0.08956338257109864, + "PullRequest": 2.9342125475021885 }, "byEventSource": { - "collaboration": 3.8689241308374203 + "collaboration": 3.023775930073287 } } }, { - "id": "User_GitHub_12178678", - "name": "JimmyShi22", + "id": "User_GitHub_22429695", + "name": "codecov[bot]", "nodeType": "User", - "openrank": 2.9799950869454217, + "openrank": 3.914621825842959, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 2.8999950869454216, + "initValue": 1, + "retained": 0.8, + "propagation": 3.114621825842959, "breakdown": { "byEdgeType": { - "activity": 2.899996206031188 + "activity": 2.7303372473639484 }, "bySourceType": { - "Issue": 1.75881452413844, - "PullRequest": 1.141181681892747 + "PullRequest": 2.7303372473639484 }, "byEventSource": { - "collaboration": 2.899996206031188 + "collaboration": 2.7303372473639484 } } }, { - "id": "User_GitHub_13342660", - "name": "ywy2090", + "id": "User_GitHub_28520306", + "name": "wenlinlee", "nodeType": "User", - "openrank": 2.110457660612292, + "openrank": 3.759487283108278, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 2.0304576606122917, + "initValue": 1, + "retained": 0.8, + "propagation": 2.9594872831082784, "breakdown": { "byEdgeType": { - "activity": 2.0304591268286534 + "activity": 2.5949084099074704 }, "bySourceType": { - "Issue": 0.17273321405063388, - "PullRequest": 1.8577259127780188 + "Issue": 0.06406500895887772, + "PullRequest": 2.530843400948592 }, "byEventSource": { - "collaboration": 2.0304591268286534 + "collaboration": 2.5949084099074704 } } }, { - "id": "User_GitHub_175728472", - "name": "Copilot", + "id": "User_GitHub_13342660", + "name": "ywy2090", "nodeType": "User", - "openrank": 1.9579687501611522, + "openrank": 1.8159826295242933, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 1.8779687501611522, + "initValue": 1, + "retained": 0.8, + "propagation": 1.0159826295242933, "breakdown": { "byEdgeType": { - "activity": 1.87797038155483 + "activity": 0.8412013680254099 }, "bySourceType": { - "PullRequest": 1.87797038155483 + "PullRequest": 0.8412013680254099 }, "byEventSource": { - "collaboration": 1.87797038155483 + "collaboration": 0.8412013680254099 } } }, { - "id": "User_GitHub_106899249", - "name": "22640", + "id": "User_GitHub_111552329", + "name": "jdkuangx", "nodeType": "User", - "openrank": 0.477294610671694, + "openrank": 1.1740758544001626, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 0.39729461067169397, + "initValue": 1, + "retained": 0.8, + "propagation": 0.37407585440016256, "breakdown": { "byEdgeType": { - "activity": 0.39729465404216824 + "activity": 0.3337449546017317 }, "bySourceType": { - "Issue": 0.39729465404216824 + "PullRequest": 0.3337449546017317 }, "byEventSource": { - "collaboration": 0.39729465404216824 + "collaboration": 0.3337449546017317 } } }, { - "id": "User_GitHub_88825933", - "name": "tjujingzong", + "id": "User_GitHub_30165217", + "name": "Mojicode", "nodeType": "User", - "openrank": 0.3953980804520013, + "openrank": 1.1566667083620175, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 0.3153980804520013, + "initValue": 1, + "retained": 0.8, + "propagation": 0.3566667083620174, "breakdown": { "byEdgeType": { - "activity": 0.315398112654552 + "activity": 0.32249409924889266 }, "bySourceType": { - "Issue": 0.315398112654552 + "PullRequest": 0.32249409924889266 }, "byEventSource": { - "collaboration": 0.315398112654552 + "collaboration": 0.32249409924889266 } } }, { - "id": "User_GitHub_8678234", - "name": "Spark-Liang", + "id": "User_GitHub_20827861", + "name": "jdkuangxx", "nodeType": "User", - "openrank": 0.2897193988006543, + "openrank": 1.155542588080271, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 0.20971939880065427, + "initValue": 1, + "retained": 0.8, + "propagation": 0.35554258808027095, "breakdown": { "byEdgeType": { - "activity": 0.20971942942334904 + "activity": 0.31192301002965056 }, "bySourceType": { - "Issue": 0.20971942942334904 + "PullRequest": 0.31192301002965056 }, "byEventSource": { - "collaboration": 0.20971942942334904 + "collaboration": 0.31192301002965056 } } }, { - "id": "User_GitHub_30165217", - "name": "Mojicode", + "id": "User_GitHub_32122247", + "name": "ZXR-v2", "nodeType": "User", - "openrank": 0.27094661062447817, + "openrank": 0.9530714760509021, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 0.19094661062447815, + "initValue": 1, + "retained": 0.8, + "propagation": 0.1530714760509021, "breakdown": { "byEdgeType": { - "activity": 0.1909468451717118 + "activity": 0.12607329498216088 }, "bySourceType": { - "PullRequest": 0.1909468451717118 + "Issue": 0.12607329498216088 }, "byEventSource": { - "collaboration": 0.1909468451717118 + "collaboration": 0.12607329498216088 } } }, { - "id": "User_GitHub_7068352", - "name": "sicwolf", + "id": "User_GitHub_22519865", + "name": "fCorleone", "nodeType": "User", - "openrank": 0.25541439408318106, + "openrank": 0.9423361648529047, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 0.17541439408318105, + "initValue": 1, + "retained": 0.8, + "propagation": 0.14233616485290468, "breakdown": { "byEdgeType": { - "activity": 0.17541440466101912 + "activity": 0.12700641646182706 }, "bySourceType": { - "Issue": 0.17541440466101912 + "PullRequest": 0.12700641646182706 }, "byEventSource": { - "collaboration": 0.17541440466101912 + "collaboration": 0.12700641646182706 } } }, { - "id": "User_GitHub_40993399", - "name": "jishitang", + "id": "User_GitHub_4343461", + "name": "cyjseagull", "nodeType": "User", - "openrank": 0.24877854931142235, + "openrank": 0.9313572188502106, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 0.16877854931142233, + "initValue": 1, + "retained": 0.8, + "propagation": 0.13135721885021057, "breakdown": { "byEdgeType": { - "activity": 0.16877855736350283 + "activity": 0.11140744733979638 }, "bySourceType": { - "Issue": 0.16877855736350283 + "PullRequest": 0.11140744733979638 }, "byEventSource": { - "collaboration": 0.16877855736350283 + "collaboration": 0.11140744733979638 } } }, { - "id": "User_GitHub_130641570", - "name": "851543", + "id": "User_GitHub_96527993", + "name": "RagnarokSu", "nodeType": "User", - "openrank": 0.22182874433618338, + "openrank": 0.9096159264955196, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 0.14182874433618337, + "initValue": 1, + "retained": 0.8, + "propagation": 0.10961592649551954, "breakdown": { "byEdgeType": { - "activity": 0.1418287558672578 + "activity": 0.09221628070140894 }, "bySourceType": { - "Issue": 0.1418287558672578 + "Issue": 0.09221628070140894 }, "byEventSource": { - "collaboration": 0.1418287558672578 + "collaboration": 0.09221628070140894 } } }, { - "id": "User_GitHub_50353447", - "name": "alisigy", + "id": "User_GitHub_106899249", + "name": "22640", "nodeType": "User", - "openrank": 0.2142518233842421, + "openrank": 0.8945986487453519, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 0.13425182338424207, + "initValue": 1, + "retained": 0.8, + "propagation": 0.09459864874535184, "breakdown": { "byEdgeType": { - "activity": 0.13425183143346256 + "activity": 0.08094981927495513 }, "bySourceType": { - "Issue": 0.13425183143346256 + "Issue": 0.08094981927495513 }, "byEventSource": { - "collaboration": 0.13425183143346256 + "collaboration": 0.08094981927495513 } } }, { - "id": "User_GitHub_68625791", - "name": "userInner", + "id": "User_GitHub_18379086", + "name": "lengmianshi", "nodeType": "User", - "openrank": 0.20952747439016614, + "openrank": 0.8937715125083112, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 0.12952747439016613, + "initValue": 1, + "retained": 0.8, + "propagation": 0.09377151250831117, "breakdown": { "byEdgeType": { - "activity": 0.12952748798760802 + "activity": 0.07762172236431257 }, "bySourceType": { - "Issue": 0.12952748798760802 + "Issue": 0.07762172236431257 }, "byEventSource": { - "collaboration": 0.12952748798760802 + "collaboration": 0.07762172236431257 } } }, { - "id": "User_GitHub_24306657", - "name": "wuhua666", + "id": "User_GitHub_129931066", + "name": "zhengcookie", "nodeType": "User", - "openrank": 0.2090554974986747, + "openrank": 0.893692830516645, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 0.12905549749867468, + "initValue": 1, + "retained": 0.8, + "propagation": 0.09369283051664501, "breakdown": { "byEdgeType": { - "activity": 0.12905551237310678 + "activity": 0.07757691092199216 }, "bySourceType": { - "Issue": 0.12905551237310678 + "Issue": 0.07757691092199216 }, "byEventSource": { - "collaboration": 0.12905551237310678 + "collaboration": 0.07757691092199216 } } }, { - "id": "User_GitHub_32031000", - "name": "smartcl", + "id": "User_GitHub_13444794", + "name": "LucasLi1024", "nodeType": "User", - "openrank": 0.2080985998496016, + "openrank": 0.8832317781299294, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 0.1280985998496016, + "initValue": 1, + "retained": 0.8, + "propagation": 0.08323177812992932, "breakdown": { "byEdgeType": { - "activity": 0.1280986130914019 + "activity": 0.07938408557317798 }, "bySourceType": { - "Issue": 0.1280986130914019 + "Issue": 0.01848953117843817, + "PullRequest": 0.060894554394739814 }, "byEventSource": { - "collaboration": 0.1280986130914019 + "collaboration": 0.07938408557317798 } } }, { - "id": "User_GitHub_193056338", - "name": "AiW520", + "id": "User_GitHub_148163077", + "name": "Wangxiujie2001", "nodeType": "User", - "openrank": 0.20720955300650043, + "openrank": 0.875094361610457, "retentionFactor": 0.8, - "initValue": 0.1, - "retained": 0.08000000000000002, - "propagation": 0.12720955300650041, + "initValue": 1, + "retained": 0.8, + "propagation": 0.0750943616104569, "breakdown": { "byEdgeType": { - "activity": 0.1272095621695084 + "activity": 0.06276129399404293 }, "bySourceType": { - "Issue": 0.1272095621695084 + "Issue": 0.06276129399404293 }, "byEventSource": { - "collaboration": 0.1272095621695084 + "collaboration": 0.06276129399404293 } } } ], "issues": [ { - "id": "Issue_GitHub_3379682272", - "name": "节点修改配置重启后产生heap-use-after-free", + "id": "Issue_GitHub_2646388200", + "name": "没有3.10.2版本的docker镜像", "nodeType": "Issue", - "openrank": 1.611068047560709, - "retentionFactor": 0.8, - "initValue": 1.9231129599070844, - "retained": 1.5384903679256676, - "propagation": 0.07257767963504147, + "openrank": 6.534209724270437, + "retentionFactor": 0.6, + "initValue": 9, + "retained": 5.3999999999999995, + "propagation": 1.1342097242704376, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936, - "reverse_activity": 0.04975570986228446 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.7017559989712507 }, "bySourceType": { - "Repo": 0.022821969772756936, - "User": 0.04975570986228446 + "Repo": 0.7650980413053792, + "User": 0.7017559989712507 }, "byEventSource": { - "unknown": 0.0725776796350414 + "unknown": 1.46685404027663 } } }, { - "id": "Issue_GitHub_3288979636", - "name": "FISCO BCOS是通过什么方式调用gmt0018接口使用密码卡计算哈希值的", + "id": "Issue_GitHub_2661282153", + "name": "FISCO BCOS 3.9使用remix链接Metamask钱包部署合约报错 gas费不足", "nodeType": "Issue", - "openrank": 1.394392999185118, - "retentionFactor": 0.8, - "initValue": 1.7128732102575046, - "retained": 1.3702985682060038, - "propagation": 0.024094430979114234, + "openrank": 5.685500101804106, + "retentionFactor": 0.6, + "initValue": 7.6000000000000005, + "retained": 4.5600000000000005, + "propagation": 1.1255001018041053, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936, - "reverse_activity": 0.0012724612063573296 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.6910699478988738 }, "bySourceType": { - "Repo": 0.022821969772756936, - "User": 0.0012724612063573296 + "Repo": 0.7650980413053792, + "User": 0.6910699478988738 }, "byEventSource": { - "unknown": 0.024094430979114265 + "unknown": 1.4561679892042527 } } }, { - "id": "Issue_GitHub_3250688821", - "name": "SDFCryptoProvider的功能是什么定义在哪个文件", + "id": "Issue_GitHub_2645529357", + "name": "3.9版本的二进制,拉取get_account.sh脚本出现拒绝访问的问题", "nodeType": "Issue", - "openrank": 1.375408400182991, - "retentionFactor": 0.8, - "initValue": 1.6268794394919972, - "retained": 1.3015035515935978, - "propagation": 0.07390484858939317, + "openrank": 5.455790530112929, + "retentionFactor": 0.6, + "initValue": 7.6000000000000005, + "retained": 4.5600000000000005, + "propagation": 0.8957905301129285, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936, - "reverse_activity": 0.0510828788166362 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.4796502869804112 }, "bySourceType": { - "Repo": 0.022821969772756936, - "User": 0.0510828788166362 + "Repo": 0.7650980413053792, + "User": 0.4796502869804112 }, "byEventSource": { - "unknown": 0.07390484858939314 + "unknown": 1.2447483282857903 } } }, { - "id": "Issue_GitHub_3201998827", - "name": "有没有社区群,可以讨论问题的,issue基本没人回复了,微信群小助手也联系不上", + "id": "Issue_GitHub_2095192062", + "name": "fisco-bcos 2.7.2怎么扩容新节点", "nodeType": "Issue", - "openrank": 1.281494754592143, - "retentionFactor": 0.8, - "initValue": 1.5197780251781718, - "retained": 1.2158224201425376, - "propagation": 0.0656723344496053, + "openrank": 5.072022038837387, + "retentionFactor": 0.6, + "initValue": 7.6000000000000005, + "retained": 4.5600000000000005, + "propagation": 0.5120220388373866, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936, - "reverse_activity": 0.042850364676848406 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.12005690418137484 }, "bySourceType": { - "Repo": 0.022821969772756936, - "User": 0.042850364676848406 + "Repo": 0.7650980413053792, + "User": 0.12005690418137484 }, "byEventSource": { - "unknown": 0.06567233444960534 + "unknown": 0.8851549454867541 } } }, { - "id": "Issue_GitHub_3171201834", - "name": "A fatal error has been detected by the Java Runtime Environment", + "id": "Issue_GitHub_2452940137", + "name": "SSL Medium Strength Cipher Suites Supported (SWEET32) 漏洞", "nodeType": "Issue", - "openrank": 1.2163415893849945, - "retentionFactor": 0.8, - "initValue": 1.4623553669425935, - "retained": 1.1698842935540748, - "propagation": 0.04645729583091973, + "openrank": 4.840357023395049, + "retentionFactor": 0.6, + "initValue": 6.2, + "retained": 3.7199999999999998, + "propagation": 1.1203570233950488, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936, - "reverse_activity": 0.023635326058162726 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.6741744971394118 }, "bySourceType": { - "Repo": 0.022821969772756936, - "User": 0.023635326058162726 + "Repo": 0.7650980413053792, + "User": 0.6741744971394118 }, "byEventSource": { - "unknown": 0.04645729583091966 + "unknown": 1.4392725384447909 } } }, { - "id": "Issue_GitHub_3147222162", - "name": "下载二进制文件报错文件不存在", + "id": "Issue_GitHub_2741324946", + "name": "fisco 3.11.0版本 轻节点发送交易 容易超时", "nodeType": "Issue", - "openrank": 1.1538307025923071, - "retentionFactor": 0.8, - "initValue": 1.412170339516491, - "retained": 1.129736271613193, - "propagation": 0.024094430979114234, + "openrank": 4.8403174024462725, + "retentionFactor": 0.6, + "initValue": 6.2, + "retained": 3.7199999999999998, + "propagation": 1.1203174024462728, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936, - "reverse_activity": 0.0012724612063573296 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.6744588107326215 }, "bySourceType": { - "Repo": 0.022821969772756936, - "User": 0.0012724612063573296 + "Repo": 0.7650980413053792, + "User": 0.6744588107326215 }, "byEventSource": { - "unknown": 0.024094430979114265 + "unknown": 1.4395568520380007 } } }, { - "id": "Issue_GitHub_3146040407", - "name": "想问一下有人在最新的mac上编译运行成功吗?", + "id": "Issue_GitHub_2286821825", + "name": "服务器扫描fisco bcos 20200端口出现漏洞", "nodeType": "Issue", - "openrank": 1.150361320714978, - "retentionFactor": 0.8, - "initValue": 1.4075703298349658, - "retained": 1.1260562638679728, - "propagation": 0.024305056847005346, + "openrank": 4.838668139347035, + "retentionFactor": 0.6, + "initValue": 6.2, + "retained": 3.7199999999999998, + "propagation": 1.1186681393470357, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936, - "reverse_activity": 0.0014830870742484977 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.6741272044489518 }, "bySourceType": { - "Repo": 0.022821969772756936, - "User": 0.0014830870742484977 + "Repo": 0.7650980413053792, + "User": 0.6741272044489518 }, "byEventSource": { - "unknown": 0.024305056847005433 + "unknown": 1.439225245754331 } } }, { - "id": "Issue_GitHub_3145403460", - "name": "mac编译时出现openssl/sm2.h找不到的错误,怎么解决?", + "id": "Issue_GitHub_2578120482", + "name": "v3.11.0的build_chain无法安装", "nodeType": "Issue", - "openrank": 1.1475920999099025, - "retentionFactor": 0.8, - "initValue": 1.4059626626714319, - "retained": 1.1247701301371456, - "propagation": 0.022821969772756967, + "openrank": 4.83276118207565, + "retentionFactor": 0.6, + "initValue": 6.2, + "retained": 3.7199999999999998, + "propagation": 1.1127611820756504, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.6589061316254535 }, "bySourceType": { - "Repo": 0.022821969772756936 + "Repo": 0.7650980413053792, + "User": 0.6589061316254535 }, "byEventSource": { - "unknown": 0.022821969772756936 + "unknown": 1.4240041729308328 } } }, { - "id": "Issue_GitHub_3135550861", - "name": "fisco3.0源码在M3芯片的macos上编译始终无法通过", + "id": "Issue_GitHub_2247765942", + "name": "Fisco3.2官方文档中“多群组区块链(Pro版本)”部分的教程,部署监控服务失败", "nodeType": "Issue", - "openrank": 1.136151839674433, - "retentionFactor": 0.8, - "initValue": 1.3900717608691484, - "retained": 1.1120574086953188, - "propagation": 0.024094430979114234, + "openrank": 4.638574355261647, + "retentionFactor": 0.6, + "initValue": 6.2, + "retained": 3.7199999999999998, + "propagation": 0.9185743552616472, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936, - "reverse_activity": 0.0012724612063573296 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.494916275953863 }, "bySourceType": { - "Repo": 0.022821969772756936, - "User": 0.0012724612063573296 + "Repo": 0.7650980413053792, + "User": 0.494916275953863 }, "byEventSource": { - "unknown": 0.024094430979114265 + "unknown": 1.2600143172592422 } } }, { - "id": "Issue_GitHub_3082667791", - "name": "轻节点运行异常", + "id": "Issue_GitHub_2717757982", + "name": "console文件附带的get_account.sh 69行}附近出现问题", "nodeType": "Issue", - "openrank": 1.1326299151604386, - "retentionFactor": 0.8, - "initValue": 1.2877989986926393, - "retained": 1.0302391989541115, - "propagation": 0.10239071620632711, + "openrank": 4.604155990395495, + "retentionFactor": 0.6, + "initValue": 6.2, + "retained": 3.7199999999999998, + "propagation": 0.8841559903954952, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936, - "reverse_activity": 0.07956874643357013 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.4644718947722968 }, "bySourceType": { - "Repo": 0.022821969772756936, - "User": 0.07956874643357013 + "Repo": 0.7650980413053792, + "User": 0.4644718947722968 }, "byEventSource": { - "unknown": 0.10239071620632709 + "unknown": 1.229569936077676 } } }, { - "id": "Issue_GitHub_3079522704", - "name": "v3.15 webase 直接导出java项目后 如何关闭log自动生成", + "id": "Issue_GitHub_2282498082", + "name": "FISCO BCOS 3.6 air版 落盘加密报错", "nodeType": "Issue", - "openrank": 1.1016759278333426, - "retentionFactor": 0.8, - "initValue": 1.2828268140081818, - "retained": 1.0262614512065455, - "propagation": 0.07541447662679701, + "openrank": 4.546491608706198, + "retentionFactor": 0.6, + "initValue": 6.2, + "retained": 3.7199999999999998, + "propagation": 0.8264916087061982, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936, - "reverse_activity": 0.052592506854040155 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.41486272752108305 }, "bySourceType": { - "Repo": 0.022821969772756936, - "User": 0.052592506854040155 + "Repo": 0.7650980413053792, + "User": 0.41486272752108305 }, "byEventSource": { - "unknown": 0.0754144766267971 + "unknown": 1.1799607688264622 } } }, { - "id": "Issue_GitHub_3099753081", - "name": "fisco_me", + "id": "Issue_GitHub_2173244357", + "name": "不能切换群组问题", "nodeType": "Issue", - "openrank": 1.0967912575703203, - "retentionFactor": 0.8, - "initValue": 1.3230357141525948, - "retained": 1.0584285713220758, - "propagation": 0.03836268624824446, + "openrank": 4.53406751733735, + "retentionFactor": 0.6, + "initValue": 6.2, + "retained": 3.7199999999999998, + "propagation": 0.8140675173373504, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936, - "reverse_activity": 0.015540716475487526 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.3928667579089366 }, "bySourceType": { - "Repo": 0.022821969772756936, - "User": 0.015540716475487526 + "Repo": 0.7650980413053792, + "User": 0.3928667579089366 }, "byEventSource": { - "unknown": 0.03836268624824446 + "unknown": 1.1579647992143156 } } }, { - "id": "Issue_GitHub_3075960086", - "name": "v2.8.0上链时快时慢", + "id": "Issue_GitHub_2071553171", + "name": "关于crud的优化", "nodeType": "Issue", - "openrank": 1.046279458312953, - "retentionFactor": 0.8, - "initValue": 1.2775062961445645, - "retained": 1.0220050369156517, - "propagation": 0.024274421397301404, + "openrank": 4.478053844441643, + "retentionFactor": 0.6, + "initValue": 6.2, + "retained": 3.7199999999999998, + "propagation": 0.7580538444416431, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936, - "reverse_activity": 0.0014524516245443921 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.34980930905336216 }, "bySourceType": { - "Repo": 0.022821969772756936, - "User": 0.0014524516245443921 + "Repo": 0.7650980413053792, + "User": 0.34980930905336216 }, "byEventSource": { - "unknown": 0.024274421397301328 + "unknown": 1.1149073503587412 } } }, { - "id": "Issue_GitHub_3006488498", - "name": "部署rpc服务出现如下问题", + "id": "Issue_GitHub_2645877682", + "name": "源码编译问题", "nodeType": "Issue", - "openrank": 0.933929319031038, - "retentionFactor": 0.8, - "initValue": 1.1351869221969886, - "retained": 0.9081495377575909, - "propagation": 0.025779781273447155, + "openrank": 4.472701025982601, + "retentionFactor": 0.6, + "initValue": 6.2, + "retained": 3.7199999999999998, + "propagation": 0.752701025982601, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936, - "reverse_activity": 0.002957811500690242 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.33924967999010713 }, "bySourceType": { - "Repo": 0.022821969772756936, - "User": 0.002957811500690242 + "Repo": 0.7650980413053792, + "User": 0.33924967999010713 }, "byEventSource": { - "unknown": 0.025779781273447176 + "unknown": 1.1043477212954864 } } }, { - "id": "Issue_GitHub_2990131112", - "name": "按照文档操作,无法动态关闭权限检查", + "id": "Issue_GitHub_2647169868", + "name": "python3 deploy.py installWeBASE可视化部署webase失败", "nodeType": "Issue", - "openrank": 0.9286037586564877, - "retentionFactor": 0.8, - "initValue": 1.1028293108132796, - "retained": 0.8822634486506238, - "propagation": 0.046340310005863916, + "openrank": 4.468643178795991, + "retentionFactor": 0.6, + "initValue": 6.2, + "retained": 3.7199999999999998, + "propagation": 0.7486431787959908, "breakdown": { "byEdgeType": { - "reverse_belong": 0.022821969772756936, - "reverse_activity": 0.023518340233107032 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.33121906865062084 }, "bySourceType": { - "Repo": 0.022821969772756936, - "User": 0.023518340233107032 + "Repo": 0.7650980413053792, + "User": 0.33121906865062084 }, "byEventSource": { - "unknown": 0.046340310005863965 + "unknown": 1.096317109956 } } } ], "prs": [ { - "id": "PullRequest_GitHub_2795477942", - "name": "sync code from release-3.16.0", + "id": "PullRequest_GitHub_2207301498", + "name": "sync code to release-3.13.0", "nodeType": "PullRequest", - "openrank": 2.0586365218622618, + "openrank": 5.341318364747211, "retentionFactor": 0.6, - "initValue": 2.869776771077121, - "retained": 1.7218660626462727, - "propagation": 0.336770459215989, + "initValue": 7.543004032774511, + "retained": 4.525802419664706, + "propagation": 0.8155159450825051, "breakdown": { "byEdgeType": { - "reverse_belong": 0.045643939545513885, - "reverse_activity": 0.29112651967047515 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.830020030807482 }, "bySourceType": { - "Repo": 0.045643939545513885, - "User": 0.29112651967047515 + "Repo": 0.7650980413053792, + "User": 0.830020030807482 }, "byEventSource": { - "unknown": 0.336770459215989 + "unknown": 1.5951180721128613 } } }, { - "id": "PullRequest_GitHub_2606010666", - "name": "sync code to 316", + "id": "PullRequest_GitHub_2202337127", + "name": "Sync code from master", "nodeType": "PullRequest", - "openrank": 1.7718986727790786, + "openrank": 4.846074312551337, "retentionFactor": 0.6, - "initValue": 2.504143334220054, - "retained": 1.5024860005320322, - "propagation": 0.26941267224704646, + "initValue": 7.000907863945999, + "retained": 4.200544718367599, + "propagation": 0.6455295941837376, "breakdown": { "byEdgeType": { - "reverse_belong": 0.045643939545513885, - "reverse_activity": 0.2237687327015326 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.4549851624672224 }, "bySourceType": { - "Repo": 0.045643939545513885, - "User": 0.2237687327015326 + "Repo": 0.7650980413053792, + "User": 0.4549851624672224 }, "byEventSource": { - "unknown": 0.26941267224704657 + "unknown": 1.2200832037726017 } } }, { - "id": "PullRequest_GitHub_2631076665", - "name": "sync code from 3.15.4 to master", + "id": "PullRequest_GitHub_2142830397", + "name": "Release v3.12.0", "nodeType": "PullRequest", - "openrank": 1.681963163993361, + "openrank": 4.763225854636816, "retentionFactor": 0.6, - "initValue": 2.409951144304533, - "retained": 1.4459706865827198, - "propagation": 0.23599247741064122, + "initValue": 6.609062612921474, + "retained": 3.9654375677528844, + "propagation": 0.7977882868839314, "breakdown": { "byEdgeType": { - "reverse_belong": 0.045643939545513885, - "reverse_activity": 0.19034853786512737 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.7839882795438473 }, "bySourceType": { - "Repo": 0.045643939545513885, - "User": 0.19034853786512737 + "Repo": 0.7650980413053792, + "User": 0.7839882795438473 }, "byEventSource": { - "unknown": 0.23599247741064125 + "unknown": 1.5490863208492265 } } }, { - "id": "PullRequest_GitHub_2818127003", - "name": "update archive-reader", + "id": "PullRequest_GitHub_2199813034", + "name": "sync code", "nodeType": "PullRequest", - "openrank": 1.649137265717517, + "openrank": 4.468652538346926, "retentionFactor": 0.6, - "initValue": 2.608376138798593, - "retained": 1.5650256832791556, - "propagation": 0.08411158243836137, + "initValue": 6.463979428602486, + "retained": 3.8783876571614915, + "propagation": 0.5902648811854343, "breakdown": { "byEdgeType": { - "reverse_belong": 0.045643939545513885, - "reverse_activity": 0.038467642892847535 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.3405462015269292 }, "bySourceType": { - "Repo": 0.045643939545513885, - "User": 0.038467642892847535 + "Repo": 0.7650980413053792, + "User": 0.3405462015269292 }, "byEventSource": { - "unknown": 0.08411158243836142 + "unknown": 1.1056442428323083 } } }, { - "id": "PullRequest_GitHub_2142830397", - "name": "Release v3.12.0", + "id": "PullRequest_GitHub_2225924339", + "name": "sync code", "nodeType": "PullRequest", - "openrank": 1.6089313766733457, + "openrank": 4.463860707547416, "retentionFactor": 0.6, - "initValue": 2.100640292585357, - "retained": 1.2603841755512142, - "propagation": 0.34854720112213156, + "initValue": 6.649232477597315, + "retained": 3.989539486558389, + "propagation": 0.47432122098902685, "breakdown": { "byEdgeType": { - "reverse_belong": 0.045643939545513885, - "reverse_activity": 0.3029032615766177 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.15992593548102813 }, "bySourceType": { - "Repo": 0.045643939545513885, - "User": 0.3029032615766177 + "Repo": 0.7650980413053792, + "User": 0.15992593548102813 }, "byEventSource": { - "unknown": 0.3485472011221315 + "unknown": 0.9250239767864074 } } }, { - "id": "PullRequest_GitHub_2288839103", - "name": "sync code from release-3.13.0 to master", + "id": "PullRequest_GitHub_1711121023", + "name": "Release 3.6.0", "nodeType": "PullRequest", - "openrank": 1.6084917376401568, + "openrank": 4.423409976125578, "retentionFactor": 0.6, - "initValue": 2.361134432006013, - "retained": 1.4166806592036079, - "propagation": 0.191811078436549, + "initValue": 2.763983720156977, + "retained": 1.6583902320941861, + "propagation": 2.7650197440313917, "breakdown": { "byEdgeType": { - "reverse_belong": 0.045643939545513885, - "reverse_activity": 0.14616713889103497 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 3.2023446958197175 }, "bySourceType": { - "Repo": 0.045643939545513885, - "User": 0.14616713889103497 + "Repo": 0.7650980413053792, + "User": 3.2023446958197175 }, "byEventSource": { - "unknown": 0.19181107843654885 + "unknown": 3.9674427371250967 } } }, { - "id": "PullRequest_GitHub_2355354930", - "name": "sync code from release-3.14.0 to master", + "id": "PullRequest_GitHub_2251393014", + "name": "sync code from master", "nodeType": "PullRequest", - "openrank": 1.5828832386385503, + "openrank": 4.239043941988635, "retentionFactor": 0.6, - "initValue": 2.176616205379565, - "retained": 1.305969723227739, - "propagation": 0.27691351541081133, + "initValue": 6.376790345332201, + "retained": 3.82607420719932, + "propagation": 0.4129697347893151, "breakdown": { "byEdgeType": { - "reverse_belong": 0.045643939545513885, - "reverse_activity": 0.2312695758652974 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.055546914613387816 }, "bySourceType": { - "Repo": 0.045643939545513885, - "User": 0.2312695758652974 + "Repo": 0.7650980413053792, + "User": 0.055546914613387816 }, "byEventSource": { - "unknown": 0.27691351541081133 + "unknown": 0.820644955918767 } } }, { - "id": "PullRequest_GitHub_2726783642", - "name": ": support eth_subscribe newHeader functionality", + "id": "PullRequest_GitHub_2238721545", + "name": "Add broadcast message impl", "nodeType": "PullRequest", - "openrank": 1.5494338827918317, + "openrank": 4.204625473707145, "retentionFactor": 0.6, - "initValue": 2.3341738946145725, - "retained": 1.4005043367687435, - "propagation": 0.14892954602308817, + "initValue": 6.2972361216548896, + "retained": 3.7783416729929336, + "propagation": 0.4262838007142111, "breakdown": { "byEdgeType": { - "reverse_belong": 0.045643939545513885, - "reverse_activity": 0.10328560647757414 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.07564975198960074 }, "bySourceType": { - "Repo": 0.045643939545513885, - "User": 0.10328560647757414 + "Repo": 0.7650980413053792, + "User": 0.07564975198960074 }, "byEventSource": { - "unknown": 0.148929546023088 + "unknown": 0.84074779329498 } } }, { - "id": "PullRequest_GitHub_2202337127", - "name": "Sync code from master", + "id": "PullRequest_GitHub_2254082359", + "name": "Add BalancePrecompiled for baseline", "nodeType": "PullRequest", - "openrank": 1.5307650985027916, + "openrank": 4.20312082421534, "retentionFactor": 0.6, - "initValue": 1.9821061781216607, - "retained": 1.1892637068729963, - "propagation": 0.3415013916297953, + "initValue": 6.316717474684742, + "retained": 3.790030484810845, + "propagation": 0.4130903394044947, "breakdown": { "byEdgeType": { - "reverse_belong": 0.045643939545513885, - "reverse_activity": 0.2958574520842815 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.05649759281599451 }, "bySourceType": { - "Repo": 0.045643939545513885, - "User": 0.2958574520842815 + "Repo": 0.7650980413053792, + "User": 0.05649759281599451 }, "byEventSource": { - "unknown": 0.34150139162979537 + "unknown": 0.8215956341213737 } } }, { - "id": "PullRequest_GitHub_2648383877", - "name": "Move httpserver impl out of line", + "id": "PullRequest_GitHub_2197148342", + "name": "Refactor bucket map, add traverse", "nodeType": "PullRequest", - "openrank": 1.521385513417752, + "openrank": 4.149574785168501, "retentionFactor": 0.6, - "initValue": 2.1372536736410255, - "retained": 1.2823522041846152, - "propagation": 0.23903330923313693, + "initValue": 6.174106853812157, + "retained": 3.704464112287294, + "propagation": 0.4451106728812073, "breakdown": { "byEdgeType": { - "reverse_belong": 0.045643939545513885, - "reverse_activity": 0.19338936968762308 + "reverse_belong": 0.7650980413053792, + "reverse_activity": 0.11915172857277473 }, "bySourceType": { - "Repo": 0.045643939545513885, - "User": 0.19338936968762308 + "Repo": 0.7650980413053792, + "User": 0.11915172857277473 }, "byEventSource": { - "unknown": 0.23903330923313695 + "unknown": 0.884249769878154 } } }, { - "id": "PullRequest_GitHub_2548997190", - "name": "