PluginProbe ʕ •ᴥ•ʔ
Wordfence Security – Firewall, Malware Scan, and Login Security / 7.11.5
Wordfence Security – Firewall, Malware Scan, and Login Security v7.11.5
8.2.2 8.2.1 8.2.0 3.7.1 3.7.2 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 3.8.9 3.9.1 4.0.1 4.0.2 4.0.3 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.1 5.1.2 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.2.9 5.3.1 5.3.10 5.3.11 5.3.12 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 5.3.8 5.3.9 6.0.1 6.0.10 6.0.11 6.0.12 6.0.14 6.0.15 6.0.16 6.0.17 6.0.18 6.0.19 6.0.2 6.0.20 6.0.21 6.0.22 6.0.23 6.0.24 6.0.25 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.0.9 6.1.1 6.1.10 6.1.11 6.1.12 6.1.14 6.1.15 6.1.16 6.1.17 6.1.2 6.1.3 6.1.4 6.1.5 6.1.6 6.1.7 6.1.8 6.1.9 6.2.0 6.2.1 6.2.10 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6 6.2.7 6.2.8 6.2.9 6.3.0 6.3.1 6.3.10 6.3.11 6.3.12 6.3.14 6.3.15 6.3.16 6.3.17 6.3.18 6.3.19 6.3.2 6.3.20 6.3.21 6.3.22 6.3.3 6.3.4 6.3.5 6.3.6 6.3.7 6.3.8 6.3.9 7.0.1 7.0.2 7.0.3 7.0.4 7.0.5 7.1.0 7.1.1 7.1.10 7.1.11 7.1.12 7.1.14 7.1.15 7.1.16 7.1.17 7.1.18 7.1.19 7.1.2 7.1.20 7.1.3 7.1.4 7.1.5 7.1.6 7.1.7 7.1.8 7.1.9 7.10.0 7.10.1 7.10.2 7.10.3 7.10.4 7.10.5 7.10.6 7.10.7 7.11.0 7.11.1 7.11.2 7.11.3 7.11.4 7.11.5 7.11.6 7.11.7 7.2.1 7.2.2 7.2.3 7.2.4 7.2.5 7.3.1 7.3.2 7.3.3 7.3.4 7.3.5 7.3.6 7.4.0 7.4.1 7.4.10 7.4.11 7.4.12 7.4.14 7.4.2 7.4.3 trunk 7.4.4 1.1 7.4.5 1.2 7.4.6 1.3 7.4.7 1.3.1 7.4.8 1.3.2 7.4.9 1.3.3 7.5.0 1.4.2 7.5.1 1.4.3 7.5.10 1.4.4 7.5.11 1.4.5 7.5.2 1.4.6 7.5.3 1.4.7 7.5.4 1.4.8 7.5.5 1.5.1 7.5.6 1.5.2 7.5.7 1.5.3 7.5.8 1.5.4 7.5.9 1.5.5 7.6.0 1.5.6 7.6.1 2.0.1 7.6.2 2.0.2 7.7.0 2.0.3 7.7.1 2.0.5 7.8.0 2.0.6 7.8.1 2.0.7 7.8.2 2.1.0 7.9.0 2.1.1 7.9.1 2.1.2 7.9.2 2.1.3 7.9.3 2.1.4 8.0.0 2.1.5 8.0.1 3.0.2 8.0.2 3.0.3 8.0.3 3.0.4 8.0.4 3.0.5 8.0.5 3.0.6 8.1.0 3.0.7 8.1.1 3.0.8 8.1.2 3.0.9 8.1.3 3.1.0 8.1.4 3.1.1 v1.4.1 3.1.2 3.1.4 3.1.6 3.2.1 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4.1 3.4.4 3.4.5 3.5.1 3.5.2 3.6.1 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.6.9
wordfence / js / wfi18n.1712157296.js
wordfence / js Last commit date
admin.1712157296.js 2 years ago admin.ajaxWatcher.1712157296.js 2 years ago admin.liveTraffic.1712157296.js 2 years ago chart.umd.1712157296.js 2 years ago date.1712157296.js 2 years ago jquery-ui-timepicker-addon.1712157296.js 2 years ago jquery.colorbox-min.1712157296.js 2 years ago jquery.colorbox.1712157296.js 2 years ago jquery.qrcode.min.1712157296.js 2 years ago jquery.tmpl.min.1712157296.js 2 years ago knockout-3.5.1.1712157296.js 2 years ago wfdashboard.1712157296.js 2 years ago wfdropdown.1712157296.js 2 years ago wfglobal.1712157296.js 2 years ago wfi18n.1712157296.js 2 years ago wfonboarding.1712157296.js 2 years ago wfpopover.1712157296.js 2 years ago wfselect2.min.1712157296.js 2 years ago
wfi18n.1712157296.js
225 lines
1 (function () {
2
3 window.wfi18n = {
4 __: function(text) {
5 if (window.WordfenceI18nStrings && text in window.WordfenceI18nStrings) {
6 return window.WordfenceI18nStrings[text];
7 }
8 return text;
9 }
10 };
11
12 if (typeof wp === 'object' && wp.i18n) {
13 window.wfi18n.sprintf = wp.i18n.sprintf;
14 return;
15 }
16
17 /**
18 * Code has been adapted from WordPress' i18n.js functions and is being used as a polyfill for WordPress
19 * versions before 5.0.
20 */
21 var re = {
22 not_string: /[^s]/,
23 not_bool: /[^t]/,
24 not_type: /[^T]/,
25 not_primitive: /[^v]/,
26 number: /[diefg]/,
27 numeric_arg: /[bcdiefguxX]/,
28 json: /[j]/,
29 not_json: /[^j]/,
30 text: /^[^\x25]+/,
31 modulo: /^\x25{2}/,
32 placeholder: /^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,
33 key: /^([a-z_][a-z_\d]*)/i,
34 key_access: /^\.([a-z_][a-z_\d]*)/i,
35 index_access: /^\[(\d+)\]/,
36 sign: /^[+-]/
37 };
38
39 function sprintf(key) {
40 // `arguments` is not an array, but should be fine for this call
41 return sprintf_format(sprintf_parse(key), arguments)
42 }
43
44 function vsprintf(fmt, argv) {
45 return sprintf.apply(null, [fmt].concat(argv || []))
46 }
47
48 function sprintf_format(parse_tree, argv) {
49 var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, ph, pad, pad_character, pad_length, is_positive, sign
50 for (i = 0; i < tree_length; i++) {
51 if (typeof parse_tree[i] === 'string') {
52 output += parse_tree[i]
53 }
54 else if (typeof parse_tree[i] === 'object') {
55 ph = parse_tree[i] // convenience purposes only
56 if (ph.keys) { // keyword argument
57 arg = argv[cursor]
58 for (k = 0; k < ph.keys.length; k++) {
59 if (arg == undefined) {
60 throw new Error(sprintf('[sprintf] Cannot access property "%s" of undefined value "%s"', ph.keys[k], ph.keys[k-1]))
61 }
62 arg = arg[ph.keys[k]]
63 }
64 }
65 else if (ph.param_no) { // positional argument (explicit)
66 arg = argv[ph.param_no]
67 }
68 else { // positional argument (implicit)
69 arg = argv[cursor++]
70 }
71
72 if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {
73 arg = arg()
74 }
75
76 if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg))) {
77 throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))
78 }
79
80 if (re.number.test(ph.type)) {
81 is_positive = arg >= 0
82 }
83
84 switch (ph.type) {
85 case 'b':
86 arg = parseInt(arg, 10).toString(2)
87 break
88 case 'c':
89 arg = String.fromCharCode(parseInt(arg, 10))
90 break
91 case 'd':
92 case 'i':
93 arg = parseInt(arg, 10)
94 break
95 case 'j':
96 arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0)
97 break
98 case 'e':
99 arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential()
100 break
101 case 'f':
102 arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg)
103 break
104 case 'g':
105 arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg)
106 break
107 case 'o':
108 arg = (parseInt(arg, 10) >>> 0).toString(8)
109 break
110 case 's':
111 arg = String(arg)
112 arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
113 break
114 case 't':
115 arg = String(!!arg)
116 arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
117 break
118 case 'T':
119 arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()
120 arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
121 break
122 case 'u':
123 arg = parseInt(arg, 10) >>> 0
124 break
125 case 'v':
126 arg = arg.valueOf()
127 arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
128 break
129 case 'x':
130 arg = (parseInt(arg, 10) >>> 0).toString(16)
131 break
132 case 'X':
133 arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()
134 break
135 }
136 if (re.json.test(ph.type)) {
137 output += arg
138 }
139 else {
140 if (re.number.test(ph.type) && (!is_positive || ph.sign)) {
141 sign = is_positive ? '+' : '-'
142 arg = arg.toString().replace(re.sign, '')
143 }
144 else {
145 sign = ''
146 }
147 pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' '
148 pad_length = ph.width - (sign + arg).length
149 pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''
150 output += ph.align ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)
151 }
152 }
153 }
154 return output
155 }
156
157 var sprintf_cache = Object.create(null)
158
159 function sprintf_parse(fmt) {
160 if (sprintf_cache[fmt]) {
161 return sprintf_cache[fmt]
162 }
163
164 var _fmt = fmt, match, parse_tree = [], arg_names = 0
165 while (_fmt) {
166 if ((match = re.text.exec(_fmt)) !== null) {
167 parse_tree.push(match[0])
168 }
169 else if ((match = re.modulo.exec(_fmt)) !== null) {
170 parse_tree.push('%')
171 }
172 else if ((match = re.placeholder.exec(_fmt)) !== null) {
173 if (match[2]) {
174 arg_names |= 1
175 var field_list = [], replacement_field = match[2], field_match = []
176 if ((field_match = re.key.exec(replacement_field)) !== null) {
177 field_list.push(field_match[1])
178 while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
179 if ((field_match = re.key_access.exec(replacement_field)) !== null) {
180 field_list.push(field_match[1])
181 }
182 else if ((field_match = re.index_access.exec(replacement_field)) !== null) {
183 field_list.push(field_match[1])
184 }
185 else {
186 throw new SyntaxError('[sprintf] failed to parse named argument key')
187 }
188 }
189 }
190 else {
191 throw new SyntaxError('[sprintf] failed to parse named argument key')
192 }
193 match[2] = field_list
194 }
195 else {
196 arg_names |= 2
197 }
198 if (arg_names === 3) {
199 throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')
200 }
201
202 parse_tree.push(
203 {
204 placeholder: match[0],
205 param_no: match[1],
206 keys: match[2],
207 sign: match[3],
208 pad_char: match[4],
209 align: match[5],
210 width: match[6],
211 precision: match[7],
212 type: match[8]
213 }
214 )
215 }
216 else {
217 throw new SyntaxError('[sprintf] unexpected placeholder')
218 }
219 _fmt = _fmt.substring(match[0].length)
220 }
221 return sprintf_cache[fmt] = parse_tree
222 }
223
224 window.wfi18n.sprintf = sprintf;
225 })();