PageSourceSearch

https://graceonfire.net/wp-content/plugins/identitysync-diagnostic/assets/diagnostic.js?ver=1.0.0

js graceonfire.net collected 2026-09-30 11:50:40 UTC 14,495 bytes, 249 lines download raw bytes

1(function() {
2    'use strict';
3
4    var areas = {
5        marriage: {
6            headline: "What does it actually feel like inside that relationship?",
7            stmts: [
8                "We keep having the same fight — different day, different trigger, same ending.",
9                "I feel more like roommates than partners. The closeness is gone and I don't know how to get it back.",
10                "I pour everything into this relationship and still feel like it's never enough.",
11                "I love them but I've started to wonder if something is fundamentally wrong with us — or with me."
12            ],
13            results: {
14                low: {
15                    headline: "Your relationship isn't broken. But something underneath it is.",
16                    body: "Most couples try to fix the marriage. Better communication. More quality time. Date nights. But if the person showing up to those moments is still living from a fractured sense of self — nothing shifts for long. The real work isn't between you. It starts within you.",
17                    truth: "When you know who you are, you stop needing your partner to complete you — and that's when real love finally has room to breathe."
18                },
19                high: {
20                    headline: "You've been trying to save something from the outside. The wound is deeper than that.",
21                    body: "The cycle you're in — the fights, the distance, the feeling of pouring yourself out and still falling short — that isn't a relationship problem. It's an identity problem wearing a relationship costume. You can't give from a self that feels empty. You can't receive love you don't believe you deserve.",
22                    truth: "The most powerful thing you could do for your marriage right now isn't try harder. It's find out who you actually are."
23                }
24            }
25        },
26        mental: {
27            headline: "Which of these lives in your head?",
28            stmts: [
29                "There's a quiet voice that says I'm not enough — and it's been there so long I barely notice it anymore.",
30                "I wake up anxious before anything has even happened. My default is dread.",
31                "I perform well on the outside. Most people have no idea how heavy it is on the inside.",
32                "I've tried to think my way out of this. I know the right answers. They don't seem to help."
33            ],
34            results: {
35                low: {
36                    headline: "The heaviness you feel isn't a mood problem. It's a root problem.",
37                    body: "Anxiety, fear, and that persistent low-grade weight aren't random — they're signals. They're telling you that the self you're operating from doesn't feel safe, doesn't feel worthy, doesn't feel secure. That's not a thinking problem. That's an identity problem.",
38                    truth: "When you know who you are at the core, anxiety loses its grip — not because life gets easier, but because you stop being afraid of it."
39                },
40                high: {
41                    headline: "You've been managing something that was never meant to be managed. It was meant to be healed.",
42                    body: "The fact that you know the right answers and they don't help — that's important. Because truth that stays in your head doesn't transform you. It has to get into your identity. Into how you see yourself. The anxiety, the performance, the weight — they're all symptoms of living from the wrong version of who you are.",
43                    truth: "You are not your fear. You are not your performance. But until you know 
43what you actually are, those things will keep running the show."
44                }
45            }
46        },
47        spiritual: {
48            headline: "What does your faith feel like from the inside right now?",
49            stmts: [
50                "I'm still showing up — church, prayer, reading — but something feels hollow. Like going through motions.",
51                "I feel like I have to earn God's favor. Like I'm always slightly behind where I should be.",
52                "I used to feel close to God. That season feels far away and I don't know how to get back.",
53                "I believe in God but honestly don't know if I believe God is for me — specifically me."
54            ],
55            results: {
56                low: {
57                    headline: "You haven't lost your faith. You've lost your footing.",
58                    body: "Spiritual drift almost never starts with doubt about God. It starts with a subtle shift in how you see yourself. You begin performing instead of resting. Striving instead of receiving. And slowly, the distance grows — not because God moved, but because you stopped believing you were someone he'd stay close to.",
59                    truth: "You don't need to find God again. You need to find out who you are in him — and that changes everything."
60                },
61                high: {
62                    headline: "You're exhausted from trying to be enough for a God who already said you are.",
63                    body: "The hollowness. The sense of always being behind. The wondering if he's really for you. That's not a faith crisis — that's an identity crisis wearing spiritual clothes. You've been trying to earn what was given. You've been striving toward a version of yourself you already are in Christ. That's the exhausting loop the next 10 days were built to break.",
64                    truth: "Grace isn't something you grow into. It's something you wake up to. And you can wake up — starting today."
65                }
66            }
67        },
68        financial: {
69            headline: "What does money stress actually feel like for you?",
70            stmts: [
71                "No matter what I do, there's never quite enough. I can't seem to get ahead.",
72                "I feel shame around money — like my situation is proof of something wrong with me.",
73                "I make decisions from fear. What if it runs out. What if I can't provide. What if I fail.",
74                "I've prayed about it. Believed for it. And still feel stuck in the same place financially."
75            ],
76            results: {
77                low: {
78                    headline: "Your financial situation is real. But the root goes deeper than dollars.",
79                    body: "Money pressure is one of the most concrete pains a person can feel — it's immediate, it's visible, it affects everything. But scarcity almost always has a soul dimension. How you see yourself determines what you believe you're capable of, what you believe you deserve, and how you make decisions under pressure.",
80                    truth: "Soul prosperity isn't a metaphor. It's the foundation. When identity shifts, the way you see and handle everything — including money — shifts with it."
81                },
82                high: {
83                    headline: "You're not stuck because of what you don't have. You're stuck because of what you believe about yourself.",
84                    body: "The shame. The fear. Praying and still feeling frozen. That combination is a sign that this isn't primarily a financial problem — it's an identity problem with financial consequences. You can't consistently build what you don't believe you deserve to have. And you can't receive what you don't believe is meant for you.",
85                    truth: "3 John 1:2 says God wants you to prosper as your soul prospers. The soul comes first. That's where the 10-day journey begins."
86                }
87            }
88        }
89    };
90
91    function ISDiagnostic(container) {
92        this.container = container;
93        this.ctaUrl   = container.dataset.ctaUrl   || 'https://identitysync.app';
94        this.ctaLabel = container.dataset.ctaLabel || 'Start the free 10-day journey →';
95        this.currentArea = null;
96        this.selected = new Set();
97
98        // Capture ref parameter from current page URL
99        var urlParams = new URLSearchParams(window.location.search);
100        this.refCode = urlParams.get('ref') || '';
101
102        this.render();
103        this.bind();
104    }
105
106    ISDiagnostic.prototype.render = function() {
107        var c = this.container;
108        c.innerHTML = [
109            '<div class="isd-section isd-active" data-step="1">',
110                '<div class="isd-area-grid">',
111                    this._areaCard('marriage', '💍', 'My relationship',   'Marriage, connection, feeling unseen or alone together'),
112                    this._areaCard('mental',   '🧠', 'My mind & emotions','Anxiety, fear, shame, that low-grade heaviness that won\'t lift'),
113                    this._areaCard('spiritual','🙏', 'My faith',          'Disconnected, dry, going through the motions, God feels far'),
114                    this._areaCard('financial','💰', 'My finances',       'Stuck, behind, fear around money, never quite enough'),
115                '</div>',
116                '<p class="isd-tap-prompt">👆 Tap the area that feels heaviest right now</p>',
117            '</div>',
118
119            '<div class="isd-section" data-step="2">',
120                '<p class="isd-eyebrow">Step 2 of 2</p>',
121                '<h2 class="isd-headline" data-role="s2-headline"></h2>',
122                '<p class="isd-subhead">Select every statement that feels true. Be honest.</p>',
123                '<div class="isd-stmt-list" data-role="s2-stmts"></div>',
124                '<button class="isd-btn" data-role="reveal-btn">Show me what\'s really going on &rarr;</button>',
125                '<br><button class="isd-back" data-role="back-area">&larr; Change my area</button>',
126            '</div>',
127
128            '<div class="isd-section" data-step="3">',
129                '<div class="isd-result-box">',
130                    '<p class="isd-result-label">Here\'s the real issue</p>',
131                    '<h3 class="isd-result-headline" data-role="r-headline"></h3>',
132                    '<p class="isd-result-body" data-role="r-body"></p>',
133                    '<p class="isd-result-truth" data-role="r-truth"></p>',
134                    '<a class="isd-btn isd-active" data-role="r-cta" href="' + this.ctaUrl + '" target="_blank" rel="noopener">' + this.ctaLabel + '</a>',
135                '</div>',
136                '<button class="isd-back" data-role="restart">&larr; Start over</button>',
137            '</div>'
138        ].join('');
139    };
140
141    ISDiagnostic.prototype._areaCard = function(key, icon, label, hint) {
142        return '<div class="isd-area-card" data-area="' + key + '">' +
143            '<span class="isd-area-icon">' + icon + '</span>' +
144            '<span class="isd-area-label">' + label + '</span>' +
145            '<span class="isd-area-hint">' + hint + '</span>' +
146        '</div>';
147    };
148
149    ISDiagnostic.prototype.bind = function() {
150        var self = this;
151
152        this.container.addEventListener('click', function(e) {
153            var areaCard = e.target.closest('[data-area]');
154            if (areaCard) { self.pickArea(areaCard.dataset.area); return; }
155
156            var stmt = e.target.closest('.isd-stmt');
157            if (stmt) { self.toggleStmt(stmt); return; }
158
159            var role = e.target.dataset.role || (e.target.closest('[data-role]') && e.target.closest('[data-role]').dataset.role);
160            if (role === 'reveal-btn')  { self.showResult(); return; }
161            if (role === 'back-area')   { self.show(1); return; }
162            if (role === 'restart')     { self.restart(); return; }
163        });
164    };
165
166    ISDiagnostic.prototype.find = function(role) {
167        return this.container.querySelector('[data-role="' + role + '"]');
168    };
169
170    ISDiagnostic.prototype.show = function(step) {
171        this.container.querySelectorAll('.isd-section').forEach(function(s) {
172            s.classList.remove('isd-active');
173        });
174        this.container.querySelector('[data-step="' + step + '"]').classList.add('isd-active');
175    };
176
177    ISDiagnostic.prototype.pickArea = function(area) {
178        this.currentArea = area;
179        this.selected.clear();
180        var data = areas[area];
181
182        this.find('s2-headline').textContent = data.headline;
183
184        var list = this.find('s2-stmts');
185        list.innerHTML = data.stmts.map(function(t, i) {
186            return '<div class="isd-stmt" data-i="' + i + '">' +
187                '<div class="isd-check"></div>' +
188                '<span class="isd-stmt-text">' + t + '</span>' +
189            '</div>';
190        }).join('');
191
192        var btn = this.find('reveal-btn');
193        btn.classList.remove('isd-active');
194        this.show(2);
195    };
196
197    ISDiagnostic.prototype.toggleStmt = function(el) {
198        var i = el.dataset.i;
199        if (this.selected.has(i)) {
200            this.selected.delete(i);
201            el.classList.remove('isd-selected');
202        } else {
203            this.selected.add(i);
204            el.classList.add('isd-selected');
205        }
206        var btn = this.find('reveal-btn');
207        if (this.selected.size > 0) btn.classList.add('isd-active');
208        else btn.classList.remove('isd-active');
209    };
210
211    ISDiagnostic.prototype.showResult = function() {
212        if (!this.currentArea || this.selected.size === 0) return;
213        var r = areas[this.currentArea].results;
214        var result = this.selected.size >= 2 ? r.high : r.low;
215        this.find('r-headline').textContent = result.headline;
216        this.find('r-body').textContent     = result.body;
217        this.find('r-truth').textContent    = result.truth;
218
219        // Build CTA URL with both area and ref parameters
220        var baseUrl = this.ctaUrl || 'https://identitysync.app';
221        var params = [];
222        if (this.refCode) params.push('ref=' + encodeURIComponent(this.refCode));
223        params.push('area=' + encodeURIComponent(this.currentArea));
224        var ctaFinal = baseUrl + (params.length ? '?' + params.join('&') : '');
225        var ctaEl = this.find('r-cta');
226        if (ctaEl) ctaEl.href = ctaFinal;
227
228        this.show(3);
229    };
230
231    ISDiagnostic.prototype.restart = function() {
232        this.currentArea = null;
233        this.selected.clear();
234        this.show(1);
235    };
236
237    function init() {
238        document.querySelectorAll('.isd-wrap').forEach(function(el) {
239            new ISDiagnostic(el);
240        });
241    }
242
243    if (document.readyState === 'loading') {
244        document.addEventListener('DOMContentLoaded', init);
245    } else {
246        init();
247    }
248
249})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.