PageSourceSearch

https://baybayintranslator.net/wp-content/plugins/baybayin-alphabet/clipboard.js

js baybayintranslator.net collected 2026-10-05 04:08:53 UTC 23,553 bytes, 556 lines download raw bytes

vendor: 22,402 bytes, lines 1-520
1/*!
2 * clipboard.js v1.5.15
3 * https://zenorocha.github.io/clipboard.js
4 *
5 * Licensed MIT © Zeno Rocha
6 */
7!function(e) {
8    if ("object" == typeof exports && "undefined" != typeof module)
9        module.exports = e();
10    else if ("function" == typeof define && define.amd)
11        define([], e);
12    else {
13        var t;
14        t = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this,
15        t.Clipboard = e()
16    }
17}(function() {
18    var e, t, n;
19    return function e(t, n, i) {
20        function o(a, c) {
21            if (!n[a]) {
22                if (!t[a]) {
23                    var l = "function" == typeof require && require;
24                    if (!c && l)
25                        return l(a, !0);
26                    if (r)
27                        return r(a, !0);
28                    var s = new Error("Cannot find module '" + a + "'");
29                    throw s.code = "MODULE_NOT_FOUND",
30                    s
31                }
32                var u = n[a] = {
33                    exports: {}
34                };
35                t[a][0].call(u.exports, function(e) {
36                    var n = t[a][1][e];
37                    return o(n ? n : e)
38                }, u, u.exports, e, t, n, i)
39            }
40            return n[a].exports
41        }
42        for (var r = "function" == typeof require && require, a = 0; a < i.length; a++)
43            o(i[a]);
44        return o
45    }({
46        1: [function(e, t, n) {
47            function i(e, t) {
48                for (; e && e !== document; ) {
49                    if (e.matches(t))
50                        return e;
51                    e = e.parentNode
52                }
53            }
54            if (Element && !Element.prototype.matches) {
55                var o = Element.prototype;
56                o.matches = o.matchesSelector || o.mozMatchesSelector || o.msMatchesSelector || o.oMatchesSelector || o.webkitMatchesSelector
57            }
58            t.exports = i
59        }
60        , {}],
61        2: [function(e, t, n) {
62            function i(e, t, n, i, r) {
63                var a = o.apply(this, arguments);
64                return e.addEventListener(n, a, r),
65                {
66                    destroy: function() {
67                        e.removeEventListener(n, a, r)
68                    }
69                }
70            }
71            function o(e, t, n, i) {
72                return function(n) {
73                    n.delegateTarget = r(n.target, t),
74                    n.delegateTarget && i.call(e, n)
75                }
76            }
77            var r = e("./closest");
78            t.exports = i
79        }
80        , {
81            "./closest": 1
82        }],
83        3: [function(e, t, n) {
84            n.node = function(e) {
85                return void 0 !== e && e instanceof HTMLElement && 1 === e.nodeType
86            }
87            ,
88            n.nodeList = function(e) {
89                var t = Object.prototype.toString.call(e);
90                return void 0 !== e && ("[object NodeList]" === t || "[object HTMLCollection]" === t) && "length"in e && (0 === e.length || n.node(e[0]))
91            }
92            ,
93            n.string = function(e) {
94                return "string" == typeof e || e instanceof String
95            }
96            ,
97            n.fn = function(e) {
98                var t = Object.prototype.toString.call(e);
99                return "[object Function]" === t
100            }
101        }
102        , {}],
103        4: [function(e, t, n) {
104            function i(e, t, n) {
105                if (!e && !t && !n)
106                    throw new Error("Missing required arguments");
107                if (!c.string(t))
108                    throw new TypeError("Second argument must be a String");
109                if (!c.fn(n))
110                    throw new TypeError("Third argument must be a Function");
111                if (c.node(e))
112                    return o(e, t, n);
113                if (c.nodeList(e))
114                    return r(e, t, n);
115                if (c.string(e))
116                    return a(e, t, n);
117                throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")
118            }
119            function o(e, t, n) {
120                return e.addEventListener(t, n),
121                {
122                    destroy: function() {
123                        e.removeEventListener(t, n)
124                    }
125                }
126            }
127            function r(e, t, n) {
128                return Array.prototype.forEach.call(e, function(e) {
129                    e.addEventListener(t, n)
130                }),
131                {
132                    destroy: function() {
133                        Array.prototype.forEach.call(e, function(e) {
134                            e.removeEventListener(t, n)
135                        })
136                    }
137                }
138            }
139            function a(e, t, n) {
140                return l(document.body, e, t, n)
141            }
142            var c = e("./is")
143              , l = e("delegate");
144            t.exports = i
145        }
146        , {
147            "./is": 3,
148            delegate: 2
149        }],
150        5: [function(e, t, n) {
151            function i(e) {
152                var t;
153                if ("SELECT" === e.nodeName)
154                    e.focus(),
155                    t = e.value;
156                else if ("INPUT" === e.nodeName || "TEXTAREA" === e.nodeName)
157                    e.focus(),
158                    e.setSelectionRange(0, e.value.length),
159                    t = e.value;
160                else {
161                    e.hasAttribute("contenteditable") && e.focus();
162                    var n = window.getSelection()
163                      , i = document.createRange();
164                    i.selectNodeContents(e),
165                    n.removeAllRanges(),
166                    n.addRange(i),
167                    t = n.toString()
168                }
169                return t
170            }
171            t.exports = i
172        }
173        , {}],
174        6: [function(e, t, n) {
175            function i() {}
176            i.prototype = {
177                on: function(e, t, n) {
178                    var i = this.e || (this.e = {});
179                    return (i[e] || (i[e] = [])).push({
180                        fn: t,
181                        ctx: n
182                    }),
183                    this
184                },
185                once: function(e, t, n) {
186                    function i() {
187                        o.off(e, i),
188                        t.apply(n, arguments)
189                    }
190                    var o = this;
191                    return i._ = t,
192                    this.on(e, i, n)
193                },
194                emit: function(e) {
195                    var t = [].slice.call(arguments, 1)
196                      , n = ((this.e || (this.e = {}))[e] || []).slice()
197                      , i = 0
198                      , o = n.length;
199                    for (i; i < o; i++)
200                        n[i].fn.apply(n[i].ctx, t);
201                    return this
202                },
203                off: function(e, t) {
204                    var n = this.e || (this.e = {})
205                      , i = n[e]
206                      , o = [];
207                    if (i && t)
208                        for (var r = 0, a = i.length; r < a; r++)
209                            i[r].fn !== t && i[r].fn._ !== t && o.push(i[r]);
210                    return o.length ? n[e] = o : delete n[e],
211                    this
212                }
213            },
214            t.exports = i
215        }
216        , {}],
217        7: [function(t, n, i) {
218            !function(o, r) {
219                if ("function" == typeof e && e.amd)
220                    e(["module", "select"], r);
221                else if ("undefined" != typeof i)
222                    r(n, t("select"));
223                else {
224                    var a = {
225                        exports: {}
226                    };
227                    r(a, o.select),
228                    o.clipboardAction = a.exports
229                }
230            }(this, function(e, t) {
231                "use strict";
232                function n(e) {
233                    return e && e.__esModule ? e : {
234                        default: e
235                    }
236                }
237                function i(e, t) {
238                    if (!(e instanceof t))
239                        throw new TypeError("Cannot call a class as a function")
240                }
241                var o = n(t)
242                  , r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
243                    return typeof e
244                }
245                : function(e) {
246                    return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
247                }
248                  , a = function() {
249                    function e(e, t) {
250                        for (var n = 0; n < t.length; n++) {
251                            var i = t[n];
252                            i.enumerable = i.enumerable || !1,
253                            i.configurable = !0,
254                            "value"in i && (i.writable = !0),
255                            Object.defineProperty(e, i.key, i)
256                        }
257                    }
258                    return function(t, n, i) {
259                        return n && e(t.prototype, n),
260                        i && e(t, i),
261                        t
262                    }
263                }()
264                  , c = function() {
265                    function e(t) {
266                        i(this, e),
267                        this.resolveOptions(t),
268                        this.initSelection()
269                    }
270                    return a(e, [{
271                        key: "resolveOptions",
272                        value: function e() {
273                            var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
274                            this.action = t.action,
275                            this.emitter = t.emitter,
276                            this.target = t.target,
277                            this.text = t.text,
278                            this.trigger = t.trigger,
279                            this.selectedText = ""
280                        }
281                    }, {
282                        key: "initSelection",
283                        value: function e() {
284                            this.text ? this.selectFake() : this.target && this.selectTarget()
285                        }
286                    }, {
287                        key: "selectFake",
288                        value: function e() {
289                            var t = this
290                              , n = "rtl" == document.documentElement.getAttribute("dir");
291                            this.removeFake(),
292                            this.fakeHandlerCallback = function() {
293                                return t.removeFake()
294                            }
295                            ,
296                            this.fakeHandler = document.body.addEventListener("click", this.fakeHandlerCallback) || !0,
297                            this.fakeElem = document.createElement("textarea"),
298                            this.fakeElem.style.fontSize = "12pt",
299                            this.fakeElem.style.class = "img-0",
300                            this.fakeElem.style.padding = "0",
301                            this.fakeElem.style.margin = "0",
302                            this.fakeElem.style.position = "absolute",
303                            this.fakeElem.style[n ? "right" : "left"] = "-9999px";
304                            var i = window.pageYOffset || document.documentElement.scrollTop;
305                            this.fakeElem.addEventListener("focus", window.scrollTo(0, i)),
306                            this.fakeElem.style.top = i + "px",
307                            this.fakeElem.setAttribute("readonly", ""),
308                            this.fakeElem.value = this.text,
309                            document.body.appendChild(this.fakeElem),
310                            this.selectedText = (0,
311                            o.default)(this.fakeElem),
312                            this.copyText()
313                        }
314                    }, {
315                        key: "removeFake",
316                        value: function e() {
317                            this.fakeHandler && (document.body.removeEventListener("click", this.fakeHandlerCallback),
318                            this.fakeHandler = null,
319                            this.fakeHandlerCallback = null),
320                            this.fakeElem && (document.body.removeChild(this.fakeElem),
321                            this.fakeElem = null)
322                        }
323                    }, {
324                        key: "selectTarget",
325                        value: function e() {
326                            this.selectedText = (0,
327                            o.default)(this.target),
328                            this.copyText()
329                        }
330                    }, {
331                        key: "copyText",
332                        value: function e() {
333                            var t = void 0;
334                            try {
335                                t = document.execCommand(this.action)
336                            } catch (e) {
337                                t = !1
338                            }
339                            this.handleResult(t)
340                        }
341                    }, {
342                        key: "handleResult",
343                        value: function e(t) {
344                            this.emitter.emit(t ? "success" : "error", {
345                                action: this.action,
346                                text: this.selectedText,
347                                trigger: this.trigger,
348                                clearSelection: this.clearSelection.bind(this)
349                            })
350                        }
351                    }, {
352                        key: "clearSelection",
353                        value: function e() {
354                            this.target && this.target.blur(),
355                            window.getSelection().removeAllRanges()
356                        }
357                    }, {
358                        key: "destroy",
359                        value: function e() {
360                            this.removeFake()
361                        }
362                    }, {
363                        key: "action",
364                        set: function e() {
365                            var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "copy";
366                            if (this._action = t,
367                            "copy" !== this._action && "cut" !== this._action)
368                                throw new Error('Invalid "action" value, use either "copy" or "cut"')
369                        },
370                        get: function e() {
371                            return this._action
372                        }
373                    }, {
374                        key: "target",
375                        set: function e(t) {
376                            if (void 0 !== t) {
377                                if (!t || "object" !== ("undefined" == typeof t ? "undefined" : r(t)) || 1 !== t.nodeType)
378                                    throw new Error('Invalid "target" value, use a valid Element');
379                                if ("copy" === this.action && t.hasAttribute("disabled"))
380                                    throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
381                                if ("cut" === this.action && (t.hasAttribute("readonly") || t.hasAttribute("disabled")))
382                                    throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');
383                                this._target = t
384                            }
385                        },
386                        get: function e() {
387                            return this._target
388                        }
389                    }]),
390                    e
391                }();
392                e.exports = c
393            })
394        }
395        , {
396            select: 5
397        }],
398        8: [function(t, n, i) {
399            !function(o, r) {
400                if ("function" == typeof e && e.amd)
401                    e(["module", "./clipboard-action", "tiny-emitter", "good-listener"], r);
402                else if ("undefined" != typeof i)
403                    r(n, t("./clipboard-action"), t("tiny-emitter"), t("good-listener"));
404                else {
405                    var a = {
406                        exports: {}
407                    };
408                    r(a, o.clipboardAction, o.tinyEmitter, o.goodListener),
409                    o.clipboard = a.exports
410                }
411            }(this, function(e, t, n, i) {
412                "use strict";
413                function o(e) {
414                    return e && e.__esModule ? e : {
415                        default: e
416                    }
417                }
418                function r(e, t) {
419                    if (!(e instanceof t))
420                        throw new TypeError("Cannot call a class as a function")
421                }
422                function a(e, t) {
423                    if (!e)
424                        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
425                    return !t || "object" != typeof t && "function" != typeof t ? e : t
426                }
427                function c(e, t) {
428                    if ("function" != typeof t && null !== t)
429                        throw new TypeError("Super expression must either be null or a function, not " + typeof t);
430                    e.prototype = Object.create(t && t.prototype, {
431                        constructor: {
432                            value: e,
433                            enumerable: !1,
434                            writable: !0,
435                            configurable: !0
436                        }
437                    }),
438                    t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
439                }
440                function l(e, t) {
441                    var n = "data-clipboard-" + e;
442                    if (t.hasAttribute(n))
443                        return t.getAttribute(n)
444                }
445                var s = o(t)
446                  , u = o(n)
447                  , f = o(i)
448                  , d = function() {
449                    function e(e, t) {
450                        for (var n = 0; n < t.length; n++) {
451                            var i = t[n];
452                            i.enumerable = i.enumerable || !1,
453                            i.configurable = !0,
454                            "value"in i && (i.writable = !0),
455                            Object.defineProperty(e, i.key, i)
456                        }
457                    }
458                    return function(t, n, i) {
459                        return n && e(t.prototype, n),
460                        i && e(t, i),
461                        t
462                    }
463                }()
464                  , h = function(e) {
465                    function t(e, n) {
466                        r(this, t);
467                        var i = a(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));
468                        return i.resolveOptions(n),
469                        i.listenClick(e),
470                        i
471                    }
472                    return c(t, e),
473                    d(t, [{
474                        key: "resolveOptions",
475                        value: function e() {
476                            var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
477                            this.action = "function" == typeof t.action ? t.action : this.defaultAction,
478                            this.target = "function" == typeof t.target ? t.target : this.defaultTarget,
479                            this.text = "function" == typeof t.text ? t.text : this.defaultText
480                        }
481                    }, {
482                        key: "listenClick",
483                        value: function e(t) {
484                            var n = this;
485                            this.listener = (0,
486                            f.default)(t, "click", function(e) {
487                                return n.onClick(e)
488                            })
489                        }
490                    }, {
491                        key: "onClick",
492                        value: function e(t) {
493                            var n = t.delegateTarget || t.currentTarget;
494                            this.clipboardAction && (this.clipboardAction = null),
495                            this.clipboardAction = new s.default({
496                                action: this.action(n),
497                                target: this.target(n),
498                                text: this.text(n),
499                                trigger: n,
500                                emitter: this
501                            })
502                        }
503                    }, {
504                        key: "defaultAction",
505                        value: function e(t) {
506                            return l("action", t)
507                        }
508                    }, {
509                        key: "defaultTarget",
510                        value: function e(t) {
511                            var n = l("target", t);
512                            if (n)
513                                return document.querySelector(n)
514                        }
515                    }, {
516                        key: "defaultText",
517                        value: function e(t) {
518                            return l("text", t)
519                        }
520                    }, {
521                        key: "destroy",
522                        value: function e() {
523                            this.listener.destroy(),
524                            this.clipboardAction && (this.clipboardAction.destroy(),
525                            this.clipboardAction = null)
526                        }
527                    }]),
528                    t
529                }(u.default);
530                e.exports = h
531            })
532        }
533        , {
534            "./clipboard-action": 7,
535            "good-listener": 4,
536            "tiny-emitter": 6
537        }]
538    }, {}, [8])(8)
539});
540
541
542
543// save button file
544function save(){
545    var text = document.getElementById("bar").value;
546    text = text.replace(/\n/g, "\r\n"); 
547    var blob = new Blob([text], { type: "text/plain"});
548    var anchor = document.createElement("a");
549    anchor.download = "baybayintranslator_net_keyboard.txt";
550    anchor.href = window.URL.createObjectURL(blob);
551    anchor.target ="_blank";
552    anchor.style.display = "none"; // just to be safe
553    document.body.appendChild(anchor);
554    anchor.click();
555    document.body.removeChild(anchor);
556 }

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.