PageSourceSearch

https://cecindia.in/build/assets/ZoomSelector-DG2W28ID.js

js cecindia.in collected 2026-10-07 19:34:26 UTC 3,575 bytes, 23 lines download raw bytes

1import { j as e, r as d } from "./app-BVOYVG7k.js";
2import { t as x, f as m, u as p } from "./index.esm-Be0TM4JJ.js";
3import { q as r } from "./menu-DtUmqSN0.js";
4import { q as u } from "./transition-Bv7SIFCO.js";
5import "./iconBase-Dq-k2Yhi.js";
6import "./keyboard-CQ3VRvN3.js";
7const i = /* @__PURE__ */ new Map([["auto", "Auto"], ["page-actual", "Actual Size"], ["page-fit", "Page Fit"], ["page-width", "Page Width"]]), b = /* @__PURE__ */ new Map([[0.5, "50%"], [0.75, "75%"], [1, "100%"], [1.25, "125%"], [1.5, "150%"], [2, "200%"]]), N = ({ usePDFSlickStore: o }) => {
8  const l = o((s) => s.scale), n = o((s) => s.scaleValue), a = o((s) => s.pdfSlick);
9  return e.jsxs("div", { className: "flex items-center space-x-1", children: [e.jsx("button", { disabled: !a || l <= 0.25, className: "enabled:hover:bg-slate-200 enabled:hover:text-black text-slate-500 disabled:text-slate-300 p-1 rounded-sm transition-all group relative focus:border-x-orange-400 focus:ring-0 focus:shadow outline-none border border-transparent", onClick: () => {
10    var _a;
11    return (_a = a == null ? void 0 : a.viewer) == null ? void 0 : _a.decreaseScale();
12  }, children: e.jsx(x, { className: "h-4 w-4 fill-current" }) }), e.jsxs(r, { as: "div", className: "text-xs relative hidden sm:block", children: [e.jsxs(r.Button, { disabled: !a, className: "text-left w-32 bg-slate-200/70 hover:bg-slate-200 py-1 rounded-sm focus:border-x-orange-400 focus:ring-0 focus:shadow outline-none border border-transparent", children: [e.jsx("span", { className: "sr-only", children: "Open zoom options" }), e.jsxs("div", { className: "flex px-1", children: [e.jsx("span", { className: `flex-1 px-1 ${a ? "opacity-100" : "opacity-0"}`, children: n && i.has(n) ? i.get(n) : `${~~(l * 100)}%` }), e.jsx("div", { className: "w-4 h-4", children: e.jsx(m, { className: "w-4 h-4" }) })] })] }), e.jsx(u, { as: d.Fragment, enter: "transition ease-out duration-100", enterFrom: "transform opacity-0 scale-95", enterTo: "transform opacity-100 scale-100", leave: "transition ease-in duration-75", leaveFrom: "transform opacity-100 scale-100", leaveTo: "transform opacity-0 scale-95", children: e.jsxs(r.Items, { className: "absolute right-0 left-0 z-30 mt-2 w-full origin-top-right divide-y divide-slate-200 rounded text-left bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none", children: [e.jsx("div", { className: "py-1", children: Array.from(i.entries()).map(([s, t]) => e.jsx(r.Item, { children: ({ active: c, close: f }) => e.jsx("button", { onClick: () => {
13    a.currentScaleValue = s;
14  }, className: `block w-full box-border text-left px-2 py-1.5 text-xs ${c ? "bg-slate-100 text-gray-900" : "text-gray-700"}`, children: t }) }, t)) }), e.jsx("div", { className: "py-1", children: Array.from(b.entries()).map(([s, t]) => e.jsx(r.Item, { children: ({ active: c }) => e.jsx("button", { onClick: () => {
15    a.currentScale = s;
16  }, className: `block w-full box-border text-left px-2 py-1.5 text-xs ${c ? "bg-slate-100 text-gray-900" : "text-gray-700"}`, children: t }) }, t)) })] }) })] }), e.jsx("button", { disabled: !a || l >= 5, className: "enabled:hover:bg-slate-200 enabled:hover:text-black text-slate-500 disabled:text-slate-300 p-1 rounded-sm transition-all group relative focus:border-x-orange-400 focus:ring-0 focus:shadow outline-none border border-transparent", onClick: () => {
17    var _a;
18    return (_a = a == null ? void 0 : a.viewer) == null ? void 0 : _a.increaseScale();
19  }, children: e.jsx(p, { className: "h-4 w-4 fill-current" }) })] });
20};
21export {
22  N as default
23};

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.