{"id":3310,"date":"2025-06-23T10:52:35","date_gmt":"2025-06-23T13:52:35","guid":{"rendered":"https:\/\/nucleojoalheria.org\/?page_id=3310"},"modified":"2025-06-23T13:35:08","modified_gmt":"2025-06-23T16:35:08","slug":"inscricoes","status":"publish","type":"page","link":"https:\/\/nucleojoalheria.org\/es\/inscricoes\/","title":{"rendered":"Inscri\u00e7\u00f5es"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"3310\" class=\"elementor elementor-3310\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-bc22e8b e-flex e-con-boxed e-con e-parent\" data-id=\"bc22e8b\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b3dd18a elementor-widget elementor-widget-html\" data-id=\"b3dd18a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!DOCTYPE html>\n<html lang=\"pt-BR\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Brazil Jewelry Week - Participantes<\/title>\n    <style>\n        body {\n            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n            line-height: 1.6;\n            margin: 0;\n            padding: 20px;\n            color: #333;\n            background-color: #f5f7fa;\n        }\n        h1 {\n            color: #2c3e50;\n            text-align: center;\n            margin-bottom: 30px;\n            font-weight: 600;\n            font-size: 2.5em;\n        }\n        .container {\n            max-width: 1200px;\n            margin: 0 auto;\n        }\n        .upload-area {\n            border: 2px dashed #ccc;\n            padding: 30px;\n            text-align: center;\n            margin-bottom: 40px;\n            border-radius: 8px;\n            background-color: #fff;\n            box-shadow: 0 2px 10px rgba(0,0,0,0.05);\n        }\n        .participant {\n            margin-bottom: 10px;\n            background-color: #fff;\n            border-radius: 0px;\n            box-shadow: 0 2px 5px rgba(0,0,0,0.1);\n            overflow: hidden;\n            transition: all 0.3s ease;\n        }\n        .participant-header {\n            padding: 15px 20px;\n            background-color: #000000;\n            color: white;\n            cursor: pointer;\n            display: flex;\n            justify-content: space-between;\n            align-items: center;\n        }\n        .participant-name {\n            font-size: 1.3em;\n            font-weight: 500;\n            margin: 0;\n        }\n        .participant-content {\n            padding: 0;\n            max-height: 0;\n            overflow: hidden;\n            transition: max-height 0.3s ease, padding 0.3s ease;\n        }\n        .participant.active .participant-content {\n            padding: 25px;\n            max-height: 5000px;\n        }\n        .participant-info {\n            display: grid;\n            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n            gap: 20px;\n            margin-bottom: 20px;\n        }\n        .field-group {\n            margin-bottom: 15px;\n        }\n        .field-title {\n            font-weight: 600;\n            color: #2c3e50;\n            margin-bottom: 5px;\n            font-size: 0.95em;\n        }\n        .field-content {\n            background-color: #f8fafc;\n            padding: 12px;\n            border-radius: 6px;\n            border-left: 4px solid #000000;\n            word-break: break-word;\n        }\n        .long-text {\n            max-height: 200px;\n            overflow-y: auto;\n            line-height: 1.6;\n            padding-right: 8px;\n        }\n        .obra-container {\n            background-color: #fff;\n            border-radius: 8px;\n            padding: 20px;\n            margin-bottom: 25px;\n            box-shadow: 0 2px 6px rgba(0,0,0,0.05);\n            border: 1px solid #e0e0e0;\n        }\n        .obra-title {\n            font-weight: 600;\n            color: #2c3e50;\n            margin-bottom: 15px;\n            font-size: 1.2em;\n            padding-bottom: 5px;\n            border-bottom: 1px solid #eee;\n        }\n        .obra-file {\n            margin-bottom: 15px;\n        }\n        .btn {\n            background-color: #000000;\n            color: white !important;\n            padding: 10px 15px;\n            border: none;\n            border-radius: 6px;\n            cursor: pointer;\n            font-size: 14px;\n            margin-right: 10px;\n            margin-bottom: 10px;\n            text-decoration: none;\n            display: inline-block;\n            transition: background-color 0.3s ease;\n        }\n        .btn:hover {\n            background-color: #000000;\n        }\n        .btn-pdf {\n            background-color: #000000;\n        }\n        .btn-pdf:hover {\n            background-color: #000000;\n        }\n        .btn-image {\n            background-color: #000000;\n        }\n        .btn-image:hover {\n            background-color: #000000;\n        }\n        .file-preview {\n            margin-top: 15px;\n            max-width: 100%;\n            border-radius: 4px;\n            border: 1px solid #ddd;\n        }\n        .file-preview:not([src]):not([srcset]) {\n            display: none !important;\n        }\n        .btn {\n            background-color: #000000;\n            color: white !important;\n            padding: 12px 20px;\n            border: none;\n            border-radius: 6px;\n            cursor: pointer;\n            font-size: 16px;\n            margin: 10px 5px;\n            transition: background-color 0.3s ease;\n        }\n        .btn:hover {\n            background-color: #000000;\n        }\n        .file-input {\n            padding: 12px;\n            border: 1px solid #ddd;\n            border-radius: 6px;\n            margin: 10px 0;\n            width: 80%;\n            max-width: 400px;\n        }\n        .message {\n            padding: 15px;\n            border-radius: 6px;\n            margin-top: 15px;\n            text-align: center;\n        }\n        .error {\n            background-color: #ffebee;\n            color: #c62828;\n            border: 1px solid #ef9a9a;\n        }\n        .success {\n            background-color: #e8f5e9;\n            color: #2e7d32;\n            border: 1px solid #a5d6a7;\n        }\n        .debug-info {\n            background-color: #263238;\n            color: #eceff1;\n            padding: 15px;\n            margin-top: 20px;\n            border-radius: 6px;\n            font-family: 'Courier New', Courier, monospace;\n            font-size: 13px;\n            max-height: 300px;\n            overflow-y: auto;\n            display: none;\n        }\n        .file-info {\n            margin-top: 15px;\n            font-size: 14px;\n            color: #555;\n            background-color: #f5f5f5;\n            padding: 10px;\n            border-radius: 6px;\n        }\n        .link-btn {\n            display: block;\n            margin-top: 8px;\n            background-color: #000000;\n            color: white !important;\n            padding: 8px 12px;\n            border-radius: 4px;\n            text-decoration: none;\n            font-size: 14px;\n            text-align: center;\n            transition: background-color 0.3s;\n        }\n        .link-btn:hover {\n            background-color: #000000;\n        }\n        .arrow {\n            transition: transform 0.3s ease;\n        }\n        .participant.active .arrow {\n            transform: rotate(180deg);\n        }\n        @media (max-width: 768px) {\n            .participant-info {\n                grid-template-columns: 1fr;\n            }\n        }\n    <\/style>\n<\/head>\n<body>\n    <div class=\"container\">\n        <h1>Brazil Jewelry Week - Sexta Edi\u00e7\u00e3o<\/h1>\n        \n        <div class=\"upload-area\">\n            <h2>Carregar Planilha<\/h2>\n            <input type=\"file\" id=\"csvFile\" accept=\".csv,.xlsx,.xls\" class=\"file-input\">\n            <button class=\"btn\" onclick=\"processCSV()\">Processar Planilha<\/button>\n            <button class=\"btn\" onclick=\"showDebugInfo()\">Mostrar Debug<\/button>\n            <div id=\"message\" class=\"message\"><\/div>\n            <div id=\"file-info\" class=\"file-info\"><\/div>\n            <div id=\"debug-info\" class=\"debug-info\"><\/div>\n        <\/div>\n        \n        <div id=\"participants-container\"><\/div>\n    <\/div>\n\n    <script>\n        let currentFileContent = '';\n        let currentParticipants = [];\n        const COLUMNS_TO_IGNORE = ['Submission ID', 'Created At', 'User IP', 'Referrer', 'User ID', 'User Agent', 'Form Name (ID)', 'Form Name', 'User ID (ID)'];\n\n        function processCSV() {\n            const fileInput = document.getElementById('csvFile');\n            const file = fileInput.files[0];\n            const messageDiv = document.getElementById('message');\n            const fileInfoDiv = document.getElementById('file-info');\n            \n            if (!file) {\n                showMessage('Por favor, selecione um arquivo CSV.', 'error');\n                return;\n            }\n            \n            fileInfoDiv.innerHTML = `<strong>Arquivo:<\/strong> ${file.name}<br>\n                <strong>Tamanho:<\/strong> ${(file.size \/ 1024).toFixed(2)} KB<br>\n                <strong>Tipo:<\/strong> ${file.type || 'N\u00e3o especificado'}`;            \n            if (file.name.endsWith('.xlsx') || file.name.endsWith('.xls')) {\n                showMessage('Para arquivos Excel (.xlsx\/.xls), converta para CSV primeiro.', 'error');\n                return;\n            }\n            \n            const reader = new FileReader();\n            \n            reader.onload = function(e) {\n                try {\n                    const contents = e.target.result;\n                    currentFileContent = contents;\n                    \n                    const normalizedContents = contents.replace(\/\\ufeff\/g, '')\n                                                      .replace(\/\\r\\n\/g, '\\n')\n                                                      .replace(\/\\r\/g, '\\n');\n                    \n                    console.log('Conte\u00fado do arquivo (primeiros 500 caracteres):', normalizedContents.substring(0, 500));\n                    \n                    let participants = [];\n                    const delimiters = [';', ',', '\\t', '|'];\n                    \n                    for (let delimiter of delimiters) {\n                        participants = parseCSV(normalizedContents, delimiter);\n                        if (participants.length > 0) {\n                            console.log(`Sucesso com delimitador: \"${delimiter}\"`);\n                            break;\n                        }\n                    }\n                    \n                    if (participants.length === 0) {\n                        showMessage('Nenhum dado encontrado no arquivo CSV. Verifique o formato e os delimitadores.', 'error');\n                        return;\n                    }\n                    \n                    currentParticipants = participants;\n                    displayParticipants(participants);\n                    showMessage(`Dados carregados com sucesso! ${participants.length} participantes encontrados.`, 'success');\n                    \n                } catch (error) {\n                    console.error('Erro ao processar CSV:', error);\n                    showMessage(`Erro ao processar o arquivo CSV: ${error.message}`, 'error');\n                }\n            };\n            \n            reader.onerror = function() {\n                showMessage('Erro ao ler o arquivo.', 'error');\n            };\n            \n            reader.readAsText(file, 'UTF-8');\n        }\n        \n        function parseCSV(csvText, delimiter = ';') {\n            console.log(`Tentando parser com delimitador: \"${delimiter}\"`);\n            \n            let lines = csvText.split('\\n').filter(line => line.trim() !== '');\n            \n            if (lines.length < 2) {\n                console.log('Menos de 2 linhas ap\u00f3s filtro');\n                return [];\n            }\n            \n            \/\/ Processa headers\n            const headers = parseCSVLine(lines[0], delimiter)\n                .map(header => header.trim())\n                .filter(header => !COLUMNS_TO_IGNORE.includes(header));\n            \n            console.log('Headers encontrados:', headers);\n            \n            if (headers.length < 2) {\n                console.log('Poucos headers encontrados, delimitador pode estar errado');\n                return [];\n            }\n            \n            const participants = [];\n            \n            for (let i = 1; i < lines.length; i++) {\n                const values = parseCSVLine(lines[i], delimiter);\n                \n                if (values.length === 0 || (values.length === 1 && values[0].trim() === '')) {\n                    continue;\n                }\n                \n                const participant = {};\n                \n                for (let j = 0; j < headers.length; j++) {\n                    if (j >= values.length) continue;\n                    \n                    let value = values[j];\n                    const header = headers[j];\n                    \n                    if (COLUMNS_TO_IGNORE.includes(header)) continue;\n                    \n                    if (typeof value === 'string') {\n                        value = value.trim();\n                        \/\/ Remove as aspas se o valor come\u00e7ar e terminar com elas\n                        if (value.startsWith('\"') && value.endsWith('\"')) {\n                            value = value.slice(1, -1);\n                        }\n                        \/\/ Remove as barras invertidas de qualquer valor lido do CSV\n                        value = value.replace(\/\\\\\/g, ''); \n                    }\n                    \n                    participant[header] = value;\n                }\n                \n                participants.push(participant);\n            }\n            \n            console.log(`Participantes encontrados: ${participants.length}`);\n            return participants;\n        }\n        \n        function parseCSVLine(line, delimiter = ';') {\n            const values = [];\n            let current = '';\n            let inQuotes = false;\n            \n            for (let i = 0; i < line.length; i++) {\n                const char = line[i];\n                \n                if (char === '\"') {\n                    if (i + 1 < line.length && line[i + 1] === '\"') {\n                        current += '\"';\n                        i++;\n                    } else {\n                        inQuotes = !inQuotes;\n                    }\n                } else if (char === delimiter && !inQuotes) {\n                    values.push(current.trim());\n                    current = '';\n                } else {\n                    current += char;\n                }\n            }\n            \n            values.push(current.trim());\n            return values;\n        }\n        \n        function displayParticipants(participants) {\n            const container = document.getElementById('participants-container');\n            container.innerHTML = '';\n            \n            if (participants.length === 0) {\n                container.innerHTML = '<p>Nenhum participante encontrado.<\/p>';\n                return;\n            }\n            \n            participants.forEach((participant, index) => {\n                const participantDiv = document.createElement('div');\n                participantDiv.className = 'participant';\n                \n                \/\/ Cabe\u00e7alho do acorde\u00e3o\n                const headerDiv = document.createElement('div');\n                headerDiv.className = 'participant-header';\n                \n                \/\/ Nome do participante\n                const nameField = findField(participant, ['Nome', 'Name', 'nome', 'NOME', 'Nome Completo']);\n                const nameDiv = document.createElement('div');\n                nameDiv.className = 'participant-name';\n                nameDiv.textContent = nameField ? cleanText(participant[nameField]) : `Participante ${index + 1}`;\n                \n                \/\/ \u00cdcone de seta\n                const arrowDiv = document.createElement('div');\n                arrowDiv.className = 'arrow';\n                arrowDiv.innerHTML = '\u25bc';\n                \n                headerDiv.appendChild(nameDiv);\n                headerDiv.appendChild(arrowDiv);\n                participantDiv.appendChild(headerDiv);\n                \n                \/\/ Conte\u00fado do acorde\u00e3o\n                const contentDiv = document.createElement('div');\n                contentDiv.className = 'participant-content';\n                \n                \/\/ Informa\u00e7\u00f5es b\u00e1sicas\n                const infoGrid = document.createElement('div');\n                infoGrid.className = 'participant-info';\n                \n                \/\/ Processa todos os campos, exceto os de obra e arquivos\n                Object.keys(participant).forEach(key => {\n                    if (!participant[key] || participant[key].toString().trim() === '' || COLUMNS_TO_IGNORE.includes(key)) {\n                        return;\n                    }\n                    \n                    const lowerKey = key.toLowerCase();\n                    \n                    \/\/ Pula campos que s\u00e3o obras ou arquivos para serem processados na se\u00e7\u00e3o espec\u00edfica de obras e arquivos\n                    if (lowerKey.includes('obra') || lowerKey.includes('pe\u00e7a') || lowerKey.includes('piece') || \n                        lowerKey.includes('arquivo') || lowerKey.includes('file') || lowerKey.includes('imagem')) {\n                        return;\n                    }\n                    \n                    const value = cleanText(participant[key].toString());\n                    if (!value || value.trim() === '') return;\n                    \n                    const fieldDiv = document.createElement('div');\n                    fieldDiv.className = 'field-group';\n                    \n                    const titleDiv = document.createElement('div');\n                    titleDiv.className = 'field-title';\n                    titleDiv.textContent = key;\n                    \n                    const contentDiv = document.createElement('div');\n                    contentDiv.className = value.length > 300 ? 'field-content long-text' : 'field-content';\n                    \n                    if (isLink(value, key)) {\n                        const linkValue = extractAndCleanLink(value, key);\n                        \/\/ Para links em campos gerais, apenas torna-os clic\u00e1veis\n                        const displayValue = value.length > 50 ? value.substring(0, 47) + '...' : value;\n                        contentDiv.innerHTML = `<a href=\"${linkValue}\" target=\"_blank\">${displayValue}<\/a>`;\n                        \n                        \/\/ Adiciona o bot\u00e3o abaixo do link\n                        const linkBtn = document.createElement('a');\n                        linkBtn.href = linkValue;\n                        linkBtn.target = '_blank';\n                        linkBtn.className = 'link-btn';\n                        \n                        \/\/ Determina o tipo de arquivo pela extens\u00e3o\n                        const fileType = getFileTypeFromLink(linkValue);\n                        linkBtn.textContent = fileType ? `Abrir (${fileType})` : 'Abrir Link';\n                        \n                        contentDiv.appendChild(linkBtn);\n                    } else {\n                        contentDiv.innerHTML = formatText(value);\n                    }\n                    \n                    fieldDiv.appendChild(titleDiv);\n                    fieldDiv.appendChild(contentDiv);\n                    infoGrid.appendChild(fieldDiv);\n                });\n                \n                contentDiv.appendChild(infoGrid);\n                \n                \/\/ Processa obras e arquivos\n                processObrasAndFiles(contentDiv, participant);\n                \n                participantDiv.appendChild(contentDiv);\n                container.appendChild(participantDiv);\n                \n                \/\/ Adiciona evento de clique para expandir\/recolher\n                headerDiv.addEventListener('click', function() {\n                    \/\/ Fecha todos os outros participantes\n                    document.querySelectorAll('.participant').forEach(p => {\n                        if (p !== participantDiv) {\n                            p.classList.remove('active');\n                        }\n                    });\n                    \n                    \/\/ Alterna o participante clicado\n                    participantDiv.classList.toggle('active');\n                });\n            });\n        }\n        \n        function processObrasAndFiles(container, participant) {\n            const obraFields = {};\n            const fileFields = {};\n            \n            Object.keys(participant).forEach(key => {\n                if (!participant[key] || participant[key].toString().trim() === '') {\n                    return;\n                }\n                \n                const lowerKey = key.toLowerCase();\n                const value = cleanText(participant[key].toString());\n                \n                if (lowerKey.includes('obra') || lowerKey.includes('pe\u00e7a') || lowerKey.includes('piece')) {\n                    obraFields[key] = value;\n                } else if (lowerKey.includes('arquivo') || lowerKey.includes('file') || lowerKey.includes('imagem')) {\n                    fileFields[key] = value;\n                }\n            });\n            \n            if (Object.keys(obraFields).length > 0 || Object.keys(fileFields).length > 0) {\n                const obraContainer = document.createElement('div');\n                obraContainer.className = 'obra-container';\n                \n                const obraTitle = document.createElement('div');\n                obraTitle.className = 'obra-title';\n                obraTitle.textContent = 'Obras e Arquivos';\n                obraContainer.appendChild(obraTitle);\n                \n                \/\/ Adiciona descri\u00e7\u00f5es das obras (textos)\n                Object.entries(obraFields).forEach(([key, value]) => {\n                    const fieldDiv = document.createElement('div');\n                    fieldDiv.className = 'field-group';\n                    \n                    const titleDiv = document.createElement('div');\n                    titleDiv.className = 'field-title';\n                    titleDiv.textContent = key;\n                    \n                    const contentDiv = document.createElement('div');\n                    contentDiv.className = value.length > 300 ? 'field-content long-text' : 'field-content';\n                    \n                    if (isLink(value, key)) {\n                        const linkValue = extractAndCleanLink(value, key);\n                        const displayValue = value.length > 50 ? value.substring(0, 47) + '...' : value;\n                        contentDiv.innerHTML = `<a href=\"${linkValue}\" target=\"_blank\">${displayValue}<\/a>`;\n                        \n                        \/\/ Adiciona o bot\u00e3o abaixo do link\n                        const linkBtn = document.createElement('a');\n                        linkBtn.href = linkValue;\n                        linkBtn.target = '_blank';\n                        linkBtn.className = 'link-btn';\n                        \n                        \/\/ Determina o tipo de arquivo pela extens\u00e3o\n                        const fileType = getFileTypeFromLink(linkValue);\n                        linkBtn.textContent = fileType ? `Abrir (${fileType})` : 'Abrir Link';\n                        \n                        contentDiv.appendChild(linkBtn);\n                    } else {\n                        contentDiv.innerHTML = formatText(value);\n                    }\n                    \n                    fieldDiv.appendChild(titleDiv);\n                    fieldDiv.appendChild(contentDiv);\n                    obraContainer.appendChild(fieldDiv);\n                });\n                \n                \/\/ Adiciona arquivos (PDFs ou imagens) e links clic\u00e1veis\n                Object.entries(fileFields).forEach(([key, value]) => {\n                    const fileDiv = document.createElement('div');\n                    fileDiv.className = 'obra-file';\n                    \n                    const titleDiv = document.createElement('div');\n                    titleDiv.className = 'field-title';\n                    titleDiv.textContent = key;\n                    fileDiv.appendChild(titleDiv);\n                    \n                    \/\/ Extrai e limpa os links do valor\n                    const links = extractLinks(value); \n                    \n                    links.forEach(link => {\n                        const isPDF = link.toLowerCase().endsWith('.pdf');\n                        const isImage = \/\\.(jpe?g|gif|png|webp|bmp)$\/i.test(link);\n                        const fileType = getFileTypeFromLink(link);\n\n                        \/\/ Cria o bot\u00e3o que aponta para o link corrigido\n                        const btn = document.createElement('a');\n                        btn.href = link;\n                        btn.target = '_blank';\n                        \n                        if (isImage) {\n                            btn.className = 'btn btn-image';\n                            btn.textContent = fileType ? `Ver ${fileType}` : 'Ver Imagem';\n                            fileDiv.appendChild(btn);\n\n                            const imgPreview = document.createElement('img');\n                            imgPreview.src = link;\n                            imgPreview.className = 'file-preview';\n                            imgPreview.style.maxHeight = '200px';\n                            imgPreview.onerror = function() {\n                                this.style.display = 'none';\n                            };\n                            fileDiv.appendChild(imgPreview);\n\n                        } else if (isPDF) {\n                            btn.className = 'btn btn-pdf';\n                            btn.textContent = fileType ? `Ver ${fileType}` : 'Ver PDF';\n                            fileDiv.appendChild(btn);\n                        } else {\n                            btn.className = 'btn';\n                            btn.textContent = fileType ? `Ver ${fileType}` : 'Ver Arquivo \/ Link';\n                            fileDiv.appendChild(btn);\n                        }\n                        \n                        \/\/ Adiciona um bot\u00e3o adicional abaixo do link principal\n                        const secondaryBtn = document.createElement('a');\n                        secondaryBtn.href = link;\n                        secondaryBtn.target = '_blank';\n                        secondaryBtn.className = 'link-btn';\n                        secondaryBtn.textContent = fileType ? `Abrir (${fileType})` : 'Abrir Link';\n                        fileDiv.appendChild(secondaryBtn);\n                    });\n                    \n                    obraContainer.appendChild(fileDiv);\n                });\n                \n                container.appendChild(obraContainer);\n            }\n        }\n        \n        function getFileTypeFromLink(link) {\n            if (!link) return null;\n            \n            const lowerLink = link.toLowerCase();\n            \n            if (lowerLink.endsWith('.pdf')) {\n                return 'PDF';\n            } else if (lowerLink.match(\/\\.(jpe?g)$\/)) {\n                return 'JPG';\n            } else if (lowerLink.endsWith('.png')) {\n                return 'PNG';\n            } else if (lowerLink.endsWith('.gif')) {\n                return 'GIF';\n            } else if (lowerLink.endsWith('.webp')) {\n                return 'WEBP';\n            } else if (lowerLink.endsWith('.bmp')) {\n                return 'BMP';\n            } else if (lowerLink.endsWith('.doc') || lowerLink.endsWith('.docx')) {\n                return 'DOC';\n            } else if (lowerLink.endsWith('.xls') || lowerLink.endsWith('.xlsx')) {\n                return 'XLS';\n            } else if (lowerLink.endsWith('.ppt') || lowerLink.endsWith('.pptx')) {\n                return 'PPT';\n            } else if (lowerLink.endsWith('.zip') || lowerLink.endsWith('.rar')) {\n                return 'ZIP';\n            }\n            \n            return null;\n        }\n        \n        function extractLinks(text) {\n            const urlRegex = \/(https?:\\\/\\\/[^\\s]+|www\\.[^\\s]+)\/gi;\n            const matches = text.match(urlRegex) || [];\n            \n            return matches.map(link => {\n                if (link.startsWith('www.') && !link.startsWith('http')) {\n                    link = `https:\/\/${link}`;\n                }\n                return link.replace(\/\\\\\/g, ''); \n            });\n        }\n        \n        function findField(participant, possibleNames) {\n            for (let name of possibleNames) {\n                if (participant.hasOwnProperty(name)) {\n                    return name;\n                }\n            }\n            return null;\n        }\n        \n        function cleanText(text) {\n            if (!text) return '';\n            \n            return text.toString()\n                .replace(\/\\\\r\\\\n\/g, '\\n')\n                .replace(\/\\\\n\/g, '\\n')\n                .replace(\/\\\\r\/g, '\\n')\n                .replace(\/\\\\t\/g, ' ')\n                .replace(\/\\n\\s*\\n\\s*\\n\/g, '\\n\\n')\n                .replace(\/\\s+\/g, ' ')\n                .replace(\/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]\/g, '')\n                .trim();\n        }\n        \n        function formatText(text) {\n            if (!text) return '';\n            \n            return text\n                .split('\\n')\n                .map(line => line.trim())\n                .filter(line => line.length > 0)\n                .map(line => `<p style=\"margin: 5px 0;\">${line}<\/p>`)\n                .join('');\n        }\n        \n        function isLink(value, key) {\n            const lowerValue = value.toLowerCase();\n            const isUrlFormat = lowerValue.includes('http:\/\/') || \n                                lowerValue.includes('https:\/\/') || \n                                lowerValue.includes('www.');\n            \n            return isUrlFormat;\n        }\n        \n        function extractAndCleanLink(value, key) {\n            let cleanValue = cleanText(value);\n            const urlRegex = \/(https?:\\\/\\\/[^\\s]+|www\\.[^\\s]+)\/i;\n            const match = cleanValue.match(urlRegex);\n            \n            if (match) {\n                let extractedLink = match[0];\n                if (extractedLink.startsWith('www.') && !extractedLink.startsWith('http')) {\n                    extractedLink = `https:\/\/${extractedLink}`;\n                }\n                return extractedLink.replace(\/\\\\\/g, ''); \n            }\n            \n            if (!cleanValue.startsWith('http:\/\/') && !cleanValue.startsWith('https:\/\/') && !cleanValue.startsWith('www.')) {\n                if (key.toLowerCase().includes('instagram')) {\n                    cleanValue = cleanValue.replace('@', '').replace('instagram.com\/', '').replace('\/', '');\n                    return `https:\/\/www.instagram.com\/${cleanValue}`;\n                }\n                return `https:\/\/${cleanValue}`;\n            }\n            \n            return cleanValue; \n        }\n        \n        function showMessage(message, type) {\n            const messageDiv = document.getElementById('message');\n            messageDiv.textContent = message;\n            messageDiv.className = `message ${type}`;\n        }\n        \n        function showDebugInfo() {\n            const debugDiv = document.getElementById('debug-info');\n            \n            if (debugDiv.style.display === 'none') {\n                debugDiv.style.display = 'block';\n                \n                let debugContent = '';\n                \n                if (currentFileContent) {\n                    debugContent += 'CONTE\u00daDO DO ARQUIVO (primeiros 1000 caracteres):\\n';\n                    debugContent += currentFileContent.substring(0, 1000) + '\\n\\n';\n                    \n                    const lines = currentFileContent.split('\\n');\n                    debugContent += `TOTAL DE LINHAS: ${lines.length}\\n\\n`;\n                    \n                    if (lines.length > 0) {\n                        debugContent += 'PRIMEIRA LINHA (headers):\\n';\n                        debugContent += lines[0] + '\\n\\n';\n                    }\n                    \n                    if (lines.length > 1) {\n                        debugContent += 'SEGUNDA LINHA (primeiro registro):\\n';\n                        debugContent += lines[1] + '\\n\\n';\n                    }\n                }\n                \n                if (currentParticipants.length > 0) {\n                    debugContent += 'PARTICIPANTES PROCESSADOS:\\n';\n                    debugContent += JSON.stringify(currentParticipants[0], null, 2);\n                }\n                \n                debugDiv.textContent = debugContent;\n            } else {\n                debugDiv.style.display = 'none';\n            }\n        }\n    <\/script>\n<\/body>\n<\/html>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Brazil Jewelry Week &#8211; Participantes Brazil Jewelry Week &#8211; Sexta Edi\u00e7\u00e3o Carregar Planilha Processar Planilha Mostrar Debug<\/p>","protected":false},"author":65,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_canvas","meta":{"footnotes":""},"class_list":["post-3310","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/nucleojoalheria.org\/es\/wp-json\/wp\/v2\/pages\/3310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nucleojoalheria.org\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/nucleojoalheria.org\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/nucleojoalheria.org\/es\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/nucleojoalheria.org\/es\/wp-json\/wp\/v2\/comments?post=3310"}],"version-history":[{"count":0,"href":"https:\/\/nucleojoalheria.org\/es\/wp-json\/wp\/v2\/pages\/3310\/revisions"}],"wp:attachment":[{"href":"https:\/\/nucleojoalheria.org\/es\/wp-json\/wp\/v2\/media?parent=3310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}