{"id":4325,"date":"2026-02-28T17:28:21","date_gmt":"2026-02-28T09:28:21","guid":{"rendered":"https:\/\/phicycling.com\/activation-et-garantie\/"},"modified":"2026-04-08T09:42:26","modified_gmt":"2026-04-08T01:42:26","slug":"activation-et-garantie","status":"publish","type":"page","link":"https:\/\/phicycling.com\/fr\/activation-et-garantie\/","title":{"rendered":"Activation et garantie"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"4325\" class=\"elementor elementor-4325 elementor-2761\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-8365112 e-flex e-con-boxed e-con e-parent\" data-id=\"8365112\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-85efb9d elementor-widget elementor-widget-shortcode\" data-id=\"85efb9d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">        <div class=\"wc-hub-container\">\r\n            <style>\r\n                \/* \u2705 \u4f60\u539f\u6765\u7684\u6837\u5f0f\uff0c\u4e00\u5b57\u4e0d\u6539 *\/\r\n                .wc-hub-container {\r\n                    max-width: 1000px; margin: 40px auto;\r\n                    font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;\r\n                }\r\n                .wc-hub-header { text-align: center; margin-bottom: 40px; }\r\n                .wc-hub-header h2 { font-size: 28px; color: #111 !important; margin-bottom: 10px; }\r\n                .wc-hub-header p { color: #7f8c8d; font-size: 16px; }\r\n                .wc-hub-tabs { display:flex; justify-content:center; gap:10px; margin:-18px 0 30px; width:100%; box-sizing:border-box; }\r\n                .wc-hub-tab { min-width:0; max-width:100%; box-sizing:border-box; padding:10px 20px !important; border:1px solid #111 !important; border-radius:4px; background:#fff !important; color:#111 !important; cursor:pointer; font-weight:700; }\r\n                .wc-hub-tab.is-active { background:#111 !important; color:#fff !important; }\r\n                .wc-hub-panel { display:none; }\r\n                .wc-hub-panel.is-active { display:block; }\r\n    \r\n                .wc-hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }\r\n    \r\n                .wc-card {\r\n                    background: #ffffff;\r\n                    border: 1px solid #e5e5e5;\r\n                    border-radius: 8px;\r\n                    padding: 30px;\r\n                    box-shadow: 0 4px 12px rgba(0,0,0,0.05);\r\n                }\r\n                .wc-card h3 {\r\n                    margin-top: 0; color: #111 !important;\r\n                    border-bottom: 2px solid #f0f0f0;\r\n                    padding-bottom: 15px; margin-bottom: 20px;\r\n                }\r\n                .wc-card p.desc {\r\n                    font-size: 14px; color: #666; margin-bottom: 25px; line-height: 1.5;\r\n                }\r\n    \r\n                .wc-form-group { margin-bottom: 20px; }\r\n                .wc-form-group label {\r\n                    display: block; margin-bottom: 8px;\r\n                    font-weight: 600; color: #34495e;\r\n                }\r\n                .wc-form-group input {\r\n                    width: 100%; padding: 12px;\r\n                    border: 1px solid #bdc3c7; border-radius: 4px;\r\n                    font-size: 16px; box-sizing: border-box;\r\n                }\r\n    \r\n                \/* \u2705 \u6781\u5c0f\u8865\u5145\uff08\u4e0d\u5f71\u54cd\u539f UI\uff09 *\/\r\n                .wc-barcode-row {\r\n                    display: flex; gap: 8px; margin-bottom: 10px;\r\n                    align-items: stretch;\r\n                }\r\n                .wc-barcode-row:last-child { margin-bottom: 0; }\r\n                .wc-barcode-row input { min-width: 0; }\r\n                .wc-barcode-entry { margin-bottom:14px; }\r\n                .wc-component-caption { display:block;margin:7px 0 5px;color:#111;font-size:13px;font-weight:600; }\r\n                .wc-component-caption em { color:#777;font-style:normal;font-weight:400; }\r\n                .wc-component-label { width:100%;box-sizing:border-box;padding:9px 10px;border:1px solid #bdc3c7;border-radius:4px;background:#fff;color:#111;font-size:14px; }\r\n                .wc-warranty-policy-note { margin:10px 0 0;color:#666;font-size:13px;line-height:1.55; }\r\n                .wc-warranty-policy-note a { color:#111;text-decoration:underline;font-weight:700; }\r\n                .wc-owner-tabs { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px; }\r\n                .wc-owner-tabs label { position:relative;margin:0; }\r\n                .wc-owner-tabs input { position:absolute;opacity:0;pointer-events:none; }\r\n                .wc-owner-tabs span { display:block;padding:11px 12px;border:1px solid #111;border-radius:4px;text-align:center;font-weight:700;cursor:pointer;background:#fff;color:#111; }\r\n                .wc-owner-tabs input:checked + span { background:#111;color:#fff; }\r\n                .wc-scan-btn {\r\n                    width:54px; min-height:48px; padding:0 !important; font-size:20px;\r\n                    border: none; border-radius: 4px;\r\n                    background: #111 !important; color: #fff !important; cursor: pointer;\r\n                    border-color: #111 !important;\r\n                    flex: 0 0 auto;\r\n                }\r\n                .wc-scan-btn svg { display:block; width:29px; height:29px; margin:auto; fill:none; stroke:#fff; stroke-width:2; stroke-linecap:round; }\r\n                .wc-remove-barcode {\r\n                    width: 42px; border: 1px solid #bdc3c7; border-radius: 4px;\r\n                    background: #111 !important; color: #fff !important; font-size: 22px;\r\n                    border-color: #111 !important;\r\n                    cursor: pointer; flex: 0 0 auto;\r\n                }\r\n                .wc-remove-barcode:disabled { opacity: .35; cursor: not-allowed; }\r\n                .wc-add-barcode {\r\n                    border: 1px solid #111 !important; border-radius: 4px;\r\n                    background: #111 !important; color: #fff !important;\r\n                    padding: 7px 12px; font-size: 14px; font-weight: 600;\r\n                    cursor: pointer; margin-top:12px !important; margin-bottom:8px !important;\r\n                }\r\n                .wc-scan-btn:hover, .wc-remove-barcode:hover, .wc-add-barcode:hover,\r\n                .wc-btn:hover { background: #333 !important; border-color: #333 !important; }\r\n                .wc-repair-card { max-width:760px; margin:0 auto; }\r\n                .wc-repair-card select, .wc-repair-card textarea { width:100%; box-sizing:border-box; padding:12px; border:1px solid #bdc3c7; border-radius:4px; font-size:16px; background:#fff; }\r\n                .wc-repair-card textarea { min-height:130px; resize:vertical; }\r\n                .wc-repair-help { color:#666; font-size:13px; margin:7px 0 0; }\r\n                .wc-repair-lookup-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:end; }\r\n                .wc-repair-lookup-row .wc-form-group { margin-bottom:0; }\r\n                .wc-repair-find { min-height:48px; white-space:nowrap; padding:0 16px !important; background:#111 !important; color:#fff !important; border:1px solid #111 !important; border-radius:4px; cursor:pointer; }\r\n                .wc-repair-file-control { display:flex;align-items:center;gap:12px;min-height:48px;padding:6px;border:1px solid #bdc3c7;border-radius:4px;background:#fff;box-sizing:border-box; }\r\n                .wc-repair-file-control input[type=\"file\"] { position:absolute;width:1px;height:1px;padding:0;border:0;clip:rect(0,0,0,0);clip-path:inset(50%);overflow:hidden;white-space:nowrap; }\r\n                .wc-repair-file-button { flex:0 0 auto;padding:9px 14px !important;background:#111 !important;color:#fff !important;border:1px solid #111 !important;border-radius:4px;cursor:pointer;font-weight:600; }\r\n                .wc-repair-file-name { min-width:0;color:#222;overflow-wrap:anywhere; }\r\n                .wc-upload-progress { margin-top:14px; }\r\n                .wc-upload-progress-track { height:12px;background:#e3e3e3;border-radius:999px;overflow:hidden; }\r\n                .wc-upload-progress-track span { display:block;width:0;height:100%;background:#111;transition:width .15s ease; }\r\n                .wc-upload-progress-label { display:block;margin-top:7px;color:#111;font-size:13px; }\r\n                .wc-add-repair-images { margin-top:10px;padding:9px 14px !important;background:#111 !important;color:#fff !important;border:1px solid #111 !important;border-radius:4px;cursor:pointer; }\r\n                #repair-images { position:absolute;width:1px;height:1px;padding:0;border:0;clip:rect(0,0,0,0);overflow:hidden; }\r\n                .wc-repair-image-queue { display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;margin-top:12px; }\r\n                .wc-repair-image-item { position:relative;border:1px solid #ddd;border-radius:4px;overflow:hidden;background:#f5f5f5; }\r\n                .wc-repair-image-item img { display:block;width:100%;height:100px;object-fit:cover; }\r\n                .wc-repair-image-item button { position:absolute;right:5px;top:5px;width:27px;height:27px;padding:0 !important;border:0;border-radius:50%;background:#111 !important;color:#fff !important;font-size:18px;line-height:27px;cursor:pointer; }\r\n                .wc-repair-image-item small { display:block;padding:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#333; }\r\n    \r\n                .wc-btn {\r\n                    width: 100%; padding: 14px;\r\n                    border: none; border-radius: 4px;\r\n                    font-size: 16px; font-weight: bold;\r\n                    color: #fff; cursor: pointer;\r\n                }\r\n                .btn-activate, .btn-check {\r\n                    background: #111 !important; border-color: #111 !important;\r\n                }\r\n    \r\n                .wc-result {\r\n                    margin-top: 25px; padding: 20px;\r\n                    border-radius: 4px; display: none;\r\n                }\r\n                .res-success { background: #d4edda; color: #155724; }\r\n                .res-error { background: #f8d7da; color: #721c24; }\r\n                .res-info { background: #fff3cd; color: #856404; }\r\n    \r\n                @media (max-width: 768px) {\r\n                    .wc-hub-grid { grid-template-columns: 1fr; }\r\n                    .wc-repair-lookup-row { grid-template-columns:1fr; }\r\n                    .wc-repair-find { width:100%; }\r\n                    .wc-hub-tabs { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin:-18px 0 24px;padding:0;overflow:hidden; }\r\n                    .wc-hub-tab { width:100%;padding:10px 5px !important;font-size:11px;line-height:1.35;letter-spacing:1px;white-space:normal;overflow-wrap:anywhere; }\r\n                    .wc-card { padding:22px 18px; }\r\n                }\r\n    \r\n                \/* \u2705 \u626b\u7801\u5c42 *\/\r\n                #wcScanModal {\r\n                    display: none; position: fixed; inset: 0;\r\n                    background: #000; z-index: 99999;\r\n                    align-items: center; justify-content: center;\r\n                    flex-direction: column;\r\n                }\r\n                #wcScanBox {\r\n                    width: 90%; max-width: 400px;\r\n                    aspect-ratio: 4\/3;\r\n                    position: relative; overflow: hidden;\r\n                }\r\n                #wcScanBox video, #wcScanBox canvas {\r\n                    width: 100%; height: 100%; object-fit: cover;\r\n                }\r\n                .wc-scan-guide {\r\n                    position: absolute; z-index: 3; pointer-events: none;\r\n                    width: 52%; aspect-ratio: 1; box-sizing: border-box;\r\n                    top: 50%; left: 50%; transform: translate(-50%, -50%);\r\n                    border: 3px dashed #20e870; border-radius: 6px;\r\n                }\r\n                #wcScanStatus {\r\n                    width: 100%; margin: 16px 0 12px;\r\n                    padding: 0 20px; box-sizing: border-box;\r\n                    text-align: center; color: #fff; font-size: 14px;\r\n                }\r\n            <\/style>\r\n    \r\n            <div class=\"wc-hub-header\">\r\n                <h2>Centre de garantie<\/h2>\r\n                <p>Activez votre produit, v\u00e9rifiez la garantie ou envoyez une demande de r\u00e9paration.<\/p>\r\n            <\/div>\r\n\r\n            <div class=\"wc-hub-tabs\" role=\"tablist\" aria-label=\"Warranty services\">\r\n                <button type=\"button\" class=\"wc-hub-tab is-active\" data-hub-panel=\"warranty\" role=\"tab\" aria-selected=\"true\">Centre de garantie<\/button>\r\n                <button type=\"button\" class=\"wc-hub-tab\" data-hub-panel=\"repair\" role=\"tab\" aria-selected=\"false\">Demande de r\u00e9paration<\/button>\r\n            <\/div>\r\n\r\n            <div id=\"wc-panel-warranty\" class=\"wc-hub-panel is-active\" role=\"tabpanel\">\r\n            <div class=\"wc-hub-grid\">\r\n                <!-- \u6fc0\u6d3b -->\r\n                <div class=\"wc-card\">\r\n                    <h3>Activer la garantie<\/h3>\r\n                    <p class=\"desc\">Enregistrez roues, guidons, v\u00e9los complets ou autres produits pour activer la garantie officielle.<\/p>\r\n    \r\n                    <form id=\"hub-activate-form\">\r\n                        <input type=\"hidden\" id=\"security\" name=\"security\" value=\"fee9fae10f\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/fr\/wp-json\/wp\/v2\/pages\/4325\" \/>                        <input type=\"hidden\" name=\"lang\" value=\"fr\">\r\n    \r\n                        <div class=\"wc-form-group\">\r\n                            <label>Codes-barres \/ num\u00e9ros de s\u00e9rie<\/label>\r\n                            <div id=\"wc-activation-barcodes\">\r\n                                <div class=\"wc-barcode-entry\">\r\n                                    <div class=\"wc-barcode-row\">\r\n                                        <input type=\"text\" id=\"ha-barcode-1\" name=\"barcodes[]\" placeholder=\"Barcode 1\" autocomplete=\"off\" required aria-label=\"Barcode 1\">\r\n                                        <button type=\"button\" class=\"wc-scan-btn\" onclick=\"wcStartScan('ha-barcode-1')\" aria-label=\"Scan barcode 1\"><svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M3 7V4h4M17 4h4v3M21 17v3h-4M7 20H3v-3M7 8v8M10 8v8M14 8v8M17 8v8\"\/><\/svg><\/button>\r\n                                        <button type=\"button\" class=\"wc-remove-barcode\" onclick=\"wcRemoveBarcode(this)\" aria-label=\"Remove barcode 1\">&times;<\/button>\r\n                                    <\/div>\r\n                                    <span class=\"wc-component-caption\">Type de produit <em>(obligatoire)<\/em><\/span>\r\n                                    <select class=\"wc-component-label\" name=\"component_labels[]\" aria-label=\"Product type for barcode 1\" required>\r\n                                        <option value=\"\" selected disabled>S\u00e9lectionnez le type de produit<\/option>\r\n                                        <option value=\"front_wheel\">Roue avant<\/option><option value=\"rear_wheel\">Roue arri\u00e8re<\/option><option value=\"handlebar\">Guidon<\/option><option value=\"complete_bike\">V\u00e9lo complet<\/option><option value=\"other\">Autre produit<\/option>                                    <\/select>\r\n                                <\/div>\r\n                            <\/div>\r\n                            <button type=\"button\" class=\"wc-add-barcode\" id=\"wc-add-barcode\">+ Ajouter un autre code<\/button>\r\n                            <p class=\"wc-warranty-policy-note\">The displayed warranty period applies to the product main body. For spokes, hubs, bearings, freehubs, ratchets, end caps, and other wear parts, please see the Warranty Policy. <a href=\"https:\/\/phicycling.com\/fr\/warranty-policy\/\" target=\"_blank\" rel=\"noopener\">View Warranty Policy<\/a><\/p>\r\n                        <\/div>\r\n    \r\n                        <div class=\"wc-form-group\">\r\n                            <label>Propri\u00e9taire<\/label>\r\n                            <div class=\"wc-owner-tabs\" role=\"radiogroup\" aria-label=\"Type de propri\u00e9taire\">\r\n                                <label><input type=\"radio\" name=\"owner_type\" value=\"first\" checked><span>Premier propri\u00e9taire<\/span><\/label>\r\n                                <label><input type=\"radio\" name=\"owner_type\" value=\"second\"><span>Deuxi\u00e8me propri\u00e9taire<\/span><\/label>\r\n                            <\/div>\r\n                            <input type=\"text\" name=\"customer_name\" placeholder=\"Nom du propri\u00e9taire\" required>\r\n                        <\/div>\r\n    \r\n                        <div class=\"wc-form-group\">\r\n                            <label>E-mail<\/label>\r\n                            <input type=\"email\" name=\"customer_email\" required>\r\n                        <\/div>\r\n    \r\n                        <button type=\"submit\" id=\"btn-act-submit\" class=\"wc-btn btn-activate\">Activer la garantie<\/button>\r\n                    <\/form>\r\n    \r\n                    <div id=\"hub-act-result\" class=\"wc-result\"><\/div>\r\n                <\/div>\r\n    \r\n                <!-- \u67e5\u8be2 -->\r\n                <div class=\"wc-card\">\r\n                    <h3>V\u00e9rifier le statut<\/h3>\r\n                    <p class=\"desc\">Saisissez le code du produit pour v\u00e9rifier la garantie.<\/p>\r\n    \r\n                    <form id=\"hub-check-form\">\r\n                        <input type=\"hidden\" id=\"security\" name=\"security\" value=\"fee9fae10f\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/fr\/wp-json\/wp\/v2\/pages\/4325\" \/>                        <input type=\"hidden\" name=\"lang\" value=\"fr\">\r\n    \r\n                        <div class=\"wc-form-group\">\r\n                            <label>Code-barres \/ num\u00e9ro de s\u00e9rie<\/label>\r\n                            <div class=\"wc-barcode-row\">\r\n                                <input type=\"text\" id=\"hc-barcode\" name=\"barcode\" required>\r\n                                <button type=\"button\" class=\"wc-scan-btn\" onclick=\"wcStartScan('hc-barcode')\" aria-label=\"Scan barcode\"><svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M3 7V4h4M17 4h4v3M21 17v3h-4M7 20H3v-3M7 8v8M10 8v8M14 8v8M17 8v8\"\/><\/svg><\/button>\r\n                            <\/div>\r\n                        <\/div>\r\n    \r\n                        <button type=\"submit\" id=\"btn-chk-submit\" class=\"wc-btn btn-check\">V\u00e9rifier le statut<\/button>\r\n                    <\/form>\r\n    \r\n                    <div id=\"hub-chk-result\" class=\"wc-result\"><\/div>\r\n                <\/div>\r\n            <\/div>\r\n            <\/div>\r\n\r\n            <div id=\"wc-panel-repair\" class=\"wc-hub-panel\" role=\"tabpanel\">\r\n                <div class=\"wc-card wc-repair-card\">\n    <h3>Demande de r\u00e9paration<\/h3>\n    <p class=\"desc\">Saisissez l\u2019adresse e-mail utilis\u00e9e pour activer le produit, puis s\u00e9lectionnez le composant exact et indiquez les d\u00e9tails de la r\u00e9paration.<\/p>\n    <form id=\"wc-repair-form\" enctype=\"multipart\/form-data\">\n        <input type=\"hidden\" id=\"security\" name=\"security\" value=\"fee9fae10f\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/fr\/wp-json\/wp\/v2\/pages\/4325\" \/>        <input type=\"hidden\" name=\"lang\" value=\"fr\">\n        <input id=\"repair-customer-name\" type=\"hidden\" name=\"customer_name\" value=\"\">\n        <div class=\"wc-repair-lookup-row\">\n            <div class=\"wc-form-group\">\n                <label for=\"repair-customer-email\">E-mail<\/label>\n                <input id=\"repair-customer-email\" type=\"email\" name=\"customer_email\" required>\n            <\/div>\n            <button type=\"button\" id=\"wc-find-repair-wheels\" class=\"wc-repair-find\">Trouver mon produit<\/button>\n        <\/div>\n        <p id=\"wc-repair-lookup-message\" class=\"wc-repair-help\" aria-live=\"polite\">Saisissez votre e-mail d\u2019activation pour retrouver vos produits enregistr\u00e9s.<\/p>\n\n        <div id=\"wc-repair-wheel-group\" class=\"wc-form-group\" hidden>\n            <label for=\"repair-barcode\">Produit \/ composant \/ code activ\u00e9<\/label>\n            <select id=\"repair-barcode\" name=\"barcode\" required disabled><\/select>\n        <\/div>\n\n        <div class=\"wc-form-group\">\n            <label for=\"repair-issue-type\">Type de probl\u00e8me<\/label>\n            <select id=\"repair-issue-type\" name=\"issue_type\" required>\n                <option value=\"\">S\u00e9lectionnez un probl\u00e8me<\/option>\n                                    <option value=\"wheel_rim_damage\">Dommage roue \/ jante<\/option>\n                                    <option value=\"carbon_spoke\">Probl\u00e8me de rayon carbone<\/option>\n                                    <option value=\"hub_bearing\">Probl\u00e8me de moyeu \/ roulement<\/option>\n                                    <option value=\"freehub_cassette\">Probl\u00e8me de corps de roue libre \/ cassette<\/option>\n                                    <option value=\"tubeless_tire_valve\">Probl\u00e8me tubeless \/ pneu \/ valve<\/option>\n                                    <option value=\"alignment_truing\">Alignement \/ d\u00e9voilage de roue<\/option>\n                                    <option value=\"noise_vibration\">Bruit \/ vibration<\/option>\n                                    <option value=\"installation_compatibility\">Installation \/ compatibilit\u00e9<\/option>\n                                    <option value=\"accident_impact\">Dommage accident \/ impact<\/option>\n                                    <option value=\"handlebar_cockpit\">Probl\u00e8me de guidon \/ cockpit<\/option>\n                                    <option value=\"complete_bike_assembly\">Probl\u00e8me de v\u00e9lo complet \/ montage<\/option>\n                                    <option value=\"drivetrain_brake\">Probl\u00e8me de transmission \/ frein<\/option>\n                                    <option value=\"electrical_system\">Probl\u00e8me \u00e9lectrique \/ moteur \/ batterie<\/option>\n                                    <option value=\"cosmetic_finish\">Probl\u00e8me esth\u00e9tique \/ finition<\/option>\n                                    <option value=\"other\">Autre<\/option>\n                            <\/select>\n        <\/div>\n\n        <div class=\"wc-form-group\">\n            <label for=\"repair-reason\">Description d\u00e9taill\u00e9e<\/label>\n            <textarea id=\"repair-reason\" name=\"reason\" required placeholder=\"D\u00e9crivez le probl\u00e8me, sa date d\u2019apparition et les conditions d\u2019utilisation pertinentes.\"><\/textarea>\n        <\/div>\n\n        <div class=\"wc-form-group\">\n            <label for=\"repair-video\">Vid\u00e9o<\/label>\n            <div class=\"wc-repair-file-control\">\n                <input id=\"repair-video\" type=\"file\" name=\"repair_video\" accept=\"video\/mp4,video\/quicktime,video\/webm\" required>\n                <button type=\"button\" id=\"wc-choose-repair-video\" class=\"wc-repair-file-button\">Choisir une vid\u00e9o<\/button>\n                <span id=\"wc-repair-video-name\" class=\"wc-repair-file-name\">Aucun fichier s\u00e9lectionn\u00e9<\/span>\n            <\/div>\n            <p class=\"wc-repair-help\">MP4, MOV ou WebM ; 100 Mo maximum.<\/p>\n        <\/div>\n\n        <div class=\"wc-form-group\">\n            <label for=\"repair-images\">Images<\/label>\n            <input id=\"repair-images\" type=\"file\" accept=\"image\/jpeg,image\/png,image\/webp\" multiple>\n            <button type=\"button\" id=\"wc-add-repair-images\" class=\"wc-add-repair-images\">+ Ajouter d\u2019autres images<\/button>\n            <div id=\"wc-repair-image-queue\" class=\"wc-repair-image-queue\" aria-live=\"polite\"><\/div>\n            <p class=\"wc-repair-help\">Ajoutez les images en une ou plusieurs s\u00e9lections (1 \u00e0 8 au total). Elles sont compress\u00e9es \u00e0 1800 px maximum avant l\u2019envoi ; les originaux ne sont pas conserv\u00e9s.<\/p>\n        <\/div>\n\n        <button type=\"submit\" id=\"wc-repair-submit\" class=\"wc-btn btn-activate\">Envoyer la demande de r\u00e9paration<\/button>\n        <div id=\"wc-repair-upload-progress\" class=\"wc-upload-progress\" hidden aria-live=\"polite\">\n            <div class=\"wc-upload-progress-track\"><span><\/span><\/div>\n            <strong class=\"wc-upload-progress-label\">Pr\u00e9paration de l\u2019envoi\u2026<\/strong>\n        <\/div>\n    <\/form>\n    <div id=\"wc-repair-result\" class=\"wc-result\"><\/div>\n<\/div>\n            <\/div>\r\n    \r\n            <!-- \u2705 \u626b\u7801\u5f39\u7a97 -->\r\n            <div id=\"wcScanModal\">\r\n                <button type=\"button\" onclick=\"wcStopScan()\" style=\"position:absolute;top:20px;right:20px;padding:8px 14px;background:#fff;border:none;border-radius:4px;z-index:4;\">\r\n                    Fermer                <\/button>\r\n    \r\n                <div id=\"wcScanBox\">\r\n                    <div class=\"wc-scan-guide\"><\/div>\r\n                <\/div>\r\n    \r\n                <div id=\"wcScanStatus\" aria-live=\"polite\">\r\n                    Centrez le code QR ou le code-barres                <\/div>\r\n                <button type=\"button\" class=\"button\" onclick=\"document.getElementById('wcQrPhoto').click()\">\r\n                    Lire le QR depuis une photo                <\/button>\r\n                <input type=\"file\" id=\"wcQrPhoto\" accept=\"image\/*\" hidden onchange=\"wcReadQrPhoto(this)\">\r\n            <\/div>\r\n    \r\n            <script src=\"https:\/\/phicycling.com\/wp-content\/plugins\/wc-wheel-activation-system\/assets\/jsQR-1.4.0.js\"><\/script>\r\n            <!-- \u2705 Quagga2\uff08\u7a33\u5b9a\u7248\uff09 -->\r\n            <script src=\"https:\/\/unpkg.com\/@ericblade\/quagga2\/dist\/quagga.min.js\"><\/script>\r\n    \r\n            <script>\r\n            let wcTargetInput = null;\r\n            let wcScannerRunning = false;\r\n            let wcScanSession = 0;\r\n            let wcDetectionCode = '';\r\n            let wcDetectionCount = 0;\r\n            let wcDetectionTime = 0;\r\n            const wcRequiredDetections = 2;\r\n            let wcQrTimer = null;\r\n            let wcQrStream = null;\r\n\r\n            function wcAcceptScan(code) {\r\n                const target = document.getElementById(wcTargetInput);\r\n                if (target) {\r\n                    target.value = code;\r\n                    target.dispatchEvent(new Event('change', { bubbles: true }));\r\n                }\r\n                wcStopScan();\r\n            }\r\n\r\n            function wcDecodeQr(context, source, x, y, width, height, maxSize) {\r\n                const scale = Math.min(1, maxSize \/ Math.max(width, height));\r\n                const outputWidth = Math.max(1, Math.round(width * scale));\r\n                const outputHeight = Math.max(1, Math.round(height * scale));\r\n                const canvas = context.canvas;\r\n                if (canvas.width !== outputWidth || canvas.height !== outputHeight) {\r\n                    canvas.width = outputWidth;\r\n                    canvas.height = outputHeight;\r\n                }\r\n                context.drawImage(source, x, y, width, height, 0, 0, outputWidth, outputHeight);\r\n                const frame = context.getImageData(0, 0, outputWidth, outputHeight);\r\n                const result = window.jsQR(frame.data, outputWidth, outputHeight);\r\n                const code = result ? result.data.trim() : '';\r\n                return \/^[A-Za-z0-9_-]{1,64}$\/.test(code) ? code : '';\r\n            }\r\n\r\n            function wcWatchQr(video, scanSession) {\r\n                if (!video || typeof window.jsQR !== 'function') return;\r\n                const context = document.createElement('canvas').getContext('2d', { willReadFrequently: true });\r\n                if (!context) return;\r\n                let fullFrame = false;\r\n                wcQrTimer = window.setInterval(function () {\r\n                    if (scanSession !== wcScanSession || video.readyState < 2 || !video.videoWidth || !video.videoHeight) return;\r\n                    const width = video.videoWidth;\r\n                    const height = video.videoHeight;\r\n                    const side = Math.floor(Math.min(width, height) * .75);\r\n                    \/\/ Alternate the native-resolution center with the full frame for off-center codes.\r\n                    const code = fullFrame\r\n                        ? wcDecodeQr(context, video, 0, 0, width, height, 640)\r\n                        : wcDecodeQr(context, video, (width - side) \/ 2, (height - side) \/ 2, side, side, 768);\r\n                    fullFrame = !fullFrame;\r\n                    if (code) wcAcceptScan(code);\r\n                }, 180);\r\n            }\r\n\r\n            async function wcReadQrPhoto(input) {\r\n                const file = input.files[0];\r\n                input.value = '';\r\n                if (!file) return;\r\n                const scanSession = wcScanSession;\r\n                const url = URL.createObjectURL(file);\r\n                try {\r\n                    const photo = new Image();\r\n                    photo.src = url;\r\n                    await photo.decode();\r\n                    if (scanSession !== wcScanSession) return;\r\n                    const context = document.createElement('canvas').getContext('2d', { willReadFrequently: true });\r\n                    const code = context && typeof window.jsQR === 'function'\r\n                        ? wcDecodeQr(context, photo, 0, 0, photo.naturalWidth, photo.naturalHeight, 1600)\r\n                        : '';\r\n                    if (code) {\r\n                        wcAcceptScan(code);\r\n                        return;\r\n                    }\r\n                } catch (error) {\r\n                    \/\/ The picker remains available for a clearer or supported photo.\r\n                } finally {\r\n                    URL.revokeObjectURL(url);\r\n                }\r\n                if (scanSession === wcScanSession) {\r\n                    document.getElementById('wcScanStatus').textContent = \"Aucun QR client trouv\\u00e9. Essayez avec une photo plus nette.\";\r\n                }\r\n            }\r\n\r\n            async function wcStartQrOnly(scanSession) {\r\n                try {\r\n                    const stream = await navigator.mediaDevices.getUserMedia({\r\n                        video: { facingMode: { ideal: 'environment' }, width: { ideal: 1920 }, height: { ideal: 1080 } }\r\n                    });\r\n                    if (scanSession !== wcScanSession) {\r\n                        stream.getTracks().forEach(function (track) { track.stop(); });\r\n                        return;\r\n                    }\r\n                    wcQrStream = stream;\r\n                    const video = document.createElement('video');\r\n                    video.id = 'wcQrOnlyVideo';\r\n                    video.muted = true;\r\n                    video.playsInline = true;\r\n                    video.srcObject = stream;\r\n                    document.getElementById('wcScanBox').appendChild(video);\r\n                    await video.play();\r\n                    if (scanSession === wcScanSession) wcWatchQr(video, scanSession);\r\n                } catch (err) {\r\n                    if (scanSession !== wcScanSession) return;\r\n                    wcReleaseQrCamera();\r\n                    document.getElementById('wcScanStatus').textContent = \"Cam\\u00e9ra indisponible. V\\u00e9rifiez l\\u2019autorisation ou saisissez le code manuellement.\";\r\n                }\r\n            }\r\n\r\n            function wcHandleDetected(result) {\r\n                if (!result || !result.codeResult || !result.codeResult.code) return;\r\n\r\n                const decoded = result.codeResult.decodedCodes || [];\r\n                const errors = decoded\r\n                    .filter(function(bit) { return typeof bit.error === 'number'; })\r\n                    .map(function(bit) { return bit.error; });\r\n                const averageError = errors.length\r\n                    ? errors.reduce(function(total, error) { return total + error; }, 0) \/ errors.length\r\n                    : 0;\r\n                if (averageError > 0.25) return;\r\n\r\n                const code = String(result.codeResult.code).trim();\r\n                const now = Date.now();\r\n                if (code === wcDetectionCode && now - wcDetectionTime < 1800) {\r\n                    wcDetectionCount++;\r\n                } else {\r\n                    wcDetectionCode = code;\r\n                    wcDetectionCount = 1;\r\n                }\r\n                wcDetectionTime = now;\r\n\r\n                const status = document.getElementById('wcScanStatus');\r\n                if (wcDetectionCount < wcRequiredDetections) {\r\n                    status.textContent = \"Restez stable pour confirmer le code\\u2026\";\r\n                    return;\r\n                }\r\n\r\n                wcAcceptScan(code);\r\n            }\r\n\r\n            function wcStartScan(inputId) {\r\n                const scanSession = ++wcScanSession;\r\n                wcTargetInput = inputId;\r\n                wcDetectionCode = '';\r\n                wcDetectionCount = 0;\r\n                wcDetectionTime = 0;\r\n                document.getElementById('wcScanModal').style.display = 'flex';\r\n                document.getElementById('wcScanStatus').textContent = \"Centrez le code QR ou le code-barres\";\r\n    \r\n                if (!window.Quagga) {\r\n                    wcStartQrOnly(scanSession);\r\n                    return;\r\n                }\r\n                Quagga.init({\r\n                    inputStream: {\r\n                        type: 'LiveStream',\r\n                        target: document.querySelector('#wcScanBox'),\r\n                        area: {\r\n                            top: '35%',\r\n                            right: '10%',\r\n                            bottom: '35%',\r\n                            left: '10%'\r\n                        },\r\n                        constraints: {\r\n                            facingMode: { ideal: 'environment' },\r\n                            width: { ideal: 1920 },\r\n                            height: { ideal: 1080 }\r\n                        }\r\n                    },\r\n                    decoder: {\r\n                        readers: ['code_128_reader']\r\n                    },\r\n                    locator: {\r\n                        patchSize: 'medium',\r\n                        halfSample: true\r\n                    },\r\n                    locate: true,\r\n                    frequency: 10,\r\n                    numOfWorkers: 0\r\n                }, function (err) {\r\n                    if (scanSession !== wcScanSession) {\r\n                        try { Quagga.stop(); } catch (e) {}\r\n                        return;\r\n                    }\r\n                    if (err) {\r\n                        try { Quagga.stop(); } catch (error) {}\r\n                        wcStartQrOnly(scanSession);\r\n                        return;\r\n                    }\r\n                    Quagga.offDetected(wcHandleDetected);\r\n                    Quagga.onDetected(wcHandleDetected);\r\n                    Quagga.start();\r\n                    wcScannerRunning = true;\r\n                    wcWatchQr(document.querySelector('#wcScanBox video'), scanSession);\r\n                });\r\n            }\r\n    \r\n            function wcReleaseQrCamera() {\r\n                window.clearInterval(wcQrTimer);\r\n                wcQrTimer = null;\r\n                if (wcQrStream) {\r\n                    wcQrStream.getTracks().forEach(function (track) { track.stop(); });\r\n                    wcQrStream = null;\r\n                }\r\n                document.getElementById('wcQrOnlyVideo')?.remove();\r\n            }\r\n\r\n            function wcStopScan() {\r\n                wcScanSession++;\r\n                wcReleaseQrCamera();\r\n                if (window.Quagga) Quagga.offDetected(wcHandleDetected);\r\n                if (wcScannerRunning) {\r\n                    Quagga.stop();\r\n                    wcScannerRunning = false;\r\n                }\r\n                document.getElementById('wcScanModal').style.display = 'none';\r\n            }\r\n            <\/script>\r\n    \r\n            <!-- \u2705 \u4f60\u539f\u6765\u7684 AJAX \u903b\u8f91\uff08\u5b8c\u5168\u4e0d\u52a8\uff09 -->\r\n            <script>\r\n            jQuery(document).ready(function($){\r\n                var barcodeIndex = 1;\r\n                var scanIcon = '<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M3 7V4h4M17 4h4v3M21 17v3h-4M7 20H3v-3M7 8v8M10 8v8M14 8v8M17 8v8\"\/><\/svg>';\r\n                var componentOptions = {\"front_wheel\":\"Roue avant\",\"rear_wheel\":\"Roue arri\\u00e8re\",\"handlebar\":\"Guidon\",\"complete_bike\":\"V\\u00e9lo complet\",\"other\":\"Autre produit\"};\r\n                var wcFrontendText = {\"Front Wheel\":\"Roue avant\",\"Rear Wheel\":\"Roue arri\\u00e8re\",\"Handlebar\":\"Guidon\",\"Complete Bike\":\"V\\u00e9lo complet\",\"Other Product\":\"Autre produit\",\"Product Type\":\"Type de produit\",\"(required)\":\"(obligatoire)\",\"Select product type\":\"S\\u00e9lectionnez le type de produit\",\"Wheel Warranty Center\":\"Centre de garantie\",\"Activate your product, check warranty status, or submit a repair request.\":\"Activez votre produit, v\\u00e9rifiez la garantie ou envoyez une demande de r\\u00e9paration.\",\"Warranty Center\":\"Centre de garantie\",\"Repair Request\":\"Demande de r\\u00e9paration\",\"Activate Warranty\":\"Activer la garantie\",\"Register wheels, handlebars, complete bikes, or other products to activate the official warranty.\":\"Enregistrez roues, guidons, v\\u00e9los complets ou autres produits pour activer la garantie officielle.\",\"Barcode \\\/ Serial Numbers\":\"Codes-barres \\\/ num\\u00e9ros de s\\u00e9rie\",\"Barcode \\\/ Serial Number\":\"Code-barres \\\/ num\\u00e9ro de s\\u00e9rie\",\"+ Add another barcode\":\"+ Ajouter un autre code\",\"Owner\":\"Propri\\u00e9taire\",\"Owner Name\":\"Nom du propri\\u00e9taire\",\"Owner Type\":\"Type de propri\\u00e9taire\",\"Owner Type:\":\"Type de propri\\u00e9taire :\",\"First Owner\":\"Premier propri\\u00e9taire\",\"Second Owner\":\"Deuxi\\u00e8me propri\\u00e9taire\",\"Lifetime Warranty\":\"Garantie \\u00e0 vie\",\"No Commercial Warranty\":\"Aucune garantie commerciale\",\"Email\":\"E-mail\",\"Check Status\":\"V\\u00e9rifier le statut\",\"Enter a product barcode to verify activation status.\":\"Saisissez le code du produit pour v\\u00e9rifier la garantie.\",\"Customer\":\"Client\",\"Find My Product\":\"Trouver mon produit\",\"Activated Product \\\/ Component \\\/ Barcode\":\"Produit \\\/ composant \\\/ code activ\\u00e9\",\"Problem Type\":\"Type de probl\\u00e8me\",\"Select a problem\":\"S\\u00e9lectionnez un probl\\u00e8me\",\"Detailed Reason\":\"Description d\\u00e9taill\\u00e9e\",\"Video\":\"Vid\\u00e9o\",\"Images\":\"Images\",\"Choose video\":\"Choisir une vid\\u00e9o\",\"No file selected\":\"Aucun fichier s\\u00e9lectionn\\u00e9\",\"+ Add Images\":\"+ Ajouter des images\",\"+ Add More Images\":\"+ Ajouter d\\u2019autres images\",\"Submit Repair Request\":\"Envoyer la demande de r\\u00e9paration\",\"Wheel \\\/ Rim Damage\":\"Dommage roue \\\/ jante\",\"Carbon Spoke Problem\":\"Probl\\u00e8me de rayon carbone\",\"Hub \\\/ Bearing Problem\":\"Probl\\u00e8me de moyeu \\\/ roulement\",\"Freehub \\\/ Cassette Problem\":\"Probl\\u00e8me de corps de roue libre \\\/ cassette\",\"Tubeless \\\/ Tire \\\/ Valve Problem\":\"Probl\\u00e8me tubeless \\\/ pneu \\\/ valve\",\"Wheel Alignment \\\/ Truing\":\"Alignement \\\/ d\\u00e9voilage de roue\",\"Noise \\\/ Vibration\":\"Bruit \\\/ vibration\",\"Installation \\\/ Compatibility\":\"Installation \\\/ compatibilit\\u00e9\",\"Accident \\\/ Impact Damage\":\"Dommage accident \\\/ impact\",\"Handlebar \\\/ Cockpit Problem\":\"Probl\\u00e8me de guidon \\\/ cockpit\",\"Complete Bike \\\/ Assembly Problem\":\"Probl\\u00e8me de v\\u00e9lo complet \\\/ montage\",\"Drivetrain \\\/ Brake Problem\":\"Probl\\u00e8me de transmission \\\/ frein\",\"Electrical \\\/ Motor \\\/ Battery Problem\":\"Probl\\u00e8me \\u00e9lectrique \\\/ moteur \\\/ batterie\",\"Cosmetic \\\/ Finish Problem\":\"Probl\\u00e8me esth\\u00e9tique \\\/ finition\",\"Other\":\"Autre\",\"Use the same customer name and email used to activate the product. Select the exact component and provide all required details.\":\"Utilisez le m\\u00eame nom et la m\\u00eame adresse e-mail que lors de l\\u2019activation. S\\u00e9lectionnez le composant exact et remplissez tous les champs obligatoires.\",\"Enter both fields to find your activated barcode.\":\"Renseignez les deux champs pour trouver le code activ\\u00e9.\",\"Describe the problem, when it started, and any relevant riding conditions.\":\"D\\u00e9crivez le probl\\u00e8me, sa date d\\u2019apparition et les conditions d\\u2019utilisation pertinentes.\",\"MP4, MOV, or WebM; maximum 100 MB.\":\"MP4, MOV ou WebM ; 100 Mo maximum.\",\"Add images one time or in several selections (1\\u20138 total). Images are compressed to a maximum of 1800 px before upload; originals are not stored.\":\"Ajoutez les images en une ou plusieurs s\\u00e9lections (1 \\u00e0 8 au total). Elles sont compress\\u00e9es \\u00e0 1800 px maximum avant l\\u2019envoi ; les originaux ne sont pas conserv\\u00e9s.\",\"Preparing upload\\u2026\":\"Pr\\u00e9paration de l\\u2019envoi\\u2026\",\"Enter the email used to activate the product, then select the exact component and provide the repair details.\":\"Saisissez l\\u2019adresse e-mail utilis\\u00e9e pour activer le produit, puis s\\u00e9lectionnez le composant exact et indiquez les d\\u00e9tails de la r\\u00e9paration.\",\"Enter your activation email to find your registered products.\":\"Saisissez votre e-mail d\\u2019activation pour retrouver vos produits enregistr\\u00e9s.\",\"No activated products matched this email address.\":\"Aucun produit activ\\u00e9 ne correspond \\u00e0 cette adresse e-mail.\",\"Close\":\"Fermer\",\"Align barcode within the frame\":\"Alignez le code dans le cadre\",\"Align one barcode within the frame\":\"Alignez un code dans le cadre\",\"Hold steady to confirm the barcode\\u2026\":\"Restez stable pour confirmer le code\\u2026\",\"Camera unavailable. Check camera permission or enter the barcode manually.\":\"Cam\\u00e9ra indisponible. V\\u00e9rifiez l\\u2019autorisation ou saisissez le code manuellement.\",\"Center the QR code or barcode\":\"Centrez le code QR ou le code-barres\",\"Read QR from a photo\":\"Lire le QR depuis une photo\",\"No customer QR code found. Try a clearer photo.\":\"Aucun QR client trouv\\u00e9. Essayez avec une photo plus nette.\",\"Finding\\u2026\":\"Finding\\u2026\",\"activated product(s) found. Select the exact component that needs repair.\":\"activated product(s) found. Select the exact component that needs repair.\",\"The lookup could not be completed. Please try again.\":\"The lookup could not be completed. Please try again.\",\"A maximum of 8 images can be attached.\":\"A maximum of 8 images can be attached.\",\"Image could not be read.\":\"Image could not be read.\",\"Image format is not supported.\":\"Image format is not supported.\",\"Image compression failed.\":\"Image compression failed.\",\"Please find and select your activated product first.\":\"Please find and select your activated product first.\",\"Please select between 1 and 8 images.\":\"Please select between 1 and 8 images.\",\"Preparing\\u2026\":\"Preparing\\u2026\",\"Compressing images to 1800 px\\u2026\":\"Compressing images to 1800 px\\u2026\",\"Uploading video and images\\u2026\":\"Uploading video and images\\u2026\",\"Upload complete \\u2014 100%\":\"Upload complete \\u2014 100%\",\"Repair request submitted.\":\"Repair request submitted.\",\"Reference\":\"Reference\",\"Upload failed. Please check the files and try again.\":\"Upload failed. Please check the files and try again.\",\"The repair request could not be submitted.\":\"The repair request could not be submitted.\",\"The repair request could not be submitted. Please try again.\":\"The repair request could not be submitted. Please try again.\",\"Activating...\":\"Activating...\",\"Activation Successful!\":\"Activation Successful!\",\"Start:\":\"Start:\",\"Expires:\":\"Expires:\",\"The request could not be completed. Please try again.\":\"The request could not be completed. Please try again.\",\"Checking...\":\"Checking...\",\"Not Activated\":\"Not Activated\",\"Owner:\":\"Owner:\",\"Activated:\":\"Activated:\",\"The displayed warranty period applies to the product main body. For spokes, hubs, bearings, freehubs, ratchets, end caps, and other wear parts, please see the Warranty Policy.\":\"The displayed warranty period applies to the product main body. For spokes, hubs, bearings, freehubs, ratchets, end caps, and other wear parts, please see the Warranty Policy.\",\"View Warranty Policy\":\"View Warranty Policy\",\"Please enter the activated customer name and a valid email address.\":\"Please enter the activated customer name and a valid email address.\",\"No activated products matched this customer name and email.\":\"No activated products matched this customer name and email.\",\"Please complete every required field.\":\"Please complete every required field.\",\"The selected barcode does not belong to this activated customer. Please find the product again.\":\"The selected barcode does not belong to this activated customer. Please find the product again.\",\"One video and at least one image are required.\":\"One video and at least one image are required.\",\"You can upload up to 8 images.\":\"You can upload up to 8 images.\",\"The video must be 100 MB or smaller.\":\"The video must be 100 MB or smaller.\",\"Each compressed image must be 10 MB or smaller.\":\"Each compressed image must be 10 MB or smaller.\",\"Too many repair requests were submitted. Please try again later.\":\"Too many repair requests were submitted. Please try again later.\",\"One of the images could not be uploaded.\":\"One of the images could not be uploaded.\",\"The repair request could not be saved.\":\"The repair request could not be saved.\",\"Your repair request has been submitted successfully.\":\"Your repair request has been submitted successfully.\",\"Video upload failed: %s\":\"Video upload failed: %s\",\"Image upload failed: %s\":\"Image upload failed: %s\",\"Your customer account could not be created. Please try again or contact support.\":\"Your customer account could not be created. Please try again or contact support.\",\"The same barcode was entered more than once. Please remove the duplicate.\":\"The same barcode was entered more than once. Please remove the duplicate.\",\"Please select the product type for every barcode.\":\"Please select the product type for every barcode.\",\"At least one barcode, Owner, and Email are required.\":\"At least one barcode, Owner, and Email are required.\",\"Please enter a valid email address.\":\"Please enter a valid email address.\",\"A maximum of 20 barcodes can be activated at one time.\":\"A maximum of 20 barcodes can be activated at one time.\",\"Invalid barcode <strong>%s<\\\/strong>. This code was not found in our wholesale sales records.\":\"Invalid barcode <strong>%s<\\\/strong>. This code was not found in our wholesale sales records.\",\"Barcode <strong>%1$s<\\\/strong> was already activated by <strong>%2$s<\\\/strong> on %3$s.\":\"Barcode <strong>%1$s<\\\/strong> was already activated by <strong>%2$s<\\\/strong> on %3$s.\",\"System Error: Could not locate the order item for barcode <strong>%s<\\\/strong>.\":\"System Error: Could not locate the order item for barcode <strong>%s<\\\/strong>.\",\"%d product was activated successfully.\":\"%d product was activated successfully.\",\"%d products were activated successfully.\":\"%d products were activated successfully.\",\"Please enter a barcode.\":\"Please enter a barcode.\",\"Barcode not found in our system.\":\"Barcode not found in our system.\",\"This product has <strong>not been activated<\\\/strong> yet. Please use the Activation form to register it.\":\"This product has <strong>not been activated<\\\/strong> yet. Please use the Activation form to register it.\",\"Warranty Expired\":\"Warranty Expired\",\"Warranty Active\":\"Warranty Active\",\"Sorry, the warranty period for this product has expired.\":\"Sorry, the warranty period for this product has expired.\",\"Good news! This product is currently under warranty.\":\"Good news! This product is currently under warranty.\"};\r\n                function wcT(source) { return wcFrontendText[source] || source; }\r\n\r\n                $('.wc-hub-tab').on('click', function(){\r\n                    var panel = $(this).data('hub-panel');\r\n                    $('.wc-hub-tab').removeClass('is-active').attr('aria-selected', 'false');\r\n                    $(this).addClass('is-active').attr('aria-selected', 'true');\r\n                    $('.wc-hub-panel').removeClass('is-active');\r\n                    $('#wc-panel-' + panel).addClass('is-active');\r\n                });\r\n\r\n                function updateRemoveButtons() {\r\n                    var disableRemove = $('#wc-activation-barcodes .wc-barcode-row').length === 1;\r\n                    $('#wc-activation-barcodes .wc-remove-barcode').prop('disabled', disableRemove);\r\n                }\r\n\r\n                $('#wc-add-barcode').on('click', function(){\r\n                    barcodeIndex++;\r\n                    var inputId = 'ha-barcode-' + barcodeIndex;\r\n                    var $entry = $('<div>', { class: 'wc-barcode-entry' });\r\n                    var $row = $('<div>', { class: 'wc-barcode-row' });\r\n                    $('<input>', {\r\n                        type: 'text', id: inputId, name: 'barcodes[]', required: true,\r\n                        placeholder: 'Barcode ' + barcodeIndex,\r\n                        autocomplete: 'off', 'aria-label': 'Barcode ' + barcodeIndex\r\n                    }).appendTo($row);\r\n                    $('<button>', {\r\n                        type: 'button', class: 'wc-scan-btn', html: scanIcon,\r\n                        'aria-label': 'Scan barcode ' + barcodeIndex\r\n                    }).on('click', function(){ wcStartScan(inputId); }).appendTo($row);\r\n                    $('<button>', {\r\n                        type: 'button', class: 'wc-remove-barcode', html: '&times;',\r\n                        'aria-label': 'Remove barcode ' + barcodeIndex\r\n                    }).on('click', function(){ wcRemoveBarcode(this); }).appendTo($row);\r\n                    $row.appendTo($entry);\r\n                    var $caption = $('<span>', { class: 'wc-component-caption' }).text(wcT('Product Type') + ' ');\r\n                    $('<em>').text(wcT('(required)')).appendTo($caption);\r\n                    $caption.appendTo($entry);\r\n                    var $component = $('<select>', {\r\n                        class: 'wc-component-label', name: 'component_labels[]',\r\n                        'aria-label': 'Product type for barcode ' + barcodeIndex,\r\n                        required: true\r\n                    });\r\n                    $('<option>', { value: '', text: wcT('Select product type'), disabled: true, selected: true }).appendTo($component);\r\n                    $.each(componentOptions, function(value, label){ $('<option>', { value: value, text: label }).appendTo($component); });\r\n                    $component.appendTo($entry);\r\n                    $('#wc-activation-barcodes').append($entry);\r\n                    updateRemoveButtons();\r\n                    document.getElementById(inputId).focus();\r\n                });\r\n\r\n                window.wcRemoveBarcode = function(button) {\r\n                    if ($('#wc-activation-barcodes .wc-barcode-row').length <= 1) return;\r\n                    $(button).closest('.wc-barcode-entry').remove();\r\n                    updateRemoveButtons();\r\n                };\r\n\r\n                updateRemoveButtons();\r\n\r\n                function resetRepairWheelLookup() {\r\n                    $('#repair-barcode').empty().prop('disabled', true);\r\n                    $('#repair-customer-name').val('');\r\n                    $('#wc-repair-wheel-group').prop('hidden', true);\r\n                    $('#wc-repair-lookup-message').text(wcT('Enter your activation email to find your registered products.'));\r\n                }\r\n                $('#repair-customer-email').on('input', resetRepairWheelLookup);\r\n\r\n                $('#wc-find-repair-wheels').on('click', function(){\r\n                    var $button = $(this);\r\n                    var email = $('#repair-customer-email').val().trim();\r\n                    if (!email) {\r\n                        $('#wc-repair-lookup-message').text(wcT('Please enter a valid email address.'));\r\n                        return;\r\n                    }\r\n                    $button.prop('disabled', true).text(wcT('Finding\u2026'));\r\n                    $.post('https:\/\/phicycling.com\/wp-admin\/admin-ajax.php', {\r\n                        action: 'wc_find_activated_wheels',\r\n                        security: $('#wc-repair-form input[name=\"security\"]').val(),\r\n                        lang: $('#wc-repair-form input[name=\"lang\"]').val(),\r\n                        customer_email: email\r\n                    }).done(function(res){\r\n                        if (!res.success) {\r\n                            resetRepairWheelLookup();\r\n                            $('#wc-repair-lookup-message').text(res.data.message);\r\n                            return;\r\n                        }\r\n                        var $select = $('#repair-barcode').empty();\r\n                        $('#repair-customer-name').val(res.data.customer_name || '');\r\n                        res.data.wheels.forEach(function(wheel){\r\n                            $('<option>', { value: wheel.barcode, text: wheel.product + ' \u2014 ' + wheel.component_label + ' \u2014 ' + wheel.barcode }).appendTo($select);\r\n                        });\r\n                        $select.prop('disabled', false);\r\n                        $('#wc-repair-wheel-group').prop('hidden', false);\r\n                        $('#wc-repair-lookup-message').text(res.data.wheels.length + ' ' + wcT('activated product(s) found. Select the exact component that needs repair.'));\r\n                    }).fail(function(){\r\n                        resetRepairWheelLookup();\r\n                        $('#wc-repair-lookup-message').text(wcT('The lookup could not be completed. Please try again.'));\r\n                    }).always(function(){\r\n                        $button.prop('disabled', false).text(wcT('Find My Product'));\r\n                    });\r\n                });\r\n\r\n                var wcRepairImageFiles = [];\r\n\t\t\t\t$('#wc-choose-repair-video').on('click', function(){ $('#repair-video').trigger('click'); });\r\n\t\t\t\t$('#repair-video').on('change', function(){\r\n\t\t\t\t\tvar file = this.files && this.files[0];\r\n\t\t\t\t\t$('#wc-repair-video-name').text(file ? file.name : wcT('No file selected'));\r\n\t\t\t\t});\r\n                function wcRenderRepairImageQueue() {\r\n                    var $queue = $('#wc-repair-image-queue').empty();\r\n                    wcRepairImageFiles.forEach(function(file, index) {\r\n                        var previewUrl = URL.createObjectURL(file);\r\n                        var $item = $('<div>', { class: 'wc-repair-image-item' });\r\n                        $('<img>', { src: previewUrl, alt: file.name }).on('load', function(){ URL.revokeObjectURL(previewUrl); }).appendTo($item);\r\n                        $('<button>', { type: 'button', html: '&times;', 'aria-label': 'Remove ' + file.name, 'data-image-index': index }).appendTo($item);\r\n                        $('<small>', { text: file.name }).appendTo($item);\r\n                        $queue.append($item);\r\n                    });\r\n                    $('#wc-add-repair-images').text(wcRepairImageFiles.length ? wcT('+ Add More Images') + ' (' + wcRepairImageFiles.length + '\/8)' : wcT('+ Add Images'));\r\n                }\r\n                $('#wc-add-repair-images').on('click', function(){ $('#repair-images').trigger('click'); });\r\n                $('#repair-images').on('change', function() {\r\n                    var incoming = Array.from(this.files || []);\r\n                    incoming.forEach(function(file) {\r\n                        var signature = [file.name, file.size, file.lastModified].join(':');\r\n                        var duplicate = wcRepairImageFiles.some(function(existing){ return [existing.name, existing.size, existing.lastModified].join(':') === signature; });\r\n                        if (!duplicate && wcRepairImageFiles.length < 8 && \/^image\\\/(jpeg|png|webp)$\/.test(file.type)) wcRepairImageFiles.push(file);\r\n                    });\r\n                    this.value = '';\r\n                    wcRenderRepairImageQueue();\r\n                    if (incoming.length && wcRepairImageFiles.length >= 8) {\r\n                        $('#wc-repair-result').removeClass('res-success').addClass('res-error').show().text(wcT('A maximum of 8 images can be attached.'));\r\n                    }\r\n                });\r\n                $('#wc-repair-image-queue').on('click', 'button[data-image-index]', function() {\r\n                    wcRepairImageFiles.splice(Number($(this).data('image-index')), 1);\r\n                    wcRenderRepairImageQueue();\r\n                });\r\n\r\n                function wcCompressRepairImage(file) {\r\n                    return new Promise(function(resolve, reject) {\r\n                        var reader = new FileReader();\r\n                        reader.onerror = function(){ reject(new Error(wcT('Image could not be read.'))); };\r\n                        reader.onload = function(event) {\r\n                            var image = new Image();\r\n                            image.onerror = function(){ reject(new Error(wcT('Image format is not supported.'))); };\r\n                            image.onload = function() {\r\n                                var scale = Math.min(1, 1800 \/ Math.max(image.naturalWidth, image.naturalHeight));\r\n                                var canvas = document.createElement('canvas');\r\n                                canvas.width = Math.max(1, Math.round(image.naturalWidth * scale));\r\n                                canvas.height = Math.max(1, Math.round(image.naturalHeight * scale));\r\n                                var context = canvas.getContext('2d');\r\n                                context.fillStyle = '#fff';\r\n                                context.fillRect(0, 0, canvas.width, canvas.height);\r\n                                context.drawImage(image, 0, 0, canvas.width, canvas.height);\r\n                                canvas.toBlob(function(blob) {\r\n                                    if (!blob) reject(new Error(wcT('Image compression failed.')));\r\n                                    else resolve({ blob: blob, name: file.name.replace(\/\\.[^.]+$\/, '') + '-1800.jpg' });\r\n                                }, 'image\/jpeg', 0.84);\r\n                            };\r\n                            image.src = event.target.result;\r\n                        };\r\n                        reader.readAsDataURL(file);\r\n                    });\r\n                }\r\n\r\n                function wcSetUploadProgress(percent, label) {\r\n                    $('#wc-repair-upload-progress').prop('hidden', false);\r\n                    $('#wc-repair-upload-progress .wc-upload-progress-track span').css('width', percent + '%');\r\n                    $('#wc-repair-upload-progress .wc-upload-progress-label').text(label);\r\n                }\r\n\r\n                $('#wc-repair-form').on('submit', function(e){\r\n                    e.preventDefault();\r\n                    var form = this;\r\n                    var $button = $('#wc-repair-submit');\r\n                    var $result = $('#wc-repair-result').removeClass('res-success res-error').hide();\r\n                    if ($('#repair-barcode').prop('disabled') || !$('#repair-barcode').val()) {\r\n                        $result.addClass('res-error').show().text(wcT('Please find and select your activated product first.'));\r\n                        return;\r\n                    }\r\n                    var files = wcRepairImageFiles.slice();\r\n                    if (!files.length || files.length > 8) {\r\n                        $result.addClass('res-error').show().text(wcT('Please select between 1 and 8 images.'));\r\n                        return;\r\n                    }\r\n                    $button.prop('disabled', true).text(wcT('Preparing\u2026'));\r\n                    wcSetUploadProgress(0, wcT('Compressing images to 1800 px\u2026'));\r\n                    Promise.all(files.map(wcCompressRepairImage)).then(function(images) {\r\n                        var data = new FormData(form);\r\n                        data.delete('repair_images[]');\r\n                        images.forEach(function(image){ data.append('repair_images[]', image.blob, image.name); });\r\n                        data.append('action', 'wc_submit_repair');\r\n                        $button.text(wcT('Uploading video and images\u2026'));\r\n                        wcSetUploadProgress(1, wcT('Uploading video and images\u2026') + ' 1%');\r\n                        return $.ajax({\r\n                            url: 'https:\/\/phicycling.com\/wp-admin\/admin-ajax.php',\r\n                            method: 'POST', data: data, processData: false, contentType: false,\r\n                            xhr: function() {\r\n                                var xhr = $.ajaxSettings.xhr();\r\n                                if (xhr.upload) xhr.upload.addEventListener('progress', function(event) {\r\n                                    if (!event.lengthComputable) return;\r\n                                    var percent = Math.min(99, Math.round((event.loaded \/ event.total) * 100));\r\n                                    wcSetUploadProgress(percent, wcT('Uploading video and images\u2026') + ' ' + percent + '%');\r\n                                });\r\n                                return xhr;\r\n                            }\r\n                        });\r\n                    }).then(function(res){\r\n                        if (res.success) {\r\n                            wcSetUploadProgress(100, wcT('Upload complete \u2014 100%'));\r\n                            $result.addClass('res-success').show().html('<strong>' + wcT('Repair request submitted.') + '<\/strong><br>' + wcT('Reference') + ' #' + res.data.reference);\r\n                            form.reset();\r\n                            wcRepairImageFiles = [];\r\n                            wcRenderRepairImageQueue();\r\n                            resetRepairWheelLookup();\r\n                        } else {\r\n                            throw new Error(res.data && res.data.message ? res.data.message : wcT('The repair request could not be submitted.'));\r\n                        }\r\n                    }).catch(function(error){\r\n                        $result.addClass('res-error').show().text(error.message || wcT('The repair request could not be submitted. Please try again.'));\r\n                        wcSetUploadProgress(0, wcT('Upload failed. Please check the files and try again.'));\r\n                    }).finally(function(){\r\n                        $button.prop('disabled', false).text(wcT('Submit Repair Request'));\r\n                    });\r\n                });\r\n    \r\n                $('#hub-activate-form').on('submit', function(e){\r\n                    e.preventDefault();\r\n                    var $btn = $('#btn-act-submit');\r\n                    var $res = $('#hub-act-result');\r\n    \r\n                    $btn.prop('disabled',true).text(wcT('Activating...'));\r\n                    $res.removeClass('res-success res-error res-info').hide();\r\n    \r\n                    $.post(\r\n                        'https:\/\/phicycling.com\/wp-admin\/admin-ajax.php',\r\n                        $(this).serialize()+'&action=wc_activate_wheel'\r\n                    ).done(function(res){\r\n                        $btn.prop('disabled',false).text(wcT('Activate Warranty'));\r\n                        $res.show();\r\n                        if(res.success){\r\n                            $res.addClass('res-success').html(\r\n                                '<strong>\u2705 '+wcT('Activation Successful!')+'<\/strong><br>'+\r\n                                res.data.message+'<br>'+\r\n                                '<div style=\"margin-top:10px;font-size:14px;\">'+\r\n                                '<strong>'+wcT('Start:')+'<\/strong> '+res.data.start_date+' | '+\r\n                                '<strong>'+wcT('Expires:')+'<\/strong> '+res.data.end_date+\r\n                                '<\/div>'\r\n                            );\r\n                            $('#hub-activate-form')[0].reset();\r\n                            $('#wc-activation-barcodes .wc-barcode-entry').slice(1).remove();\r\n                            updateRemoveButtons();\r\n                        }else{\r\n                            $res.addClass('res-error').html(res.data.message);\r\n                        }\r\n                    }).fail(function(){\r\n                        $btn.prop('disabled',false).text(wcT('Activate Warranty'));\r\n                        $res.addClass('res-error').show().text(wcT('The request could not be completed. Please try again.'));\r\n                    });\r\n                });\r\n    \r\n                $('#hub-check-form').on('submit', function(e){\r\n                    e.preventDefault();\r\n                    var $btn = $('#btn-chk-submit');\r\n                    var $res = $('#hub-chk-result');\r\n    \r\n                    $btn.prop('disabled',true).text(wcT('Checking...'));\r\n                    $res.removeClass('res-success res-error res-info').hide();\r\n    \r\n                    $.post(\r\n                        'https:\/\/phicycling.com\/wp-admin\/admin-ajax.php',\r\n                        $(this).serialize()+'&action=wc_check_warranty'\r\n                    ).done(function(res){\r\n                        $btn.prop('disabled',false).text(wcT('Check Status'));\r\n                        $res.show();\r\n                        if(res.success){\r\n                            if(!res.data.active){\r\n                                $res.addClass('res-info').html(wcT('Not Activated'));\r\n                            }else{\r\n                                $res.addClass(res.data.is_expired?'res-error':'res-success').html(\r\n                                    '<strong>'+res.data.status_label+'<\/strong><br>'+\r\n                                    wcT('Owner:')+' '+res.data.owner+'<br>'+ \r\n                                    wcT('Owner Type:')+' '+res.data.owner_type+'<br>'+ \r\n                                    wcT('Activated:')+' '+res.data.activated_date+'<br>'+\r\n                                    wcT('Expires:')+' '+res.data.expiry_date\r\n                                );\r\n                            }\r\n                        }else{\r\n                            $res.addClass('res-error').html(res.data.message);\r\n                        }\r\n                    }).fail(function(){\r\n                        $btn.prop('disabled',false).text(wcT('Check Status'));\r\n                        $res.addClass('res-error').show().text(wcT('The request could not be completed. Please try again.'));\r\n                    });\r\n                });\r\n    \r\n            });\r\n            <\/script>\r\n        <\/div>\r\n        <\/div>\n\t\t\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":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4325","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/phicycling.com\/fr\/wp-json\/wp\/v2\/pages\/4325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phicycling.com\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/phicycling.com\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/phicycling.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phicycling.com\/fr\/wp-json\/wp\/v2\/comments?post=4325"}],"version-history":[{"count":1,"href":"https:\/\/phicycling.com\/fr\/wp-json\/wp\/v2\/pages\/4325\/revisions"}],"predecessor-version":[{"id":4327,"href":"https:\/\/phicycling.com\/fr\/wp-json\/wp\/v2\/pages\/4325\/revisions\/4327"}],"wp:attachment":[{"href":"https:\/\/phicycling.com\/fr\/wp-json\/wp\/v2\/media?parent=4325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}