{"_id":"@bentoproject/timeago","_rev":"244-25adc18f7c71e64bd7dc0fc742bae019","name":"@bentoproject/timeago","dist-tags":{"nightly":"1.2305241828.0","latest":"1.2305051745.1"},"versions":{"1.2110261518.0":{"name":"@bentoproject/timeago","version":"1.2110261518.0","description":"AMP HTML amp-timeago Component","author":{"name":"The AMP HTML Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":"./web-component","./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"e4bbe5c706c18a2c817265b40388ca4d4771613a","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2110261518.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-os/fCvlxg3NpxI6tgnTNpXYbKavcmV+t7sApUTL4YLiSnPkMKn7mC7aOp77/J7NqpHfyCrfqiaV4WTj23D5XfA==","shasum":"67fdf31e5a071631327846b9389630df3bbb9b2f","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2110261518.0.tgz","fileCount":27,"unpackedSize":3052836,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4GWGDngmAbIveQNssDIUmc+bRwxYHoWvW7iuvWwgfkQIhAN9ZFFqUlu2IJ09ew9prUneJjGYb8Qd6ZuiKlLLB3pwK"}]},"_npmUser":{"name":"ampprojectbot","email":"bot@amp.dev"},"directories":{},"maintainers":[{"name":"ampprojectbot","email":"bot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2110261518.0_1635445242254_0.1504662663943006"},"_hasShrinkwrap":false},"1.2110252343.0":{"name":"@bentoproject/timeago","version":"1.2110252343.0","description":"Bento timeago Component","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":"./web-component","./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nThe Bento Timeago component can count up to, or away from, a specified date and time. It replaces the text node with a fuzzy timestamp, such as `in 30 years` or `3 hours ago`.\n\n## Usage\n\n### Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\nThe examples below demonstrate use of the `<bento-timeago>` web component.\n\n#### Example: Import via npm\n\nInstall via npm:\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n#### Example: Import via `<script>`\n\n```html\n<head>\n  <script src=\"https://cdn.ampproject.org/bento.js\"></script>\n  <script\n    async\n    src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n  ></script>\n  <style>\n    bento-timeago {\n      display: block;\n      overflow: hidden;\n      position: relative;\n    }\n  </style>\n</head>\n<bento-timeago id=\"my-timeago\" datetime=\"2017-04-11T00:37:33.809Z\" locale=\"en\">\n  Saturday 11 April 2017 00.37\n</bento-timeago>\n<div class=\"buttons\" style=\"margin-top: 8px\">\n  <button id=\"ar-button\">Change locale to Arabic</button>\n  <button id=\"en-button\">Change locale to English</button>\n  <button id=\"now-button\">Change time to now</button>\n</div>\n\n<script>\n  (async () => {\n    const timeago = document.querySelector('#my-timeago');\n    await customElements.whenDefined('bento-timeago');\n\n    // set up button actions\n    document.querySelector('#ar-button').onclick = () =>\n      timeago.setAttribute('locale', 'ar');\n    document.querySelector('#en-button').onclick = () =>\n      timeago.setAttribute('locale', 'en');\n    document.querySelector('#now-button').onclick = () =>\n      timeago.setAttribute('datetime', 'now');\n  })();\n</script>\n```\n\n#### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n#### Attributes\n\n##### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n##### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n##### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n### Preact/React Component\n\nThe examples below demonstrates use of the `<BentoTimeago>` as a functional component usable with the Preact or React libraries.\n\n#### Example: Import via npm\n\nInstall via npm:\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n#### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n##### Props\n\n##### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n##### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n##### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n##### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"57e62ecc0e24bc2cd64467dba9d0f9836eea0182","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2110252343.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-udrlwLmv3NuSLXILSpMfdhWHRV8UgaKJnw7Xc269x7WXGM7PQ8GV5aCKAoFBJGXUJ2Nai3XETjzhioz3N9g6pQ==","shasum":"704b2380b7feb62482cb93dc10559042fcbb91cc","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2110252343.0.tgz","fileCount":27,"unpackedSize":3052822,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFsTgEDlbcBZkQveol9dWUiggL0wL4ZpASI4a3wJiKf6AiBCG2l+gz3ge9kiTjVDuzOv+SclGWtlL/3lKfpQWFF2xA=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"ampprojectbot","email":"bot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2110252343.0_1635457835796_0.16954596140970613"},"_hasShrinkwrap":false},"1.2110281959.0":{"name":"@bentoproject/timeago","version":"1.2110281959.0","description":"Bento timeago Component","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":"./web-component","./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nThe Bento Timeago component can count up to, or away from, a specified date and time. It replaces the text node with a fuzzy timestamp, such as `in 30 years` or `3 hours ago`.\n\n## Usage\n\n### Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\nThe examples below demonstrate use of the `<bento-timeago>` web component.\n\n#### Example: Import via npm\n\nInstall via npm:\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n#### Example: Import via `<script>`\n\n```html\n<head>\n  <script src=\"https://cdn.ampproject.org/bento.js\"></script>\n  <script\n    async\n    src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n  ></script>\n  <style>\n    bento-timeago {\n      display: block;\n      overflow: hidden;\n      position: relative;\n    }\n  </style>\n</head>\n<bento-timeago id=\"my-timeago\" datetime=\"2017-04-11T00:37:33.809Z\" locale=\"en\">\n  Saturday 11 April 2017 00.37\n</bento-timeago>\n<div class=\"buttons\" style=\"margin-top: 8px\">\n  <button id=\"ar-button\">Change locale to Arabic</button>\n  <button id=\"en-button\">Change locale to English</button>\n  <button id=\"now-button\">Change time to now</button>\n</div>\n\n<script>\n  (async () => {\n    const timeago = document.querySelector('#my-timeago');\n    await customElements.whenDefined('bento-timeago');\n\n    // set up button actions\n    document.querySelector('#ar-button').onclick = () =>\n      timeago.setAttribute('locale', 'ar');\n    document.querySelector('#en-button').onclick = () =>\n      timeago.setAttribute('locale', 'en');\n    document.querySelector('#now-button').onclick = () =>\n      timeago.setAttribute('datetime', 'now');\n  })();\n</script>\n```\n\n#### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n#### Attributes\n\n##### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n##### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n##### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n### Preact/React Component\n\nThe examples below demonstrates use of the `<BentoTimeago>` as a functional component usable with the Preact or React libraries.\n\n#### Example: Import via npm\n\nInstall via npm:\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n#### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n##### Props\n\n##### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n##### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n##### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n##### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"55fa3e004e2aeece5faf9a68717228077c215a13","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2110281959.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-w3ZqVef0Rhz+BhKpLD9AUdldqk/i3HhWA6tKMPphhF8Igg7GLYVAE/A8hu3Wob2KRv60mH+D1yAIvT30DLItmA==","shasum":"52b4494f54ef751c87b3995addb6675db320f8b4","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2110281959.0.tgz","fileCount":27,"unpackedSize":3052822,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBaw7QPjN+1J0csAXhR+kBwfmkGT/N77ATi4FoyyEpFOAiBbvXq3haw665xIcEDnPJGmWQhUonLbkVck7MCV1uHEww=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"ampprojectbot","email":"bot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2110281959.0_1635508503292_0.23859400692885613"},"_hasShrinkwrap":false},"1.2110290545.0":{"name":"@bentoproject/timeago","version":"1.2110290545.0","description":"Bento timeago Component","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":"./web-component","./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nThe Bento Timeago component can count up to, or away from, a specified date and time. It replaces the text node with a fuzzy timestamp, such as `in 30 years` or `3 hours ago`.\n\n## Usage\n\n### Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\nThe examples below demonstrate use of the `<bento-timeago>` web component.\n\n#### Example: Import via npm\n\nInstall via npm:\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n#### Example: Import via `<script>`\n\n```html\n<head>\n  <script src=\"https://cdn.ampproject.org/bento.js\"></script>\n  <script\n    async\n    src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n  ></script>\n  <style>\n    bento-timeago {\n      display: block;\n      overflow: hidden;\n      position: relative;\n    }\n  </style>\n</head>\n<bento-timeago\n  id=\"my-timeago\"\n  datetime=\"2017-04-11T00:37:33.809Z\"\n  locale=\"en\"\n  style=\"height: 30px\">\n    Saturday 11 April 2017 00.37\n</bento-timeago>\n<div class=\"buttons\" style=\"margin-top: 8px\">\n  <button id=\"ar-button\">Change locale to Arabic</button>\n  <button id=\"en-button\">Change locale to English</button>\n  <button id=\"now-button\">Change time to now</button>\n</div>\n\n<script>\n  (async () => {\n    const timeago = document.querySelector('#my-timeago');\n    await customElements.whenDefined('bento-timeago');\n\n    // set up button actions\n    document.querySelector('#ar-button').onclick = () =>\n      timeago.setAttribute('locale', 'ar');\n    document.querySelector('#en-button').onclick = () =>\n      timeago.setAttribute('locale', 'en');\n    document.querySelector('#now-button').onclick = () =>\n      timeago.setAttribute('datetime', 'now');\n  })();\n</script>\n```\n\n#### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n#### Attributes\n\n##### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n##### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n##### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n### Preact/React Component\n\nThe examples below demonstrates use of the `<BentoTimeago>` as a functional component usable with the Preact or React libraries.\n\n#### Example: Import via npm\n\nInstall via npm:\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n#### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n##### Props\n\n##### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n##### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n##### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n##### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"1cc07336e186d25fc5fbfb2e8f7e12c4a5c79fe9","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2110290545.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-JNQBMWJ3VYHngmYnBz1zETsaYMOcOm5Z2GP32r1YgGxrOwzYMUoUji0+JUcdbzpvpZ9dTSEen+wL7OAnTWn2gQ==","shasum":"fd477b80fb0446ab717e8ec3b94aab4d21b2e483","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2110290545.0.tgz","fileCount":27,"unpackedSize":3052853,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGEMRCKczFVvxT5QtlGzDFx3Vmp5M5P6uAIQb8MHHMgQIhAMKplxIg296jA0MoUrE4iRXEdPv2T04dEwQpWJQmPK2o"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"ampprojectbot","email":"bot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2110290545.0_1635593088294_0.8338720040840755"},"_hasShrinkwrap":false},"1.2111011823.0":{"name":"@bentoproject/timeago","version":"1.2111011823.0","description":"The Bento Timeago component can count up to, or away from, a specified date and time. It replaces the text node with a fuzzy timestamp, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nThe Bento Timeago component can count up to, or away from, a specified date and time. It replaces the text node with a fuzzy timestamp, such as `in 30 years` or `3 hours ago`.\n\n## Usage\n\n### Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\nThe examples below demonstrate use of the `<bento-timeago>` web component.\n\n#### Example: Import via npm\n\nInstall via npm:\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n#### Example: Import via `<script>`\n\n```html\n<head>\n  <script src=\"https://cdn.ampproject.org/bento.js\"></script>\n  <script\n    async\n    src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n  ></script>\n  <style>\n    bento-timeago {\n      display: block;\n      overflow: hidden;\n      position: relative;\n    }\n  </style>\n</head>\n<bento-timeago\n  id=\"my-timeago\"\n  datetime=\"2017-04-11T00:37:33.809Z\"\n  locale=\"en\"\n  style=\"height: 30px\">\n    Saturday 11 April 2017 00.37\n</bento-timeago>\n<div class=\"buttons\" style=\"margin-top: 8px\">\n  <button id=\"ar-button\">Change locale to Arabic</button>\n  <button id=\"en-button\">Change locale to English</button>\n  <button id=\"now-button\">Change time to now</button>\n</div>\n\n<script>\n  (async () => {\n    const timeago = document.querySelector('#my-timeago');\n    await customElements.whenDefined('bento-timeago');\n\n    // set up button actions\n    document.querySelector('#ar-button').onclick = () =>\n      timeago.setAttribute('locale', 'ar');\n    document.querySelector('#en-button').onclick = () =>\n      timeago.setAttribute('locale', 'en');\n    document.querySelector('#now-button').onclick = () =>\n      timeago.setAttribute('datetime', 'now');\n  })();\n</script>\n```\n\n#### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n#### Attributes\n\n##### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n##### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n##### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n### Preact/React Component\n\nThe examples below demonstrates use of the `<BentoTimeago>` as a functional component usable with the Preact or React libraries.\n\n#### Example: Import via npm\n\nInstall via npm:\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n#### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n##### Props\n\n##### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n##### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n##### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n##### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"7bd4192edeb4ded8e78291b094118653b1a78939","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2111011823.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-yjLaenohTorD8e13Q6x8FPZy2mqEMG5BySFH3UA/76m6JFQEte6H498zz58ilUBJa9o0/PTgvGJ93eYKo02ytQ==","shasum":"57e21a28f1d81298943d9603398eba18d311cd10","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2111011823.0.tgz","fileCount":27,"unpackedSize":3053084,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrosuxbSukFxoD4vDLmQ+aVGtN6DHuhRvX3vtEkTwLWgIhAOO11Cv9mEZsjOHjppbwUriqm+qP3R2LReOiCMn7LOFp"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2111011823.0_1635852352792_0.5698720401704076"},"_hasShrinkwrap":false},"1.2110152252.3":{"name":"@bentoproject/timeago","version":"1.2110152252.3","description":"The Bento Timeago component can count up to, or away from, a specified date and time. It replaces the text node with a fuzzy timestamp, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"7a44c3f3047d8b5f5bcbcf5a86c4c1cb30184bdc","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2110152252.3","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-XePPIk2zuf9OUJtyFIfuY0Z79nlK5XQgSc26FAZAZBcA0zu1rijKAWmeQ9fwo0MlqEjqpDMjPtDvVh9lZBCQEQ==","shasum":"8c3031db00c22cfc44f87e556a251a6348cd6404","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2110152252.3.tgz","fileCount":27,"unpackedSize":3053084,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDL5XZCINMGmDd8ZOdJ8nE5JROoyKbEc5ITrLzMUBcbXAIgS0GXblSBQr6PSf/vsM8M4yA5p0QCSj4AgWiI41eGXy8="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2110152252.3_1635890825408_0.7651459125381435"},"_hasShrinkwrap":false},"1.2110212130.2":{"name":"@bentoproject/timeago","version":"1.2110212130.2","description":"The Bento Timeago component can count up to, or away from, a specified date and time. It replaces the text node with a fuzzy timestamp, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"7a44c3f3047d8b5f5bcbcf5a86c4c1cb30184bdc","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2110212130.2","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-udS/vgiiuO7JGxF7PPrg8/38y9yGUF31UrYDWuxoA03dEmuLQH1dfHbS03NsDxDw+qVz2sp6qT7HNF5hlMrZAQ==","shasum":"5d4611c2bd0192495691b18e78cf2b018fbadf5c","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2110212130.2.tgz","fileCount":27,"unpackedSize":3053084,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7EULtEiYVHNLMnKi/v19HUzJxkjRHwHZdLC2STvFtQAIgLfF19WoBJCpIKQeM+ZBHg32EI3mhdX15OC1RWyjfhWo="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2110212130.2_1635891501043_0.30652255628643044"},"_hasShrinkwrap":false},"1.2111022043.0":{"name":"@bentoproject/timeago","version":"1.2111022043.0","description":"The Bento Timeago component can count up to, or away from, a specified date and time. It replaces the text node with a fuzzy timestamp, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nThe Bento Timeago component can count up to, or away from, a specified date and time. It replaces the text node with a fuzzy timestamp, such as `in 30 years` or `3 hours ago`.\n\n## Usage\n\n### Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\nThe examples below demonstrate use of the `<bento-timeago>` web component.\n\n#### Example: Import via npm\n\nInstall via npm:\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n#### Example: Import via `<script>`\n\n```html\n<head>\n  <script src=\"https://cdn.ampproject.org/bento.js\"></script>\n  <script\n    async\n    src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n  ></script>\n  <style>\n    bento-timeago {\n      display: block;\n      overflow: hidden;\n      position: relative;\n    }\n  </style>\n</head>\n<bento-timeago\n  id=\"my-timeago\"\n  datetime=\"2017-04-11T00:37:33.809Z\"\n  locale=\"en\"\n  style=\"height: 30px\">\n    Saturday 11 April 2017 00.37\n</bento-timeago>\n<div class=\"buttons\" style=\"margin-top: 8px\">\n  <button id=\"ar-button\">Change locale to Arabic</button>\n  <button id=\"en-button\">Change locale to English</button>\n  <button id=\"now-button\">Change time to now</button>\n</div>\n\n<script>\n  (async () => {\n    const timeago = document.querySelector('#my-timeago');\n    await customElements.whenDefined('bento-timeago');\n\n    // set up button actions\n    document.querySelector('#ar-button').onclick = () =>\n      timeago.setAttribute('locale', 'ar');\n    document.querySelector('#en-button').onclick = () =>\n      timeago.setAttribute('locale', 'en');\n    document.querySelector('#now-button').onclick = () =>\n      timeago.setAttribute('datetime', 'now');\n  })();\n</script>\n```\n\n#### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n#### Attributes\n\n##### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n##### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n##### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n### Preact/React Component\n\nThe examples below demonstrates use of the `<BentoTimeago>` as a functional component usable with the Preact or React libraries.\n\n#### Example: Import via npm\n\nInstall via npm:\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n#### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n##### Props\n\n##### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n##### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n##### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n##### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"f4d548031e8e20aaea8ade649d3394d56518b769","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2111022043.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-tKJxiuwflHPehA3mstRwy4RcqPv29VHUeDRxdDGt8l+f2Taw2cNDhzh/cLRd6yr1TrK7iWP9coTI3zF/VzbJzg==","shasum":"cf218cef8031fb2609cfebda3cc774d03d2d0d74","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2111022043.0.tgz","fileCount":27,"unpackedSize":3053084,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2EkD+zt7RyS8ve+s5qOLKq8WDaVaAiK+Q/870tbumfwIgdRkMRQmZn/GJfEMkBS2kc5y2169fPIuBe6mASYFuOs8="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2111022043.0_1635938497310_0.281794183752764"},"_hasShrinkwrap":false},"1.2111180040.0":{"name":"@bentoproject/timeago","version":"1.2111180040.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Import via `<script>`\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"f53cd87e15233c147123f81aad5da820c5581752","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2111180040.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-S/OYDJeu/BHRYoogKxR0YPOCTCxzOOyl8ayPGUAa3uRGS/tUZBe4imU1ZsGs8e0MWj4KM+ipUkiZiPQvpHzR/w==","shasum":"2ca061d51c5f05d6516df55dfb03efa784561e5d","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2111180040.0.tgz","fileCount":27,"unpackedSize":2925104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhlsYACRA9TVsSAnZWagAAFyMP/RUf+gphI1FQOruVN0o5\nLlidzPefBtZVICPGVnWUUbij83K2D59Y+eXYD7uc+PadzCGDn7FADZUCAVS/\nP70mAbk/vIJ0/zpYEmNkJHia0J62f+bkps4iyAADHGoEJKHvggdkZ6aNalae\nr9eb3vcrl3siZdLLOGJ+FG8ta62GahL4Vc0h+HUsyjL9CxHxhO8683BgfBAc\nnGIiN2oY3GD/vTreZgStXpW8INvKvOlUADm7tTLgiq3ikYa4MnNN+OMSw+kE\nSLsCtJIdSAroRvXzWbB/5eSeQYrPukE7W/EvemOdTpli6yR2w/2swNmoCc9s\n39iidcybbvogIUb4We3+tV/gdYlj2Jrs1CPCIhj/Iz67qqTaCB1Jol8I3b4S\nWqgCl2xun7LF7/efny8MhKyjoZXpgLcs54anEyRaFwA7S77VkG4SasJC6SHJ\nrX5B/Quv8RSQlomXgdXqdzPuOBz67qozc3dQnjXIvtkPd2C29M/A7v7NzPlE\n13sDFcW7lmGuIa5hOop1gwWw6aCgL9og179umpGJHWN9wiGTnq6hR6E82bF0\nlUZj+oQFo+lQWjwNviDvukGOL3raZ8G4dWCZU6oKrE02yvK1djhVjh/mepBv\nNLLKXt9GznanDk61dljZ0hia+PrbzOLjMr0KtmVWdFaeTPPrSzSKTZz269ot\nTgC5\r\n=HCr0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFgAxPEQe9MbQ0+qpja7yKL5MNXCd8mkBJ0cey45zQxvAiBtDUKs3eaZJzQx15613sykhXcuAj7Ho7Z4i67ojLZBAg=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2111180040.0_1637271040211_0.8550835415357534"},"_hasShrinkwrap":false},"1.2111060251.3":{"name":"@bentoproject/timeago","version":"1.2111060251.3","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"f53cd87e15233c147123f81aad5da820c5581752","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2111060251.3","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-vYIWOBLNEbzJBcL/ZDwwy14FClElU4QECQObF2lZhr+xBmpFsEkUYKx0oEkm5s88ACqeNJgnUYA3rbvxv5jlKQ==","shasum":"d0b7b794e821e5fe27d822a9b62ff249f77dc7be","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2111060251.3.tgz","fileCount":27,"unpackedSize":2925104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhlsmYCRA9TVsSAnZWagAA3DoP/3aRPmNCxL8B0aamBZuW\niEdZC6zUOUceJqcb4reD56EPwEg3nCEQbrHqLtdIaMydYwdVxaqZ0m7b4dam\ncRudhc6WmP7Eoonf32unOOTQumwGSveB0G1+p2Nt1TpjHTwvE9KRE+4fL594\nuc8k04D1+cJZuLLgLYboy3OAOj7zpBe7dpa0aN6+81rCO2JZJENuoRQhLYSQ\na4J5MV7JtqNsoetVD9sM2EOOl20PX7ofwPNyaGOs8hFu5umiColuNZuutUPj\nJq2QCedOl9S2Vu+7qH07FxP6CYR2WSitlzXU2jQFf8kDZJx6Q3gAfWELk4UD\nUfDq/sJQ8RuUAm3OFSCzv8+48XItdV4mep9ko0SlVGCjMSqABkOAFUu7ipgd\nsZYwVCdBDAFQrdN7618Fk8MdwHvGUSZG+f4q+rKg7g8ODNFl4JoroFKrnHYZ\nmjXLM5cBHdSEZavOYMJzC7SEGNEpJP65Z1T14ShTwXVBivJn9A+vHiZS6Hhc\ni2dRAvJuguI+GpG+Tjfde9uy1QVnV8T11IK6V3WpAriBdiUhU9okbh5yuKtr\nIzrO8rTOHAEaJIx3n1Ykw/BbJirYqSOOI4VllF+FAQn41i81r7bzhJHrKQEP\n/XnWOdhYPTQS6sTx0ukAWb516DbUQqEMmMtTTMcXtJ7xhO11OY4VKY3BFcLi\n60dN\r\n=0PcL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE12lq48CVYbPXgdHdpAQDuziHJ5r1EESyFzemRGRJsDAiEA0D3bh0C2q+xWsWA9eG4cL5x7dDeQHNsxxh4/KQ7i6Lk="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2111060251.3_1637271959031_0.3867788024078138"},"_hasShrinkwrap":false},"1.2111182332.0":{"name":"@bentoproject/timeago","version":"1.2111182332.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Import via `<script>`\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"34ebd943d9b16506b7a515b38941fdd8357bd288","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2111182332.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-zxr82lyRZMFOdoEkc7McO4u3Ovtx3pH6mhGoEjxbbFKp6bJ5LFuT7ewoDhPk5iWbbkCdim1x9gIchWxkR2fXbQ==","shasum":"0123c517735360760d2a599240fd3ef611c41367","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2111182332.0.tgz","fileCount":27,"unpackedSize":2937555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl5hHCRA9TVsSAnZWagAAH+8P+QHgLWLbMFo4nOLKyF7k\nEUCbXiGLhnZqJ/Nl6aaMnGkrcArnZ44eXzPobncDz5EUCLG9ECeamL+BLhjX\nt6dOQbMOK5CfhsQ7YXNBfTkhVv/Qadc5TIEFqNUWuzPA57jpmk8+WZklKmiP\nfYMYsI8r7FjC2ih6AyEXZqqz9l20R9GiJbDIxFyxHYUip3Q2/st81+j1smoE\nWXV59xjgJ7QkkcLrjUkohGi41DabPx4xGsovXDY/4/WVMod3CyUJKSTG0LD8\nreSGKcp0xrJfog/WbKaBQq9OOuRkYj4cyw2OVIgo9rZQ4g9/EqfmIvR3Om/h\nWHCt3ot9yLSTVjzCsZEcY0Ij/7ke27xyDkcqtCw3xMj/jINr3222KynLu5Lm\nk7vIDU8xSQkNMmHvwBiZiODj0y11Xk22/3IXm+BP3UYghh2tMJUgv4mFuUIi\nZSNCoD8Pg84QqD/jdf06/gAM8AKKybPU5CgeSecmhiHCMtFga0DOWhYONlGQ\nTLvMyxktN8RKimm5JMCw7OoKX14MUqWu3G+wGaSWvXo6VQmAiTOrC/lO6O2s\n/JUY2g+CUoqRFdjjO9R4Jy38w4jb4ATJi0mwiaaamZ8nMg7EzltOZg1l5nQG\nfcpNee+tJBjtNkHGop/BS/dwHlm+OHO7wogAaaOLGihrrfx9vrlshVkO3dm8\n2dMZ\r\n=Nq9S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMYDjx/7au2vUpHAbcSdBiWMTuUktTbZus1w67BQW5iwIhANlwKdJj4KTL+pAmSiUq9J/tcrDV5Y3a5kaCdUCrh9ws"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2111182332.0_1637324871500_0.566767288111879"},"_hasShrinkwrap":false},"1.2111060251.9":{"name":"@bentoproject/timeago","version":"1.2111060251.9","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"04e44a3695f8db307eda69f753e10665cfa70fa1","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2111060251.9","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-+eaL2dk5Bmnk16TAEITnY6ZigzbTMBM+bKT159B7HzGQJ1/qqiURg3xMwgP9KKBgdWRR7Yjv2TJyqAC23OWTRw==","shasum":"6696766101fa1fdfb8f638241a78ba2fcf99836e","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2111060251.9.tgz","fileCount":27,"unpackedSize":2937555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl9H8CRA9TVsSAnZWagAAuf0QAIM7+eym3dGwdmm6ylwU\nE5N5n7qU6WQ0fwv7FMiaVb8pcsiBljV+aG/N8s+86ykOtQnF+IYBHF0LKYh6\nQEYVn96H1vdvfuUo79U0jqU//0ezRohj/MWLQ7svJmPvPAzH8ISNHVWntzzh\nGjcpsWtb6JmLYtFy3Y/At09CY3Qd9TVCBXcN1LpOUmRbULpxhzqEhEaQnMwy\nFnZ6VMyEBZkzysSeFWIhJ+s1jdkJLkL1WIa4WdAlOZGbUC/hgwDQP71HzadJ\nZy/vufRwYumJgQlP3x+Z0YDNkAMkBdVaGvMx74Yqkq76pz2elvOuDhnjexQ5\nWeglQrBWTfLHjTUQ19+OsL0r1wbx+GS2yAyLI4VgD3N1o9QSQZqG2k+o6OZo\nd/HJysKQTqU4xpNw7KcWZ3oDyQFjwBBVstRPSvUXg+j2x3P/MY6uGYT9p4mZ\nDcHd0BKOeEfiCVkGl/bkSusYOXh/+aif5V4w5UpK00X+kg1SN2KAww1R4KOc\nnQfaFzUmFqiC3Lh0iB5D9XyGsY3RBz51oFEWauMfHrgQv9xyTWNh6Y8hm36q\n5vsOh91AQ8BOsEHbwFY280s6DDqTC/IpPOtNCowCbEAK44EvVbfg/eIvQm/v\nSl/3GjMQF9+o3ZFQOueOh2sLzJbkKlhaxtwHgFMvRHTLsP0c8o+VZJYpd5Jm\nSR6X\r\n=XrSY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHfYPBvv0avp7hmqv8zCE6LWslRtAMLK+BzVQsW2vh1wIhAI9HZ9zxePmtYRIemwmMjG1nekatxVN2IAnGByPKc0Iv"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2111060251.9_1637339643846_0.7096831344797636"},"_hasShrinkwrap":false},"1.2111191951.0":{"name":"@bentoproject/timeago","version":"1.2111191951.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Import via `<script>`\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"22d6da19b9e01e75e6b67f54cd425c465822fe8c","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2111191951.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-6LzI9sA5mSRdUCEe8PRa0PNqecnskbWiUyGKwTcs37c5eQ0JSl+L4Eov2SHLob9nALYv9uwIxAsV/ogpZZzokg==","shasum":"aeb3c56656f9a3b13f715ee80bf78212e52b49f3","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2111191951.0.tgz","fileCount":27,"unpackedSize":2937555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmOlcCRA9TVsSAnZWagAA1ugP/1iuGOE2fZFX5ZbcPHvm\nouycHyNF9G5RCzJx1YT6EOjxRWbRCWpxfzgM6GQMpKIlo5yYeN7ahN2m4CcM\nLJSE+QC/BOqzxqA7aKVwixJUd++4adThUn3RaMkQkT2O4H8HfzrsFwdXvdzd\nKeX4DMX9adX7iqC0lYDeIHrjG5F6CNEErZaUK7W4Wh7e4KYTnECvJJWp2aL7\nJywxj4d1Myfm5pfI2O9AU1ybXW0W8vtrYTTp9OS6ephM6FWnYcFHaqcH5MCB\nF0s0ev6sgn86sJtTG5ZXvVm0vopu14qQjwIvu1QL1PX7twOB+C+50vLqXekc\nE9vAk7R8Jlxem2+aCF4oJQoOmdvj0/7nT3pCNI4cdoeKjp5+THXgR5ST1QGL\nsuRuEbri6EbcdIli9ezBlxTYG1kOy39dfpZTt2V51inern/x3y623/6Ts6t2\nTpBbAxV5JWfmWMa3twbATNwxxroweXA+tmmo29vjt2inTIF5vQG4yfYwq2GO\nZ/ZCRFeP66i7zNRL8KRmt8w4gHk2U6EHa3NXi5WSlJ1WNv6BzHysQseyGfjl\nWoY2M5isc08KTx9UANBTcUvNEiQGh+ViTGdKdupyJ/2VJBOf+RUZrWgoq/3k\n4E2R5UGuDuH794mp6ln03+GeNtPz6KESTY1CVZqXbqqxsJpGybzPtc/LO2W5\nDuQk\r\n=KSOT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTKGLMOPLF5v4jCNc4deCvl7ITSjHxXOsdhhAZQb/yWQIgIU19KHB5uPn+HJWJA6UbhYEk3K9L9dNk0WH7e/RdwIs="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2111191951.0_1637411163888_0.09808984183175085"},"_hasShrinkwrap":false},"1.2111230244.0":{"name":"@bentoproject/timeago","version":"1.2111230244.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Import via `<script>`\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"d906c0bae3e05aebd88696b9659414f63c1ca45a","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2111230244.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-5EsJvtBCub4/bCDnfiVdgBrshn+tGCGm1LVgGucb7/ofJo6BwsDlMStW8qhTIV/tViOPRRcq+Xb+9xeoxDEONQ==","shasum":"993d1d6e526d7a2cf79b758703aca773f7a9ab8e","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2111230244.0.tgz","fileCount":27,"unpackedSize":2937555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnN43CRA9TVsSAnZWagAAG5IP/AwjtMVLN2ezi8l2rANr\nQUuUeaP+z8SM8eJsYAOXYbxT4yCf7suUykAlUGS3fWeWMD/ZZvO5TX8OJdLf\n4O+Ji43Zc7P0oP9KV+TCilDTRE3DHaxto2+h3Yrp6mx8UrN1k64i7/uQL2Ix\nLigcAGYeLZe4KRhsQwL+TxPxFaliIHJrA7wlmUXv2a1HsGD3+OEHeoCMGnAj\nZPoF1tIvSqcBlmGczjNnEg+znVciWQQ+cluUXwuwN6UNiT6ptbj79DtPLuFF\n+jFfPKsNUN2lPKva6lf/+QDjqImZEdQtov5RRP8m1OvZcBhLLe4Jb2Suik9o\n1En+BkPAzF0L1shLiSqTV7gh6MwPy+E1R7XFnjBR3OGwpfXvV/h/XLBs54Xl\n6q9ybWmZ0pthmdSwM8LLe7ou/Jgv6jBf6FYqUis/XKsEshrVf2/n38x11tK6\nqnVyBN1titSreF/mVJqfbv9ApXKcnaxfFaGT5glYg9DCQlcp4ndKST7xlsYR\nz0EYtm9bVOqJlSoKbo/1tRMN91NBtFwLtUx2BPxfdHz9e9BlSYo5Q88hYrQI\n4YVBzHymCQCY/B5WK5Cqp8eQUhYsBuglOD405MjuMC9ExPxyWDUo7UdFzd7h\ngC4FYKidVNjvWYsAWqdsKOydiR1TFBPp+5/6z4TqGXYkXbxAzmBT8joiDZ94\nzDcY\r\n=jSWf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBBQJTekquUcZMVsoxQdtAXLL2UNUx7iXk+Y+ScEcpQuAiBcXxzspNzlCMEz9qpSV6+q9v07AqnXUAwIVVrS351vcQ=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2111230244.0_1637670455035_0.1695389708369328"},"_hasShrinkwrap":false},"1.2111230636.0":{"name":"@bentoproject/timeago","version":"1.2111230636.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Import via `<script>`\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"46e8f482bf5e3008ef07e950034d194c48317990","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2111230636.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-Bjs/+1prlQfZkLS4ZxJxbPC1fZHgtPOe3am0+izh9O7miBTJlcEy+0/FcCOyQsLzz0gOizfDOGrWouZDyamDAA==","shasum":"641480b57c02c0d5ad8b03fc52b2eea18fc1c900","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2111230636.0.tgz","fileCount":27,"unpackedSize":2937555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhni82CRA9TVsSAnZWagAAwuwP/i4y8dQpJMCCOZNxGHyI\nFpOveYKr/YS0BlpuuVKKqE/fDCGmj/O36P/wBP6FqhS87ONmi3zW6ey5SD6p\nh9nIy11OIFBQPI3qYDaZKENwnscXXZS3L3wDWbNaOAD25pj9udta0cTTy/CJ\n3FadRP4aafYYY2lh5ruToBHvbPqrrGLkXJcHpA4vSSUu+kS/EQCj1fs7NBzg\nGhu8VgI1DRCXDkkz4sr/F+7cIA7InwV7SspxH5oBqoUhuLSnOjm8gulYTF3S\nChhReNxTWXcH7M6tmROHbau0VFBICpOvRcB2nbLC9PCDX+uBAdv6lXF+iZJT\nRRBWnpME2Mh0UxcSHR/UOJYMdwGAYZvOWzPTlgW5mMl5kDidtXDGILWFs/af\nkPWv/0ANEbAr89DBy969OTu8H1VPSG1MVAgDsVGwcDRGOLS6+0fMWjwBFtI+\nJJ/h3ULiQqA8383dgxAPOoEkEPMiBO1hY1cVNXmBw9bx6HaxYP1mjhHj/H/C\nE1uf9wnjg5S2FszzC9XWiSWiPIg8O0r3qtLSDY7bK9pKNl3yySc2hOxDZfky\nWp2Q331Qre6awKZXDii0mDLH1AZgmnUnDPdruZrTcQK5Bb4IqFjIwVVlopni\nsvpJOBO98u7Gh6VqSddbZV8GP2rI8ZYzyk4TwtsQIllYQJRVv9YrnDF77nsQ\nUJEG\r\n=UZ37\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsHYHBkKt+5raC07EThKREhlYAYM5zvF9IMESCsQbJ1gIgc8TKxNhSlpLNgdv1HuJcQw7XSrg43++OJ1iO0FVl7jk="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2111230636.0_1637756726334_0.5710747491276389"},"_hasShrinkwrap":false},"1.2111242025.0":{"name":"@bentoproject/timeago","version":"1.2111242025.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"b78e8781ff3976b3bff1ba881cf66dd2609b5c07","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2111242025.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-HfEikWNUi7mdWuXgheRl50sjZAKw3iFwCKapBDn0ePasBXgoWd+/kIhhS63gfCNwWg92L+60P5Kh0kHirneuHA==","shasum":"53be8690175cba74832b3bf938b3dcdd4d10b883","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2111242025.0.tgz","fileCount":27,"unpackedSize":2939732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhn4U3CRA9TVsSAnZWagAA81EP/0BHSEFqTKLetPGavZyI\nL1xhjd5c07RH0K3SDhNXhi9LEKOxpBTGK6DmQga+qPeThm2SdOxujclLfA0o\n/t5Vc6z50e8XcpKYw9n5bGy7ajHq5841Nc4O3z4PDdQlG/5DJTxdwKe820r8\n6X9Wf1g/gj7u1IVlCUNwgGqh2Oh3cUQyLSLo96/s4pe8y4iHfHzZ6I+1Q0bs\nHPJ0KCIwDZXvsCDJi2v8yw3LQT+5XGGJIHa/Q/bOhng4Oc+ahiY687JW9lR+\nxnNLI+Lv8Rqb0Q93jiMlhAW7qWFh77A0kE8SXZ8EsWNuCEHiBS8JJLwbm3mD\nDXRwmbhEiKC/UzMeVmDJjD49Jf36i6J8Qp+bSW8p2yfNWaB56VwimwpkY59Y\nlC/ucZtDFA+Qm0QfvSPEz6kileFj3VxUpdcYow0jqZOfEveFqd/AVRZVs51j\nXp7uoNN9AUZpknrNVOzhOS1f1ci7lR8Gd28qohhMmI5AExTogoIkuJyMOMVA\nJBNcPjmdygDEpTicshHYHw41yZ2ivKDu6GEqhy5hkxGvNSX0GTxYC+N6fDCC\nwPfQ2QL3DcVkbSpKzGhKpHuOVwKwMyg4JwLa+394iz7MKgDtJ+/agZWlBvcP\nc1PPyn5kPE+msGKOzFt3zgT6RS6YiUzpWQTWp8V3KKmPeSmDg5z9vJ7tyIbE\nQmbR\r\n=s84m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH2voQY0xKWnuqnXX2Di376StRkxjoeYsb/FWN+XR8PFAiEAqVWne786YCaB0zObg3PMUUg+2rW5x51PE1A2Xvp5xEI="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2111242025.0_1637844279162_0.41092734595126035"},"_hasShrinkwrap":false},"1.2111292120.0":{"name":"@bentoproject/timeago","version":"1.2111292120.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"e938f7c9446e2d1eb0f0f865c0f1ff42a4be76c5","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2111292120.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-mzL42H+RDPPp5blXDk3Jjv/J4jzKa0cRNKZ32U0cZcWGftfeX06DbSnUdORevtcG662RJzPsbWJoThRW3GDtKQ==","shasum":"afb3d64fa4e79271d74dfadacc0d29755859187f","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2111292120.0.tgz","fileCount":27,"unpackedSize":2939732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhphySCRA9TVsSAnZWagAAlIEQAKKoK9p297HZ6xqu7ULR\n6mU2N6sidYQvrJpwb14tNMzJz0k9r+rT9u8azqp9dW6PdPjn0DAeT/bq4ETB\nwInUEBilZeEFzC85Q2k+IGBNmpJpLHuPoAlJ6Rw83kVeHxb9un4LUhukO579\nb79SSS5cv/dA9M1NhZwZDHMN8XFU+1CnDAbh/ZNY4a4bwdeIBmt8ySV4MgPn\nejwxFB+yGK1xCdyYsaHwbRuOR6eUS2MHN6rz9YODURLx6gsP8yMnPsykMjZ8\nK/5AQ9Ly+z5UXdzMbp/ncmMpZDVl6w8gxSsTwYkLGZL0ALQxcANknmkgCpPg\ndd5IciWMjbITf3nsDTHgwMTc1gkuReRMS1pdo3DCQvSRCZluKnxGviYGr+Dk\n21XuokiUIa+3/2OvGboohUZQi05nZaKL2aqc992CwEhlWNfQ0DeFtFRp4BPT\nbsbuy0H60SEP92dhme8zWMNdrrPCPKEykcnnZlZC8IXN1hvI0AynvRCLbQtC\nIBZUCjV7ekI1klYCWO7LR+T4wUW9RrHHZqNH0UqMQg5zhu03hRkTBTV3bELg\nXeTuogaPsUBdU+Ds7+WryE8OKiuIHnDG5RsHR9L5utUhBCSTZQXulPbnl/+X\nwZS0LZtIY/L0PmICoQeULW5lQ7LFFmBjdSokLs2Xzu+oOm76uj7FX5dyEUiz\ni3fm\r\n=Ifp0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKO+jiN4WpF92tj+C/RnGHhsqKfVd+C6w34CIi4V9kdQIgOama6tGJq5YWo89uyOx4AR/JuOaMhN9WNcuN0rSYHFs="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2111292120.0_1638276241936_0.5403615608643437"},"_hasShrinkwrap":false},"1.2111152338.2":{"name":"@bentoproject/timeago","version":"1.2111152338.2","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"27e204ed206cf75fae0a37d8f110b5fedb45fa7e","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2111152338.2","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-6o82BWniP5JsUjvAm5gB/Ty03cpwkPi+1V937Whg9ERqHwm7fZjlVGgXGcULToJ/5veoeoLGQmBToqJ6yaP0tg==","shasum":"63217aae1d1d2352f2fbaa713d3aace38f6ab506","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2111152338.2.tgz","fileCount":27,"unpackedSize":2939732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpmWICRA9TVsSAnZWagAAZ2cP/0nfxcQg7QagI5AtddI6\nGF0O9R/749HcAlWHijkxDrtUOCOJ7uZNOy4NjRcxhRuj8L46AfSdz1exkGRM\nc6SZefFAw+DMyuFxWdcRPMR9iB3HD6zBMRBxwW0+G8ycP7B36mOQGsjimZCE\nm4BD1BfBoFinGyYRxwUVbPqH69Jrn6HhzPdK6NPsVe0+wsfhf8wbfvf5cdwC\nB7gmv3DbfMaWXc8vXVZrzV8Nh6iFv8YoiVY8xAcIxkxuMKNyTVJ1OnL7G4av\ng+5xBhYoEF4Eycwv4Aj5swBRGjMsVpBbyjdRd2B7ebz4KIAPMXj/QwQl7n/r\nIGWTYjXPGLvbfGs7sIaQMcqkJCwz35I0PQjRbbFa72CJ/s3AIJS+X4NmiubZ\nhBamr9o2nw4RXc9SSSzF0Xhb/y9VGATErn5e9I6q8PhGbTcTJN6MpgOz20pQ\nv8Rwe3D2utRrJ6wuKCb/MDOHzEomJa3uECET76dxyOmadUJrwbUmdxRMgpPX\nF1ydFD2GbMTXluC5mwwESKDd12VJQO6x+lJao97ODbN2hl7gJ2z7ccikwFjV\nr93SBLyoUbFiVWFj2yutTmEa8bpWYvzTLpQPdc+AYqOsz3iPej/M013XGDPx\ny+NmKYNbEvHg45mspIvrPRcfJ4vWCMtkmVVTL+jF+X3TMUWGcTIAjaMyxYy2\n8uvE\r\n=J51H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKreDy6jdv+R+xVPcAsXnzRFHAuxO4MWcH8y/xgNLo8gIgE6snMTu95Z3eAd15ca5AX/w3KBm5yG5z7A/SekFhBi8="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2111152338.2_1638294920234_0.06180861204663679"},"_hasShrinkwrap":false},"1.2112010058.0":{"name":"@bentoproject/timeago","version":"1.2112010058.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"6d1060a3a4288fb99047cc700661d589bc9e2a01","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112010058.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-50fiEzyGu5KllzApAxFeenKFEfVaWDcZbC9V2zeJedxVBi3Y7jwXCV413LHQ0rpRTyq1qFYbcLD/Ri1iAvXv7w==","shasum":"8bc07a911f351158387b8dfc7e069baf86e4ad59","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112010058.0.tgz","fileCount":27,"unpackedSize":2940004,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhp2ilCRA9TVsSAnZWagAA9F4P/ir6kPqvGzftvSZFsCD8\nb870YBrDRyF+/D8yEe7i7TtG61m9Y3f5dMQee+DXjFdEUyURi3OySsiXScYp\nQ36+W4hNSntezTscuKtX2g3T9QCga74HMDcyMJnIIrTS6/3jDH7bG8R7vRkb\n13OFSXOnOn+cNG+HR2u9su5bpH2d/JOLWwN1ltdD8XpvyckkKeTAVvbKEpcI\niKDmaFaM9ro2Wqq/tc/Xq3+8kouQvqauhxqDwaQjzk4QSxm1JjlAgUoy6FBV\nQo9qula6cqZyhlL4j1XfJw5GVWkemo1dB29ZceOCSUCyOT6lZWRu23HUtsUo\nnc7Em8G6y7QQB6RMg2a5OwquI/eVzqZf37qYZ2vAp6WJ91dR5s7M/DLR9jg6\n2fcZWwVoeJFWE58OwhKxMcbghDx88IxgI0dSb1XAN38XsbQ9LEpT7puMGNZa\nis6SETqSvrY1Trj67jjWNL5zEDvITL0kVGlkAI8ktUMxzpftzu7nqExtY6MU\nYwekiRKJ5ClePBCnDl8emvw/AwckhG63zNTesT+Ifxf3VLzNdY4eQ97YEnam\nKSsq6dtJLTduWSoesNMGPPeeBgBP5pLIEvtfuk98QcSgT11IRjs5LeEaDMIG\n7/qTiVM/ASGAwOpnVLBlxDJRJYOlF2ISWagxXMYLwhJi964V3uHlDWV+lFkW\nu3CO\r\n=FyLB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGZMS4+3eKxwS2DebVEbfyD/MhZ9X0GdlQQtFyccPyMaAiAm7Gq/c6lCtJoskpdz9c4vA1D5LBgnJVCDKSJP+pFS/g=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112010058.0_1638361252906_0.6388809399201458"},"_hasShrinkwrap":false},"1.2112012300.0":{"name":"@bentoproject/timeago","version":"1.2112012300.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"4ecf84d856583465c1ab59847234535fed16d55a","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112012300.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-6TINCuhpU2/upteKFtvncjhiVpdlz7aOaeC+kcWiZf7PvHWYiE9y5gwQGcotZStmcChY6f1R9MxAHKrvOuW0TA==","shasum":"f11c6b1cf74839583c99dfc6b72b1ca134ae4cd7","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112012300.0.tgz","fileCount":27,"unpackedSize":2940004,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqLzHCRA9TVsSAnZWagAA4VYP/29TZZ68/VmNnqtxhQJ/\ngU0g3doJq3wJiS84MPhN5cVvtMSalvzREjCGPCQLd9DWVuQCNq9p8EzGfJjs\nPycPXWKvdKyk3lODpzAym7GSIUmbuf4T4lHP+aLTqxorfbwprxBxlYvL50WF\nS8APm27CBp6zfZXxtBpRX/UJrbNgDTEgMTM5PbGwdbNa39hrAIu+uYsft5ih\ndY0y3AONp2fRoXcOjG9qgKilPBlOmjXdQSu8ww7X03/zgvuU/T8j/+xJANm4\nhydXk+I2owLqvGiw4AaipS3LxfmOZ6jknAyeeUmlJtmEmKyicOiQRbbQXO3h\nJNfKyJU2te8DNaOITJrreFu2jvL5xhCeljhr82QtnTTZh3x2lI1fL6IhpfcK\nhcJyZ+u3gMkaK3DnjfEZbhH3Ca1EZ52l8d4qmFtl3w3r9VZBym+a4TQoQX/n\nHgAWLb1ETw2AyjVBfEiz9rBFY+haZYlMAlEV3REYpXfUGundI7pxQpLXydj4\ny8xeIHqaz8J2mDge7Cade+siFps3ewL5bcLDLdOA7RCjaHTS0uFEKHIHbBcp\nZKftJlhLALWqqvsRqVI6Z4YfRh7fk+5fhiVV70YD0+6MHjtYvzmiX9JRP+9s\nrJsoP5tEsMlDBLHTA/s+kTkVsf8qyJX3d/58XY7nYE6loY1h/jbguAXCH1+Q\nC/dZ\r\n=K2OH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGvqwuXholpGTP6xkHtct2c+6FdbanoftR9Yoz7vbtIAIgem6Q5jp/hu6VBG9dCLVC0NsdfSKkSj+oc1WZr65LCYA="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112012300.0_1638448326815_0.5668972337995493"},"_hasShrinkwrap":false},"1.2112021656.0":{"name":"@bentoproject/timeago","version":"1.2112021656.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"4a66d3f7120b51959ea01867aa68d516d5e0dc36","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112021656.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-RdGxKfNSbn0buh2BApkChQfKLZTNDdiP5RjDk9yFhw5sPNUyYduG5xudtOKWQDBwXUwgLDG1bfp0nobK+VBEMg==","shasum":"02dd95516bd63b05d2a4d26055d395456a579c99","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112021656.0.tgz","fileCount":27,"unpackedSize":2940004,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqgxVCRA9TVsSAnZWagAApvUP/3lLUw8vIemYTLWVKjrr\n+/DkPDMOCtKvkNnPEB9dHZcXSFDNviIw3dv0ZjdyU+OtE8QLfWrKNGKXeK7W\n37jWuB5KDdiOafqMOSnfCkMT4aTYCvTVVax0dcG5czBCoOsGdDgVmTx+6ZiP\n8oIFP2ZB4MvPGyx7Ntg5rZvYRXgzuBiAOtRT4STD7RPFT4ELhMR/Yn+Me55+\nCbfWh0enodHzkBtEiHtqYobQzOizBkooSBcG4246DAq9ko3PY7GZtDK47Gvw\nHNUzmSlb0mDW8kNYGcKSn/hadyXF/lIU+A4IWBPbP6jIM9+hEKrHt5dqo81u\nBOMKhNBYrpL5+ZdkJfF6WJ1hsyBjqLMa3LEtJRoJJvBveOacPWMnwNhyDhZg\no1W4ukW+kmgMwoMVLi+KbrnXGeBvH+fUODqRjNXchcRsTQYt1/NmesV2UXLX\nf/+RYuCon5RJSB/NUomPjAajrnxxvbHkxRBxRGHsbzdnJBzDyA4j6Bn6x+1M\n3GdyZjSySl6D7So6fVa3FgC9WdQP9l8Iz0Nc8hfn3UIafb/72wUYGv+w9xGy\nU3DiqffVZMuzUM4v0QYZFernlD1uL3bAlzPMj1v00dpO0fhZ9TJWKOQWashE\n2H/ZePwk/zZEb6FqG2QzRlTpedm4MwvRPpZsdbTwnU7S7tRqKzLYaGioSv5/\nzHpt\r\n=jSmu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtBuVxWV0BKmgPnAglPJipW5yoyay6vuWAqYaE7pf9OAIhANIa0KGDuMWWMNFi6AXkv5slu88Ge7EokRAY3yy4balo"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112021656.0_1638534228897_0.18009283944820997"},"_hasShrinkwrap":false},"1.2112032204.0":{"name":"@bentoproject/timeago","version":"1.2112032204.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"80ca53e97f8ac619b78398d429e0031f40cf68c0","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112032204.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-2e36CTZXRe0AvwukJ6axYLV6fv+vFXss7Sqf39Bk1G3LZffXw2GausCFAd+VtpYCqbLFmSMY1FAKm6awlx3hTQ==","shasum":"529eb941d14dc38a775b9b3bf0395a37c63cd792","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112032204.0.tgz","fileCount":27,"unpackedSize":2928846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhq10GCRA9TVsSAnZWagAA0vwP/0ctM9l2mP+tAVRcO/qp\ndE3ANDTQmjyde+alIgb4sqJF/oFEDQj1HDOv5Hf7gbRjiPiYLEeJIJnSXk6w\nk7oxnRyOnYtf6vZJvd+KZOPy8SxrIdgwzqXrESy50wmQWg8HNvl3xqCfg1VV\nQQW1FCBOJo/OUL9Fgtp3UShOelPdK1C/lQe3cUZgTfpX3Jbqlk5Ddq7vN+JD\nClVtna4zjZdahXHwrTq2+uA58h2YIlNziDqJsNpN4NT209ij57mbffopjbxs\nqiQqc+p9P5ewxXvgkq3yu89URtZH2rKHD4HPbjZWEul7RS1qnUD7ZkD5Pw5k\nterJ6cVh0LQ3nFNE56kZqj3fpYh5TG05GXRFCX01AWWIsjmfDA78VImcODQk\n/AJRo1CNCG38XGsNQDypcdex6ABB9UnZgJcexzlkujPhUNP6MB5rn1kU2cfz\n6qqW+C3L6j4BiYxH8su2kf8SDyu/8ICVmZyZluqbK+0PEvIpmwVjcwMzyscN\nAHK3Jzg2iW/Tv3O5tOWduP8bCKibujeW/N/V7OxtV3YUxG1ZTtIS951DhbNA\npWl3VL7ktBVqHq1MnNvq9YtYVuLyM35Vx+g5PWJdXVi20B4SC1zx1rrJAvA3\nWLgYq2gc8yGCY2Vo3cL3jdLy3cgi7PLNPGSVREF090PxjZMNrmbPUB9+f9yR\n5iLf\r\n=wJMV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwc/CjWxj86xNTp2g64NZ4eTDphcxkWwOL+Ylldoz1BQIhANrFbuMMwnjBycNTAOyh6WTTg2/UEfuk1MD/X1XgzKBG"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112032204.0_1638620422684_0.5317858599356067"},"_hasShrinkwrap":false},"1.2112062322.0":{"name":"@bentoproject/timeago","version":"1.2112062322.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"cddcce65024c209c9420ce0567f525aef4fc971f","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112062322.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-EFa4RUEDIKZ8K6/z6u2ZNsPOzzOBJ2j5X83Ns5RVmsjquRD3+1JLFw/+8m2SAsHq+cgq4HWFMGdfXZZDl4S2/A==","shasum":"62f4066e1d9754233e0140ac1a6d822356b153f6","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112062322.0.tgz","fileCount":27,"unpackedSize":2932950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhr1OJCRA9TVsSAnZWagAAnl4P/R2B/HJPHZD1dY1zBOcN\nyujO5Ap3Zb6HJduUHHeQz4JfnZsQpPim3hnogof0U4DPAZPg41NO6dmlRo+O\nnnFLBNFRnyeMq02PBfLJNHu8Yvmx0eSD3md2FHWy1pjAQ55tw+M8+ooh1dJ+\nqDe2aIcwcxXZBQ0cqg0XOO2jJYAJYWyICAReKjU7cDTUyFNT5+RN3o6EJvkZ\np9sqLfTktwXwj5TU9R2JMDzidjnsO763JW/5GKwVK0qDRRmSJGBcD88TRZBo\nkATSzcUR5gaZ/lQowW6AEyhIUAKPZx6n1vdNHmiXvG0lyVUT9hvg6GHdtRf8\n4v/8SaMnPOMzl+UNgerhQhMwzGwlhbzxBvFJtDUZS03M++dj00ht7bMXz2aa\nycZskJwN9NkqSHZKAF8/PUD2s8OCOrqG/Cw+nXL3ZZ82F5EorgZAaVYk/4Pl\nXtVXmCruZK0dXQB48Ggi6Lua+bZR9/79PaGWMw1XKlC+ksEuP9lIcvBFE8Ic\nFZvq6F8tTASMOfvwSnXPf4LTRlrIWD/xk4E2Ga0nZJgIcgGQ21WyC0pK4yrK\n9bUEtcW6y7BQKlhxg6b8R3cx5+yWAiSwXq66J1westUO8CkghayRf4T017Ig\nDNP4oQsDEoU65VOajDyWbESIn2Tj692F6nHfiEqm4UrTu4n3czDqLRwA7Ixg\n32ES\r\n=bend\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcwlCYKK9y/V4WcnngOCVArtygPFn4sND78CSqlKNfxQIhAJMoMFXvt3z1IKZph6CbvMf4CiCiXOxvye3GpfGNFfd3"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112062322.0_1638880137482_0.6667939569195429"},"_hasShrinkwrap":false},"1.2112062322.2":{"name":"@bentoproject/timeago","version":"1.2112062322.2","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"3e8072d191c8771ac14d19f2122bba93b872265b","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112062322.2","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-sCpkRp+kH6qByRaX1ElXyVbMXaxnMSomuU3rhNPnJjIL6dHNnQymbfdc+xo0dK+/QwdGgwQX19Jad/6hCKY8ug==","shasum":"7b4ce9e84dc3171dd18fc25ccdb6cfa19d6b4cd8","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112062322.2.tgz","fileCount":27,"unpackedSize":2932950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhr+CuCRA9TVsSAnZWagAAz2kP/3ZTMH/twppMVBPuW7Iu\nGiDxx/WMQnDyQGFb22eHFcivuMhEyxj9DMr9MfeTbXs0MqnQS1mFd0lgncAX\nGMmwR8XDcckMNckKq4nkeKZ2+A/ofL2EariZ+DigSDmGwFetiJVvkiP2BzjX\n/G52mybutkoU4bbFbLaovdJAGmHIsk92UsRu8XT7xCdLiiVgL32DSqB16WVB\nibQvSS2Me2sOAN8rpm6hEoBvNroOG+03P9PfTyMmJ3r9OCrrA8pPcWZQwWFV\n+B5dHrxoovPF52mdGNuwWosUNezs8nIklAKyhjIbARsqXgQtAxiI0rRhpL32\nzw3VdBVKGtVg2h1T8xC/PIYMhSGZo6dlyZd8HPZFgxXqBoF1lAdP+I63AKz2\nmx5U0H1yfv0gzIObuaqAxhs8UmWAqErCfPZ0CdLjGBSKs/H92ZbqtISXfYfG\nPrJa9bVZry+qp5pMLc6DbDO/T1rLwlSwCc90sPD6Yka0ooponiTMksS1rCrE\nBhI985V+ICI1v1Lxbd8kCR5t8PDNJl2hRk+SDdRVqZrUxP/kJzHuvCClRNWe\ntmKhhAkRgvHPNVVsQY6ba3h9K7wfBcAhRWc0fyvHwTZtTClcvmgnUYk4P9h/\noMqF0zH8uw9zSjGl1vVakWLZtZKkY8Mmzvelq0CRKs/3Lw01ojQvJts0SfU+\n5sNX\r\n=DhzN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHPHecWuA+T7UNX9T0t5m7FngTjrwR4F3kgv66wjm/VQIhALm42l99iZZg+DL0/VnwWUZ/ImKc1QwtZT5cTAmxaF7u"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112062322.2_1638916270293_0.05344460444183308"},"_hasShrinkwrap":false},"1.2112080230.0":{"name":"@bentoproject/timeago","version":"1.2112080230.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"6d03180e136b7ae380fb9d5d3d6fd8c0d5b28e04","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112080230.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-ZTSLrSOt+DUW2KWfHfAr+g0I6v9IlkQvnnH2JYwNH6zW2qCzXszP4yID5TSgh0Np90F2le7yqnMPOuC99ZTO+w==","shasum":"195d1d84da3f1325b7abd336e1ddd98256bf35e1","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112080230.0.tgz","fileCount":27,"unpackedSize":2932950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsLF9CRA9TVsSAnZWagAAOgsQAJG+NpJSpIw1WEI7xT0t\nYw5OZBl47ZazNJbTZyCu21nE7EKSGEbx9Yo70/Gw5xs8Q0bWdWufPO+84NuV\n3RG01OqdmfNEMIIvvFmy3uVBRko0n9kPepy0gHV8SX/jzAltDuRpaL9lcdl8\nqKvez+9SFLXC6x8KFravMqcRIGgnTMcxuxaQhl7lptkVUZzNXqMwG+sJPyY5\nJummQNEY98wn9UeqwQLzv9Cf9SeEBdteKNMen7AHvg4E3oXsUjKqwO6n35yP\n7B5gD5z6X+wocUPX/7tA0yvOeMm74tsAHVyxUR43ppTqNuqaqJ5rVAV8P73j\nfsv1qfl0DiFeLrF/ycASsIl3w2JsDdBz0TTa3zWSxwc11vCnTvAVjbZrQ2Np\nCvEWs3JPw2omO8Lya4E2vG+99CD0muBtgAXG2QVDUgEdQuY6I2SZ/irlG+w8\nYrpEEQ2zpG3eL8ca8XGlWwP2BA5G5FiXU5ixMyhomhgt0YYIwRxkqzwXqiOm\nc1eWzguevjCbDyZduSieJyniIYfsU+XczED08Xy56ORGyS5AQEEMFGN0R4wd\nKRzWhTh1+TBAWuc+LQQr228mx0LvTjKrT3kTjYOABYITYdmqJl7laNVsQ4Ak\ne++jnTAOL1HmHEkjpOa9dqTxFlQa0kNveTELs6FxCu0eunn2IB4M11Uo8Wjj\nlq2g\r\n=TlQ4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICo3qSfDDuaK5xaqWg5DBk6L9sEqcBBONVEeZBBVl5TnAiA46czoIweeoL+iOmPgrkBCADCREEfrV9Oj0WGL37wsSA=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112080230.0_1638969725435_0.6334136305868805"},"_hasShrinkwrap":false},"1.2112080230.1":{"name":"@bentoproject/timeago","version":"1.2112080230.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"6268ef31f81697778937a9d77d4ccda3a561f39f","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112080230.1","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-D+pAfe5vAvsl5ITU6ljtbSfjbDyrIlTypDFyp5GUrs+guFYMT3GVo5ywyYqreJh5MgI13XV7VtaPRVsBkQeu+A==","shasum":"023900ae51389254dba60d0cc53cbea41f4ea123","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112080230.1.tgz","fileCount":27,"unpackedSize":2932968,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsNaTCRA9TVsSAnZWagAA6z0P/Ak2YC0gWoWEy+FK9VAT\nqUWbRV+K800zddCqeIiwKWB4TE3UzEpj1Hto1fOP/5OG3/cL26VmZNsHHpY9\nvHUAj5JUVNn5iHA/uBAmj8JWSrFc37xSSuH/XspY0vcIoKFNiZWByA01Y7RT\nD7SQ2hGkiUNFo+EqOj8VPjXsf+tpFCzWmGbCb8RDGk0SoJctgEEh9dPr8OK7\n5Y2cKCCV7V8FAeRuafZ7ihDxq2rw5i4XGRQMnypBKMr5HPpiM8j5gwbM5q7A\n+B8MbqRUsfL7av+MJ9NQx254TXRxHDTxlvh/a6LrqzXmnwDVyKKsrODCtadk\nFsIJuucUrTSxkTPlREVc0+2UEYWUjx5e+loLh5TwPqo+hWA3zK5xKnSzjNui\nUy7bWeiYTWTxOxv4wmHP6tnT+1ihmvNWBu8Ud6yiDPCMB5FwUMUY9ZsoDPmm\nezltV3BbmR7JGfIaBkHqvVaKBYO2Sm4LSVmEEtEAZlqs8DNSdP4CmEej0cqu\nHKTbbLKIVLQo2s7/KSfTmFMYuLmshFeMlGj0tjQ7pzxMDLgWrySQ1gBWQ864\nDk0k+TpzTOfbr18vTMUY2j2WjlgME+c90jgXHZcGAzMMsYwaxh88uM/36B51\n8fu8K4Y7q9T3ONj4fcXDgzvF5asX4ZNrBbRQLbqA+eWYhzA18zEqBvHcjj9N\n6Jtk\r\n=TIol\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqWiDYQHXLu08KM0hY7FsprJ144RqjRMGuvK79AuA4uQIhAJRqhRTkohK3HxHHQcB+U8IuqT+3cru3IrTKQmPlxArw"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112080230.1_1638979219652_0.28268860393122974"},"_hasShrinkwrap":false},"1.2112082232.0":{"name":"@bentoproject/timeago","version":"1.2112082232.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"b7b1a9f9f7f0773645f4fbcb9a550233900046a0","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112082232.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-Y5YXSR75z55/m3vgAWTLSk43Z9xQGaG+xEoNFVADHouC1ZoNqCeZTjVQ2uPIIg5ks/jIEFh2zZXs3HQAzU49hg==","shasum":"e9ae105cf3dc1b4f53df5fe8649ed8cd64211674","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112082232.0.tgz","fileCount":27,"unpackedSize":2932968,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsfr9CRA9TVsSAnZWagAAgucP/ibZrBBCUC17eoHoiFVH\nFKBEAKXg/CtDl5r5WWXRGSgXq3BL+w8J+TgUAnzRfF/zY0YMoTa30ja6ko+4\noGU3c8A367ZLTx38qTwm0FkESPX0pjwwaD8TINbbjY/psUIo8QpWYuvVLf7D\nK8TRMAIbafO0U3OabCVY7cL7wSig9WVCRLiNnrS/YDXeQVNbG7WpZ2mRhLI2\n9y5Ogpi/UzeqeCkP0Grb3VrUaSrCYSkhkCH5jGVtdtvU7wFpMye4yybhofox\nlurr+Iz2g76+fyAH3jCOxB8LaR0xKBzXQnMyo2rhE/p6kozEsieJDjTHgmio\ngY5NjPBw8Vm/fFSx8fosPMg3Nlfj4sPPiCXj+jWOLubwqeIgn0vrNSe3aUuu\nDnF+9PvYk6bdvusRRS5HZfhJi634jIYT+JMTkCXRLMVO/KVohgxKlrxl+IC6\nJtHRA6Kwj0QovXmLiR7KRSKEyP/oYFna5nfvqNmDmlygzSpC1s4W3tTSjRPC\nynjPqdwISdl4Ej8Q5wyh9P2vLcv+28Lwqu3Yuxnwk+0rZqRTH3RBgSLAOOen\ndXGsuxl+Ccfv0hu4DQOH4VFOR80ZwuYQMTg1CaV2mOf7O/AdAD/QaQGNdptD\nZJSPsQwt4oHDkBQstcQ6tRIBYqSb5S3EncarGMRgeydftpY1dwwH94f1X8Zt\nOptY\r\n=3ZxG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmJnWMiGN5XMJHLdIzN2kpOPdpbLS+mEBNL5kx4FJJqgIgN85N0zqjlYJp3sshSbxNytmERMsA5ju/m9YwAKgYBAw="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112082232.0_1639054077451_0.7291190970202148"},"_hasShrinkwrap":false},"1.2111242025.1":{"name":"@bentoproject/timeago","version":"1.2111242025.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"b65dbd2c132f8cee302c477f3a52cb864a79663a","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2111242025.1","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-32B2ifsP/j+y4RMj1L+QVOXFhTsVq/WkmUAg0R1FcFaKxM/KYJEjILRiir3LDfU6VqcOEH0hPH3w47f0bDl0WQ==","shasum":"106e1d4ac80a4ebc06a2c2c113f743ec08b2d656","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2111242025.1.tgz","fileCount":27,"unpackedSize":2939088,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhspvLCRA9TVsSAnZWagAArGAP/2fat/DTbGOkK+L+ZFSr\nR1Uu4RsO7pBDQLCsqkeGRLiMN72DDwvWb8993FL2UYQU+uTm+yUOXq7rBTXb\nMTQP0jR1kNa2GcLoEPhhfMnREg9QVLMZMoV+BTNKh3oXG5rCW4pjnQmkIvq5\nm/hlbsEp2vw2/Ty2Wv9CDWEYT4oIWoMu+aO2V8ny3GSskGTfqzsZBKuRv5D3\nBRydEyts2uV4C739bgho+pNI6iOfOhS5kulU6rixcVLE0ufeYqdFHy4tEPiR\nJcxlgnAjoYr29dW3EAeGGf7oCt8RORi+AySxmiiv4I166S5TW3yZvhCnmMun\n+woYkGL53VOSenejtLW66SmMvPJtdNiChs4RgLo4FPbMDuEmHSm1eMGFoqsg\nFDeyuKBBzaAxuaK6slSzJ35b9PA3DJOuXth6Y8gtVa6tGgSn48ekJhdH9eo4\nizGKS8Nz5etOsJDRTeYwriEgzgcs10QEMbsCWn3yEiLAbzkKhTPQgSki+eUk\nMCiX0ICEM1eKJ1da4+A/eDeo5l/9RDqSx1e4IQHCaVxfCJgfmKbvVAdeNfR7\nk8mXsutHD/nRsz+wVifXt2Vf+b6Ft3zYwBZ7UOZA5cbM5HNuMkpbWSMZP/1j\nxGNzPg4g8n8H/KwtyFh7pj5YirtfOryZjcn6IkTW2rUkIQyUAoC+Iu7uHbJJ\n3szI\r\n=EqvR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA3qhl1+QU2jtKS/lB8MZ+CFVCTomlRrgT6Viscv5M5DAiATRRfi0wo73iLrhs7SjuCEVFsP2wf5LsrRNfCqeNq2bw=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2111242025.1_1639095242855_0.3266830872247839"},"_hasShrinkwrap":false},"1.2112091956.0":{"name":"@bentoproject/timeago","version":"1.2112091956.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"b65dbd2c132f8cee302c477f3a52cb864a79663a","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112091956.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-bKAkjdxRKGnUz0V6j0s2Y8YEPhVEKAoSAmFFDgJKUHUU3+gT9vPxilhLB9lIPk/XlAsyOC9KX+SSrZiDauyz1g==","shasum":"6ce6b827f55b58d8516ef63a5eb24be4e1afdabf","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112091956.0.tgz","fileCount":27,"unpackedSize":2939088,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhs0yUCRA9TVsSAnZWagAA6ocP/1d1WsBMNg8oGkV32KOz\n2AeVC7LZ9xynUkiEi8XIxEw9WIKSMEi8LoQH/XujiRG0I7NjsDIWTOz7glIZ\nTuVaIvBYL8WvfO6to13QREKIwiDcg/Y7DIu/dvtRZYcHJ8GJsfK7SvwX3zSn\naJY5AKY/eAh8L9jVGcZSrlalJRO+RIalAZP8p+x5IWkotaQas4/x9+RQybiv\nORR+7sEtVZRvXy52e1r1mMmDN2cps1DC2aZOCZH+1PZ7KErgzCDCYPgSwxVC\nid4029dl7IQ5nhTwiKjQMo8IeTb3O6Vm/CUt83O2j0MCN7wH0GTN4sARp0vC\n02TXGmQ1NHCgOE6THpDTOPiq20SpoVrV4VEhVANKaDe48xHQHIOvX6ADT3aH\nI/or/9i57pc2rcYzS3gj5LSE2hpupzEyoYoecphCO2Jr5dYP8QlTrjFmr34B\nNiXZKkzFKpwvuYjck8PDyMLStKuMUsAWN1D/ocJsBT2kB3rCpJ3G9qLohceG\nJFkWRPp6f9Ob06vPhRb6LeOaCO02YRNFePVXKs5ipqij7aRf1bZ8Y+Xp4nET\nD/p1AUeTsn0B4YcQ0GjzC5nXFq0m4Zkjvmls4RobO7+8YsIKX1uT51c2vA86\ncP5W+M4Myn9xPl8Gw3flYQbDCKxj7yLWZV2tVAZIXsOgxrjsHHZtnwvx6gvR\nMmIg\r\n=7rSb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF+qJy+DjABAkhe5CJpvBjTCOEpu1KZidcccR/uF0FuCAiEAjEgEpRcc3W9P9OFhWnjpUChgkNRtk4aGdJ+aDdDM6BY="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112091956.0_1639140499877_0.5904285996651426"},"_hasShrinkwrap":false},"1.2112102136.0":{"name":"@bentoproject/timeago","version":"1.2112102136.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"07236921f8e25ede71217e1921f8aac93c30ab6b","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112102136.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-KnJOOVvsHgdm/ZRyrsfkEZsIP/nu+rq44DS7KSZUPfASeGUvJpSkUwklg4jXqI7zsYMLZ+7bz+Vk8QtbxgBspQ==","shasum":"fe27ff13f78aa1875f002c75e2dd355bb5416b79","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112102136.0.tgz","fileCount":27,"unpackedSize":2936636,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhtJqsCRA9TVsSAnZWagAASAoP/37vZT7mdf63ul0g73wu\n3wg1ogR7hIGZcphQl2/bvw0e6Bvf7eYkMZQHp5fBgQkrfoBzVK+qIWeZyqAL\n9oeyrnf9x7EuB2nQeOz3MGLcNXlaKdPuINpx78HCQ9aZXan4gaotAXco0Z4c\npXIGzNSukOVR9+9yQ3uRDkY08ObmWhy/RyVkl2mIE4ORBlBj0GypuRsvdcUt\n/mNJPX9ridtCqg6vzEi3bAukrsxa3qo4GcHHMzpWcQ03is2XeqDbNOzqBloo\nvCHoiG4miiHUc96wtPcvg6ztenTic+DqkcTPCkuAYq87H1f5zM5QoemcB964\nh2BgUuR31kPmSx0CscVOyEcSXx2NGfiF2KF84lLtnQQaunX9/K7xWlJe/LmK\nuK5kdikNd5KcCvy6nc/VzHvvaXsQtTIixsx1BEIR+4eO0WeXScErPXf1morA\nsidnKfFYnzJYRJMJF18EDTXlJWJrJGQToheMjFFj/l0uryC6CahWj9x08JvS\n+q7cj6ZEWWQl2JdfANksdYwIRjpwC8NhNeYBhFqEgwRelsV5j+3lOgOrIhpb\n0/QDqCuGts1Orkse++LWUstdXv0a54nMz529+2RDEfChjxK/8+et5dKdaddD\nLHLzijPCZm2y8AY/Wihobn678eT0jUZp23FLrczDvXH28b5L0ehShqWq/UAM\nc0Rx\r\n=F1Oh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0GgXKt/qUoyRTseOPYmW8GpQA0X9+0oDv24GBwscZFgIgRQcjN3PluhZWRwJkv49O32pNMtZXAxK8fn+TTDo1Rvk="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112102136.0_1639226028671_0.7493362481429873"},"_hasShrinkwrap":false},"1.2112132331.0":{"name":"@bentoproject/timeago","version":"1.2112132331.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"cf62ae1d6a12b70dfb6a7bd8ce66ed5bc6e30d1b","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112132331.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-HCkeAWxS5B4lRbR3YpfVAEGJj1omp9WZ5bNQHpaT4w6umme/C8oK2vrDZvgQlu8A1Q4bWTjs19w5wSk9eWHpyQ==","shasum":"047fcf1805de33ece505fb73b7d1c7e754a7a710","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112132331.0.tgz","fileCount":27,"unpackedSize":2934237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuJWwCRA9TVsSAnZWagAA30UP/1GoaIy6PN1EH7wLnEZa\nDm71bV2Kd4BJUKwS9dKi7C8Ljxzk4auIftlhcmre8J1KJ7J2MKPcNBn4TN/a\nVwqZ2QAmLAi1aehhPd9A1jlfBqCgu5ABt2gPicxiJ5ou3Ng2kgb0C8n/6K76\n2MPd2HilceHDa/Oerrwr6QMrEizSDzzlqdz/HZrtqTRZ6a5KfX2noJrR/gEq\n221wcifcT3u5mqM7Y1+eCy077kgyjjlq1aIzOp8Y50+pt9v8M3VTflp3sDF5\nP/Hz2eCB2vFdaBmo7BmnUinK95MNTTtNvrnomI9lhRjgsF+JHazHa/korWLI\nOUmrJE3B3XxngOVKmnvVo+b6QDQeYABp9UnPDjlD6aFUvLlXFPG2p7gNYZBw\nfX6K2EAmfl6r3pnRQbDxBoCjRN0dOirChv31V75+H1mGokJ422F+UxqL1WwJ\nGMXDrkmT8W6EYmgb43cJuWZ4TkK25f7ziyH3ULkFFqQmUW6eI49u8W0n0noM\nKLeDgjuWleeY26yLNXHRn/pIMmqIGfR+7l2MOgGX+8VWukgo9wf00yKBBlBu\np91IhzgCC+meuBx4ctFSvNCIH3AC6HG6Xgh21p2xxfBVhL/2gPEQWRxFXo53\npzc3Ol3pU8O0f6mukBdLZJ+WhyPVhdp0DTKNSoAfMTxFO7MCPluBNwtv2Mba\nE2Ny\r\n=NUky\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDWoBkBUU/TzrfCWlyG+7lpWojnVilQOGVVl0hFtfojtAiEAud/2C+IF4fphHgwZMzJVztIwSh8+uaLcyDOWm3Kl2jo="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112132331.0_1639486895806_0.45434976002432603"},"_hasShrinkwrap":false},"1.2112160003.0":{"name":"@bentoproject/timeago","version":"1.2112160003.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"2bfd164830b15f49d7d86cf73821410a039d9039","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112160003.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-JFBAhazCS8aJ0fyPPqZhGPJbVZivqZf3VfJJsgXcC9tvBJsqz/mK2ngUVG/C5zCk04KIjCfx5w5abgLDpbYslA==","shasum":"22d02f6b7000f1cb717b290c6a73fb2d1c91fe70","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112160003.0.tgz","fileCount":27,"unpackedSize":2934237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuy7UCRA9TVsSAnZWagAAQpcQAIA4C/FtEo3mqU46WVaA\nNdV6yNjO3bOnQjiEKIhfBVG/BZBE6Vjo5MkpKoSP67f5fNIBfFmZV90mQF0w\n4enTyCkpLiuZyrg2N1ETDwPJ4qH1tagizD0fZky7dxLgKA5+LlkOc/Rgw1ku\nbVmC6mhlO9GHjG4nH0QfVQrjkf0oizGEo3cNLE9TBZSs8+W1qFXD0IV1viui\npW6kSb6SODfhdQv+2ztP/4bBcj3oYi7aMQgYZrRiQalpSAZfYq0uHg7mfN2T\n5mqheMEspWfXE2P/GNDv7PVvQwZf1GqyYkOPA+GqC2fdP8Y0oQzlkJUfWuQF\nI13bR7Pwb9yA7y8HCm9t2b3yydan+e3uLobvsEt1nhCRhNNcmp4si8QQD+cN\nSWD7BVUuYH9p/cvWmWzvSLyQ09jfnjFoWL7gG1PhJEQ7torxUCLkGlc2ZNo9\nKO7MSmfnbhLyOib9OTJ6PhvF5T4+DMHha1QR8GZnKn89kKbm325SDf1agffz\n+eywaXApIN0BjU/lAXaLb5Y7Ox/NiDr32CAVApQ5/LtVkLVthIVVlrcL0W7X\nLDmW/pwQEK6pCZ1eT4jSUFNjHNgPp6R+Rc2a4oIud6jpAXF6OOXyuCfZAMW5\nJxEnE3k+FHO7axcnI/3t9n24KyliTomH0QqSIoubMxfC2srbYWsxl22FltjN\n+MYU\r\n=h89A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEhOlmLwsuQ6VLpNbn0MK7g0muemoG9DbF5p1bhRjw/wIhAPhpRwqXa9CX2vSbSStie9UcT2oXHc07NlRbCnOoInPs"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112160003.0_1639657172736_0.3523856610476652"},"_hasShrinkwrap":false},"1.2112162055.0":{"name":"@bentoproject/timeago","version":"1.2112162055.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"e3242ec094a87348831cbdd342f5187068444994","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112162055.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-WCJkQ+cTEtSy/vk0VHG/LRpYTSYccmrm3HcMH3+7jdGVdvfYAssTdWwsPHVY8KayN8z7eMg+Ydt70tBPfRc5XA==","shasum":"17847731e9ba963a0bce670a72da1253be6b4dca","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112162055.0.tgz","fileCount":27,"unpackedSize":2933949,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvIBbCRA9TVsSAnZWagAAg2EP/3IQYkm+3pxoAHuL6u8Z\nMlFiREM+jyLvvmyarZM5EYn1L25vmbBs0yC1StS11V65HoGOcKPoZqAjcs77\n8vGloa8aO+wp7HDQ9vyJ1ffvLr3YpuGQ3TOMW3MyKp7MAR3n3yZuPL/3G/TG\nDVGdtXUBn+9iyow4VnaenVhYj+NdT2yrH4vmomb0t6SUYd8GFa/CMvxLxjby\nvmhGGncm/Qj3E/eSWBI6ShKmjtqxDb5BbPrXJ1XREDbey6ooGZLG1jfjRo+I\n/yxjKkr0eGOd6CrFaDO9uU3lccswoHMcFM3gGiVT3/yqJ3UwEQRD/bSAYY8B\neDANBUrbFF34xfvSvtE20VbCKGCb1rk9xHbfNui7LFNFAhf7rgRMI4T617CQ\niy8HKNgSU48yfkSRoSwTgU9WYX01lj1HV2hcVXbn0pr3G1G8IYQpklepwGGa\noG4hqb5YljqqiY6bYvd3egyQWfB3ByKZmUmScplAINxXTq30WQ6HGYD2RKFI\nwjVc1Ulaylq9FMgN1t1s1Ib2tKLmtXmqOSyc5EnlbJ8Gd+mhoqUzVHLAarHA\ncSdD3EM+G+tKBM83Pmuvmsc03aSOyaeMlTrGARo5mhIeAXSucS7iobgz4K3t\nxvgBMu62WYMjgTov35SRlUmcateUKesEJ3bF54xKvqvtKcsfcCIN7PKtLzMf\nYCcN\r\n=7zSc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFtFKWC1twh/KbiPYeJpPKJ0Arxb1HpE0nnpUgcuJBhyAiEA31q0XOkknTYyGZp3l4DFALqYQpak+UejC69MADFgNdA="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112162055.0_1639743579100_0.18545114413400254"},"_hasShrinkwrap":false},"1.2112170012.0":{"name":"@bentoproject/timeago","version":"1.2112170012.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"38e50237c04e29792bd0ccfdc13308940a873817","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112170012.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-oD1ZPVr6RYIslj5NfbWVj+hT7z4oa2S2wo5gjOCXBlKasq3zpFnTMG3/yl3gWLwmeugYfns04Vsa9/jyCSg2nw==","shasum":"d67afdd645851454e6a1deab9ee2bb26b67ebb3b","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112170012.0.tgz","fileCount":27,"unpackedSize":2934171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvdIDCRA9TVsSAnZWagAAiuMP/0oODNYlywE4jI9dg+uv\ntDfWgC4Y6gYnKYlcklAX5wEseci+fAKJUPv+CgDg9xqSH5ueG1Zlpa46c8x6\n6aiV77qTAXNrsa0QAMqGCaVqbufAh1MSJfIL0Hj+lTtblDXGo+zTD+9T52R+\n8gZPGFU/bOG8JuW/eybkb4QCjSRoPH4NbwZvPqrXKbkzMeh2pKc0rw8OXnkr\nkWnh9xvEp7JORHF/3hY3Dhg767SJwkvkdudmOpEXtw4e4OCmT/6A3ttt0Uda\nYDpaOd8d3sFCJkLu0dJwjgq1po0H0s04ZmsXypdep1LUJ+nmW1M42+U8gLcA\nxa2VqMtoUI9Prb6NTZ5HlThwLcL1bG7nlS7YUeqecTlhALvYybixhXwn/Maa\nBxvxbPK2NfKk1p+x9FgwJoinuRyCzc1jBgo8cQOYan/UeqQlUbxlUoYmVI1e\nzQE9sCMIvyIwLf1B9qRrSVKXVC9czU/iO3O7ZfNJP2CUF1Lv8OPdFS43cARt\n1g5VhjO8A0lFuui0xyt5T1JWeCywmj+QE0KAxFtm3ah90H9Xssn/soLrhA0T\ndmeb+NzFxspv4Lrs/DcayZ9PNe8qo26S1A24YHiAx7tZwGSHjpol3aY0thS9\ngtYXX2whsH0oSUhInAMm0AWVs7fdD6hdr/pIw93qL/BBnYCFYuKm+8pJATAE\nwTUj\r\n=acrO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDD3jCYwEyXVrCXYvQ+IcBTPqVD8fk7R/CLTIV6tykSigIhAI/f5mVtiMP5w7WGHrwEd2nr569q7Lesz0vfVl7Z2Z57"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112170012.0_1639830019343_0.3104238385103544"},"_hasShrinkwrap":false},"1.2112201724.0":{"name":"@bentoproject/timeago","version":"1.2112201724.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"a8be9d1eaab4dcebc8c170c9911acf0c8a5e73c1","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112201724.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-fBiItSCFZBWiSBDQiFZ4o12ABhwMgBFWhmoCajT33IGHuOooGg11m71cqNxVGGVE1dDT9ovGlpNWgBsHFtH+XQ==","shasum":"7c09fbbea86c75edd5cbef7a304a1c99c11844e4","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112201724.0.tgz","fileCount":27,"unpackedSize":2934171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwcdcCRA9TVsSAnZWagAA1d8P/RAvzX6VqBn1PHz2VKh+\noyWAY2lWqquhgvCPsyIHSSKoBD/u9WHOmpig/85mYG3FKW+0cMw/nQYJ3WJn\nlPDLxhqoc60RRFV2/JZG/b1LVCT+3s5kG/wMOK61hZg3yEpQF/3GKX/uYoSr\noA9MfdI9IPmKeIcTyN2ZcJ/ciJIdtk3KW5qzKXyhzNPhFw69uQRj/SUvg7QF\nF9OG/IhhS3eOB3NQFOmhHbhVgGjBf6WH4pUioEgmUPdcuQTxYMMa+Q/1srXv\nzU6Xu2Za13fW3wlSdASEtTDBpjXqBSjb0X1H7f6pPYmQr/YnyBaSJFkJckec\nSFadVF6p2+AJ/oFGCuIpTKvDz23f/vWYT3MJurJ2JtBqfKbsWnrjQ8iP8hGt\nsnVTnFn2U/mCI1yDoFmGLQxux1mhSB61EVI3/akecGwTSQitnmdzAxFYhQGb\ngxQi4mmk8E4ixu5x1Q3mCYvXCc/z7w1WVLR5eUbAsJWItfRFU+7nGRMNQ3sd\n34ojX9j7Z+6tN6DHBWZkwhtn3R43bkIC54Qu9T3Qr7WUkpAvjMYXvv6YycrS\n0ZLu7BdOK9yqgU1sGQe8FQYRmhRaWTu9sgUp8VVMMfoQie/Uc2hIAmRjSPDt\nzTivNIlpkt7nvqc+mnCvsPZeuIuKYPHqysHkvzbcQy0rWvCLe3k1LhFKQfJ6\nDxfK\r\n=vFoK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHZNv80se0L63Nshs8B99a59o1Opv+BTa5B5c/CfXE5KAiEA4s65n/RSwMJk3KCOdhfjogElk90SH13HkN+CJES6SmU="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112201724.0_1640089436272_0.7403073438951882"},"_hasShrinkwrap":false},"1.2112212349.0":{"name":"@bentoproject/timeago","version":"1.2112212349.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"a6b6a6c259283b2cfcfb474966602c2ada072484","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112212349.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-WH1DYKMgIwdEiq06TJ+QCfmhI4nIulHw/vHSbBisw4xRgFRgvA+Ij0tPOyGAirZ06Sef0HjAmSOmVY9fZ2172w==","shasum":"57cd3cadd0fcba88938835035d910af15f45fade","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112212349.0.tgz","fileCount":27,"unpackedSize":2934171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwxlACRA9TVsSAnZWagAAgSkQAI0R3pDtO5RCFmMO8F8R\nosW+tSyF4WBYpg4DgFLAvEiLCjy0XhmIbtjLp9oTZEcnHnPU6HrvF1nNTtc0\nPPMqErtggXjW93u2crUQyCwws7Nt+UAW6wv7jr+Hcwoez6tVfTD31RkmE1lF\nw9Xf7loY6zO+Vn2YvfhtjgTCQX1qq6HFgKdxYQhSUJdggQUTyO4yHkGS8Src\ntU5upU/J/1P1vWVfDOOynL5iQUalMfZ/U/zJ3Dsm/QKpxgguvdqgvygJq0s8\n5dpHifSwCKmyH+k3xaXWKEEqJpWxAhzjNrTLEqa3ymD2QsI9jlv5jZV6sHOJ\nJfWPOHj15sXwITm2YZGnDurPOTwbNq3ReoYWl2uZpt9Kz+BW9PP0uSLq3IqQ\nt5OiUgjhItnt7ZUkG3oqUfWt1iTtrTno6zCOmMTy5YhdGXplHfj0DMftWtNX\ns5ZMe3dgCZc+t707XtWTbmyfVwCqg705aidkKQq4f2p8qFpLZtnW+YS7G5/r\nkMl1pRDSR6kfwsCpg+v7MSQNUYK8ghPjJoEr7o5l/1c8Dukp4AeNppi5LXZs\nsy3P4g+cZlHTDyinEluqMn53uvzXBUzN1ISxBHpj5XRp9BAJE92j3vXExkyS\nOlzIgY+kgAhAK184yLKZFMqaeI1GU6uri2Um//8ZKSe6tZMzf40snYaGUD8+\nID2k\r\n=Yrce\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYY0ycBiPpuYIDadMDIKqxw+x9Lr3KLQKj22vXMp6d1wIhAOKLd8e2m+30C8JdkjMzoTBZ+SErRLwd2h/E+APHtde+"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112212349.0_1640175936144_0.6252042519326901"},"_hasShrinkwrap":false},"1.2112221739.0":{"name":"@bentoproject/timeago","version":"1.2112221739.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"5d282652a97695e5ec57a655f76c0cb6d40de066","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112221739.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-scWAC+re4isn04TdJ1GzGW/IALJj8jXbaVujyawYm4vI2tx9PdAb72XahAenwsB3p5ZpHb1wRc0ft/TWrEiBfg==","shasum":"ea3a4d5a877c713c6e9f726caa0bb5aac1b90b98","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112221739.0.tgz","fileCount":27,"unpackedSize":2934171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxGnKCRA9TVsSAnZWagAAQJQP/RCb3a7Mpxrok6bGRzHn\nFyusHpfkkngRqhk/w01jN8QMMRpm5VclC+Gp+L/lO9yd6FBXEzcjF5FUImr7\n1CTHEKLlJbBrN5z1T2YjYldkv4jNADtb7OOinppeEqEuMSM5pe7b4dGOfCDM\nuqesImb8u06FMyZIUzLQl3BiyIgS/q0IV9vvxczga0qeZWkzfolCFLd+94da\n4s+DTEHPc6mFhtn7kYTWkjJraJiqKIwjxVFljOYJalrkjiV3MWJ+oLFHA8Z4\nuiEPQT5uAwTA5c6t6hG/E42+Gl4QFDvB3tufiLawm4QRUujBIfE2wm1HrG2C\ny/zCtGPvUlcM1K9kIfpdPdNWhTvX+qmlu61bMJXpPsAkxdUdzBEkiGxivAyU\nKv7NdTNZADQDxTKqm/47DFxJb6rQR/m2G2jzOy4xGBdFEblR3SYHj8qFztmS\nSCZDZEZwRiayUCFZvpf2nJbJJIz9R633ax8W3r+VspGZ3VSqDYE0xyyvxDpi\nKS910ISbwEg4QDmf8fFQtyz1pmrRLT7l0mv2QfnbnWMRLzmP9/q/Le3uRNnp\nWoT12l50LmdjYGMGiF3P4y5VYCBQASzkidU6xePMSCSMgUGaB1nk/J7R4NTa\nrU8selxywdDhTf6+gSRWk6jNZ0uheAU4BxZt6V3MVSAn1VRO1xE5k1eIDWPb\n5Ypn\r\n=hDP3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICX929PGYBfCngwR7CDIfZ6Z7jbVUIcegSKobnl5tuXAAiBUmXxLYQB/Yakp8vWT/JAhcVvQpAjupDE1HVyH9oAsKA=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112221739.0_1640262090419_0.5631411590386033"},"_hasShrinkwrap":false},"1.2112231523.0":{"name":"@bentoproject/timeago","version":"1.2112231523.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"3d06e61b6949affa49fa2c89bd550777f0fc8c3a","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112231523.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-NN8qxojaRaXdNuCu8P+uEkF9EeMJV3HD2oJqFfygpxZES1cOJkMOHgQo6BVl6k3NkdzjMDO1QbXLcK9jl6xUHA==","shasum":"11571c48a7106dbd2e475982eb53da536bc55cd2","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112231523.0.tgz","fileCount":27,"unpackedSize":2934171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxbtyCRA9TVsSAnZWagAAcugP/1CR7967d8aXz2tAmYL6\n45fa6BeZPLDJfpE7WB9r6tM8MsyEzPIsdESySks5ZSJT3x6l7NDGzoPZ5jwq\nIixjytn99ubVws8ca0Tw12BhenyQxEDa31YlhUMOB1n/gPrV80RZ1FA+O6Yi\nkV9VLsLYpl46T7cHGAiaOpBF8O7WzgwbxV6Pq8JmWDWMO99OlHEJfnEFqTG9\naj+L8+whyVUKJUcGuflbMz8FrXE4hL7qgmaZWQ1loXTvt6hlX+zrV8yxfnch\njB5mpAb5wp8JSFbsg6LNPVqUB31gpWxRFP/UQg/LdRLprvY7z3QXGalwRM8u\n54ofAt1xBWjKNmNWAVvhns/dzGe73JM1Vu4SaExZqPX/Wmo9WusKvEnHIUt0\nqJr62TyHNvVtxzvMj9J3jjvURU7okE5UflB0H9M4qnMc+HWLWDg6MFi3Jj/D\nXVJPKTLrF4WxgOdE9l4LZdBFTnro+7mTGGZt8qCVjeQKCrqQkYxqGtazmBDM\n9slWxCn5oJqT/lu0XgAbrMvZvgY8LE/vfGY+DBPiEv+ddG4P2pEBMl7dnp78\ngJR+9GM7sr5oauiAza7gesbv1VrUQ/v25Dzr5iShcjVaQmgpsjOciQ8q2jh2\n7eILgmrVfr0p0x1X8O6dH+rxATlKdTY8E1KcatunT1afHAn0+nr4jRUhrmlO\nfPvU\r\n=jqiI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICBJqdbWMv7DiKE2UYA5qnWK1ifgmejz8n5g9vrbKiddAiBla/XfhmFUYD3LGWM23wHNmllZaS6htJmlRB/uEiunCQ=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112231523.0_1640348529931_0.7825646586617754"},"_hasShrinkwrap":false},"1.2201042109.0":{"name":"@bentoproject/timeago","version":"1.2201042109.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"9526fe41f7489e55b2e2a8bf52d6b0e4367e19e8","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2201042109.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-zYEFgAC+l31OrRZ9aIXPH7ZzmSN19EfLg+bY9hfiWTOn4PHdNI6JL81WPdrUbo/zsJ9YsLoKMcTo6Y3vippiYA==","shasum":"1b627247dc91f685584ffd261bd40495af2a567f","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2201042109.0.tgz","fileCount":27,"unpackedSize":2907351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1Y/8CRA9TVsSAnZWagAAPFMP/ApdBvwr5Y2Wn8yLf6OU\njjS+UxQoGh0FCS+4a8RMeutqPcaePUndvQPTgmDlBx5ubZfsfhCeNCRcu1AR\n7o52q+k/YL6rXTWq7XN1t3xztFF64ptZstBcj1/NAfXp799/Lq48DAmpY0rM\nuslQOu8EmhVyzb1/nWn+NuGnJWgHuF4ucoPeqv8Dz5SuN8Or0tV3cLw9MEU+\nIlCY4KlX7VcYlqYwRsKSNJHRVTuqy4BCbbqPZ549V+8IK5o7qTqjlKkYtV2N\nEN3hhCtGIgFlIMxc9/NKCMn+IIF19LYgEy9SoVB3iXrXuC6h3FTIHKPSmj+T\nW4yIO2tTi9uAYeZwUpzIxyo0LysmTzw4SqHc4LAsJXxCMt6BeK9tjq1saMJe\nSBXZlyF78RIDoTLxL6y8hkzfk6ZBTkogvhbjp4ZH4UziZQUDD4sOmyCgTkF/\n3EA+mpl15+WzBWH9O2q4xGhji4MR0/LhxALQlYyN7B/tF4UDEXPu7HLJsP5F\nT2dzid7TcVrD7OABEJlhe4MMWIGCxMRpmeghPRjuzVXq2ETaxgzQ7SFC92Kz\nNmvZKrJSTBhYszGZ/E6eMuN+CNf+VRPBQQuLDzEbFusHyAqFgwOu/0jJ0KGM\ndycrzIcAuT6MZ1Yjk7U2T1Liw84XnLD0vlMAMxqjwd0NA/5qt4wKSnXE5oBf\n9oXC\r\n=1rfA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD75U3wk8tyDX+uQoFlW7u8gvn38RYdFrbcZ1OoAP/QwAIgRT9X5b6IZCozUb9K/z5oHHmiN6zccWCq63oX2rZ1aSc="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2201042109.0_1641385980205_0.021291189073580297"},"_hasShrinkwrap":false},"1.2201052144.0":{"name":"@bentoproject/timeago","version":"1.2201052144.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"09cb7c2c04a007089967ccf35accd80cfaff0c83","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2201052144.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-+xBKE8Mqi0eqiAgCXK6E5DI3m9iQLO7Ff7wbMTKVpB03jJbiY/xOUbzVDZeDYyfMwhgVGpNJh/1Zn/6QMFhs7A==","shasum":"3827b890d27841fc93979c2f487264e287d402f4","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2201052144.0.tgz","fileCount":27,"unpackedSize":2907351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1uNGCRA9TVsSAnZWagAA23kP/2M0mNrclwlL2xigfA3I\ntYUYDKsl9L0zkJlEzZwuAtTTYLTiDgn11NPQEyLuyiE05rFw/jej1LjlWCBK\nkCdRUhehqAZfGfuTiIs6sscU1564JRA0dZlgGcHOFjWiLEWJF4u62NsOkTe+\nUUtuJC9M3stmD29ahVqP3NHsI1EDPnyVF6vBLRTUoatFttgi9CnDkcpGtgHw\nEtkE/acSowgNtIfa6DgykGdKdV6OLd4KLOfLHj3OX4GWvZWsgwi2P7b6lyRH\nUjccakruOAz3HmmAH2dO2fbSpi8MuBXRK9+7sPVc7JBiVA7G5XBMV4edIhjM\nZWFe0bF5BzoB1VznJ7uu5bj6dbrfhCmVYrRz/Il8gxGyYFbZKwLRslcmkCFp\nMfcBpN2ijjwdyDAAjbAo1wH4xMhfjJqA6fy0/CzuYCbFNGag08cjHyPeaHx7\nsL0lgD3cRyyjaBwrx1gVkRaGMYr53EVnGrWXNgxLVczhORIYhJftzuSYujN0\n/nZEz3z793rQln0GX/eCbk1HwqPEBPljAl3J6V1lcLxd8o7s7DeWyT6Ku39M\nBoARloTJWeBuvu4os7Q52mpTXJPyGjNQ5iYifheBitzOGagLRR1T5/jgfG4x\nc6HVG80Bi+Yengu47ZZUrntQFFdk1t5cUFu7ULYi+WvB6yol2STPW9M1p1qN\nhH9r\r\n=4qsG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEwQD3uAvE3iVz4iiZNKb7A8P0OUTY2PniBLq0xNAFKnAiAwSnvJHFnIbRJsEufUbsffIfKv7J3UzsuW5BhnrVZtAA=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2201052144.0_1641472838557_0.0025617236046637792"},"_hasShrinkwrap":false},"1.2201061922.0":{"name":"@bentoproject/timeago","version":"1.2201061922.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"737b882748278c09f4270720744c1618e36be6ba","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2201061922.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-rNi4tPFd33SzjFyBKX2OMfKXEC62HquJoisZ3TYu206e7on5kKJ85/pj+8QQ6/4Ljg1/gZwXPamcYut1WfWqkw==","shasum":"2bd58cf689ce6deb35ce15730a879a0237c581e3","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2201061922.0.tgz","fileCount":27,"unpackedSize":1683908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2DK+CRA9TVsSAnZWagAAOmAP/36KW+CRfIbxkhI+jO1b\nKx+3kU2KXQ+Ka5wboiXuOOgOocVR9DF9yJW34H/KrTzbgN2klU3ZiCjtDXtR\nuDie5HeHvxoOo4ZczzmBQ30mDAkxI1liaA6S3XmT7Q6wI55MzUyurdJ1n3xD\n8xQxx+QWwbm8Yx6LMhxh+ZvfIReSrjm/AXkyrwxE039v3kH9aOOE09tZaU7M\nzdg17uxb76B7fcSUr+4fNLjNsh9hcG3j27DVLLVUAPum0VlGA7TfaNpJM/tt\nWYwQmiD59bBlGugzb8efwxyRsPLeIKopQkQbVU9t/VO/uEEZivkDAg6sv7Q0\nF3qhg3++Ity0k/PSp+HjoE5Bd7Am76bL1VAbBg6WNMqu++TdoW/hFoNv89TZ\nX+nN4xzXnpSuWHmKITjzy+Zl2kn4128gHGBuwv/roiLUuG/F1DObM+X2TIs6\nIDU9LH6P2IJ/DuDt1oRYE+51u2ynfQkpVpRVLcbexikMGZASI7NxErNb3bfy\nLBfV5OhhsAlm61Q/Lvj45/mriflCCCz15sn3aRscQA3QK52RuSOICjdl6aq9\noD8DAjvgDi9UiObtaK+P69Ryz6cC/L5lnQd4JJpjQxeavr2pzY0HRolv3jP1\nNav3ki00GapZB9wiA11LHBNSBpKVP1skrsrzN74iyz4wR9OU//g8HgSmYoVF\nwgQY\r\n=D3iW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAd9i74BrEpluj1f7vaDqqE8zDMsjSs2kG+yXpe/8EXjAiEAmEaVbVEGfgqRA6iH6AePaXsjPzYW648WOof0iR7FRjQ="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2201061922.0_1641558718306_0.09146804747200377"},"_hasShrinkwrap":false},"1.2201071715.0":{"name":"@bentoproject/timeago","version":"1.2201071715.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"e40a24fdddceb1c635f67571d9cf513c7e58800e","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2201071715.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-um9OsXTmPXxY0G/4JJz/B3NOgg2lkzmv7uAjEtk/yNv30V254BqAdDwrdCzrLj/x3rsu549HXhwYht3IrfyrEg==","shasum":"d3928e78a90919d32a7a9022c5bc0909fc1e3f2b","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2201071715.0.tgz","fileCount":27,"unpackedSize":1683908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2YHbCRA9TVsSAnZWagAA5pQP/02ND7EUDjbH2u2kKFaN\n0zLUJmvDbXmOq6svvrZXIoDWPgVqFyWDHk9vHOTZIgPrUFcPkjg3qWflRRGR\nb4dXgQmjkUtSqFqKiBVlKN9NvURby87xqZFwJ+ITHjTq4vwqoZp23CImiNFj\nemDXVHWItrybxQPHt1PYCv2+utKuYw/ScyI3mDMDU4e06O0KZAkWhIGzhMyh\nDARkzuCUaAZIanJDJyUc0u05zCXBxLMz9Ho+cq3tOH51RSYkHzpTXw8IRBKb\n5RWtIzOzBdbsM+/CJqY4r24pHQ20OxanxHDkPrpPbTUXcQpN0q2Rzl3uYpYG\n7mV8huIjtlsESSEax1m1HIIpb8HqWBhdyEIInQ94YwkH7OFSXm/2FbkknKWU\ngR3hI6g0i892wJRdgJ2TphbvWA0WFWhSS6IzhPam+1Gcif2kqv+m8XT7bgVj\nNk2cZIqMJs9/1Lav+tRpA46S3J2fyn7C4W0Z8M0WwDROM6TY0qQ8x9+L3ARd\ntjYlACKcCs9sh7Y62Yg0No2iHWGFcrqTZaHfoJT1CYqQvixFworcHDxxx7vY\nb/drbDV3s1TpPOtCTCccFq/S0KxwjsjcCf88N1sDRMGimKHRYCFR9oPWe+Qv\ndtZsF9uh9m14bPxOC2BxSJMSakSrjoscYiHn3ZkKXJqts8UnXdc7ioRWEtqY\nLlJR\r\n=8cVP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDVbtN27Z9h7S9Hq5Tf4jDfoiSCpFOAPzHQIvVc6vyBrAiBAmiMUjGSCz4jvNgCR7ljX9MuCZl4IKgiEw64dU1nkdA=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2201071715.0_1641644506855_0.8982174275983088"},"_hasShrinkwrap":false},"1.2201101902.0":{"name":"@bentoproject/timeago","version":"1.2201101902.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"f0b7ffe685c60b51cfbab92bada4e0c87e0377a1","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2201101902.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-1Vm2wYokV8S+7aOYY/2HtMfrQwS0KspM6PgWLa8rtVgjNzgmKo4fAeN8aWUtzwRkhoob2cm7VVUgdIOVZhU+jQ==","shasum":"6521f77cf66705a357ffc29d99200e5c5fafcb09","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2201101902.0.tgz","fileCount":27,"unpackedSize":1683908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3XjnCRA9TVsSAnZWagAAUnsP/jF5L6nFFWqJHptmntW9\nVGDrs/4dQwqNTEb1znUG1QIcPLJfLavq7gBYuQiRFvyAyTufdbcCQ9UeXsO/\nJi6yROX1vaeRKwg+aO3BjdyBgVWfuisEf+jjbQ2GDZg97gT8MtfvWBe/ozxN\nbJa81WVsC78d+UVpcBcv2wZSdCZpdfJaHSdsRcKpOq3CaV5+WfvRFQwkeGXF\nVgMoZ9NnE3glywnFCqbjtmBAinXwsaPcfG3bHFjSwtfkDYSPtaHqJTnp5zlG\nyXibtqVuVmhnW9USGNbtb9ecpWP3OYC2cYCNN3ZK72gx3Te+N9LMkVjrnhVl\n1Q1LDq2p9vbg0TZQyngog0ch6PG0roX9hHOWaBiLRWQHkpJd3945uB8qS+Ht\nQAcBQYYRAn+o7PawCsbxwIwlY7jgMX63NuzwEGNrMvTp8lIkQBqgBlaKShOW\nlVs+LJz4TSFahlLsYFzZiCOQefI9O6EB573BWNe012SnSb/LKlDgrJjVseRu\nO7bJjSGtmZamr6Z+xxFSoqUjGzrc5NIZ04/9jsaljW/+3tFk9JCRuezvfLzb\nUsBt+09FaAFGZfkRy9f4LE+I33ZpdOGW4vRqC2V//OF7qlERZ8n5GJI55PWI\nMS8GhbaoLLQVUQwigeOFapMy8NSa62EmgUzZ8tnYA+H2Z7Rxfm1dnTDXIGXv\nQpAE\r\n=x4Fy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHUnjzAReJopYC0cH8MNpMBciQRVPALS9k/tX0orNXKZAiB2RevYTAa4oZMaQOZMZ1IA6IpHbBfrls5O4eUvmR8bUg=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2201101902.0_1641904359308_0.6893224336582808"},"_hasShrinkwrap":false},"1.2112231523.1":{"name":"@bentoproject/timeago","version":"1.2112231523.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"1ba2e6854831868cfbd5aecf8a74b09bb0fbc2ce","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112231523.1","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-duqfGPc7rPF+lqKQ9LUMgHSXYhUcfA1vIjf6rsuz+a+A/9+AG70A6hRpto+2GQcSlxJkNfmylg22fe4ol+ay+A==","shasum":"055bb305e74319514d818d47acfa4f8e224d25d1","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112231523.1.tgz","fileCount":27,"unpackedSize":1683908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3do8CRA9TVsSAnZWagAAKmQP+wZNj4J80xsOgpuhIWLJ\n3iPPtmEqvodVSdj3mOELJQmyXNWqaJvlnyOkjVKh2VR9zVS1yjK/bCRVz6VU\n1+baahGbYrkz0FHNsMxTlQP1BKkrgRz0WUNNKUGLsFZhWUjYHIyhNk8DIZPB\nY/I1C6mcFxdcxYWirc6q5kVeYhxSlE97XA8jPOi18ZUN3BBT4KfmSnPmei5C\nttc7sAmG6u4MjYIaxF3oFM42y1opRqVfJ1dObh+yG1Tytj0ER+fK99ghG52+\nHGbO6FinLG5TZ2Ix8mPwAfOZR6+hwewA9Vrni5zu4U1COa/3ZDoyoQq+a8wU\nlwbERwFkZrT3qTNusMjhYC3ecjCTqD8Wp8Ccjhp5MieT3YwC95UCugHNOfoj\nPz2y1LpvmXd7JQFoq2MbHxH8D77F/HRXE+Tkw6qLWtlPCsmiAouZo17ZvrPt\nwQDMBU6TI/KS0iiFnpnIS/NeafscWmJaGPGf2LbIOVmnXqfMqRues+FcDpni\nmiuqtQyt1XJlhkHGRGCYJf3eNOiTtFVoehYpDpQ3iM6obeFMmapFciWlOtV7\n5/CwSSn7+La+4wP8YIOIZqBvBBKIxkW6EFjB/v/mqidfG2Fx7A/hXB/9MpUY\nl/XR6B6Zs4L+YHIw7SbcrQTV+vb5UBFNbtgYev53mdZwn1MFg2Umzd760nL5\nBSF3\r\n=6AtP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4nUoMKVvMxQqtW+JUnXqTCD6HAPFahej99loSWqjW+wIhAInK7TYNao8yrWApc02qeKfdVegPyKe00qjArngDioUV"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112231523.1_1641929276122_0.08379249895323992"},"_hasShrinkwrap":false},"1.2201120015.0":{"name":"@bentoproject/timeago","version":"1.2201120015.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"c592aa0f3999a8b6109a8a31a07cae6a83115d8e","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2201120015.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-VOHMtcusLC9n12HAq3iQQ1/A7oWiglBUHz6u+OBdwCVlH5CZsXmtpjaiz9mdHsGWBsVOtgH2k1wmClW9JbHJLg==","shasum":"e36705866783930f5dd5981d600c35523e1bd318","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2201120015.0.tgz","fileCount":27,"unpackedSize":1667440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3spxCRA9TVsSAnZWagAAez0P/Aoxl+1p74ZI8IgNpQf+\nb/dQxUMZmiT773uLoArVHlpbkl3Sm2a4VN6Pl3+LIJSo/GPdmPnQm6t6V2En\nqLZ58/gIYozXPR1O3Sh0Afr+DW65hZwzzMnlbuU+SjFXfn+tCU/L/FQjBU5Q\nzLNsrq5/iRuWLlKb6qT0jzLe9xe7mJQ9ZvOatPUM2gOgfPP0rdBSoZ99NI4H\nPLMm0/Z81Li22dh0Ai8O8LOxaWP57R4T1UZOaZDwRVIryXie8fRD/A6Sah5q\njnq3B+9GPevZx3PWbMLyxu42wn2LRo/N4CWrcPLHFtDEAD3VI/u6/oyCC0uC\nwx1PmyPbCjVeCkLI6VmfRu+V9tysy7B4NI0D8KYCwJNYm6r8gyHldNLNcXyg\nsfGWqKJZpz6dHpLNqz9oIwMBowt6z1ybPzKxr+TiszzHs7tX/G2EnkbUcKXY\nt1yZlRavRBdxJSbFeJFa49TqRzwKUM3zXpRsTIfN0DJ6qWMzVYH0NzA3pdMM\njA1hVPmgS0ZTshwXrVR/G10j0rCvKScX/gLws3DZUtfZ9lR4WAJOhXx7Z4Oe\nXN9RIjwwzxRlGsh84iHa/TbOJahnYwqCkY+o0oSoOSZ920yWLYWNhPr4OYlG\n//l4DhKMkE7HIlDA990PPXa3Z1iQ8DYMtHAVNAq0s4gooPJYLsiRkkpq2Fqg\na1oh\r\n=iO8Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCETWqrQwEFKuC33GcLd55dsaGMOn5o3NFE4M58425YkwIgGygvZKp4somRo8JOYj59E2c/LHxk/hi6DI8dyaPDDxA="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2201120015.0_1641990769632_0.9853575635071874"},"_hasShrinkwrap":false},"1.2112231523.2":{"name":"@bentoproject/timeago","version":"1.2112231523.2","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"036fd40f8ecb160f2d6c65688c6ff4765a670bf8","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2112231523.2","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-QDjRg7MtdkrpsDL9L37EFTiX66Qr5GQ0C9zNafQBUcFWDn4GBJe5mHOFdz60wVp8Rw9kIREVfo1n7ZnFisRsZA==","shasum":"c75ddae1ef6d0b15e4b9f8f8f2e0b3a7c63dd466","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2112231523.2.tgz","fileCount":27,"unpackedSize":1655019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh31kfCRA9TVsSAnZWagAA1YEP/j8uOZkuYE85bjgBXzRE\n8Z8U0vQSLPbmuWLZgOiN9ouBrvGePnb8tHn9YMdLJV13CAatQPhFpTAOt/D7\ntR5wNICOsIvs3QhVbvnmoQzm+54Sy55jg0/BnqyVakHfV9f+CgZa1F58xFNx\nPvW5umjbbnrgwxfaWRTXoHvC06SG31WXKwugQ5AD9ZtCy0fKje3e3afaZCtu\nRAFzUTZWUdw4dqXLNC+fXxPdNkpwYz9D3+gbecRU/0GMZAOdQX9mJcihc8gj\nny2/5NrIHatW+vrLq9y544GJcuGYhoq1cMN7sF3k3Ur2h6YtodTr3UGFRgcO\nXP0tyH+TFApeCHtmPnVdlSoRPT3Fci7FPwRL1nkGj41CG5qDntaO3496lG8f\nZbT/OaB9PeZnuOfXNH2qMNThUcyAhq7wY2d8zxBVkZAkl/EYJRa3EtL/2vgc\nPj/RoFhHMjHkS/K+D3t7Zqhw0jsqC0C38WxKVO0UBy/8jHWxv/2Lha7rQvCJ\n+EYm7ycXQUMaoWJnE93kMGWlIhPWR5exC4dQ1kr9V27LmHUfdTXMGmch/z4k\niQZ6cQuPEp+aG/MRcacFBDlQuKr/W2ZlZ2MnMgPDQSAEFkGKq6/ECHmqHYvm\nq4C/UGH7Bt6k97Kk4JWLHqwq997Pett415h8xtcvn4lXyOZGoi8poidB471N\nHVBw\r\n=5cOG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIClnarUKgCcJXel+Y8ZepsumIY7Vj6z2p33NPrz/an3IAiEAhz+fPvrTMaSGJsYQ1HdvvuEnhPATN3ozjJL2nndL87E="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2112231523.2_1642027294919_0.9957893193480258"},"_hasShrinkwrap":false},"1.2201122239.0":{"name":"@bentoproject/timeago","version":"1.2201122239.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"c04895bc1c2e1d0b7b874427b9bf1cec2b4b9f72","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2201122239.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-JXJn3ukpW72BAos2K3a5OoI/v1N7Nokva6GFKZbItGE97zcPz1cW+1aZmY4DmZbpHcXCpR46bDKqKZwy4EabhA==","shasum":"b92f9825a9723659920d376c3620a421c37193a7","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2201122239.0.tgz","fileCount":27,"unpackedSize":1655019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4CLiCRA9TVsSAnZWagAALbkQAIvoGv7/gMAkOfJDnacw\nMz7n+cakyIRGHKkIsP0l524JPebSul/QxcjkQI1IJxRQt1BbACxPVDWaIULf\nfl2GAbCZgYYdqVNhzbk7CLl0XsW+ptXUXKiRZhtR8orYPqM2UwvmdcETR5FO\nDJplS3LHqMbOqm+cHq7ftikcJWHWwOQ+f3QhyX6R1gzjJRip2Tq8+0glT7Pw\n8+ZxcXTByc5jL+DbJGczrU8a8qy0V1v9YdGUeI5y3IfGBUUM5FiPPfVnMbCL\nwQOLavrOq0ghxJHbrY0LPeDV+onZUdeZkKANRO3SRGQCS4BB5Cwh8opDwreD\nc3JOqkZ2NGEma7nD7Xa29Sa0l75PHB76qwpB3VgyK3Fp9dGif7Ev1aTmjWnJ\nia7zMSpsHRno4FDmNoJYXTwI3z3/AgSz429xjDH/qDQ90qykdVLtnwIGfdkN\nlNFNaYaliW1vpSQIoQSCPTaSLoxsxGfxYS2ChxIlP3JR817dtZCVri/Pwv1s\nODxMp7SxSeewrnzLsXgGBBOl0MHBdnSxcvO0uQfdkyIAAm8UXjLjfK8Cpjko\nodqGyIS2Sr7ZAzjN4AFCbsaRRL2HVECR2c2E0mPdsfMidcC95BUugy11ZT+K\nlomnaQ5C3Kxj5B23P8O5lv3uBQBxaEAQL8Zy40dgmzB3HcOzOeZ0nVWfKzjD\nkfsm\r\n=gAHa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIArhj3VEOAJ7+0zkIJBSkndRaglSlAFNA6Oj4/NYH1+SAiEAz64fp7DRE3b2dub9KXRq4j+WR0a/T6k3bgT9Vzbe9S0="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2201122239.0_1642078945932_0.13402551649811456"},"_hasShrinkwrap":false},"1.2201131702.0":{"name":"@bentoproject/timeago","version":"1.2201131702.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"e9b16ad7a5cee398ceaabf6ba7990488624e098b","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2201131702.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-AMcuI4wSxQCk5PTVsidZPMPXO6ptJ89fz9aUgZGZGJ9JHfFkAtheO6zeB2DN3dlC94RHPtB32PMv7x94vgVh4w==","shasum":"f155f91b1e2d7ac0e23c8651639615dcaa4ec40e","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2201131702.0.tgz","fileCount":27,"unpackedSize":1657827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4XVDCRA9TVsSAnZWagAA9B8P/3oCUPQwDZwDx8HHDb/2\nCu5nieiXGZ/VlrSWr4ry5FZowI1yL/L+BIDCZL45dSXdQLO5G5i9rSlIMk5V\nlnwCzyCWw5AZNvnVMphTv1bZHkPn7o1nTXhnBqN1qIY6VqOn/ltMhZDOjU32\nXSdZ4dJYuWZR0Hin7i0uBmCRAOIlKQYDR8dVzyoFPYDwpqXTPnFXpeHRKwMS\nY+hezLEWhTDB6XFewgI2e9GuKm7C4OeZr6800T7rVeoMHkX+wXq/BoD4IY6I\nAOrqQ2U9ZYu6qdteR29byvHXmdPlLFGJRqUAPtTnrjZPMaTe8KJs6KQWIWMV\nAUxR3pr73EGl6sihOHKrBqz39DaNhglf47ImrtG5Y49cChdgQDA8vbX38YUL\nSlYVDPqOaMg20svx1PUTAC0Ds46KK1AmFKob1sbgPyW+9yxdFm3Z7RL3N2+v\n6wouRc6GXECKHCcjkaQsJ2aNPaAzKcRtQY5vBLeIfKbo0Zbh+X+ogAxNCrHH\nl+lDf2WzHHOUaNR6niJcPNq0YtHLuF2iIZyk+lbWwTy1Efg99JR6mnnRGaLF\n5eMEGPbNHlyYYIRDo8hs0TsUf3JLRn6s/ifS9ePCWKkgmm+qe2Sk5YBketGl\n1RwPkvmuoKx37GEKnNqba7SXYbXNh8vXySZ3qFqlABGer03r6eLs+g8//E2X\nwvmf\r\n=Ra+7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMWwccg7yVBFoVhUJGIrhPNcwu54q1MsnIfD3xH8hC+wIhAO3SVfMQVo6aA6uTD1Ed5roehb2wnMSNFnMN2iH5W6xV"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2201131702.0_1642165570919_0.09147201170367514"},"_hasShrinkwrap":false},"1.2201141909.0":{"name":"@bentoproject/timeago","version":"1.2201141909.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"96bebbc98d1f79b185c5ff6c58442ddc2092547d","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2201141909.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-wZcwGAnVJjjvM6X8pTHX8oD5Y0B6CVmatXPj0m3fuU/nwOOK717tbVJCwv5R1Y4P755u8hA5Zbr/frrYHdajtA==","shasum":"d1f1f8a1dcb6aeef205b11caa7525923ab8b5789","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2201141909.0.tgz","fileCount":27,"unpackedSize":1657172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4ry1CRA9TVsSAnZWagAAUAgP/3JXG94OZ1eixfXTeLkN\nVv4zdxYuOQ7MwU4teeD8mHn8nXZ+EmW1WhOz59jLsEtVlO4/WeAf+G0UNeJu\nwGsGiQ3vgFpWgXjKDd3kfiQ9J4CmnozC2MskGPHPuEz8sTiRREJL7bhsQy/U\nHDP+9yXyp1jpMD9jBIgoNB9rKP6nlkJrCbmXl+3aquBv5IduoF1eS54dQlAw\nxcKvUOGy6vE8BraU5LN+HBMBjvR2Up8O4CuMckfPAqkN6AVYhOUVslcB4HOu\n80JCfEXYZnrjFWZDd/qEiw4f20NnlIIlVhHLVv3qeHLryaO9Ulu2xhkcV0FP\nECmBRECZXxWrXivH6jlg+kqdClIyUdRCuRIAQU0CFCbFzK55F3mgHaYydUti\nGKtCXtexpbLEdxyC3FoV8MeBllUieb9xkCeAuH8aIEbzPa4aMWonMHokMmLo\nrMPDQTqLE3clUFt3o1G6DsNNBfZ78rrId4gK1nJmfpHf1iN5gaSJr7O9ZJis\niSyKokL01BArQkfV1jYjTyY2YlbQSrC+fKzMrpUgbbyz6YYIAaHP4MkEYW3b\nQQ86s/jOO7fVHJywNSuvHK0nEfSM8KfA1Xy5cZZaMS6Nvycs7Pzvva8OD2/y\nCKzSWAYUr0Ut+FacZyNoTLI8ZJQak9qg7l/9ELXjC7qi2Tm/lMLctfdoWhbY\nHvuy\r\n=aDvp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCI4RUJhzBvMT91lBS7RTdP1DBn1rIWUGo0yvRxqcgTkgIhANxKPc0bSIo0L71rZn8cUrkIerr6C409SRxwvHnSsAiC"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2201141909.0_1642249396994_0.7161396256069579"},"_hasShrinkwrap":false},"1.2201141909.1":{"name":"@bentoproject/timeago","version":"1.2201141909.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"6474ad58b0a7e1997cf1472b09ba21af402b09fd","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2201141909.1","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-Y5faPzKBo1EM0L8Tvju1/SgSJ4/AU7r0dyrvX2diwSdCIZszcA9L6lDv8skt6GHHVDRPi1MxNjyxop/GKs2K7A==","shasum":"d7ecdda63e0d7f4b10c169790881c844919825e6","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2201141909.1.tgz","fileCount":27,"unpackedSize":1646534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8FTGCRA9TVsSAnZWagAAw3sP/icDdEOqZ+yzCK2RWdej\nhIbnXin17gSeLw2wFPThtpQXJy/oNVehmdSWb85RM9ERgr4P8SeJyY4KIGw9\noJ3Y0zlkE8So9N7pRR9tlrYSubwmQjZ+Xiz14iiJqrLmjQBcXqNHYjMbxG8B\nS8RDq6PE8PSvovhhVHBGy32qAPMKAdsVOnHl17u50qJ6FjkLWyIYlo3X7oDr\nqHX3DGLphDxMZParbSkrynCzaXLJG+vrq5ZUXFEeVkQxJOvtHa43qPBgWKsp\ni+lHHzXMmxnV1k0KSuDi6Hq8PtDQiAql0Be/ziCA5+tLL7plcqgCgy6/Q2yH\nZwLFW3cY8uB99ILMf7RmuFCaeGOxZngdVLMdDKJ7suD5ilqYhGTZbe+kOJo2\n043jpL4cFFiTXtbTDmmkGaNyBmi1FV1vcC05gkTDVfrzFfsYgW+g+1BV+RlD\nDp303rnnVUdPQqi/JxXvmmBt1yZwKWwfQMgEyP/S7exTW1uAczB6uS2lmZU3\nqBjufI1lH3P0R7LZPS5Ieo7FSQ1lpHfc9DeFBWU4Q2oTBBcV8sJY/5P70LEv\nXMCkI7ReGNE+RWV28uQfBC5UDdc27N0fjX345nwupLHJ7rsn1cJK+ZTAvXBG\nbEKrLXtv/BL0tsU9+2XBLyLpdA/soNKzNhWuIFmJM2A0rRi3nsD85jF/6aq6\nBc3B\r\n=NWQN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICyLBlvRjQ1+ObA/NATvJEcUOGBJ98ZeoCyfbcth0ldWAiAGP8kQE8H4PYe5Iea4KfnM42NEAo0fU+teCYKx1tkgtg=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2201141909.1_1643140293764_0.8721484504386856"},"_hasShrinkwrap":false},"1.2201141909.3":{"name":"@bentoproject/timeago","version":"1.2201141909.3","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"1edf4ae1e7a533868a19fad5b3b4da9917432bdc","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2201141909.3","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-LjkYd+lQVUNlVnnCYbHu1eSvhjByHApM79AkYGznQiKdtUiOmgN32QSD4Of4WL+QemeaKK7eprijRY9xJSyHSA==","shasum":"951a5f1fb29cd548984a7c118f745c964b308884","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2201141909.3.tgz","fileCount":27,"unpackedSize":1648922,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8baWCRA9TVsSAnZWagAAjqkP/iwcCalUEQDXt1nf0LmR\nEQQAPPRf0S2+xVhIe0uP48mcMK0/uD3zNcLgrpnSs6fgWIoDNNUdWX8w+BbL\ndRP4CmO7F8RfcuoFbFcRP0r1npsMx2liT81wmoiiRdzV29H7YNjcQYG57KwT\nfZGnELqRmGsFbZfGX9H8rFB+TrM+SvIZpQnmOqQQAh6KOzKjvOJxbvyPN4KJ\n3vi3Tsrs6dvKifmD9rZeT3M0eMNm0IAknJBZRUz7rCIcnF1mM7HzmX5wgFHf\nsZdBTaRzOL4M0dq3POh+ua5vNJs9IuICfKKT9nIJxLYavFGRXWwXwdgt5oRj\n+w9FK0XiFAZyrZiZAO+PthJ9Q0MOOegY25rsOMqXGM+QxnbymAv1oi/nqX+n\nfl4KLA32zvmXfSpM3xBWyMLvt8GUoy/esFSjFbD2RQgGEDDUbfiFhmR/OJpj\n4kis/1fSFanbe8bKdaEiA5unA3YjeQRmoFFqMUbOomEoxQC8uI08wGNI0y+w\n/3hk2Xs75gG5zXIyZps3/iJzOG9F8Dys5Lx8GqwuxNwSM1xatRW2vL5m6et6\nJizTGFeSoastI+opiO50rJz79K/9nu9jy/GKd0p2/XaACfnRg3vSnD4va35a\n/q91gZKc82APU3Y1d30b56rcV0xWXtSW/UbzkpQ06q9Gub6oYlYcCE4vT0Fc\nNRT/\r\n=w6Gb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/SyObQbpPVizuLrP1lMrweab/u8Z2HT2RW53TW6Oy8QIgGRu85qV5lkCNUNZADF4+kMBHgbXlM/Lr3bump7o+iww="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2201141909.3_1643230870294_0.32356321279347844"},"_hasShrinkwrap":false},"1.2201141909.4":{"name":"@bentoproject/timeago","version":"1.2201141909.4","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"6e60d79b180fd0983c9644d325b45bd569c6da2d","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2201141909.4","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-CyQjrqLjRhyYn8D5ITzdpp4eY2xwyMHQAuZb64i164+PiCgus9BbapqOjg33iJjzlwiXzDNd/RSdeckOiETaRQ==","shasum":"4e94d1bf48ba60d1a7ebde4bd4f42d9d8adc2461","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2201141909.4.tgz","fileCount":27,"unpackedSize":1649630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+ai/CRA9TVsSAnZWagAAeU4P/ig28mCkULoY0G0TFvkB\nTPaNkkgoO02lDhoP1OCgenrddlxJho9Fv8F5sOCVxV34ofbvY9wMPs2jSgJK\n5/yYSZ9XOt2pC8DvHWa8tnATaU95AoNa0359GozJnF7lkrTTeh3x20xaEbGr\nVZhd5MgGz2YxZMpTYFFhzIu5wpW0QZN4+Cv36BHFCHZhqzMBGDoce4SByngR\nsxaoMEH04aMCq+zlptc4mMP/bU/cw0akYH434gCoBYixxEF7c6AG4CPxdMia\nlbPVc/9xYT2CcWh6MvIIgPacYH3W/O17LZFey7q9Zft7C4mOcz2JergBnesm\n7i5Tw5MYzQGFkhsLD6Q+3KSq2Rhkj+W8hvHwY5Q6a9MR2xMrUSnz2BBFIinj\nzPXHQIIPeOEKqgcyVc0/56HmorhiimMCFuCWQhJecQyiDdYBYhScF8DuKxW8\nKrEuCJoVlf9NZ54W4uC4hC9YcbA1yKf6jGTJb1EO/rd2MjMiecrboNnebnf0\nhSh/92QIvcZt9nmQ3X11USbzhzJSU3TMjjcyPXxQwqr73Q3ptyf5pc8Oz8qn\nJCJ1BtTl1yTTR4wbpc3Ksph+oFLlATHwTz6IY8DfYFyeVHIuKf2xj/HU/ctY\nl0yRz3162j3LRjelGJmGgnZhGsNwlxiNeoKO6OTU3XpZ8ZHatWqtsCgVUssD\nMd9x\r\n=NNQV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyUFD2F7Buv3/lNamV7G7VZ+eX5wj8klPTZM9QE0RM3gIhAMIIcvt8bPHlQpDcQcKj9UDFsWqAGjt2IJTTdALJPKG0"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2201141909.4_1643751615139_0.9432372904978634"},"_hasShrinkwrap":false},"1.2201212122.3":{"name":"@bentoproject/timeago","version":"1.2201212122.3","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"ca1c7d4b4b4a72f4913d7c304b5368187458574a","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2201212122.3","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-wQUDkxE1cvlzk+v6zALanQBGICSqNGqV/mUgJ5b1Rd8Xk/7Unw5fTDE+7P0vj2dEuq1Vvp7XkwyBEATycVpg5Q==","shasum":"ddfe915b07310276b56fdcb81af669858e714949","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2201212122.3.tgz","fileCount":27,"unpackedSize":1649630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+sbGCRA9TVsSAnZWagAAENcP/1qw7spOdvbx6faVW+2H\ntxiAIGY8oIgWQzfoQitRhvoenOKIBdZxuwoIF0sBXsjcVRmUhB1s+XGjkZyI\nP5TSeAmpzs4v3qI1JD60oc0mzltJhZ19Sny1JhsuzWl2RC//GsG7ApW52Nu9\ncGf22uuyMgFOCXiCinu7LnddLGFAvlWd/RnemcFO3gWMNLi21ZV6Td1kXuPW\nKR7lmS0ka/nuuy9zgWZdWwAkHuZJ3+T7IPmJuqk0aZ2avq3QF1KuMcz4izKy\n6Sc3d5uFvCrTTSlZIxKhnrZeYEsdPxBhr4nygPwbOX03tj1tBPpEfJN/RIxf\n8G6Ec6klODMgEIA2LrrYLY5s1b6eKVZ0XnrM9ZZhUoGU8s9XupnrAuQE1aIc\ndLIWKlmsMP3a5T2s5v2nsr1Y7hHH1XlEmQ31BOnLxT1T6qRKAPZd8tK3/zOz\nA1rB2o+RFFr6gKwwinpMJfSamSQhDlONzKWA6tbNfVRa4Eif5vg4DsMeVAiY\njLOF+mp6ClXfZi9nTMauF+JEgP2Cpevt5OSkGoR8d8XwikugrQPX+uQOYyeP\nljWbX83QN1iWiRwEpYLbg2BkfZcpAx0hpTFoUx1rncFl6/PvX3UBjDyF1lvL\nLV+/rBwjtJMCxW0hxer6K1buz1WSOGPnez8b5jFpjhNGocCl5EIVqmt/0yKs\nWyrr\r\n=ZXuS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICQuBWIu8LVLOQGP3mYqoJ+2Mw6m841K5/hWR/v/8hdxAiANtmQrPE+5R0xd0AVCugzrD+ncF9xAE9Zdoo8ryOmjYA=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2201212122.3_1643824837813_0.21895320997669065"},"_hasShrinkwrap":false},"1.2202012258.0":{"name":"@bentoproject/timeago","version":"1.2202012258.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"fb0c4a54446b5abfcc53d1d446f24370c05507c2","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202012258.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-bteOdxpuw7FU1P5+jZhDy+Jzb5Yx5e2uFXeoEeOuqCDwJ9rPjJPBWqSLaSIfS23hLV4U4GtJaV/RPRqbaOHO1w==","shasum":"bc087749ae36a6c66861b126060f0daf47f7732a","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202012258.0.tgz","fileCount":27,"unpackedSize":1649630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+thhCRA9TVsSAnZWagAA8s8P/RxwpAgWkTTonqJoqz8k\ncLMlNgc0GXwhyYMOYY+OBySlm1nTj1RAkyNajfMyGhC2fvoj/WFp2hprjU8N\n7lyw2/mfbwA6oSsb3Y8zzpLvNjygEeeh7ovZ947BjAyCLCt46zC4Ong0PXGV\neDDL15BVRbxB6R+I7G0XW+bEDA9Bib4bQx36kx2rtBX0z05dGvYzGaguSihw\nCddkArV0uu1todBzeWNLrX1TkF/+XAucl907RsDwf8lKl0eUO0xi/5jvmQTq\nlLgFEhQVWtXbg8308vw6Q/tZwTk3PAnwHoWH/xfXicMslygB+XuBEbqx1DaH\neXcSbeh4NEb1oCCrmK0ZcROUs/rH52YemY21SguQNwxtqZMMndf6R3Pn6TNN\nZaX3C17Krfu/xgRAek0cYWEjllKUa0egSlTng2tVbUEm8nNLpLLrxcVX3oSB\nEFtGLOt/lEZz8I7fJYUmAkLin1NSMksSJdSgprvhv7yyxLAUT69xQkrA9JJf\nwNzFBUXzK1OnbV1hgoRGk5Wkj5dOIgX/dHpp10chS1tKfOOYz2bQbXDSP8hV\nVz3K7zsMn8gNEU8sWZUIUYuDo//CJhFsGq/9+KtSaZFalbFZMfZ8sOnjO0lR\nEvtLGHsPN8ZUgFpdVD0HaZAdQ2C+ZqDt7o4zeQwRC8Fo9oX7CmY+mtHEuTFM\nmNdc\r\n=ypxb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG5E51Ma5UbYBh0T+jwdiia5ad2UpBEVWGjUvLQFtKODAiA9ZgAlFvxyraYexjrZ4kYV3g3dWQ1HLEo5Uf7WsIhZzg=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202012258.0_1643829345528_0.5266326822326743"},"_hasShrinkwrap":false},"1.2202022130.0":{"name":"@bentoproject/timeago","version":"1.2202022130.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"76b8fbdfc923fb90c4ecf4dededfbae0a5978ff5","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202022130.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-I9UuQUfF+aw9gpeMVxET7AbVAIZ8bfqUsd3EY8KzTIQ5fXbZ5Fxl6NqEi8K7D/pgWcp5FyxxzEv48rW4vVIKsw==","shasum":"6b52a79ad93ddc0325bc1d965428ddb9e525a992","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202022130.0.tgz","fileCount":27,"unpackedSize":1649630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/AmXCRA9TVsSAnZWagAApGAP/10HcsXZZyhXEwx6OtYG\n/8j8lFJon9iTu3EVzRmwaIExYKjtp21n/ZDlGa+Tcmk8jZIgRhd9G3p452Uy\nlDLEQsv4aV4y3b6iHx9+j9NY5E2U59mNOQRbPMqZ5LfHJWe7qr+vEYqxEmhk\n4wB9kpkKsFMSaDCtDtz/8VflGQ6GDsudww/HNErlU1S6JZ//1lKW8WYJRtan\npiq62oxG2q8zyYydJ//5QoJYh5V8CKF1+sf/luxCoHDHV9Uljp2OfdXDNeEA\nw+dDxfcagsEc512kJrVUDCh4jDOmnap/q5mdUJ5wLMOqSiwOZy+cTu3xx3tr\nVHp1A+2nxjOOqAvLzu2Y6qcYkSrsZTi77ePcWzkV4SMLU5HlYIBmRbvpuR6Q\nvjul0Lch6Kr+pl1WwhR3MFGUv04SGjjytKXggT0jjdlSD0AmT2WYi2/f2FCp\nrBsrPf1kLVZswu37nGWCIzlUjuhHmTgn1g7CiVLR/s3WXESumxDfOMMJG+7I\njoj98Rqnq7xsa+GZ7AKmMYwjzAVgTRSpo7y8wMong3BL1gNV3ynuciuKee+Y\njpw2PJBoxqjZ6G1tM5NZmwqSTVw3t7Wu4NREsxpu8fPz1PnvbcHOrpa9d2r9\n3QfOv5YsGJ+HszDOa3uHqOshe7FbiVBZb0bMVI6CQI3yKUEHN4VgZl5fm84N\n3iLL\r\n=S3fS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDNCwxdZwEIPXEQDu4jqkP5YFve72UP1otx8QyDYVWdrAiEAhJvDeEXKJ+HAwq36torrAVTBg08/tqI95vo1ZuVLw5w="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202022130.0_1643907479110_0.2564102776560109"},"_hasShrinkwrap":false},"1.2202031816.0":{"name":"@bentoproject/timeago","version":"1.2202031816.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"b29dbd478c93a5298a18f8df14e6c1f5184879e3","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202031816.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-GT/fX8p8MuClX+xLE/JXtJnBsfuAMaHFavlJVODj6WCUfEj3/pdEg4Q4uW2mi6HdwelyxG5JHurubRVlQmRKmw==","shasum":"bda94ab41d6144c2b43f54294ce341c6b1d41b19","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202031816.0.tgz","fileCount":27,"unpackedSize":1649630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/UrpCRA9TVsSAnZWagAAbroQAIlrbj3EpCQ60dRhYlKI\nl8PaCUHV+d2raMeg6T1MQDPtFYy3E0czalmR9ipTOchMZ/ABRaxkjLKlImo8\nKD5bUk7ud2n3yzciTlLHnWj1VNtFof+WClYnjXB1/p5rlnonkxbjBc+aEXet\nPbBnyoDPdAr+TtLrCvmSqDAaEPyfY4c9Mz4CZdIP1KB7TL7Wzt14B/2pPi8Q\nnDfH+pnK8S2kOIkWy7KdZD1xF5FlX8nNPFfb6gLWqsbLTy+sJh3ibvH23cCa\nrmuBuYDa9BjaSk79eg5Z34Q8pHcJQWNa9OtfFrnRDOfwJQLHcF36bD9zYJdG\nGSZX5QtowhHdNYkuXrn/70X3m6307saQuHoRG77yvUN/m5wDlVd+W6y1kOSs\nDWdJAj44P3Xc4Efp31goe5VYd9DXKLTEFp4O5M3hitl7MbhoeAjgHMJz8YFC\ngRitBcrq737KiwbGrOOS583vqgD6/h5GVGWVo7pJM/mOWeZ10AlKL6RWEXm/\nZ+AVrjdtUxxEUpTFb+S1s4MxtT4ETMKmwps/ASY8ARMT0fKKvkNbVnVEKPlL\nqYb0nkt4FytmC9igxzxEru7BEf2x6FytsHcgvKIceZJ/NSt63J1KI3WSx+T9\n21vrbHNJkp3VA/x+Yj/My/4tEXBrsL8JkvqNCahx46U4XKCTh/jb2KKOl2E6\nAUmS\r\n=3/ma\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZmJJkvWP+t5ofU4k6eTqGiSR0R/cAqIaMB+Fu5rXRcQIgB3ODEy+bAu8rh6IL7KZmCEH/Xtq9lkWeV/K5csj4sxk="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202031816.0_1643989737064_0.49710617558558345"},"_hasShrinkwrap":false},"1.2202042210.0":{"name":"@bentoproject/timeago","version":"1.2202042210.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"04d031e10759f2ab3f4a10cacd2b776e3de93812","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202042210.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-i94vKuRzE5PZciW4Bsn+Wnm6DN/gAJm51+ofNEaIxOG7qxV30qkBcr6rJ57F/hr9iYIcjC29erGDNT/6TzEVfQ==","shasum":"bb95cb2d5cd0ed871ea5ed95c252eaa068982722","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202042210.0.tgz","fileCount":27,"unpackedSize":1650210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/kDeCRA9TVsSAnZWagAAREEP/AjHV5qVTuW4DZPwS6lO\ncZYLT8N6z3GfpzewJW0rBntKYCzZfyYEaQ2OhtQ5/xmFizCk6akfONJXZSda\ntlKsY+O6o0LR9QIEo64p5k/DaaOtmTnbXsWDfJcgyrDhLZTq9orc0nTilxKP\n75WUpJS4TlIGHlrPn1ZGVsrNRS+Ds+YViL+gewpXCTe8qflnWI1P+kkoT15L\nW6mEboAK2+bMU1nsChlzvb6htH7OwQEGTGIGWliTLjUG2yvO2UwoHdCkErdC\nZavU/sT4AdG136JAFaPqNPektxOoBfvq/aA6eERAL9iAhEvKbpM9NOHoCE5C\n9slWKFPSG2IB9JqclMqnl2UZrenzFsNL7ELTiMNxaU5sOT1NsF7ewoP2n1Qo\nfVzHqfu+1BM+yDs5K3c0GDH0b3SaWm0SvwZ6JEPOlVsWgvn1MhOs7+w71IMA\nlzo2+FMiYO2xMazK8ODXSb0UsjTsilCxEwAbD1LkEEvM6kD/7meL5WsZXYSS\nzaV4z6t6b+BJxXFOnZcpHzYJHnnlCwS5YNjmAS76n7cb3pMTVhaSaKWO91ma\n3Ftn/A2NJC8IE4Xo997mSnIofnQtQfZBgF/n+Bnj6LX4l+R7SkVDrrF1yore\nRdsTVBLsRgPC9opew9pONKW8HR1S5H0acP0Lu0/m8ncnvi3FygKaP/tAhqgf\njdmH\r\n=qejg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBZom/IlDC+FO+2mBpz+ECz1Jvnj5rJ7lDOQ1HKRueKpAiEAyd8A5zDFwVLnZ6JY8G++4HDyClL3nLGC2yhpEqERuLE="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202042210.0_1644052701970_0.9082530757648741"},"_hasShrinkwrap":false},"1.2202072236.0":{"name":"@bentoproject/timeago","version":"1.2202072236.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"}},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"1d8443e81e44defe1ab915032668da75884187d8","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202072236.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-gkdQ80TjOdLB3+dgZWpGEGJtyy+/qGIoJfIfLl1wSYocPtBMorXeJj664HFZ9GrYcA+TwzwBSdxX/6qq/n4l2Q==","shasum":"33927cbd0a4616867fbcb8c5992036e4e8bba61b","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202072236.0.tgz","fileCount":27,"unpackedSize":1650210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiAjZsCRA9TVsSAnZWagAA9NoP/0UBuGkQxxuSO3HCrD01\no9RiO3vuf0PcvEPp/8noLgERJdE1Fr55CV0+uj/mU+wW12gYAR3NPVT2diCO\n2iXHfpSsDizeDJDT0Qk4wo0Hv1X23lSWoICmHSWskaSusIDZKIPH3/+4Y9tF\nctjpPsHqZciBRCL6lG1glBIbKnc7MfcxjAFNqMFjeK7Ek+T3XO0U+RUEEED6\ndAlQRDcsGriv9tT0eKIB28eJyh881Yqb72REso1GvyzbPXyho/Hk9+G+47IA\nrvPxlWgSvrXR/is/ENBuw+k+OuNH7inHd+FoqEhavT2zwOFNQb2QB4i+RFYh\ncN/8Wok+dcX/V88PXb3xHjPPk3pX/swIVFzF1Z89oedl5zgxDteHT0/OfLVq\nsdt5YZuL+NSPKdNfcS3lfhAX19TeXfUKFqku/qfp8Ctsxsj0psMl8WcSxfpu\na4/QHspGumG0eSh+4dtsrkuj2UOuucLpaVmLlbzaEOk7nB4CAPRF78s08tvW\nyMRGSOSUvlUEe8dMG1G1EganOjFset7cj4aFLcXwQJz2wN5Dyb5knkLbuSPi\n466M7aGamqeW/2IKjqzYh1IJjC1RZu+Jbe6y/NCy5WkdnW/Gh7VpBRyf8U7W\nKwjdjI5i9lJut9PVnBsCCJwTp01O6OoZ+ncW/xsZ8lfOCixuM/oBGvofVOdB\nrUcX\r\n=VZFb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRHLTNpDz0wEVS6eBMtfBTiMgqs4kqR17tAGXMwEXWrAIhAP4icao5VLq4JU6H2UfN9lumiBGQTdDP0c02iYdKLp87"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202072236.0_1644312171951_0.9487784113438693"},"_hasShrinkwrap":false},"1.2201262038.1":{"name":"@bentoproject/timeago","version":"1.2201262038.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"cb2af7d382510037805d85242e3f21a88654a20b","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2201262038.1","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-0Bs8ILAJcWV+z4KGtcIwo2KpAK0GPv30qMH2mvWUyg9bVrLZMc72cySwBDIN9yqA69fKEPQbo0hBoN6525MSFw==","shasum":"119f77c633d346cd4b5ff8854191afd7c76bb3af","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2201262038.1.tgz","fileCount":28,"unpackedSize":1656925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiAt1bCRA9TVsSAnZWagAAEJQP/RN70W2h5wG3x7du+HSn\njdDGsceEd+Kgs6+Y91YLNZ/42h8yHQge6iqHR3X7nDlETNI0H+z+LsXYpEUD\nVfWskXMibLIsgLHFISFLMvsLj3f26P/GEexOIdnRUF18jcYIvTlN7U9tVGly\nkRNIQk4dBlzzT83tIOy9CvPzePqUbsdCd3KD48umeJ8yMgDXZ+9BQHDlH4gI\nC/UvlxVUbgJMtHuhV90ElrPb1PcNRUHy4hBC4B09uPGTe/NAEf1VGX7rOFh4\n7dBBtbLRML/EH4idIpe23DgpqxQ+bnNMagE1HnkJE0y11vq8Czg8UO3/+DMj\nnKVoF5VSnkVX7YAI/awES1xH0GxJNAETcrAxLq/iMLdMwvkZGi9aOyEb+qJU\njQMSBsIWVXS6N4+yB3bVlQH1Y+dn3sSpHioBFegbj+jwq1JiOGyVBAn7H43S\nHqqciWr+tdXCJtxy4t507fLssAEom2STDV9fNV1w5Btw5ht+oGGV2IywKkwg\nd2e57F3H5rhUfGFD7v/20ITAGnGS6ZIemx/WRDoJ0NIjFUMA6lG6s+BsVnFc\nL+vPfKSvZCADl7ed4rYCLrQZbpBxtdDnO7FBT1ajNS+l3gdyraFZUMLIDeBZ\nhZUa99awFd/LA8wSvdxQxmJGX/J777JKkVAWeR5VEuHANIp0xcb2Ddaciu4O\nRJLc\r\n=Lxi0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8860IOr2BX2bjGXgo8LmT7GPoVuTHG7pmLXuw7MAsFwIhAMZhNe9wxlJSjvqQIodnK+9XE2u+asRKqeb8ZTtQ5QqA"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2201262038.1_1644354907034_0.49670321542486384"},"_hasShrinkwrap":false},"1.2202082004.0":{"name":"@bentoproject/timeago","version":"1.2202082004.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"572ca92abd38a7a42e381c556e12e2d929f26802","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202082004.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-/x/FIEED3xV1iJldZQW2YY2eEGdZm0bt08zYKM+MSoPz0PSmdSEnVlIK3Ks4YpmZeOTn8N22IJSQqxVaTZxsqg==","shasum":"2a040399ba12747ecbe436e30b06c073e329c56b","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202082004.0.tgz","fileCount":28,"unpackedSize":1656925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBD3BCRA9TVsSAnZWagAAJxAP/RUAC5iDNwODNTMQ9nz8\nvT8Etstqo7Uj9Uvbr+F6+0/2D9u9oLIGKInWBEUQRedesmvrlcU3edNtMGRo\njSESDxtCWFti0cqvOpQMrtzEhRPG/uHISRbsbpt5W8PFtgpKyZtruexkdSNK\nPM6WRjorPWL1LqIVv2w3lNUxSLy7gH6l2eoNToCFl6Qrlkrek8Xi7VxMvR0Q\nJQqhj6njJ3FBAO9AEYpy6N3giLEFZHEnjHzfqNYhhEx71qe4j5S1612Z8Mh8\nJSDHJ92jVWijcC6I+NOagUz3NCKhmUdSudXCPeGg/47+ML2NCEALUxVoKWRG\nLHBk5qSj0TyES/jV2Ss99XkqDjZqTECTZ3uow2+hzbMnlf2pw9HHF53vtK58\n0f9IVdel/M9xJTiOhPsNJdeLmrx0RtKuK7AJcVNExPkb4/SaBisJM93rPRqg\nbNkFzTMn3yU7MoHRv3OgMfUgVWNvx5yd4h8/k2yr3SoDHW1xNEPp5MijRk2e\ndaxlqci4bEpgZeR0wiIOLGsyXwD2wKVRA8asCqyt58RZdfoWAgGyieXQRf4Y\nuziVj2PTlSMH6ZN1Dcon5/8XT+C913i1W3xAiBXHqsrhLactrEahFRydbseW\nkDGT49LTJ4TPtA84hqpRpih4gtWUWhfZ3eadB1FJhPtR9lxci14s76q69Dqo\nkUme\r\n=3DrQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHyeJXTp9HZEI3YN1PCwiBOlT5IbZRrDF3dSRoXuhhR7AiBPcSvGWx27vw8lRwqPaEBfXNWFE/LsNZ5siVQfNej/ew=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202082004.0_1644445120826_0.5023443543356336"},"_hasShrinkwrap":false},"1.2202092050.0":{"name":"@bentoproject/timeago","version":"1.2202092050.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"37b830a030b935fcd922e108d5afe28be61d68c7","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202092050.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-QsR79PPIjshLGz7HQulhUgAvcn1UHWUIoZuBT1ODh1sMPf1MW/M/5pf14w2o0c55s+uIrmMvo3DhjxMOuvsO+g==","shasum":"e7c544fc9a1312bbe374da51a042e6d0d7d10773","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202092050.0.tgz","fileCount":28,"unpackedSize":1656925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBVKXCRA9TVsSAnZWagAArsAP/Rcgv1ifzL9lsIUDiiZl\nKpkEkt6tvzbt3Qh/f0i0Nn/u0pNh990nSo0SEcl4QfDOXFRZlbY5sLG3ZVxH\nHmXRDFz0KgxcsiZXCGI1XFKSccDFk3vfCszWa503juSfi3/jfTLFUHLt+bRk\nFrgR1KNKLIAp7Fn+AoIVaZKVK5BqlUZvbkbrKsXMnAOM08f06/6hIiQtv8qo\nR0H/uBaxw4VT+DOkwsy0ehxgYsozZdHdflq2epvxte244h9TW8rznGnNM1zn\nU/f1GhxfErnF6151ukvLLUR67luu6jgIcZI/eGPhgPNj9+nG1bGEl5YIC7KO\n1eyNkKmPoaoeLGnKRvrKcB7XprNDW7cSLAW8KJwkG8/huTaQh6xr5fxKMDUb\nsFCTCP0gLpZraleDPZeHZEu3lTScNq68OkCwsP1xo3Zq3Y3AFfL3VKlcJkpz\nkviNxkuyyijOWOkKTIz6x8+vRzkHu9EQ9Fq9F95AZUDJeHnXlkK+d7s+/Dzn\nHN1D5cf3XPxRVhPRNJ+aP8+n6wE7m5uewCjYZnSGf++rjr0dNsfqMVVvktnO\n/JWZ88bi9u62fErBgZVUzElFR+aFxk/tErhM7xRbKJ9SraZFOxE/D6v+2IQa\njI6ACLPMv68868gRtB4/RM9k6YPP0vh+rMKJ5RZCAWmgGxdenVLfRBiPbCOe\nx2nN\r\n=lybI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEswrr30ZL4JHsLRqgIJzaGW7boQDe4ayKF03Pn+ofd1AiEAidPDtjjn4552iBWQviZ1Y4vWZB10Yd8i3SeXwfprXUM="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202092050.0_1644515991350_0.7881617455294887"},"_hasShrinkwrap":false},"1.2202112230.0":{"name":"@bentoproject/timeago","version":"1.2202112230.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"42cc51fbf53c86e33b0a12004dfe9c35b8f5d0fa","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202112230.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-SyAfroRF0A3U6kmMoFp3o7y5wlvl0LaOVmw9X0MYpdvjznPGM4XTPrJl0mD+yOoCHJUWhFBhwIqg9QVsXT06WQ==","shasum":"758ae06ab6b682ad3daf3b1f1e7dba9fca4f7d9b","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202112230.0.tgz","fileCount":28,"unpackedSize":1654609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiCsS9CRA9TVsSAnZWagAA//0QAJ0tTKVnU/cF7hzcS69C\noLHUblYhJh08BiZlFShE56CYBblZpWy7Zt4T6hQ09vErSnzsH6Yuqeox60t8\nYniyNMPlFfRMaV9rGwYZVESbYRS9c3948XGHhUGU4nzu69B3hp5K+pNZ/QWr\nC4/V4n0Mz6Oovhq9HaJuWFr1behbbFqWaD05rrkUE8U9rGUjpv6BUlgr3KHG\ngwysgFgoSYo6/cFfnAC9ahPWyrvExxmMjAkMK23ytQRO03/rvQ2fbLKAKWN4\nxUqcPrt0paNSVJWD5VQ8pjorrKXWmuxPtfFWixLeBw29FOV7qae2Wt4hd9o+\nNuyX8B4oXc2e3AZV8U7yGUnXV5ZDTkIfWc+4bioKoPN3CpGUBxgJ6lY/gnr3\nf18DWAOnDlhZIx2N3FQt31tAB1Lhvq6GoLltS84yeA0BSu/OBUqU+xxVcDjH\nSVswlpqXLLv8bWGdjCEE1PM3U6wlcej31zWofB9X1tBJMh25fiU6SorWT/Ad\nmD7PWMEq20MbEUWddPXbXve74c1QteGYq46wxVXPUo8sXHZKZF/NvCze/jzV\n85Ov/R3Ywk+VStLlklIZB8pShEsg52+xO2v6o8eeJ2Lhml9xoYHHDxhC+GXd\nrhdPUH/ZRADAqc1msUuSLP7VrQtlMMUKz9evUi18VEIrpayJZyy8+gb9ReQq\nUz2s\r\n=Hrat\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwa2uHVHMIfsj3HbPiOmCW1mFXT3T0aiFrvxerkzt/vAIgU6vG8q4G9odqPFf+Yoa95/nqqDCwQS1rBs3twR10f9Q="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202112230.0_1644872893417_0.8401694765439707"},"_hasShrinkwrap":false},"1.2202142035.0":{"name":"@bentoproject/timeago","version":"1.2202142035.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"4bb5570c3d04ec8e2a88418e8ed8b420e5b31ce2","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202142035.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-Rynx0S2emUr5dzrEad2QnwLdblqmkkTZP8d8yu6dqqQ2FxAFpGASLdPltJKgfGlFItkPJhE10Qyq6/KnAzOJVQ==","shasum":"fc2b461a9f9e99c4317c1b0fa46d958513e7796e","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202142035.0.tgz","fileCount":28,"unpackedSize":1654609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC3ISCRA9TVsSAnZWagAAjzsP/iw9eUr6Eqfj/tMx+byO\n6kDVLY815ufV9mSTa2/DF3gW81n2F/ADgU1tk2lu2R5x2kbmwPwlnyhAk3/B\nvu7nUXj0PPUZCtB3Oc5YODPirW6TCAyJ8B+2GRkm3tmiBQEyWA/ofsMH4Cye\nzLzx0DPthXA8aiR5Ghq5zGdFOrHEdrkXjdIqyPQE0MWzmkIGacdkPCVisMSu\naXBmCEtk1rShJvC0nOQ40Ef3c9w/EvhrztaLwcmp4Wg4F4ct0AK0bUPCz+yQ\nC2obB7TZxl3xkaMj3L8xJ+kL6kMBxZH5HFBTy+xwzFyxAeWTIxOz7rLpev2L\nQrQ52Y56wuQVVCNYIT2ioailsBT0hG2WsYm2xRgdsvqAyMqwEcZLj7Yy/Rbl\nuCQRzBpIA0Tsi+fE7vBt4Tlv4g7wv5oPS9f4dg6RA2xLLK3lBnz79yeqCvms\nDCiSJsCuMr8h8wSaWAHICVmXm7JfhFmTqvSNqpcoItx4519YeKNwv2d1P26Q\nO9FOzyT5Y+l2LeS1Fd3m5UHflSaKv29Nh82LG1wWaUF7+SUmwIb14OkRKuxo\nQlpTOu7fZEDE5+I67Xqa6pnUIFnWi1xQDfQ58k+t15LUUpxgBf18u9IAZ4Ji\nra7KOh1RChC8DFpFzuXdTreJdTw8q4wt5vwkwBWto/zZpX48oud1uvmEcO4/\n4Zns\r\n=FiNt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFReAQpgj5sCGsckZZ1QQY7BxwT7yUJM11T+JyEXdO7OAiB3M6n02yeshsJKNpGA8OwU2Gi8wx/Vx6DatbLS8zeY2g=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202142035.0_1644917266137_0.7530427122812606"},"_hasShrinkwrap":false},"1.2202042210.1":{"name":"@bentoproject/timeago","version":"1.2202042210.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"a656b221ffc7e0c9f092bede5668a546628e9512","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202042210.1","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-tKSQOR7R7lOujlugUwcX4lDnwHXYsP5w0cnyVPhVx/pRB2/ySlI3wiswuru1fRzRSTUZKauYxs7l8O6XuHiDnA==","shasum":"8349f892cfc9a3c35042c79f5da6c83a9dc00e8a","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202042210.1.tgz","fileCount":28,"unpackedSize":1655130,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC/BICRA9TVsSAnZWagAA1UEP/RADPdcVl4bdGr/7qfyz\n3k4qKjzAyrC+eMwPjwGWgQMxaouy/Pql7jScWCiyQLMP3LMfuYjMYD1sLmw3\nIOOX7S1gyIyMrDFWsOw5sFh92lXmbaSaIfxtPu3qsnmVnFzBgw0mWaO1h8Dd\ntPh62Lm4FGi0cXKM+LNmhq9zjyUD0OKfz+oecc9DGHqcA2Qoe72NboHG2Q3G\nvL/nlDe6pKb3aH0Sbe+P+6eGAX6m5dYEK9Vv/4povfpvFh5nEOCpcdAqNAt8\niuUCljJ3GbUch0tG+ftDhdUM3SilCeYB8pcO9Ed8m6ZpXGvvpC2OJp9KDzDk\na6QELr2/Hx/+8E1gJ8V3Mz/vF0jI+rTVN8e9JkB9u0OdPhmc+iGJEmsw++lP\nWBcPpQFRRKiEshp646/JnfV8B2AOwg2AusE0ZImnB80qcbU6BnngyoPtG9G8\n38paeXYtJndoR9WqD/wiNmc5iVT8xP28+afU+YgA1xWCkqTt5c2OcOj4iHyZ\n8i3yZCXz573jJvDaFGda4Xd9Szjs7UmZlSO8oYP94EerSHexjgagqqiteGbP\n1C8gEemwD2oKbIyKhoQSQL79X6T+6tFKqWqrBmXT7wGJnm/GTkXTkf6vS89p\n20YEBDYCQrtcYc21/qDibnNXPI7GOi3hIr8oHgJf+weO8Bkf5n29r7ZKNcsa\nVcDT\r\n=Axnv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICrklvQGV16uAlEfQHbUnMFfb4kgJZK/fLpOjPI/8ZYpAiEAjmR6siob1Jv1Vy4noyA1gMBiezsGjaQ9MxhBK0bTfj0="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202042210.1_1644949576626_0.17540608138746183"},"_hasShrinkwrap":false},"1.2202152253.0":{"name":"@bentoproject/timeago","version":"1.2202152253.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"a50f1711cb8aecae95387e7f6b1fd1862206166b","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202152253.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-CDDZT2lZ+LW8ytD2fHrx4PBnA1GK1EOfPjK8YzX4EO6D8SKMP7ESbE48F/DMsl+ADzfO2j6PIXjPyKIbOArt3Q==","shasum":"609939c8e6646e186f741684a7ec5fda8aaa1166","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202152253.0.tgz","fileCount":28,"unpackedSize":1654609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiDL+5CRA9TVsSAnZWagAAK9AP/ihLdmiW/RetLFwg34S6\npxEczMWGXvDIBYfAs5gJOj3YCBlG4H06eK7SEsO54qxtVenezOwL/IZXUlKA\nfll2NHxVpmallX95H877ty+roWlggktilsAwGiIJ/skNcV+USz8ARbexdVVo\ncRjS1rRL7fiIlhA4Vl3/wf/gyjJ/mr34xpL6/E23Eg/nnwZPIa5CJLkgQRe9\nf4IVj7ZkIyLitUPM9+JoTp5AlAGow2u0wuW4KIO6buq0GzQ6/Lww40JA5Vq+\nJZmbl3SoYdPMqEpFHh8BnnjBkdw/JRLs46yDloW1IxzgK/28t3sd4K48lV9m\nwqCwbo2g4gWkpN5u/i6XcetA7NbbKplwORm1pHvZssxhEbGtANzvgCdIvgV1\nFyf/kCabYbvFjzAxCc3+UXzN2ORBn+hvprRUf3g17tqTxVyuBGIU+FqMLARg\nIJRpT6zDDI6KgYbiXejV8s5uqtc3GRJCeC9P4n+lMsoUHswG99VJqiruyUvm\nBcJgU/1CUY5E1QEQWWD+dWz16Wsnj3me2j+hmML8frDWFXZ3k5UkUFtCRM5F\nQEFpat2zIHpMxPIxCZYIPA4Wyqy1tHOu+pdWyvFuf0AnchMgryMv9C4e//HD\nZFAtLyJ5jg47sSicnOPhzFJ6hHcOR3IliyGjH3gL9AltX92IKS7SnK8XQboa\no27X\r\n=Xe4t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDll1OO5F8bs5zwyvpH6QUoQP+W3nq00XydZSPs9bO95AiAz8x6QbL8IKnUMRcUkKiOuWKzkD4t4bqiWJt16x5lGDQ=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202152253.0_1645002681687_0.5768172222237518"},"_hasShrinkwrap":false},"1.2202162256.0":{"name":"@bentoproject/timeago","version":"1.2202162256.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"7548b64f77fe070829e46481b6fa247b8813958a","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202162256.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-Cfirf06kO2ocspoZSRkayt0+uUy9VdKxWJwvK0xVUjiLutCHXhxDnH1hvqQBK25hBha99pxIE3wHxpCwUfy6Zg==","shasum":"5e95b0d6cb49f55bdf6324732932157b1119b50a","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202162256.0.tgz","fileCount":28,"unpackedSize":1654609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDhYuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqpZg//V5/c0IcCEAb67+KZgm/z8UQsb+VjjHR+uyFF7THC+tyfYxQ+\r\nQuXTEHmnxMuf8gsKjIF95SLnl+zqWBnuMXm9cb6NOperk9kmrL4j8rV3h8ul\r\nV2XkpEzU2wMcxPxtxqFqVJGRVDasJoXaIcV4Ud8mjpR32243ova0jYpdsLmq\r\nOwtZbmqyoLwt2YUw1Gn0LlDLCFwWMvkH4V64Dks1crCn5rChRFo0k9p0k/O4\r\nLA9R8JOds/oG8gNO4t+D59Oc6V8CBSOkRpx38NGB+EeISYoSdPQ772pbHSib\r\nxHu1T91mL7+k6KB5fITgbphiIouC6F6HlYKRbEDR/ParvKvDtx/L6g8LDUvT\r\nG5ahfYJM8zqVtpI9miK83D0wgkInasI2eVwfdmif8YPXGg/ICTuzybA+CoXK\r\nX8ZsuhLNvd6kGhRT78zMPH2TlggfVUqhckM9vZZFzyb5QgALnGFyAjrKNIO7\r\nz1YL/P0QrcSi8ArhPWZjtTTwRPeVgXEYNabl7eDhzqoP/vRmxUQoO/kVq7Kj\r\nyQMsGUeAJ4AmatIGp38MlYC/1LDONK7yXZGwDHDu5a4nvM62mahBDheLJdWR\r\nW49QoPTF7Znz9rphjxrbC+4ehdv0h9wo0kKRVGY86txMlwIMbzRakM6fc6nb\r\nJPkqEqur4kmqhgsSqX7QMmVmDzsrz8wTCMQ=\r\n=Tpcd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE/JfrBZjavlhwPoeFRmHJZQCVwDumynh/wtrbUiNCrOAiA+UHLdhSACUDdzGjKc5uxqvTxT4AeW1K9spaCylNNt9g=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202162256.0_1645090350092_0.7637152022571125"},"_hasShrinkwrap":false},"1.2202180255.0":{"name":"@bentoproject/timeago","version":"1.2202180255.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"8708c2591965df37c54fa25ae829421f10de58aa","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202180255.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-C0XCpmGhJYR5nmQpWlo4mRli0znfK3NPmGF6+Bp1VB/kcT19OODgKccrDR2aJz75VOEIZmkfBx2vtLhSEAFuPA==","shasum":"35e7861b6a17934e53b22eb47a9c66b166b6ff23","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202180255.0.tgz","fileCount":28,"unpackedSize":2746381,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiD2qkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpykw//RkYYQv+9Tfg/S7UYX87+5xO3+Grt9LQ0V+1CKysvwgXHWyU2\r\nXZWA/AkKjhDRnBVZeOFADNIhgR3APp0kmgqk1OoLtpuT8pqan6GFD02FSxbq\r\nnN4AMgOTite/Rk8mYcUAVCid/RU7mdrCqr3JqEnBkrzrbgBH1AM9CE+pCHCO\r\nVDIvQP8EWDl7syb9u4VI5mreaKTL0zQmix04lgHHmHCRm6Y+WDZh0bF1g4DX\r\nXsONTS5uJ1XRTFH8a1pI69Qj/Ld76mHVbJV5rEz4Y4r8QhaXPGo6dUlgfzc2\r\nhEm8Ms3W4ioOotzgzceMxltkKHiBdl5mKBS2kHfVLStQZT25pnPCWHPCn3cT\r\nahMVPfTnQjN3i836Mc5pvmnvpYJamyre7xWZcrJSAWe+W6IJOLPJsaHtQnP9\r\nihyBpi2raTnvC7HvBCsNZCfAd5Z62aibFHKCpcgCZJFdTcKj808qDOedS2rC\r\nL+kr+quJ0IQP5IWIXvDtUNuzZxdMzxiWiyzJLfqfsIYqa0xsX/CeyjvgNsa+\r\nkZ23yuo/p59wXyzFLZYgmUEuO92IDmuegkWif1Jen3wXnOrNBQv9rA9qkt6Y\r\nWypnIvBMkKZfBjwQI6UpVvJVN3Kw7jRj+ZLz0Pfrua4NB6RFUnHOdk33M1iN\r\nAR6rD7R4VRwO19CtWsU2T9Qr5FT9qbmpZrU=\r\n=lQID\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCL1FnmDee2Wa0AYFnJNkYYX7fqUxKe5b2rwozJ0Kz7WgIhAKlyII/34bDi9DpFBMyy0T2CC2Q01sLhlMxbQF9FDO3F"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202180255.0_1645177508093_0.5602969148637429"},"_hasShrinkwrap":false},"1.2202230359.0":{"name":"@bentoproject/timeago","version":"1.2202230359.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"02e5f5f51d0375b35a2a20b27815ab79d9767e51","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202230359.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-qzwSVQ8gCI2q5hSTsTFcsdJJgr3GvfjZqG56xGpS6sW6hkUy2Ph07qH0TI3BFIXVy8FXQ0XxEkRbgCaxhMU4Dg==","shasum":"f706f701a21654e57d88090d816efb58ffe6b3d4","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202230359.0.tgz","fileCount":28,"unpackedSize":2746910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFf6PACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqr8Q/+MZc/ANq0ilLjhKiGrGs97kKlId8loaT5Eh9OowLJiDA0Fbn4\r\ntwsstE6p6zXduQFdjWOtJW4s9KGfDLkzVFoyOveDdQDX6wSxs0mMPxM6h2Tv\r\nc+qVOqAKo1MYX1m9Q4Y37x+LanhG1O6qcU0fK8T/bx8uXNVQJxHM4dyoPezC\r\nykXkS5xc4fV4clA5cd+rZ0Jz0JpvsojVVclZQrAnBklLfRjb1ryTYbKoP3nl\r\nmFt4u5NGzmpvWsEajo4hYFBGMDL1JDiz8lp0UZe3WGGco59HXEMyi1AW6YFG\r\n6NGGVFO92Lk4X93btOAX/lFr1EVOciCfzo6UbGdbDSM6ZdwP0oIJKtDmm/T2\r\nJJ+pihaQOo7QQ4ySzwVvEcEF5/7wufuaCyueklIHzlocM9ZqqHRhrwBu9x/b\r\nXMKp7eyi0gQ8rAyBEdoTlbeHJKBQoDKY2M6jTKHVT38eIRDlY+RnN/zJoB2z\r\nM+BfvSrPrZZRPddvjEuLjAXXnvgbF7nwtApcVGKo3o0WnGLK/d5awdHxXhod\r\ny1hkwRPBwFo30XUSOWIlt4e6KKxY6zwNLQi+GetpIky7cWuZtNttooeYhUit\r\nrcMFslzgIf9kMl8mHANc6T68znNzEvxbR1SvBxuZwR93C/xId/02h4L23kBr\r\nNtoIMfXBWI862Pcuw8VzezhLxykshbTl8Vw=\r\n=ADMU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC3LF4qaT8aKCo9s+SQssaBlKr9rPP2GuxRlVP193puEAiAYv/PU9fchmqc13cWaScWShz6fXL73pjUazUnLVQRZ2g=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202230359.0_1645608591337_0.35818987715797324"},"_hasShrinkwrap":false},"1.2202232232.0":{"name":"@bentoproject/timeago","version":"1.2202232232.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"66c8923bb334f4cf267bf8feebf822629a9129ac","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202232232.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-O+WPeZqbSeOeKPXCGYGxBJU2G7AJp/MRH1y9cS83WGzVepUJvUfJpBoGijFUGRCBPnvPC+b0ooWmAfzfIn9LNA==","shasum":"9aa91b52bf52fbb5100c3f7ea4dbf1d73b7d5219","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202232232.0.tgz","fileCount":28,"unpackedSize":2759740,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiF6NdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoa/g/9ES1i77m72zzmAkXYJcgkSGViXDYfQoAAn72q00947yI7AxRp\r\nldTacHfhVzApR0LpJot20jmgcd1K4cZ+AIE8utlg9LE3ckkMuH1pbkJ1drVV\r\nvVa1zbnP+5rLi6bI9JOpBqeFrsmkBFp7uxUYBR994OrMaaKOgd1pqXaNw/WY\r\n6rfbl3rY7nZJoCNWZqUv3YKqk1RmyEov0b5W6+xfDJ/DSS5wfOrCYm9CZLQp\r\nWQHzPhRXwMzH+Keq5fJ5fiFipfV3uU9d9yuEM+roFJbu3Ka4YjfQWTVHj0Yh\r\nxMfY4GfG0MCp3tPpFjBQ9kiCQOVLwClxcybXiH4gckwPTU8/qxxpK0kz+doO\r\nGwhmOiiDaATMT2EJ8gbXBFLumQ5xnEHEZ2vLXN3c7+GGkoQ7ItEcK2mDDcXI\r\n2KoYRo8NH66+cCU1Xkl3KcUczNFg0wW+rypc0iBddfLQ4xrqgyprfDphXtGw\r\nhUk4aTLXsWL8534ZdbT+rx1PHTBjnJZQ+p82XNa6e3xnk5XSrWi57YJNRi5I\r\nVf2/IjPilXKTdxKx7A5ASOk+I0/CjcptY38HmH5tBMLp3GsZZ1P7DZSoqwL/\r\n+KHvZd/HJze0wZAIH8bkPX9YQ+FfJFCYmSsZ2JNM606zUs2TaeZ7vLu0oyX4\r\nNhLuWp9QcMpFzZM5TdDpB+Ocg+whMNM8Ltc=\r\n=YztA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH3WQaoCou5lowanul1t1bFLpl2RfZG+VSAuuSYwgzGgAiEAz0Z3z0lbvOLSXYNp/Wsnuzhb6D9ePOOwD7MSY426KTI="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202232232.0_1645716317526_0.6956217494909192"},"_hasShrinkwrap":false},"1.2202241911.0":{"name":"@bentoproject/timeago","version":"1.2202241911.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"d0f22f13b53d3b67847e18749e07ae4640258f87","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202241911.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-TqKx0XkGtqa/NvDlLhbg+aeyhJZll6t276jRiTUKl3mtAVoJBUSWuf6bv/LTB3AjV8EDi40CqhW9l0lfPmvIRQ==","shasum":"95011e94eda156f36d5f2cb0e897392886834655","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202241911.0.tgz","fileCount":28,"unpackedSize":2759740,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiGPOyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp0IQ//U49GGkNer8DjSWskuUYgJo9/PwB2+XdQO+8EqzoMJ90vakBy\r\nT9fga6zurmx7r1IFmAZivPjFll21OlLIiML+lv5U0idwJy4MblpvQ//lbrYs\r\nEZi38cmYMNqeZ6NzxDFLyLHWv/D0CKKWNzcAx3Qdw0717n3q7MqOIIn2LLw7\r\np7BQqrVwhktKWiXP1ucU4WdzK1eqMXIKMnveqQuY0s6vTO5LGZ9aPN1uEqXT\r\nekfijTNXQRitKXTgV/fyk2cnn5Qm9TBrna6fvaBlPxyxlSFIpEgO9YUHBKtd\r\n4XSfZ3SbDVuBpVXn+elLQOHEDHWPgKHC5ZXDsEjI9syW4LyFMSaRskWEY7Br\r\n3NxTGAsCBj9Nv53tjdo2Y5d+mHg2XfD22+8K2NprCKRIbXI1iNFhNBP9rEyZ\r\nyT81oRKsTyPfCkp+I3pQSq8wfWA+7WMynColXFKJFMFNEMtPN85bEa7xkKgj\r\nIKqK0bnXbprSq56HQYoMOCPdiSIChcX1lu2dnhLJM67wO1kvewtHK4CTUWF4\r\nmrgAHNU4C/kE+rc1I/wz++SC0R9drjhlJWRVd0EmEUDtj/UYIC7ut7qWnV5V\r\nXnObH5kfpF3wl4nzlmtgwW7jQYJYbWeZl0A4nbu8V3RfoDZ9g89ihWB8U6Kz\r\nbeCqEGhO0Q3mkUh6CNMz2sSO2spZy9j/xks=\r\n=F9P2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMQLl/5HF//ozVOVOfFfisfCmjEWXy3j1uG8iKsahvkQIhAISgYol694LiagoOcA2fpohwzSJN79iluBlP6xOMbKOH"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202241911.0_1645802417981_0.18321440284804313"},"_hasShrinkwrap":false},"1.2202252101.0":{"name":"@bentoproject/timeago","version":"1.2202252101.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"fa0da0bef1bacbbaabdd17ebdc31b018e6450c58","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202252101.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-7qt+gCkU4QWqRHBRZTNXNxXVV306mxcQN2Ilk2SkvNvhzt7Yb2yUQQnAsWvQYjSZODIkDl8MYRKf3oL3RJcc0g==","shasum":"4598d7bbd148c160ece5ce1e8dc60a43ceb45ae1","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202252101.0.tgz","fileCount":28,"unpackedSize":2759740,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHPxiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrFgw//Z4FAuP/JhJhm4YGhvXG1w5mnXs5ZnOxschAwS1DflwoRjZqR\r\nLIh40keO6r/hBwlK0wogPHfKuZfsImY2zbDrI4JeFLlbsyTenWx7LdPfHyOz\r\nLEcS2WjGUSnh+cXNcrNsAdVrPtVhYwL5aTGdJl72Iho+34quxsS2raNK46U/\r\nzN7w15CrX1s45nKr0qdUJemLz0vLIVcTtXC1CDJawUsI8FeDG2Afaxr6YVNU\r\nQ8EOynsoxxMLwJYQmhiLYFfa4YcKHDfStkLEg9ZEycR+J6LbWec6hVy9BCgF\r\n8QOw7sYubdgA7XfsWr+WppIV7i+whqzqzNaMREwlwxgebWwUqbOU7pZVdKjz\r\nGuvf0exo+Sf25TWxEIBtEW41154M9jABQs/beVk5lVl4qOpJng56rEVkCe7P\r\n6kARhbIc+UwgGXxTwmF/JYdqaW0WYMmpLGktn42IfZRazRp/PWVtXmFSjmG8\r\nBDGYMyfkl0D+WreO7Vbf3dTDY6h1bhuvPUP5EGurQeMvQTnVTuqp7PQD1FdY\r\nb2gmUweEN+EaKJdyYdf3skuj6kNsaEgCx5dMgbn7R/JvURXx/ar45/cjFXX+\r\njT468PIz/3rXlH9v06+zvdGxceQKa3QAtli4G+SmIK/yyHcgPTShtWa0jB7a\r\nmoebUb4Ei6QjIcu7RWiPaypzCe9hmwOF9kc=\r\n=vIkG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICMIbL28ih59fZNAGFToKCuejdz/mvjXkF3uVyKNFstlAiEAhuRU68ADudg11pEAeMIiJPsUgoprjVlIdRsqQso7vek="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202252101.0_1646066786023_0.5112118897420221"},"_hasShrinkwrap":false},"1.2202230359.1":{"name":"@bentoproject/timeago","version":"1.2202230359.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"gitHead":"f459124bb58e0a0d2076f658b8fbe3c9db13a04e","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2202230359.1","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-PZZ19bXJ5vMt+uQ9PXNTd24KErRTaAyJ04wog5nvdWrdfW1Pt5Nl1YdJ6j+4ggE5239oRDNggDvw7ckSAnnO+g==","shasum":"1a44d84203269b8b031c8ce16f9eb72623a5a3b8","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2202230359.1.tgz","fileCount":28,"unpackedSize":2759740,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHpinACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWAA//Vur6dqraxqRssDj70KZJ32jMpBFQeExhZxImsaUvOe1Sb6CZ\r\n5dj0AuAZGkN2MHGAI6gvU61ZZBbKoABqufRVENqNQe0xquaKpauvlaX6U0XY\r\nQH0ZQ8VHiKUIZ7BysrvTTfWsG4sA07Gr0jd7nA149wI/vq9QXBD99qJxHJvr\r\nMoVaH4oaMmCGNs7F83ThVJ3jERxmGvJuG0rLaWCjwYDMV/xzzo7Xriw2JUof\r\nFfkvF8PWaQq3B75fP+vPLjsyT7S1M0FOtou+yA0PTQtiomwfm0FxFxZTAN9b\r\nPPk+r29taqzI2Nv06TQ5P7vbYbXabM0AtkUwbBCYPxXxetFDwYHrMPdK89PP\r\n1TcYDCP5Vdehl/uRd7riWy7CCedKAR1f1tjOgoWlaBcRhHibuCSE0Yd+1y/C\r\nrZqCzctsgSmXM9Vik6zW41XVcs+xGagwyFTHjvzfy2XgLZTdxOMdR9tBUCEA\r\nIHZ0t+ig4ZPYu/dHXmxR9zc5kQAcnOuJg9IW0e4eerOST9lazrANrqtw+bG+\r\n09vLBLF3XM7lMbAQykTbawDuga3IeLherFinbk9LeP1Rj8AeP/KN/Zc5D/XK\r\n9brcXHURVjurTlNK0m78MNM6r10ymRQ5UNFo8P3UYjBDohFNwzmWXJkx17J6\r\nE0tY1A0IDYdLSsmmJbWSzP2bzNjKLfFaArI=\r\n=MWzU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/ZSIAahXf6ELJf9qGvHRgF/iTWChOADCXUkFmBcSxnwIhAIIhEF7b6tAW5Dp2m3goH1I60sjiqFvxTMPlyit+cd7u"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2202230359.1_1646172326926_0.825246377043056"},"_hasShrinkwrap":false},"1.2203041950.0":{"name":"@bentoproject/timeago","version":"1.2203041950.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2203041950.0"},"gitHead":"419d49d2920fbdf4bf88e8efc3421f7c37ec209b","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2203041950.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-kB03MiQvAoyz2rpTNoKYN1R06C2qr8xCzN1mGL+egcqXi3zfYK21nrykB1OaB2x2JtqtSmR2TpcCJotlI1T13g==","shasum":"c96d940ecced82175af825e271322055f755b823","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2203041950.0.tgz","fileCount":28,"unpackedSize":1606017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMNyqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqhvA//bbrbnxlNx0mmpQVpKpFa7yhsJ0djiZCaSHaHh4qRM+KZxJwu\r\nI/AxOq8S9haED6Lg8S0CHgNaBLtgO9Zd8sh/6QOJxKbSrhwdUHVpnUvr/8Qc\r\nor3fRFeogsRB+nUdohvoxFZP6neeLR/1G9bOUPsWxMEqn36bW0nf8CDdzO25\r\nlR9Ekqh3V3zpy6hiToGvDcg1Neo+TIs/lvcBZ3Sb7Td/7MIyGl/TI+o0y7Zv\r\neD7I29i6TXJEsY4tSQNsgyXKij+jlrp1SRQCFqlMlt8i6FuPUq6WV1Vd2NH6\r\nzgGG5r6zL7ide7ysBWugxhVeYbYbAZ6n7GGHkMLpI2gjvDyIFlfGKxijr2O9\r\ng1pkYae4WjYlh4Uhgxu0uk2ajmCx58mVwRz8Mu9FtdhzBRfDiJRhlo1UoduH\r\nBXzfR3591F5K0/oaWX6P+6f/FFtq6+CG8sO/uTZaour0KI6o1XrMQAXWytlm\r\nBpIYQBEch1zRXgeULh5HAyJl7MmTPQQFVU3/XRtfbUxoMogcma2lgue3FAzx\r\nuI5x3KZOoYq/V2Pq40FED2RPpsVkhxM4kDuMsyiBxrdlEXlOcjNWNk7UU8W6\r\nIKr1QWWJq8YyUKjpPcj47yOHqEMRwJZMGm67emgHkWMQ4XWA0mVxCrK/CmiN\r\nypJRnnAkCWq2qeYDSsu4FJO2Tb4JvzPBm6M=\r\n=1VRj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDFyKICq97zNyisatElhul8IXijF0N/E0kf2fNeSdQnfAiAJ9bfOKkghMLBZSapQm3os6xXu28gg4qpa8Z7/W4J0XA=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2203041950.0_1647369385820_0.6109787283481967"},"_hasShrinkwrap":false},"1.2203151539.0":{"name":"@bentoproject/timeago","version":"1.2203151539.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2203151539.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"fc739c0d339dbae236fa53a87188f5f7ca58f25c","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2203151539.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-I1z6PIt2Fqbf3T+QZMBT0mWiDcpfcdcP4/x5UcEyALqhskeLNwd9623bWLz93kGTZSfsMgCcqtp2XjTl1nE0QQ==","shasum":"336dd46f7dc13ccff24f1631df6344225ffa7122","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2203151539.0.tgz","fileCount":28,"unpackedSize":1606017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMZ41ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmodTw//ZcML0jT1NZxR/+HTEuCRwxxNXDPPAO4TCNbw5Pz+5bLnKxal\r\nWbZ24TNHZidnghbIcKvJStGXMPDtNE4ulodSWH08e2kdkumglDs5ZpwCvF/G\r\npao7rLFMtOvi/Winco+5VgIdFxrhm4xznltMkvHOG9Bz2dE5K16X9fv1XmBr\r\nUYtHoQlTLmjWBJpyt6LYizRjx4emM7M1hadk7dbuwxBLb6Ftu+WGF5F6JCsM\r\nNoKwjgT8GXPU8ETAW6aRrrPZH8+F0aD6rFmZTf299BYtossR/untWGIfkeRq\r\nM+Hh32JwHgauUHkQ4ftrsYGUYNzbicw2FmU/zsxHE+RewBGXrYGoUqkJnzVU\r\n04CywgEbIfUAb0urs6vSwQ7APtg1o+TQjxl3sRMrZKpS1uIo0YNX0UEi7xgG\r\nyabTw6/mlcb67dMWwYoXknY/TLuZKs6z63/D1k73saz16Pf06M5WBu52hLmY\r\nphFvE42j1HcftdxI0wfO1Ndm4AOcjMS+u9sX2M5rlJVn7Y/pWA+e16dqm8BF\r\nOpg/IRNQXZzycwIjw1Uk81gJGsL7VQ4Ikyxa0FLxZawdMdYopwQTcAMdiKA3\r\nqg6TALSVvg7oQyPNgD6ztqpFdo4C1N+3uVL5u15tTJcmesmNiXD2hGr0OBrn\r\nMp6bz6E4svF9c/xfPhSWW4M6Y9rKSDcByEg=\r\n=lhSy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDH8J+CcK/aBSNp4S1H/BnEASRXQMsY5QBZA/7UhsGXowIhAPqBJ6Bb1DUcnNkmBOoz12ycRUs1mqvpAATdqNH/XWRm"}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2203151539.0_1647418933108_0.8962762069358214"},"_hasShrinkwrap":false},"1.2203172113.0":{"name":"@bentoproject/timeago","version":"1.2203172113.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2203172113.0"},"gitHead":"96b2159ef70d24edf6c33303cb76a623a4669cfb","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2203172113.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-PSPLRCqkfb3OwDvGne8RrM8gwOId9NS85DDe72a8IY+yPsu3HtmlIPqcEX7m5Sv4phJOMyetjjfkUEYwzBEecg==","shasum":"466349c413b891cb1ac3da0e1b43741fe0e99aa6","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2203172113.0.tgz","fileCount":28,"unpackedSize":1606017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiNEFvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpdtg/+JZTWeesEVzqr7DzobG6HyamBZXAsgFbJYZEGsVfR0yjc2CWB\r\nPOX9Finr+oLEzQIJz6ySm2hSVt9qFc8Q85/ejDLi4uUSfz0PwN38Dvm6MZEd\r\nHhJLRnsenOoWGrAKWgXTtKISNzb+BNYZG1U71Zn/xAbi9Au1Wp8/v5GwhRWv\r\nrLCNkMQQTjeuPT5AfdyjDqMDJ0EuEZ4KMNb9IqXuxtLd7ZphK6Nom4YkvsOE\r\n1M92B8K2UQQ5AhOWX5PZlROLu0SnlZfU1K6N/WwHMcyJExAgDwkQSsQll9bo\r\nJmn4Ow74j4v6veukTtTkTWhd0OB7Zs83EnphfKIhci+QAq3UFvzV6OrosxXL\r\nDI8O++foyoixk3NkQ6pYkKcAFan/ASsTjs71WXQHJAxuSCQbpp0olLP+doWk\r\nddquQpkzZJQfu5m/8Lw6iW0aBV7YJ3PxK6FRg1qhkFHpVD4ttLpCiU3cYaE7\r\nzSACi+MxAT8q1iBW+/gsIfNZVuP2+WxdJnsYNP9OlEk+7Gm2WYlCm08jErmy\r\nzmyPSHiTLo9wyU9R/x4+KGit6h/a9QBQ2NHHtFZZnEDl0z6blArvEMeHNCcN\r\nhZcJqqyDweNPRO8WqnJ1n51h1SbbRD0aT1/PMetP0CUF6CYJyWNLHynjLCPp\r\nU4FP669P76Wo7W55zxWMPjF74X9isKuF+Es=\r\n=HY2O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYKb6+gqQ3WuV0VtFavY9ckz/w4WEME5oRHmYVo9vm3AIgduf6PVhtD+angzuZCfhnkOXs9Z3M8O9TGosP1QMX8Ls="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2203172113.0_1647591791811_0.16103429525050394"},"_hasShrinkwrap":false},"1.2203221937.0":{"name":"@bentoproject/timeago","version":"1.2203221937.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2203221937.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"11fb2607ccf78c526a38e31bc141dbd3ac75d326","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2203221937.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-0h60MOIKq1q7lm9W/tg7z4EcINB68B35Pyc1d4UxQ0M86+fFxmk16c1ExQH5NxeisFvpFCkmFw4t8xbEqBS39w==","shasum":"e3279fb29bece49ad9d013a3feacd551046888a6","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2203221937.0.tgz","fileCount":28,"unpackedSize":1606017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOtlaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQbA//S+bwH4SZWNh8s52pVZ82U3wOYqic+pdQpGYjDCsOpwmvxw0E\r\nbk+Pk1jkd58Wr8ev3mIVkSwQnxhP4Q8lyrqWhl/2vNEHNmRnJtBflOsUsI9i\r\nwvsz77vy1Apz5A1JH1j+Wxy8ydAx6TNSEMunShLlzUYyR46GphD69rOquhBt\r\nljr8uhAgrb93SQUSahBwcCSvt8kP1ZKT+G4H/qSXIFUzL8OslZo8YJVl+RFU\r\nw00daGajk0iZXIWD8pu8EPtiziJtnQ16rD6vricfKqX8fXt7UDEQSslXFrYn\r\nciV9YMBoLtnlF7079uJghvwi8yXMDXE1VvaxbVMgo0YJdbVlJJzWd3OlS6r2\r\nrf3fLgUeBZI1J7X2DSdXp6e1z2ikUY0vDsVIHF/XG58D3ECqAA8MTeMMMwbM\r\n95wC+DKXbHmH0xnSQHfzh6pPbt2wpoUKoVnIp3n1EYKiEwJo7WhMKhiKmuJ8\r\n1JTRVsVuOduyNzMMkE+0cpdvUHeSYjDhZyZb4d76T/kczaY6eIuB2HaCaBk6\r\nZcZyBGdHs+ofNFW/fOudI3wiAY9/bd1QLqjGi0SGsgF8+tLEvrLKf0nrtBmX\r\n3GRbeoIHRsM1E7Gjijp6FbZ+UaYFFnBqDfuzP2h+7Fp+d5e3Dut+Lstsd5RB\r\nIdgeFREkn6oZ/qDgYTWwSoEXpkDYNvCvVFY=\r\n=2Q6r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGSL3QAqAJ5NrLKivbRln3M8uSztv1KgJES/Pi3ADL/BAiByFY1/+2r4F0FrtGwF9cvzsEwQ5hgxt6asZ7fVRdqENQ=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2203221937.0_1648023898587_0.4092821706685337"},"_hasShrinkwrap":false},"1.2203231914.0":{"name":"@bentoproject/timeago","version":"1.2203231914.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2203231914.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"9bf7cbdf0dbb4de2bc6b81fe042e52c990576b61","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2203231914.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-nnl0C1cYC+0ilUROUVnpnS+9j2iS/70XPnGQaHTAGFcMN+/joxb6vxA97YCBOFUYfQQDWuY7sQe4uX1ZOdVjyg==","shasum":"b7795e2efed7b07714d9f3842de4d18e836f6ec8","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2203231914.0.tgz","fileCount":28,"unpackedSize":1606114,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPCqEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFaQ/+JHeiSFY8WNBQIH5iC8YEUgq+uhjPI6zVFB85+5KoXzU7tT2j\r\nFCl23qAxHltW1avaOcG7LCoizdwzdTExRFQ+roUjUvqeFzFMACU5GnIP6Ks4\r\navDtWEF7UWLzT242AVb9lqwPX3o/U9hKNykXHh/4xOONzSKR2rQMYA2Qk9d0\r\nW6el/4o+++iJMknz2uK42PgDAzs5ojE8xK7xiCN/3mcnhFaBC/T5VPDHvJe3\r\nU4uxIccPjDmYE9qv7sPzzk6d2dttulZc55tGCrKVGIg6gEAGCmzVCL/7jWP5\r\n8EBQD+KqDyRuOOkIFzbwrn0sta5bb2SkxNShSCsBxJhW6II2w/VbKC19hM3G\r\nm+FBAoBkmrQDyVncQjIv3mOeLiN8XtX1Z3HXN3ecPR+KhoQ4M9cQ0VkUiXJx\r\nS4mRXc0ARNLylUul7xLrXdKfdSIMYGM/vRm6Y+IlWcFpHLwfCx0lVgVym90E\r\nyvKfgW8HE9F1aMpnfv9WIMAhGFL5K9qmxdPmgVWMubiv0ZTt0tyZ8V9TBLGY\r\niujI6/xvO1fq6j0Lm5D895CzmVPutb9mHoRdis/YjJU6cxiezzd57ssyxw87\r\ndgEcJwYtpgYDzpb/IM3GUCvCncSokehiT1oflIma3ODTvViWY+bAk4OnqpOc\r\ndnj/oBCi8UvK6N+bus38wY/0yTBxj4WGrZg=\r\n=gpYl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHg7DILQKAl6GYRyPDIjRYjgbLYMUPyEvg8CKcNKO15RAiBzkS9NbZ0Z9v1bRY2dyPjZLOi4dD+k3a1shnC7ekVJ3g=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2203231914.0_1648110212428_0.659035229843502"},"_hasShrinkwrap":false},"1.2203101844.0":{"name":"@bentoproject/timeago","version":"1.2203101844.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2203101844.0"},"gitHead":"9bf7cbdf0dbb4de2bc6b81fe042e52c990576b61","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2203101844.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-2icO/hLH2xdozFm0phOxbV0VHvHSFC6x/jY9N+CZn1O8Rxr9ssiNA+QMbSn2qLi5s3NKgHWDBMuzPat7/WOK5Q==","shasum":"375e71365b1cad8844f13da0e832f16dd7663509","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2203101844.0.tgz","fileCount":28,"unpackedSize":1606114,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPM/+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqe9A//SPsP1GUj979IXUkOJdPJJVRJOCY1IQau7DKYyDzBY0gKO9M5\r\n0Ev/8JzhWhaR2fJvbMGnkw5F3YNqpsw7L+gFTUBAfPlCVtUWY1Q1fTjHXMtP\r\nkz/eGWwt+sFJt4w+mOqZHkQwc+gsBjb3u2KraI0SMlAHLXDjZr893Jtwv18X\r\nd8tG4Sk/vZScPjXf0u+zEW9Zde98SzpIRkliPlacYVemuyKSo03kb+RUHJ6O\r\nr/H1aC3EqbXLvZN9E8wC8o4BY/iPRHDYDQK7du6ZLQ080Ro8d5bjpwued2Oj\r\n4fZqF61usM/yAjYUOggMinK5zPvtkvvY6ap+wGsihDbUxWQ2UpItpOUoTK0E\r\ntjYymYaj/2Ont7vyd3WQKf0z0bJJW3iVxadwuUVofl0HZiUobvyNqDaZn+LC\r\nL0hr9yXQs7dGMQWQzrJkDyIET08KNoJVDV+6lpOZCuS/z3S3HSFhOhwnATu2\r\nkWgMRpXzke72VwyAdv2JfroOazWDKWqMcNiFiWS9viskNAjxnx9cCwM+CyMn\r\nHq5KLbrO4KUYjfZPkLg19wBDNhYDBJqpiuYk0NGxk26Gt8HB/lyMRwykdCIQ\r\nKBWND9XUelBMQl7rZQgGJjBDdGtVhY/sJfZq+ouGdEvlQ5hyG/VxK58gvt1f\r\ndrRPm6EqBi6jifrY6v2k9N25WRDAz3nheks=\r\n=Sx+f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHXXiRbooltOJdrw+kG0lCC6iJjKVWhbHuvtO+NkEmfSAiEAuUWu0xBA9eT56rKzNf4QpfQvqyyGKjbD+T1+4oQh5bg="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2203101844.0_1648152574165_0.04830742481291472"},"_hasShrinkwrap":false},"1.2203281422.0":{"name":"@bentoproject/timeago","version":"1.2203281422.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2203281422.0"},"gitHead":"f74833d1e2b0d9176900cb183c4edacc4ae53986","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2203281422.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-FuRsm/5nbcVVDUrLqR+mDHefA+3IuVIPN4bRZZWzIaz/kpG30Mhuz8I/hhHyOpHTUed/J4nZTfKYutZ2SsIwiQ==","shasum":"e525e47c53ddcf5ae9c3d894ea8d9eac0b52077a","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2203281422.0.tgz","fileCount":28,"unpackedSize":1606114,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQsMlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr1LA//eKCLfjPyKw651Dt0RpRJK2rUMLKPy+oKMwdBVDA2OOMCfjYf\r\nRKDXn304F57nipcJccJLk2xE8PcYputKyM1GU0UwTKYzo/t51sOnNdHnTYZM\r\npPCXdVcC3nGX6zpTEiO+zzJy7eJ1MWuUI5I9AIXXY6W4i484zHG+vDxEmXS0\r\nIQGI+31pmZNBq5/bkdv++F0T1vcilhLXxl+PFYY2HJWrPW2qi+na4CXKacF7\r\ny/myOdWKvdKBLPE+eBzkRBlpKV7QW8YnG/sdcd9hvbN8m1RUmV7v1bB8rLCE\r\n/hcdm2steD0qNaTcEFtLkmlYTtvPx0kNr00GAr6gk3SN3Sg6/A/YbCcLW+s8\r\nx9Dvb37qsUqxPPoPqDB5zHeSUwEe2DMbV57n+A/+u7v5hHXObWcwiUseJXXH\r\nx2XMN15gyJxipCFxqzeVeWRnp/O5vEXBefE2pdQjA0kgVsqHI0O+03Mz1WX2\r\nIv6vCjY+ECsskb3okaj0SSSBfzTz+NBWtIj0YJnlo2wZdKTw4OHKgl12ihl4\r\nqwG1EQXXCRME3P7Ct7MSiyn+9L3ig7dlVmJ1C00939dHrDL+lAQPaaUB3l2e\r\npdF5TAV5JP8orDudN/ysLP61qo6EUNWD+f14VShxAVLv30pvSFXzvi0B5fxb\r\nnTbj9iDdW9PuKhndJhy8RssmrtsfUDB6qWw=\r\n=cidv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAsnOn4/iIXpPfNTwkhxgFQAg29HSYxxYNPR5MPKOn6fAiBNqgmnYsxf882dACrLIo6F5t4ab/+g9KYJWOOiQVIFNw=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2203281422.0_1648542501688_0.7937445585629674"},"_hasShrinkwrap":false},"1.2204121632.0":{"name":"@bentoproject/timeago","version":"1.2204121632.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2204121632.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"dce11ee1542a2d10e47b8e9875dae137f4cc1b0a","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2204121632.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-F3/U+g5xPbCOhA84S5iWvqGdWEXDEF+WkO06Wd7PAo4PvxPPoks8li5aDh2Q+2uXGlKc8Wc19mJcOVYhCZ5gwA==","shasum":"42bf069f0c243e19c90b971e31a01cdc00fd2873","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2204121632.0.tgz","fileCount":28,"unpackedSize":1606274,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGKSIig8zdbi3YqrKy0QrMB/6luaIo0JBQh3hD2KJS0aAiEApwkJ4syftIowc+mXyi1ryEvn/JenBTWM5uFY6ou9IF8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVcGgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqkmQ//e5uw+Cxp6ue/vByrt0aWNt1KoVRULqPv5EEfgNioNGHuEzMl\r\nrtRCohjcHWbxBCElxGLN2ScktoXv/1Ps392/AnMHz65NlvWh4gBGxJSHtusb\r\n00LyoYeAAZLMfRQzaStgP6ud8r+Zr2Mk5n1xf8B3+8NyHZH0L+T2+Rya08kQ\r\nNcq+S3kWfQfVUdRjHeRcaM6hD3ApafsVUZjxQVhjQB9ElFyfffe0PkH63u8H\r\naqGc0ISMpoQHjIBM3+5H/pXY0FG4xTFvqORjxIfDGCmXpEDSe7zsqS55cSUY\r\nocfxLVcH1d++JiWGL5PSVmff843lvU1CP2TdG03LVkPaTmZexum0sUI88/Ox\r\n/4US6ri7u4gTJ61IrRfA/hOc1JIpXbdhHuj3A25MuEf6ycbxBBlajPd7BMpd\r\nP7MeqMU34TFGBGwsCukjwWQFBAbQMcR5+1I6s9cMF68ZWakNLK1OVq3i8lAq\r\ntTaRmg6Jf+j7PzgXa1i+PkLamz2Lf4H5sL1SiwZ8k6DA7oGh5yH9LrHeTc06\r\nZo2vb+tX5UWsIHe+Obn4M1CXq2sxGGUzHPNa2NKGzDynp+jwBkwYNEOzzHNA\r\nNTLFWiCenLp6Ly9XY8+udulIe2tM3ekPZZY74CKpV0LKk/404WbiDGdFsGkD\r\ny44/T1BL0M61gIHLWnNNjtFfZcVwAXsQLx0=\r\n=6COu\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2204121632.0_1649787296140_0.723256817434798"},"_hasShrinkwrap":false},"1.2204122000.0":{"name":"@bentoproject/timeago","version":"1.2204122000.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2204122000.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"9d10200b5a9784c35ca9fa16b1a4b3078aab3180","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2204122000.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-NLUMIFWu5Bmq1dewHEtsAd2v3iOR/7L22RawpciS0eGkTkP28FbeDAIvcBBkoivtTFfgU/u/5gUJHgEt/hTdIg==","shasum":"51055705ba69e6d7813653fbf0a8735af399f850","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2204122000.0.tgz","fileCount":28,"unpackedSize":1606114,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA1oMcphgFmzkNqVwF1PK62kzHbelcZKi1j54VhFaverAiAvNjwmig3E0q1Y5uKOifj81VdtiSrcnTswFy0hEK7GBA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVoozACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrKHg/9Hr+FteJHldGbtsvWGz6FF9MfR6gQ9oaFkLlHYHnOUlX5GNcy\r\nDeScx/bp1Sh6Z6Qk8PDpSriW4ld0dN0/7mtvRApwKYHOM5t8Vm+2+wdWpQUM\r\nLTtRr8K4d9Dpep6hpZhE5t+L2yK1xo8UZ7CJaff14Y/sDpodaWupkZ1g+/85\r\nstW++atviIIJtvrki7TlEHj1mBYQ+ocyUZjBd3vCTXS73T5ahNaXgfFgoZbb\r\nI29peuwa/Vf/Y92n1RNUt+Fk5OS+vlDftdGA0B1IbM1W2aFDHO/MKwugMa2u\r\nnmFi30l1SWjzN40P/aJn+ekVMBleJBFNQrCO3GWGaPZ5VlLc8SyinsbGVZi1\r\nTcYA0EyDJZeg6H9b1SSi4FoRlKnNOIardmbQUIlI419EJIckzxwR/8Scrsl3\r\nB71Jvmn1Jd9Phtfk8dtr5ZmAMCozdcTFHwqfpj9yErNmwr9gmYjUuMXo5cfm\r\nwNdHA6kZOXXAaSPCM9vqTdZZJB5uSyQi3cH5qsPcyU/A6X2qjrS4vVGKkmZL\r\nPtcw77EjdALMKhTWQfr5OzrOrpLotfd232E7SGfcSG9rTGionEK5NsvroDfY\r\nqQXrb3G7eywoY/PGAL46+puC/Na2weK5hDjLPeMOdXvhfwA9k/gAVxFohEdF\r\nt2vWkwXTFKgY6T8Sa5+PTUJaNo02+FcqiyY=\r\n=CBRx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2204122000.0_1649838643374_0.16311558440092022"},"_hasShrinkwrap":false},"1.2204132005.0":{"name":"@bentoproject/timeago","version":"1.2204132005.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2204132005.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"26ab90e1d3f7c29ac76e3fe33cdbeec9e828eff1","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2204132005.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-7a+kiW7L2UmvzcjZg0JWkrKIYgkqDAiosy6MYge7UEW7sWq0dRPGjtLEh5gYgL5fmQo/NEW6WPD/qDegvtc3sg==","shasum":"b59600263255ec2734b313b4c3165796a460d2ce","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2204132005.0.tgz","fileCount":28,"unpackedSize":1606114,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFo8UBVWYFIRe+dOa1YUwB0qnGndEbtTfLvk0kEQeXmeAiBar1yilHQU4CR1WXFj6Ns3JP3ILAVD1klIIlOEZG6v1w=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiV9wpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqHrA//apSGo4CSiiPKmtwamHUO3pg8HpzaDBubMmp5rM/BanEuw1JY\r\nZ3iXtHkWOlmJ0tminAO7FDohxs3oqx8Fa45OM0zNOL3UB9qyV12twLVgrgtb\r\nzD19FZGdOWt2ebdvsM7LWQlhgHylGwBxr4w2d4t5SiIDyCQwnkoCGbJlHQA6\r\nXVVaAeD8Fu0GGkwiRMLeXqlcg+DRxbcTICFroUsruXFVxR91PCs5SzJs0KIV\r\ngVIg1sSPcFI7TDrFqOtadHFbqBcxFkGddEIXHFJepQAJSTjRckpkp1i0uZ8D\r\nQAPPWJGeNaTsZ/YrUb0lGQ8wSVHwNccfDmNwtz4Y7tKT3Kyp5RLddxtxZ8bX\r\n1qScLqrc2Au0sn814jSL+FFMpmr8f+50G43WssQERQ0BR2SHnc8M2Aqio4oh\r\nCJYo36++Z6UnmnfhPBDBU6zNbPG3xkrEdHGbl8+UXaKT4TlpQd2HN8fktHar\r\nruWLyFpZ/7V1zwCCZnGQNfBBOZXtNHTh0QjJ5D6gkbhtbLyTYj3SEzIvUjD2\r\nM7cQASzClkDAGLssgMribGBZLDR2uyxkZM8qz9YMXz+PpcuI1JNkLcl7svxb\r\nRKLrI/M08Pv67tX4gt1ozMELHoONnD2ReREB1xlVLAgkcqvALb/lhHbAnwF/\r\n+CRw2RpSaMt6Kv/NfkvUg+ipMrM69u7oazU=\r\n=SsKF\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2204132005.0_1649925161125_0.47073617651537103"},"_hasShrinkwrap":false},"1.2204142048.0":{"name":"@bentoproject/timeago","version":"1.2204142048.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2204142048.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"32d29a09afd66bca55e024a4f21b1cdf6690cfdb","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2204142048.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-wax9S7e2zErtptALlm9NMqe4CZPgv24T8JhLvrYhQoO8x1fazTtPGrrTUusu3ceA7mRqrhHRvXzFKO+je8CVgw==","shasum":"19ed0682a941c6e52e43223ea1bb311841398ed2","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2204142048.0.tgz","fileCount":28,"unpackedSize":1606114,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhSZFjUdxwJBSxB5+Sfum5KejA0Q8DnzeJeYjFniKFWgIgKKuqUwn1T4LS0k64j+lQPMywweSbs68KZc/7EsXeF8o="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWSwzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoKog/+ImsuXklj6A/Z/WGB7yXc45AKgv4qM+fooEbJniIW7ThvIgBK\r\nwv7h2/gQtSV8DeIMNDuxBj0GE52vyErvVPLB+jtwfzsHX41Y8OtCjGIqifcT\r\nBnmQ35DFSD4Tbo9hNGy14lXTXCsO4Pkf8I+TxDj2yYh1tQTYVrLmoCMgTcYV\r\n/9EB1wiblgc6z2THcuCOFVu82to05xeuC3B+fVXLnx7p6zCipuxA4ijPMFC3\r\nzcf8v1acggJZ+0JjQbd1xFJY5Y5YKwZXUbs6frjCBas4qn0f/V8NWh+TjQ32\r\nAIHcjW25qQGC3ywoEzqcUIxPZHGIqNRQejIqcg+E+l1W5PUC2/VTRmF5wC9E\r\nvyu0/SX6kV5TwgBujyVZlopd65caUAIm3VSi9NHiCu57JJALI/c6hxgzluTR\r\n3BqfgIXmk+vWwq67k1AFIcyF7SWdBbGq70QhnjXBEkkTScgyvJYJpF+TlVD6\r\nhwnIRzwgczJ+f/eoD/iZQXFDZ/+bMji+77sWk3jcdpFlWH2GFYF5+JjhBhTX\r\nOjB1sm0BanwhrW35acWQ710DL/YWlERbYLQhRK6hLDumRv/m/F/GryOAK697\r\njUeT4nitTAUdWMuAI56PIvIE0DvSa9VXS9+R8SUbXOsYaVGbH+wFGzgfDpa3\r\nIhyzh/wdO2u7G5htDqEi2SYrGVTph7U1Tg4=\r\n=wjj4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2204142048.0_1650011186998_0.5747697959803522"},"_hasShrinkwrap":false},"1.2204160405.0":{"name":"@bentoproject/timeago","version":"1.2204160405.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2204160405.0"},"gitHead":"a26d51722a65f29aa7f77872b7906f6e7ed62e9a","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2204160405.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-dgcvcwMyuOJuQxbvZISF42/gfXwJs/DlxQfa7EwXWMuxhw9aAv6ufAua8+FK4QHF8Fwfukb1q790TRQNuYQzSg==","shasum":"5a0508afce11881aa0dc57750aacf509ff4d19d4","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2204160405.0.tgz","fileCount":28,"unpackedSize":1606114,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFTv9wgdVgpP80A8b/iQVBxQ4SQ97Uu5kYFYXTlyuPaQAiEA4mzdswI4JCQ//TD6T9Ma9t5nm+ySVQWXE6Uq+PyHXeQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWn0YACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpkNw/+Onvco9vZSycwbl+wKvRXxSYwyh/cAePP31+kTM9PwNlX+S7B\r\n3VwoF9v9+SnEJjXYDHnob/jIri2KpLwymYcwgz/oQHuibaaVIvlG1znd8rS1\r\n6uH+yN6A2UYtqaXKE8mwfYQ64Yvtk6A4sm2xyEwoZfIXGXRdDsWKGnaT4bty\r\nd707u9a55cvUkQTVgDpGTaSmtBvVanwr4tykzonmWKIfwKCzbqFQDaLBOvPB\r\nhWR3WHbeg0rYddgXXsW6+3sRY1Ue7d+1/Drg0o+u+DQ046yiGTTxi0iZbEUV\r\nj1fJYroBqk+8mOaKx+qWlNFvbhLi0jASIYrghwZ2Y+4RR4oS6T1mzl1RHoCD\r\nELC/PZ0UXUP5pMi3vfMbWr2l0347tzmFAhI3momkpIyivUq6d67tzNGxqqRK\r\nxqT5ivutkLF7/J8GC+pzMUKtGAdbVkG0Yl8Pe63bTFa4x51NsplUp2JXupUY\r\nZmpjn9ewkCFskplXUlJy7a7JGC0sOBpIikWX7HElT9irbgy7jMM/XBqn7nf8\r\ngFKVU3qD8mLqknNunT1ZcYI+kr9EkBjRJXSsjFcp+2WOxr5Fl8KtoovbNbKN\r\nhpnr4T37LdzeC8T/UxLrvMzhIskTb9ao6AuznMgddHPILdf2qJNCDIu2b1rb\r\nnHPb2/QEKeb5SjT/0X4E11ckZDi8390bWi4=\r\n=uytN\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2204160405.0_1650097431834_0.8861482722731153"},"_hasShrinkwrap":false},"1.2204182206.0":{"name":"@bentoproject/timeago","version":"1.2204182206.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2204182206.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"83e7c80d7406923369ada8c1a7a5dc660ebdcad6","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2204182206.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-kzFUuvzLGD3rd94r9MWhAfDcxVWJxNJXbb4iab7/lQ5MzFTAEp+jKQZvuosGiy5Any6klvCKl869mSm4z+kzUQ==","shasum":"96fe859184210792e887055ad4f36cc5e37f667b","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2204182206.0.tgz","fileCount":29,"unpackedSize":1607016,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHLmOzdh0gIBIK3Cm7jl3M8NsUSr42pstyJuyaVQoSVgIgDXVQQusl209aQsH8P1PLs5VM0TU+exSryX7Beifl/s0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXnLqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9OQ/+IFdgABOz/iw3E1zJ8E1oo/ySRvGtWZjqQuzQcyc0KIIl8iey\r\n/3+kefI0H1Biv93H9qY6DsMN93hEYCMbS5R6/2j/7JryEr/DFNZyQsx+Q0Q8\r\n/cnbWbuBzQVe/3By4lox/Vy6QyVffz7ZZV9q08hT9OS5KUMVk6AaL+f9U9SD\r\nqM4RR/JGmgg8eRlGnAjvxtQjouoR0GAKjCjDsXwVT20hEB7Sxl8hVE6cTVZo\r\n4t4oCvn9Mp5sJyNheAg+92qWqMJO89EiX2sIYS8Rz65PQlost4uznPNWS/73\r\nXwQuiSgPIx43pIzOYpL+HjSCU+XNgLDJqZVgyBIew7C5+qBWbvVyZi8egjAG\r\nb31igH5tayIK4Scvet57xpV43c0kxjC+1k9kkVSss3F5Mgk8B9AdauoDE5VT\r\nDX7/u1J86tqvBDefOh5gIU6k0JLLb3/5PgT82PNtoQIgEBkT7Y7we+6VsNid\r\ndrBPoulTtCjRGCZBwEsiv9ZdPQPKW6TDYKnyDbSOM5GvcO1UR78kCvlfJObR\r\ngmUJ8lMjyuvYERLJ0aeDd4Nc0IBOHZJds9TUjIrmCi0SxcR5srejdnINLuYx\r\nFI35FSQigFREz2rcm+6kiGTFjPYRjZrtZ0CR9dh6u+5n/PibuxLczH63H3lL\r\nGBEnykQbQkWgJTVA+MNYwuONrhY3hjsCNXA=\r\n=iTU2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2204182206.0_1650356969625_0.36471820902018304"},"_hasShrinkwrap":false},"1.2204191429.0":{"name":"@bentoproject/timeago","version":"1.2204191429.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2204191429.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"2ef2d96efb4624b0ef0313b60134c9e35a4e8429","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2204191429.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-pP5wElf8g/5rnZoJjuarH5HVgbinoXLpgvG5LRZ5iRebkCt37z0G16XE0PpKZ4UUB39q2XUEyT9OlNtWpCkmQw==","shasum":"e4ed3b4fc112f1314a8591e6c6e515a72f2b747e","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2204191429.0.tgz","fileCount":29,"unpackedSize":1607016,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICL63325c6RKZo3XepyAW1Qiko/EvcGBR4P/x71VMjo/AiBgrD0dmGsFGvgo0RnSpzIFe/UOM9GtB7ESBaDbAs8hjQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiX8TbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrmhA//Xy2pKh3ds4bkaYiVz8MTFfg7f0Jk9DXtN9El+kyldfRCvPZL\r\nIhV9GGY3ouwakWTARJNlUFYpi3Dd6MGcVUWYfSGiBpFC43AgbW6mMJdLZZH+\r\nUc0TUshj8oeytIM8pqG0p4XqYkeTok1UjebFheByUaoMXthokYo3qjYgn3P8\r\nUPumbtlJD0XbCh0QsK7nMpDapPbeewrGK0QDY7oJO1VOwROKEr/M8EEjq182\r\nEonaPHDahdnW0kLyYUGLVvCMMvTai/+j00FL/tTigQgPh5+ZfjcH+InDqE9B\r\nTC8CpvQB0//G6Y8jHC6g+72eEFvJVuihvBTjsH0/lvloaAACLbAf6vrQAjlO\r\nDGndxC0Y5TM8Gu6HdBp/WH8No3fBQ4oFsh7YjVDZlHp+7givCPyqK0Pw5YDj\r\n/x/LkNDrmswFXh2OemXoyrcWnnwG4rrVD31hzkiQQUL2kXVBG2zElB7ZLEJo\r\nhUSPcMw/9InWsN3iRS6+DLOOzKp2hMwo5+QLW1217Ymi9fnmhOiUICAmgXkU\r\nfhfm69tdicPAjvnx2Q4K2rRda4loIod/61XCyQO6g7v8hD2fhnrJ0nyLOA6o\r\nzCfrbDs3gv+GlI00OLAdRZlMr0G0Z5a5DZOEZDgOmfQtfzKb+1B+f9eWq7Le\r\nR3dzEgK2sLIP7HWFne3GiEAJBGj8Cbxxeak=\r\n=OQit\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2204191429.0_1650443482684_0.2616564829335699"},"_hasShrinkwrap":false},"1.2204211736.0":{"name":"@bentoproject/timeago","version":"1.2204211736.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2204211736.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"01dad70364e4b2b9707441c2c8ec973e1547b195","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2204211736.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-w4+DruzVLqZKauQ2hWAUgxT8ak0/AshUkihrQkaIT/ObJ/Z2QFvUjPfrQOnmL18eelkc3CALmEnRD0A/Vijdrw==","shasum":"f1094abc009952fc47b2786e195b021df0356733","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2204211736.0.tgz","fileCount":29,"unpackedSize":1607016,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGr8BHxKzzCSIaaXYaKmpzNfFOXepXojsVDgJpH5hnDOAiAvAg0BBKQNPOZt+BojOmTinoPhvdMD0wrx3AkV1FGLrw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYmaEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoB2Q//cJf0H6alv4sCRuVbcpqHHwjBU0seZ+smq5Y+quhsqxh9Eq9L\r\nKyqK2WFBda+ZIJ82AKqHnUdPCuTPkOVFpuYiuFzd3MOfaNNT+0ZkuQs2Mkst\r\nM7e3YTqgnLumd7RXRpUT2Z62c3UlxKYAspMWrgeAyMN+JQ4BuxvkJczUPxl5\r\nreoUktRzd+J3JTY4MF5X62B7elQm0Is23UZ3J8Wq8TWkkjE/WKxrNisdu3Dn\r\n5W1QP9frYys/10q1sXfKqytwyGxZTqd94noo/AS8DngUSgxKqs2g7hF/jx5g\r\n3ZFF25SmQ935X6cNOUnUkYPMMlTlQ8A2mbTUo7V/UtJAk8Dtu0CIyi8mHT9x\r\nc5oFBd9g/XJ9jjtbJpJXrfnJXRfoIyCF45YpIbLyhMoJnYbm6E2Ewy8dbzIE\r\n5iLOaKANE6y6fjOfQ1VJth60jU32ZibLiwl2pPRIqhC1iqMku2VhCycjv0G7\r\nBrrsJeKD4YLzAWlSWd37GZjj/7v3G1BeCcsyHoJbZMnspt4atbez91bBQm8o\r\nS4okd5kfk0W3sso9Rnxkd60qcyq0I3F0dynMR2iF6VHjp9xmnf2QgegNdGGE\r\nV0qIezOKXZJIHVq8IfppzjczzQou7/DshyWr9MP8tQXhcoX++dYiXvaveGdN\r\nhJVFpkk8mKRvUKbhZlPFc+722j3jBPrmfpk=\r\n=VTTL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2204211736.0_1650615940256_0.07732951965326107"},"_hasShrinkwrap":false},"1.2204221712.0":{"name":"@bentoproject/timeago","version":"1.2204221712.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2204221712.0"},"gitHead":"fd84f283465064f90218f67c2964f8c0ecc248fe","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2204221712.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-5pIuTh7tkZOHJLW05eZfXbFHqma1D+Q/Rb5ykOiXcQvEVXM2btDE0X2M+Z8JlsyIWyL5Nkx6/WRkO3UBrwq6tg==","shasum":"06cdad7a8e47d282ca2e1cd35bf485fddd5dd7b3","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2204221712.0.tgz","fileCount":29,"unpackedSize":1607016,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzGGxPBBX1OIkvEaHn1DO0MCYdZIM3FsEw0Z+dREErcwIgPtRAAITMlxMNiFcgjeqI2zj0zPuRglCrcIewOpm8Rwo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiY7fAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBIxAAlors8nuBpstPbuBQXX+VTRxsCJvGrb5Jn0qlbOtk5mRH8tYs\r\nSazcpsxsa+12BZcd+j/K//elg9REGIZ+pYa2YOS8ASdAct67cCyNP3umeUjR\r\nqhOOnE5jyNAMvcP4Foj7O/kzOSbo7gD4YtGu1XuX1v2luw5fQYfxX7hwjb5V\r\nmLGAIuGAPafGWngf7EagNjj5EVpn8ERwSGHpTz83jDD/ExZJM83Rp4g/h2OI\r\ndXNjASZ423qM7++60WPTz9Pcu9k9WWQgJDRKVs4otDDr4MyV9XJRKNZkJOSe\r\nJGB7rs4enSgiACT+k+m4A38D0/XsFVZa/6GmmYtza/1ywlCX/26Zw8Hpyu3N\r\nphBil51b3yDJNdk/4qJJ7u4WQ8uxkfEUpzR+Jp/mgGSs/g2R48z7ICi1BInU\r\nJGskOxegqmCpa2wk40co99/zrMscSb78y73TBX3aVjSmx25zahqGBRCmrYv5\r\n/WNszbK4mfoSJuVMMIW/UdbxMXro0uotL1XLoMCF6nXEgUcaoYrAEb0iZHBc\r\nI6Trr5XupdV/Kjlb8YOgxld3GDITwYBM2n9Ib2a9Spe+D7BpqUT6WRmmPI1f\r\n4ldNG1oKnxIAqeUT3r2YT2a721J4hCSsHdJ6I7bx9+pUImU0K23Fucac/oMa\r\nxHYKWwnQAAAzoa0f32XjYRSeznTOpBqEj1M=\r\n=VrEQ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2204221712.0_1650702272074_0.2783486737643963"},"_hasShrinkwrap":false},"1.2204252045.0":{"name":"@bentoproject/timeago","version":"1.2204252045.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2204252045.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"9dcb73514b52c635b732b72b56561ac680ea344e","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2204252045.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-SRXpYfLSqIvOF9d4d0juPEjCRMvXHbJb9dEUvPgC6qY0i0+c40Iee4IpmeDPzMSaEQW258QnzBGhGK6FcRr/+Q==","shasum":"b781a59e9db82caa38d67bb9495bca0c69e7983e","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2204252045.0.tgz","fileCount":29,"unpackedSize":1607016,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDktuMXjkrGxJw9MjAK6dS2GYd49grWaowIQIkWGTb81wIhAM+8LgSAdr9MxdwBn+nxZmugU+Uiflw5/PjIDc82CeR3"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZ628ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqYmxAAji6PDhp5nBdiRT1pcd10dpNEs32146sK98UtlG1v+nsM8kHp\r\n2DVtr8po8DXyKNDVFmMQEYobUro3krMpBrcVNULuSebG/IUzqNRtStkyJfzO\r\nu3ztH6gfXAE1yCLRD071nIwI2x0PtApNXq51zPIyIoLorzIscTOuw6+5urc8\r\nHo+/LZk4nW+eSDJd9RfeBT/UpvrA3qUbiLYvUurLZQIQDpiRFT2tVTBVbuHe\r\n9xAeZ/uW3Cuhh4Qy3nRvLKdUCIWyEkckwE7PQhBhvHzJw0rknMX0n0s98tKQ\r\nV5IapT7vzY4gdx+SjR7UzuA4bNUyf9cCeI2TZ/ZoLvZVXQN/2m5DBxmWWpcs\r\nG9H1nf3J/wuKVAFttCFoT9cKw1fNw9V8jpQZX+017mMdGvm5aisTH5jvvU/t\r\nNqnzz7qk5hG0f2DFFu36wjxYeVmuecWKdrkDruemkKsdUJ9C7cbf5mVNDiBN\r\nua50OA3+jPuCNVxKwcWXJhdfaTqj+OFiZrbH6+5SEQ6mfj5H9Lofydu9ewOC\r\nJzBH26cv5nT7pgbfYx6OHb/ZSKXPMsCfR1qJ5LREjTojt01ZmJPXSp3WJ2YV\r\n6zDwHkI4QHnuA0TKyr/aHWUSutEWr/jPFaXHTkyP/JPTC2pczdU+ydZBpdAh\r\n2n/wAXaZJCoPSFkn8v7ZYYGXKxbuuKcV16I=\r\n=watH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2204252045.0_1650961852191_0.6679754007351888"},"_hasShrinkwrap":false},"1.2204272205.0":{"name":"@bentoproject/timeago","version":"1.2204272205.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2204272205.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"c2397d28837191a7d145806840ca6ca9a73823d4","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2204272205.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-d3ZO6MTd7Gd41hmdVCY6qisrBjahPFOpz11il00nXBcZfHwBSwMJb0rV3pVhEdPOlKl4jhQJwL1Vf51g3LqDSA==","shasum":"0a806d553eb200eede243f7d020585851fe8778a","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2204272205.0.tgz","fileCount":29,"unpackedSize":1607016,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDco+L3hsDA1q6qqA8XwEpY5NyOaj9Fr9G2zFk6Wk7i7AiEAmbhR0TDddYBmxAyclVnY5D0KU6xQwU9/n50QmQ9JY78="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJialCoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpo3g/7B1YltLyU+mJ4I8i9liu9icOxmowQ6l1r9OZmVEyph1W2xqdr\r\nYIKCIWX3Z+1Ml7ZXIz/kl1nxH15UZCqGu52QYQtdbVeMGja/Ib1hrtrHv0EK\r\ngsGkQ8RYNAyxSWFZ7TQbluBl3/+r9MMgkP3ZJosdCTZBK5Yj4CniHzbHTyqP\r\nIsTWfr1EbTMPZz3R/IOiPDSAD5dCQvtmPgi3k3s3KGWBSSJPwE3bL7IcTiZg\r\nzImUGuXmHzDn0Zh31D+Nxkwf+BwOgxD0qD7aeYeLBRMnTVubDgQRaX4PChXw\r\navbDiPagzsVCyy2k6kVKiZ0a3CUAsIp2yPJyYRywd+7N6RIkNDfX8tKqCXOD\r\n8nF5D+ptJf1k0SmKjtAdKf8cDJq6RciZjvSgDtMWtJ2JT9Hx6NQztcxXqQHT\r\ndA/GL08HfPh1APSbZEwvdcZ+TyAilj64T39H90DLui1h1sOppcPy8pF5X6KG\r\nWRpVs5yfdd8DUoocl8adJ34YWabEeKdMReKhBwgaujd3rnEgJ0K7CG5KDMzL\r\nTdqrVao+YjVUX5mBmH4htSkao5f+w7FeWEh7OzPiWbJ1aT9sBk5Q6DsIAxQY\r\nX7/znyehDaoJoI9vM8EqSC7NUXb0pg0l8p5Pi7vcv/mEhV11Eim9qlogCrgP\r\nxGX9gBRDuKk9eMcTD1r1gD+Bc/0pMGdNeNI=\r\n=ZWxR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2204272205.0_1651134631992_0.6432254464953675"},"_hasShrinkwrap":false},"1.2204281949.0":{"name":"@bentoproject/timeago","version":"1.2204281949.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2204281949.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"8bd4749759e81fea16cc216637d7a185eea3402e","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2204281949.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-SshSXs7XbRXVcwyqko3oc7zgPEVH7M2B/eRiLg2sgCfLyVOiWFNFAILBRl58Sb7ahtt3I6hhJ+LAdIdb2PXJ4g==","shasum":"c16fa9bfad294cc467ef00607808f6871ad9252f","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2204281949.0.tgz","fileCount":29,"unpackedSize":1607016,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDU94oAq/nhkKP6Ve9fxcDu6nOyf43LbZqcemvh4a7NRgIgWWB3HsCfPzrOCgA2/PI7nBrFg27kXzsB3PK8yOyTB8g="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJia6FEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmojCg//U4k5yT3ixLpb0KYNzo9OcI9gPvrpuLrDZAbooNNcGAjZ4YS4\r\nzVQcnkfl6RnSjBy5/HFd9ehHeKM8x5fuXxT9tYpWbrnv5jWSnOEP3n+N8dMf\r\ne3n0ILwTCDh1GPe4ssTP2aHvqnpzVHciByaY26dp2ku+uwXB/ax3WJNwwZ4/\r\nUZDxs9/LKDqaruTMGaG5wiUwYlcCnDQMgMIAfpyMjU1pF5M3a7Wzkl21hsKS\r\nCbvQYRXT3dORGuc4dXikGOaPoLd+tRgRk79uuVnMcoPWzmX4HJ/UNKFeJfHO\r\n0KTlUVo4WU2UKytpvWE2JflOi+hn+0pcc1OEndpvig65AQDINAePrbxekg1K\r\nDNlJC8IRFZkaHJfvqQgByHX+guqcPwnILbDu169lwloolDo54GN13ofV4/AH\r\nWxr/w20YzXYZSRoGrFUEOnTdS2aoT9TGwehJhuP/DjpszZgNfQyhjo/ba+53\r\nCN7t+LLTPfQ9sKq+ACKM4dcfAwc6jyyiwtYrR5U9a6EE/dLoFJMVfFBCnCfa\r\nGaTftjYpVKMkNrWSCfHFPejU2kCt4Q0HgAGdZbv3Toh8oUGBCL7beO3nkWF2\r\na7BP4WnguFfBgYDqnj4gXs9u0C2trwshIpvbqRVHkJmSPb0BcCZLb9dIVf02\r\nDZIADfsZaPNUALjcP0r7lFm6up1RnlSTVME=\r\n=nZXz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2204281949.0_1651220804517_0.8333570389269078"},"_hasShrinkwrap":false},"1.2204292129.0":{"name":"@bentoproject/timeago","version":"1.2204292129.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2204292129.0"},"gitHead":"266c274e2aa669399dede55e9fc55b8917069279","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2204292129.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-5UNM9xLEVpdQfSXrAOVs+k95LVKZBXCOBKfvThqRJLrvPlEW/rGAt0DJ7xc+Hfw75sFJgYIcmybny71nouMTmw==","shasum":"b54838156d6467ea2d32f9a3f7d147be792560a1","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2204292129.0.tgz","fileCount":29,"unpackedSize":1607016,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDARbGrqLQaGd+8Y59dTq7ihvot8gwm/aNsD5Jt3Hsm7wIgHwriJV33vbXUC6aLIbp97bi/SLBX8UCdMO1NuqZgND0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJibPJSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo0mw//eQEmC+XVs+nvZIn9u8FgVitamY3VAWKW4lzXc6h7987OCtks\r\nh4xgmzsrnW73qe7BJMts80P4Fi1YTrVjukYTYYe0FTsGQyKnV0B5EzwyI8OG\r\nJH2aKePbr7IHxbfUR/n2BSadBespWovtPTBhH9u9Cex0T0qL4npVcXTjMByJ\r\n2ENmn3XHm8aM6XoFyxvgz0psind8P5An6vpcQYizTS59pgt3ZkTW8SlW1JAG\r\nndBBg92WZRzor+ND6sNBv/TYEBWq1ON8cAITMaOu6YqX2CLEdfNTNqaF64LF\r\nRV6hIQti2Pu6tEgE0Ozeud6ODH3e1fSJ+uWhq2ydlKi/DuTsG/jsOddkmcrO\r\nLcYB68GwYocGl01D92Q79ReiOA7IDrAp5GSnqves6WbDyUwAJPBSj5+GfouN\r\nw7WdI22iRyJQwZp2Flgm3P68tcwAmk0dgImMqbIpggBfrryq7TG29PQIiVPP\r\nlEEBpv47/ogqYj4cpDNNWLuWrI+IinvdLy7zbWfnpsD54UNoo4BFfj1CgYrf\r\nPdeBQAsOfjjFz9S6B8R8DJfl5X0bvS84va3Vz3clIw6MQXYopHZ7vi7GrDbw\r\n9w/yUygCUtczePy4hWnKNztndbgAj3mm+4PlzHE/bXnP5qIHMzYU/9yMpLd+\r\nSpIv6XYNJ7M6Mu/DeUz03piLWCEvqkapoOg=\r\n=4fGA\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2204292129.0_1651307090658_0.09624499315540458"},"_hasShrinkwrap":false},"1.2205031420.0":{"name":"@bentoproject/timeago","version":"1.2205031420.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2205031420.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"d3652194dae7f17865db127c7135ec194907b7fb","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2205031420.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-jvLgXwFCpE/Am52BKov8+wb+d57hbY5jXZyvIZEtGX+jKHHA683lcPzK7FeJR5OgrLxpaM8XWJZb5tEQgE7abw==","shasum":"3f28623af7d7aa48e02f95d282c22c30868eafe2","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2205031420.0.tgz","fileCount":29,"unpackedSize":1607016,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuaVE/zViBw93JlP6wQBoIOo2XJQu3pF4szQ43K8GctwIhAIWpZfroXyb2co8L+pHUctqOnl4NdqCTbq9KAwVqObgE"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicjiPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3cw//bF5w9VSBe+3NdLLyisavkFdokTYHRmQYOU/4qDoKQa3yQdaJ\r\naJ+vGBZOmnCIxRfcOzvlal3FAw/KtBwgs9rl8+YBgrRsrkB9X2yKIgoUI5L9\r\nRp5WxJZZBetpbQVlD8SOtPSlVupvglfazVHtswDpBr15zqjXHFjiN1jHHV+B\r\nABVJ178Gu2c+ibn6nv9sPV0sgWPXZDoV+TYHTpp7NqNzQUSKvYt5/XqZBcDo\r\nqgPp4tA07KeKoKuYFC8Q6lfzBBdXj6Ue/m+EmudcWEe+BwYpKaHEmMP66+15\r\nyZfooDRQBRS9rWzSDBtzw9K9I3IDdx15/RfEYRsweBNGzJhstSPiwhn85Edg\r\nBaCFbeDY9sKTO2gh0dutPM6m//bfZvm8CvaItgCFxa7V53f6CO3D8lKmc625\r\n9PwKjw0NdB3dTwNPcl/URTJKuy/GOlxKyHtshijSPZlH/O2Bo1aXYxSvLWFX\r\nJRYFPQDjsZdfsUMf3iDpXzTS1yCucatsC5brI9aX02kr8qKJjATZlaa9Hi0x\r\n23t6bk9s41sR7t2+Z2OWIyUAnw7S3OKmv+Yf8cIrXMcA+XFYjyS07cDctldy\r\naVCu9CkpZNkgYb7h1Bhll/byCkDW3DCubgLAG7RtL3DTu+dj5ToD0N5AuDUZ\r\nbLoNacS0jKZlXF2DlTcbSgMdoh6AXDuXwa4=\r\n=PXy3\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2205031420.0_1651652750950_0.2647864821230659"},"_hasShrinkwrap":false},"1.2205041533.0":{"name":"@bentoproject/timeago","version":"1.2205041533.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2205041533.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"8c9c66c7b1ace99b28d77b82807f84e9e8cb305b","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2205041533.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-ZHoTi4R/GvQojxmLDQInZsJoWzKNTvYML3k6xUBAqs6y1NmEBEugvn76TK1uFDBEH65Rr6MOZIfLt6ctOa8d2w==","shasum":"c1eb9a96382df41d028cc45c26f5bad06b3775db","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2205041533.0.tgz","fileCount":29,"unpackedSize":1607016,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGgWAzOZbHGyIOHxA4+KY4ANArjPDfM4ATYmPFkygcV/AiBErr4ceel8MvsZ+YoS3ZgKqo0/bgHQ6H+AUYgDOwh13Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJic4nzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrrphAAn88q7JmfiiYZLgmGMKw3F/9wPc3lnBANvHqdXSlXOzRTX9QQ\r\nXjXCTpVxghKjeumK626xJYX/vSu6k7TeSOrDqCVSSWLg+4CS2gnFqBrQiA28\r\ncajvf3kqZnUlut2xnSYYBAgXVn2r2k+pkwSBncTxWhhplH9O9uGYhUGqlFEh\r\nYxc7UFYvirmSvL3iz599wubYrrVv34wZ5R+gfymDBd0skiKch4jEelLh02n1\r\nLnv2wCydaoOeULSO/1F0DM1FEHYm0X3mIyXKeKEjpnL1SbQGUfDZjfrVoNQ+\r\nhE7GUkWKC/gmwivpnp6MtG8Nc18OpKY+AnWJLk6r2vh/5wcm3S8Sk2xt4Qee\r\nArmachowxiizQcs2JEhTFLCe1VmDgbTiR1jbbEM3NVSckz4td7lccXlJ7v8Y\r\nTGdIwcvwQCWwS5gM1QXBprhRtqpQkuqkSNccr78HTqLHs6UYHfG2Njv2+JAJ\r\nrepp7Sw+qfKx6sdMaaDlI/NGBTfexlzi6FwrygMECopYCGz8emLV6QHd/dK3\r\nblYDxKa33ZD0zxUP3RLKXkZmjktAcsq985mhKlHcVaFy23BjxX2NncvGn7ym\r\nDKEuNz8SEAYzjftzhr/mubPdDmUqH4B6G/IivtR38MRe8FzfnzBaI2F3eHM3\r\nuLYC50Dce1l5P7BE0vXlroolm6GcokUbN3o=\r\n=9U93\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2205041533.0_1651739122834_0.480513704318823"},"_hasShrinkwrap":false},"1.2205051832.0":{"name":"@bentoproject/timeago","version":"1.2205051832.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2205051832.0"},"gitHead":"3658b8bf865c7e71c605f93088560c0657af9cb4","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2205051832.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-4IQnTdg76hXHS/Nwsc7Xt6mtU8wP4UW5Pwb+R0xqeg8jFH3V2CvoUl3AWicnTvAI36HahISdzhMykAnuIKNoYA==","shasum":"831da77570e1fa4356b2162e3981f4dd9c597614","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2205051832.0.tgz","fileCount":29,"unpackedSize":1607016,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDocncs4gtPc7Wb0frZ3TlEQNCXuan8B7ZOH6zKB6FyywIhAN1912kxp/E/sLLMa3N67WDMhBnMeN9Sd+DOiBW27oYl"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidNueACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpoCQ/9EYyyZkt8oiyPRaMW/WyxCctY5JdBmyZ9VosL6VLiOZXtmTzV\r\no435+uPK8pobrpvRi/U0Sw/boI5BBMKgJ95WcXICKeIsV0DnlIc7iaJXwBMD\r\ng2hAFVzk7Sk82MAn0SbSZgVv3ltqSe7X7bdKQntnHJzk9ricd7ZWG9AWi20X\r\niokbaCxnmson9Huv2Mj0U3p0qM4N3rWfn8f09fR9Jd33JZfe0Mw4KktXmau2\r\nI/sicbx1QnnNWJ5I/egG02JTAvSTSVdpdwIC4eeWouiefBbxU4ptXK+2xHSS\r\nM5DFhOtAH5FFzWVRRruDb5hx+PxoVxwFFUSOQEwDT2vLfbNiTckCAMtPLqDW\r\nZQH+9YBiP8sjeoq7V4gU640l8k6fOP6wUw+BHyH7GJ3wh/7mSz7R3ei/V4ng\r\nxo4rBpoeoXny+PEEUgkB6qPz6QLBOsDj40xwX4bT41fM5Y3I3+XWmhJVE8Cw\r\nz3kDw4r4Y7lKhf298Fl3Y/uoWMracNolPwCtiyjPMIOkr7ZxfC+w/hyRQWkb\r\ne2gr+o05lO6AhQ44E2/5Spn9/4+ktR3vbvOOH3Bs3EdksY+tJxXhl/RyBwgv\r\nrrG8Rqu/PRP1jIEZyOqtLGaxdXCCcp8rjtnPib3ZOEJiNTlwPV3QweRweqNq\r\nIJ4PGViH4ROELZCzVYhqa29MhF3Oe9s1bns=\r\n=GH8L\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2205051832.0_1651825566531_0.17915913464836408"},"_hasShrinkwrap":false},"1.2205090810.0":{"name":"@bentoproject/timeago","version":"1.2205090810.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2205090810.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"3fe2ae4108e8ce4355c90640458d13cf81af160c","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2205090810.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-OA3rfh8Kacpxn7vgPfib0yp3t5ZtT6xeGM5nsehDBXG2M6BpChQ3S8K+Nir77u5DS0jX9XhpP/jVQFoW0T5jwQ==","shasum":"a8bef728ea1522e2d06303f7a30ff39957186784","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2205090810.0.tgz","fileCount":29,"unpackedSize":1607016,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEDc1Z2m24kURKyGIDEHsPc/ujWmG/XnqkfEao2CvzzAAiA09rG6ax90RA9Vp6X3uvVrG24elm6N/3j+yvkVCtV7Cg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJieiLVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrOKw//bgBpBYWDxMNP/S7kmk3+KVfRzHFKTsKvKZ1HQJDzF7qR9bhQ\r\nlDbFOxTTXbREUbKt9sPIWOGRA9T9ibBGrBC8nUJbmYDNGeS61DnfqvonCUlS\r\nIpxauvgFePNk5JSFTwjGavh9jJjz/MK8OC8SIKFuSgKN4URTzHB2rm18Qa10\r\nPqHkDyikw4P1/zvmdAwDiXAH1eDkdlr1KEz0Kc3F+pq7Vi6ChgKt5XjVWId3\r\nOGRmO6R/Xe5xw0E9xp+HC/tO8onK8JX6YnQclPXB8KAX3/odcVceBfFQuaq1\r\npC3SjlGIKdbgwtMKIk++Nmvrp9kHNjNlVxnCYMBNOCUUbVJV8eJ0VnGmh/aZ\r\n0SlcRvHULEudbgEBGkzMYVHrAoOgUK2/Mrhmaoh9xGxBcCYBtXC30SLhtUEr\r\nTR6Mv9Y8xAWwa+Lqm+JXogbVQnQFpmQRdVTKKycoPBzt9XNhx0T4GzQzTJch\r\nBrTpmOYrEt6TYfNmZhDTI0PgJL2CpywPFV5J8lfUPoETsdmygXQd+6dCELEL\r\na/WrDBlrzYFgo+dfc9KvZvuNpJZ0XkuLSI4/yQtm0tHxzvHXQrY+KoheGcFq\r\nMQ1pHXYzRkikHKpSvSTlyMj7uFy5uoP3ZELPh7rWAL9dB+MUT0YDi0ybzIf3\r\n1wVBprgw4YqdjP4oGfg72JizpeDRb9csx2s=\r\n=gCsH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2205090810.0_1652171477700_0.7243344318134248"},"_hasShrinkwrap":false},"1.2205101904.0":{"name":"@bentoproject/timeago","version":"1.2205101904.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2205101904.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"43d879755f765aee2d0eab657533b493a025713f","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2205101904.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-sklEOHbSQ2G0178LEz1faCN6HD1BvV0mkC+BwI86E8UbDOLhpqWDpsn2drUQZ9awuKbCBkp/wRhnF5hFD/1apA==","shasum":"5645bab3c5fb8240e2b2dff705759ec34bbccbc8","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2205101904.0.tgz","fileCount":29,"unpackedSize":1607022,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHhI6jjFgGJnz9/G4+TYERqjXEwpJ+yKD+S/aZXBVy/cAiBAPqszn4QzVU0xQ6p+TZ5AdHAlFd+I4+fRkp+UEUpkjQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJie3RmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrqWw/+Le7sA08mCGSEsgQB7s4CkJabfIxMjdbmQSIUyjlN6rBwaG9K\r\nXIorQttxAKDVtvT/VDtooPsesFyL3hK816Xy909v34d6LIeeCkrRze6Qpwpz\r\nDkj+yBya9Qb+LhN+nfVtowDPAoi2spr2GNY9FPQvD9N13a723DXPiCa/Ni7c\r\nyyrre0fO6G8X+BkfbUpprC1lpPuEtmqVMdiKgaN/RGBNNDIdehZ99Qtvp0AV\r\n9oapZZXMOKnGx+DD0iZspQCs4fU55OiOU2ULhUxKF4zhvhWZNHYD02KXtZMn\r\nTMnAha+8GXem4LDe7V9dQuT3J+mANKufEEslexiUpEb1rT5zQaGk0talkYUs\r\n4plyG1s7MR7ThaSHAlAK4qvMXocrkLsk1k7h04llZbMuGP9kJy8VcSSHGToN\r\n0s7p7EkNymWmc1odpuvkGMdtE3h0aztolv/FwsZ6EBu/QgZbR7XJc7rwWCfG\r\n138YsfRWCc942Tm0xzoOBgBGebqipIvFgcczIhKfah+emNI8PoAa62HDB+M9\r\nY6p7IZkNQ0VeJTCQF2rA0KXRfu0njD71GYEvoZWQdULSy+v89p7rFtNvQIPZ\r\nsSGaYt4I1ZJU7/JnNUr9fRg5v5RSBRUWAsddvJ0fPEQN9J2342CZd+W4768v\r\nKBH+/S+uGLUYHXlrOTFurYoDwF5Q/cXdBto=\r\n=Ko24\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2205101904.0_1652257894091_0.054034743546212516"},"_hasShrinkwrap":false},"1.2205120110.0":{"name":"@bentoproject/timeago","version":"1.2205120110.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2205120110.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"46f34860b9f501caf0eda81977d1ae3aef4a947c","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2205120110.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-hhqbjnfA2AkcFtXzIHBLyLK7u787yvg9/7T1YRPe2bySemJdE8r43fYPnZBCJ8x3s7cb0Y5XPAmFAFRjiwjV/A==","shasum":"0952c0a72235ef63f56cab61e42c75013eed4eec","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2205120110.0.tgz","fileCount":29,"unpackedSize":1607022,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC36YVyn9rkhBNKhdNHAWsGmMDWwNOyDMUDAIlYtUL08AiAuJLz95zrmdT+L4hEGUhva1Bap3FsHK0kDaq11L7N2kQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifMWZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmotZRAAoZEzxW0IUOPNHtrtzx93ieb3AeRShkB0wjsZlx4d2H5Tu/Zh\r\nDYJ1/95c1u1Nw/nvpCObgrpFKtCeRoWD1GsCxhsJQArUnWfejB9+rne8xzXt\r\nbnpGe2Nrevz5nRWvdIpIB7+8KcFAMb+CbY92Pqr9NhUtVgKKE/hVj0Q9IHe4\r\nereIjMUHcPpBAfmLzKMEnhSEPFv7yPxJV/n8s9B7SeMJ5D0/Ytn0pkvc8D6E\r\npfsN/XPvLcaPLL4F0isZXBLtsp4Qj7wlIu7DK7UbZ88RVEre3nxXEHbHvTUF\r\n24xFvsbwaB9rlJHp8PO7UjLV8sIQL7GbwyxQFlJTnIhVr1qjGSMF2GerGuO/\r\nj/P7DP1kPZn2ylM7tvdKDMMfGzdsJE833bCwzJwRMg+DV+Kh4l79AiGrXzGO\r\nfKVfm0ao/mOWhkGhAZR/w+LYmoQJbfIFeZmOuRNSrcnnkiOk/RPC/O74VtZn\r\nQ3aPJ4DwPEZcxFJsbimU8qDYAQFuDDR6rH+6zA7eowMYx3oiQuUK6WiQkjxa\r\nPfSQMhEVqb2uHwmhEz/evrqnPN3L1uJy7bp1rS/vGHOJZrxwJPwYlc/ZpyXP\r\nN8FCQF/UlM7CDeFEXnR03UBoYT1PBJdNfPUHO601qkikKiR2hqVbPRlk10Y5\r\ncyyqQw8v5lnabPjf80ruMFcDyo57ER98l0w=\r\n=aQ89\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2205120110.0_1652344216806_0.5038929449983065"},"_hasShrinkwrap":false},"1.2205161914.0":{"name":"@bentoproject/timeago","version":"1.2205161914.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2205161914.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"2fb4e151488ba4d856b33f836151d66b45ca457e","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2205161914.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-jfmW+t1GD1FcGq+b+Z98Lhlp3MXrAdSizEkrpca5GKcdI3NAwpH8I75E76PF48U2haLmLAGIjhH+mxim7ikdmQ==","shasum":"bcbab31982bd2f6ccdaba4bc411136fc85b11fcd","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2205161914.0.tgz","fileCount":29,"unpackedSize":1607022,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZFsi/3bsb9GHN7lSFi0PcH/mpKFDrc3Cv6ObibvgU/wIgDhty5byeAiYkWeWFqsHFwzxBFX6aB43hRKbkA2trx7o="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJig1wAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrAxBAAgGKjFwr+VaYQbadh5WuX0BbXquV5akLP/A/rtaYK0Uk0YLPq\r\nERsakAHTZwnWnG2uIDU0+JHrsm3zzzb4XYM3UQT658lWc+T62k0KGaB4lA7A\r\nW0ab+V8iyULEqHaECvEXd7ifYj+dyb5mqVeHS60FX4ctOysCrxCISOaKl4VL\r\n0gfzUxX5LUp59W51TMaXRe/UPdZYtDahYuuAbTMbQH95iA0AmVN+d+YVUVx4\r\nvzPTcGAaw7JC3HlkMr7TYiyTEthPC9BApJZzOdNlgGJM87Q7n6RuIX/O/WzT\r\ngSHp36TKod/QvMtVkqPCRRK+JbD11BDIjlWRHcI0LkkNgr6LNKdkiT/ChRQW\r\n8uMLgI192e/xoKzoQhIf/3MaP0M/1KppQ4WfQ+EweblzF2Rj4/aL4bb+yLhg\r\nO4YaoHkGz5YJ4jbV8N9d2tITQbKSMDafXOnPpdLct5XjiMnKJR0QMtOV0Y1I\r\nfpU8toQaGaCWfKeprc/0ohlIMMIhQwwNGwwahG5ilq+miu1YzX1uP4TUBMvn\r\nIwjnfw/BLUJXThKit7vexOdmxdDLqLSunFUhEAOXM+msoZyFUEzXP4tQviaB\r\nwN6e2xm5gpxzQV/VXjWLIPhIwX646dITJDOTp/H1rTabLGOFh3g6JnXZjgZm\r\nz0EI7rVmk+Qf+eS8+iFFRjXGkNhzZ/ocLkU=\r\n=OnvP\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2205161914.0_1652775936661_0.02246447929081441"},"_hasShrinkwrap":false},"1.2205181800.0":{"name":"@bentoproject/timeago","version":"1.2205181800.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2205181800.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"fb3f61c46e2221f0f2e1dd836127cce386c7bbda","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2205181800.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-bzh/KOgLc0sED940mR11we7OMqot2e5RyISP2YekNm1ulJmaDQhBTbNWUkG8IRAhqI6M79+E6dJE8BwD7KSayA==","shasum":"c022170df5e753a025ece805e8a29cc340c2d9be","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2205181800.0.tgz","fileCount":29,"unpackedSize":1607022,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoZ6huPNKTbrcwYfZr1EII7T9BZcQzL3M1tp4j6Q+DmwIgKYKkARzvlreaHURdppJyRavO6WYSqcS/2KBG3nt4Cbc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihf83ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmphCw/+LIVoZRok+4fK7Mq9u1aVp+vyMQTEKoWImYoF9zIFSOmYtgNA\r\n/FDZmr4o7m5XuqMb2Lz264UDjRdowLoTiCvZIHBrUestrHL/GEP7OYRBeH0+\r\n8e9eMMGrB3RwdjNUnQf5M5YxQ+XUeycog0SrQhm5PXg3DNojE35BJPWw7mxC\r\n95MZnoveguJXfmJa/a54nqK+LhEUG2C06VgFRiI7TNzvFn17sQga1qBNtHwW\r\nkCx0xbzdie/nFc7K8XaZ+NzDdsEO2E565VpqvorePpfyqy5C1/GggdxRsJTO\r\npI6jb9/gDYMpTDFFsIgHyrHIVv8TSPL1WE8MptQYJauP3EcYXL8AN4EUKY4K\r\nqAKaIFLqLBoDT99056LW1YOUFm3F+JzDyQRyFRtC2lvsagX79YoxeRjkd6g4\r\niFQR7jJdgEAzoS6tiGNMZMeBevVVjTOc4oL42khsShvs60y/gkjd8frGGRCr\r\ng2O9T9XORd+vMoUTnLHIvztFk7K87MlQIQuqK6zxk4AHHYwIecTUGlDvLpZ9\r\n7JP6YyI/1mF/8ijhxm2agsGraxq2h8B9Hvmn9KD67S0u1FRgveh/z5HJaC9M\r\n99QvJI5j1SdP+VDFWh8UIp1BT/xEcfklGdKBuS5yBl/4o5SW4wWLBvoODo6a\r\nktxdmqOjRynMi0KveGSumIWTAXdPcy3b+1s=\r\n=vgqp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2205181800.0_1652948790828_0.6475302750936893"},"_hasShrinkwrap":false},"1.2205191749.0":{"name":"@bentoproject/timeago","version":"1.2205191749.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2205191749.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"83c369066eb9c7dfccb12aea936f29a84bad30fc","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2205191749.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-GS1AUMMxE8Eys66FnN6ceSisLezTrU0u4s+aMODhakxINMaGjvo8VRTXXpFhwQGFRaNSxDkYDaaIVrmcuJcQKw==","shasum":"696c4e84540100fafd864745905f1e9dc26b1f1b","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2205191749.0.tgz","fileCount":29,"unpackedSize":1607022,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQiXj0E9CdS0rIv2X/bo+kN9ZSQuGAj6E1UWWZQjvZkwIhAPSznSt67nw0iAiE10s9loDRYDmVb76jsY6cQ5zydyV/"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJih1CuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWZg/+P/0gK+ZHnCYBORCFNnQaAqFKmAV844pj0FJA4GkSTedg3Gaw\r\nmeeOLwW4uESLtKiXZO7nKBPViVmCfW4KWBnWxxAw3wIOuL3wK45ckJTHNyhf\r\nJz5DltJMSxSoA9uoLi32KxWCnta0LpCYaI9ndWBJLyhMw+hi5O8M7lMhbx43\r\nxo8rrXRzUxCzidoy+5I3FtTGNHBbn2QYO38y8owzxt+6tEJMAG6CIBcYUDYs\r\nb8R3zG1zszlbnCXSeXXMEklk676U0TKb8vIfJrxiPX4M3btmDUJaRSTSNp2T\r\nMIkX0XewBC+Nh0HLNXCKdBUue+I2A2PGHztPa5KtBqzAb6bAjKAf6Bk65T/C\r\n3osrx3v/p0uhLk2zGLq54eI1I4ECoa5weNr0n3Mp4kjdL8gt3200gLEirwAg\r\nQ+pg7WAPwg5DeRsJf0QkIthHs0VapCCSxz6KY+AXZA2w22rRUAvlBWCRQfkq\r\nh++fWGX5aGQu2XK+4w10zrhfol1Kyc+dS5MI6ZoSwFniOJiBZxQSBNcJcxQQ\r\nXEVWkxrYoABGXct2SYzeFn9ar2q2ZeRdFEtwholJOltHVK7mkuGaqJIb4D3C\r\noWz/qUVP9pxUNLKrxw/vtyTLXo0mMMUqeJVOzK2kv2xq8IqaBAEvzvANNpUq\r\nAwhULpzDyihHnh5JFMqIh/eNbqsncKmrAQk=\r\n=KuLT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2205191749.0_1653035182119_0.6442212106678222"},"_hasShrinkwrap":false},"1.2205232225.0":{"name":"@bentoproject/timeago","version":"1.2205232225.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2205232225.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"ed0c674bfc87fac47bc1360a13f5d69611a1228f","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2205232225.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-GL5T7UOl6stsrwzWMzk58bukYLYazeNmdtRnl08X3CvTYAnn+IJ0ZTuF5uaUhd0c39tUk9d9ggKOaHb8z+w8/g==","shasum":"25349ad4c4779839b56157d10933e4576ac754e9","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2205232225.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqyOjYX0UZQ9ipUjkdI0CeJoLiVlj5uuo2/fcUDeIj4AIhAP9UHO4v8XrbjtO0aKS+gz0xLkp3LrkgRYt/Xx8BsUd8"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijJZvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmok8BAAm5ZsX5LY7Eqm5mHWKM2ntP8ckfCGSVhLsmjNFH5tXjjIqQpX\r\nI+ZKpOfUA/UNy3GQBG/Z5xbQKJcDukUOUZ3c2lCnn2B6K+AXJbNvSo7uLjaz\r\nKClQsNGs92oe/qJjmRjC3J20QEsMeHOCrZ6ic4UVG+wIw1YfTBLInC0QscQv\r\nBH2m5CX0xQmI7EtAPyQCS6uViDXi5MS8jz0z8YK4zDTwhSo7RKkT26ZLotx/\r\nC9QWTCPSm+cxJsJeneXtrRthMu0jwHoS4CQe9JEA8mpjLNGn6fijs49uoKxo\r\n7heQoW0JsLLevUdiiKA5Cy8ztEDk1mX7gSBL0V42qckkdg5NnaYVjG9IBI8G\r\ndxvT0nk7Ae16Mwz251idjKbZySNSARat0hnT//sV4Vctds8AucK6J0z0i7oD\r\n2khMQDIIItSr9ZqSACRs2PW4s5WT7mXRPehq3X7AbkhJHrCwWa4fFSXx7Vf8\r\nqcZB/38rpKaEmk8G9tO+9NXCh8cIXYoJkQX6+pG+2IvH9CmyLzALmFu/DPVV\r\n/5mWFl2NcHUBzZs6woBLK/Fj9Kx/JxBA7dqsAHkvkypm0NfBG+oBgmPETYA8\r\nVjCWr/CeNns/Tx8P9317/QTEkiSUFFiErmA9ZzYe4Gwc40kySpgGHvNJI465\r\nDVq5kxKDzEA+7jTOkG/MQ9YbN4EpppGkPjs=\r\n=dcT5\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2205232225.0_1653380718759_0.8049627903069203"},"_hasShrinkwrap":false},"1.2205120110.1":{"name":"@bentoproject/timeago","version":"1.2205120110.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2205120110.1"},"gitHead":"ed0c674bfc87fac47bc1360a13f5d69611a1228f","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2205120110.1","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-2fsctt1LKVsq9cd8WaFLbNZvjW83m50I2xyQ1/ZRk8DS49KiCsryC7qmzJPQwJoUGnAkIJx3S7O20LBpwgkj1Q==","shasum":"5d04ca2cd71ddd5642ef8cfdcfa2dc38502ce9d0","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2205120110.1.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH9PotqyXSRqgAb8CIP6FrjLMFwLYbxOAbcpNazR14sVAiEAzexElbOWYRtxNbT6VJ0pLMmMjc5bzW6nBHgDY/CLJnI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijS4SACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3aRAAit3WqzXQRyNH8Yj+tslpIq2ZCEQ7HufSvm+jk/xkU0/U8VWZ\r\nKER0ioNvtBsUkjVWfN4uNppwGS4otCJN4eel2AJz3+G2e/AWYbTwVZwGDqJ3\r\nyHF77DLmVtF320aD53O/bzaPGpjgfB4Zt11uE1aGlMK8n9QGFsMfse3MrUcX\r\nSM0kZZci0ONuTLzE0schD9b7BcGW86CrjpoREpA44KtDsGOOZlreaCgkKw+K\r\nC3fGuX90JvzPbwmXLoe73gy1PdNZqFm3eVZd1InC6OaAl50DIyc6AGF2Wypq\r\nszvLfsUuYTrl/A0Spct8TkHcaHK3mBMCMEahdZRy6iXE9DCiac7ZX6tZ0DWb\r\nryknTkt2HS9gGGyBFs2AoZZ1GhM9AydPAf4UPtxrPu+e5wbpsNMfmNfMxeGt\r\nZRVwRdF3oCbUHj0NG49wXLdVIsS+P9lVfErbbTTOBczf9al/zH2gKiO9EVF1\r\nWEmGfP4PYbYUaBX37g1ORhrPvXTKPrf3Oh5788q19gFNSnXXV3Gl3f7NwV86\r\nkRiTK6rdjtK6PSnRMu3PwwCo718fmgk+GDg9cMeUNnpcjAvSy9IdGYPuwMsh\r\n81qdFKdurMPlYZFa3NJSC2moink5Z6iqEj1WxGEf1SU3U8UlBMj2SoSutkw0\r\nBQNCI9XsPwIYlrTxGrVmXo+sGHGC/g0Ekek=\r\n=MJJz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2205120110.1_1653419538179_0.6498796666631992"},"_hasShrinkwrap":false},"1.2205251942.0":{"name":"@bentoproject/timeago","version":"1.2205251942.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2205251942.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"e2f9546e2689785f0d9b4ba72e61759323c45bef","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2205251942.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-RywmWIoboWt8vRaMZdbZ6a1QLoILoVESNH97BssYHkbf0JD0Z8IbWrxFa8NjtcRz9afHuaKibQq7irIvBm20+w==","shasum":"f1b345245ef66b99ce21095f663bba52ed855d1a","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2205251942.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEIpFRgufSZaXSLK9ihEHLB6dz7QT7CC2TFp78jN1lsDAiB3EyDixxzm9t+jxCUkSc2vxYF/blkkXmUcfl9ppXijhQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijzmeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoiVg//aBHFJkDbAc7he+PWH+aCxeYgcKn/jNU4PqdaGUGmMHD5vDXx\r\n0gOHJC1kwNRFgnJb3hQ5qvO5pHbKdsyFwf+dLaQSEYK2vIKBnzD809+4Sdbu\r\nY3Npd488wTE2R1iRaq9cbILIQJXiXWpOCXnlxi/iDVQWW6HUtWJEJ7y8SiPx\r\niBk3mU9CEYwg1nKuyV2TnFekK/v3wiidIsgQhwtkt/lHMYG81jdjje6xKde+\r\nIzw+QgLP2jREO/yyb3/wxHFjxQX5BaNfnDGM4arE94ei2I6YWPOUq30zN40p\r\ny/EOZZ9Zo3r7L7FO9mMhnsfZGujzsg6aIhRWBPLXyqrPFF7Py1Dr7CXW/VbO\r\ndZwHr8H95RwsgnJb93S9zl7c2DR5K+wnITJ4/vZQaRPNpOftKpssr+TNsJko\r\ndJNzTSUjtjTC1TPulFUeVFeGsfDm7mPFJWWhkDkmoOrHz766lbqJzKKS81OG\r\nDkKuxjGfTNQEtwAhN8wus3e7SKNccocabbkyisiLe5dtkXnEnEtboPuT4SJE\r\nZ/GEZOsnvhRgHF5d/Ew32pLnk3hbehwpP5MNFxoBKlERCeoRonunhEBbJiG7\r\nMUbBJl4fxt4n8OBHesmYqlkWMKLOuHYDzYWe5UBZila4BK/13eYnm/kkNmIp\r\njo9BG1p/IygSo1ZDxBo3ekbUEYb2ynpmTto=\r\n=C7ig\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2205251942.0_1653553566313_0.9589202814282891"},"_hasShrinkwrap":false},"1.2205270638.0":{"name":"@bentoproject/timeago","version":"1.2205270638.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2205270638.0"},"gitHead":"11e6020f1ca745e65b5d80408e0beca2a8d38004","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2205270638.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-GdiNrg68f1dMnq71RjI/zJr44oee6/q1vTqPXbH/+xPZqW6GZIEanjmXt7g6C2pebaez8sIlmmQH90EdwRM5ZA==","shasum":"415ad7cd6d088639155d3ccb6d7f075ed9519a98","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2205270638.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6Li1JL8I5ydNkx82yzb1sa13LlFHFInvxBw2RaiKvAAIhAPtHFUAxef54ihArAGc101bxtKxr+F1Y1nYsMvs55wPa"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikIsjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6EA//eZBk5sTxBhC7E35UWtkokmTj2aNO5O3VA5fI77DkCNrgLXvg\r\nAfTRpHQmT4Ox6CEAXRGp81CJiNeuMcVk5WVcoLXn3SZC5JjmbJxVNwC3mwoL\r\nM4Gc/ngVQQ/QEXAhOpHA0LFs8AM/kEwjsSPMTIY8Cba1Yc/iiuYm1r8jzkT5\r\n2sIk8TDrkQ+u64LSQOBAjyrYgRrNf7bc0xFqRVtKFQ2I3YvrNd6CwKxP3Pqm\r\nbJHVrsObHgTSzYPbobUL9ykGaF+f+jm0rOrUobVclp1SRhNCsqdtaYQoIc5F\r\nAD0WFdK1F4G10seGytqpJSdUfSHDvInAKHEsrJfkF2+DjUMdUoZLSFt5+RHW\r\n08Z5eJsZEpKDOHUkIaUCpepwa1JG2/fTs2rszL+oQNKXBnzFsOt9B/hGZssM\r\n4RQnG0wO9LMFOnlnDG/TpifPoSDLu/eYP4TTQlPaotx5DFlh+cU9yBmpoNsP\r\nRQ7Ff8zWyNyqm+duVt1XZ0K6VKAlNeNUkahUQoHaeS8ci4KskoAk+A9pDl2k\r\nWjEmw7k4vxPBsWKIX1RPs14U51nv9z8wP0YhsFk63MtPVISzHohg7QbzmHlx\r\n5MMkZHXpF615tZyLjcWHVbquYZDGOSJcLa/Jcl66fD8a7bTBZI7EBsW62CKH\r\nJYpuMnZLBbvOxZBCTfadaQd996vy4HaHOU8=\r\n=lTuo\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2205270638.0_1653639971187_0.18164681245359904"},"_hasShrinkwrap":false},"1.2206071918.0":{"name":"@bentoproject/timeago","version":"1.2206071918.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2206071918.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"f200c815cb7bd0e1495bd9c338425aed1887a459","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2206071918.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-/xZWCaaWu4Gesq+rkbcKwf/ZetJptz1AhD+i+djSShUanIQx/lbUGqcTR9IDNqiXGYdiKjekQV/RmemFyfaFGQ==","shasum":"c45935dd8f0d67e986b2f9f8f2fbcc841da5b246","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2206071918.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDD8UaGF1k7t0dyl4Y0Dnn2hjgejGkofLpHa0QsPKiWzAiBLtq3vwxN1xRp3Naf3y8EkluLPkR2BC03k14eOodzxcg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJin9CeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpgKw/+Jjt4bKDBdD4ndcxHrZyVr7O8oQ5LWa8vIVxxziC1XwdKqWEF\r\nTZhOQRIUkrboBOnm+HchN8Q9CQ8885LqjQwXMkGcYc/nAo2EcA7N5JadI6Ww\r\npS2ruTgIjqkQIdfWDPkm5hQU2ZQvwrNIyppFf7JrH5Y3VUyML9xv+IdHq0i+\r\n4ZuhrU1Wp0K8mY8zGWYx4uasCGxGsEDQKVZByu84AjAHMOupgXDDEnHrGUuq\r\n60zcSAr0uvovb3E6PzupjS7wnEuyy8+1nB/+Gsm3TydMnymhFmA3ynUb5lTO\r\nI+KI9i3LUZ+1OLdhda27Y0Gz+ybP0Q2CWruOv62GVKGUQlLVE754pNTVkLL9\r\nRsVEZb0wHK1Zg26VNwU1eSAvrIga+Bph79uMbx9Q843sLeNJ+46tb//2FBYy\r\n2c6ZrW3KYxWLWqI0vYlTJrj+TP8E+NhwAFGMHNkwkjySOaN9quQQdw/4m9HC\r\nIl0pH3KM2um0K5b594HWo+JKWHCHYe+AVJ4OyZChW0uPlQRPYICbE/Oo6Ndp\r\nYEMdFlL8M3BbZVDaTVL8emuWiYJSsK9ApF0K4oG5Ine+LKEu0DJ7CI0/5Q34\r\n0mGBrVl1Dc6dEIPUi9eQawqQoqpdisvXPfQZnYe/CsIB8TSaY4z7TI+qC1Wb\r\nlAQqVXqohOEHOlDmvUhK3GyGBpCLaIkK7MA=\r\n=HZZw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2206071918.0_1654640798066_0.8603957313052679"},"_hasShrinkwrap":false},"1.2206072228.0":{"name":"@bentoproject/timeago","version":"1.2206072228.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2206072228.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"9cfa89fc95b4eedfeb00b4eec539909f0b0c0f6e","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2206072228.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-4GCXBW4GTExpRdprZbXLOIrNp9wbaGLtNixQ4uFfBed0+f6sqLUVEIqLikuo3qrj3I8M0kJq/nnJGZf+zZkV/g==","shasum":"daa79ad480353a910b4d2b7285b38ffdcce4f036","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2206072228.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhxTCPF6/zAH/CxK6FR9NyBoBeTi3X7BkekEtrAhtCAAIgdn4cZW1WgOBhOXMesChF+9d55THaYaDZVuohvSCMVrE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJioF06ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqU/Q//RDfKeUoy31eVh7TkhH1uuqvEVnLh7p1Zwi4ObqisyNdWdo8M\r\nlwT1bmvD6CvmlhOW0K91tImdj5K4yVnzszI1NH8bWSH11QABluqfg4OEDIZ1\r\nSg04AVDLjlI9Fcj9lknJS/y3XlbxL1cLKcqbScfKRKN9R/L+hUAtC15/9/nL\r\nzEUGO6VlagPoCno5uUcFrRWYCxkUCfjOOtO1yD+rF+pJ0meSnOV/Au/kcvfB\r\n0m1OCCvi5eJeZ8ITj9oYN4VjJ/ce5vetQjt6dnwejBVw7j7GFVDURT7vQat8\r\n3dT0+fwOOmKqB/foRhuchIPYVYEbW9XsPrdNmejJPI4TsNUzg5sQnicLQPZs\r\n2JC2U30bRXbSW1mTa971KNKSbhqXv2HXDkHoBay1Mp3YyYqZcoGUKZs4YjGJ\r\n996oBnG/b1W24XyG5FW/nUh9UdNECVrJbh2E2cexYJaeDQIBxEKLwnAMhfUL\r\nDG5cEZGSUqtK/wpJ6mKtEm6BoHC1BEiO9AJtH/yoH512Tv2TL/fiflGsNVqm\r\nRcjohTrQkmbBb4BKgpYXkYOU85CuDv49gJJ1WsHk+uWjdZwIon7FdCSb7T9/\r\nCGc/VsjsTCLbJ4mrPLTa1UQI7C/jBcfxR6VzqT5xldDeRMyI4LBs0Ck6NahE\r\npztb0GMeRZyGkyiEzvTuUazCKDL8/kPUQvY=\r\n=frUR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2206072228.0_1654676793959_0.27922344215899164"},"_hasShrinkwrap":false},"1.2206082301.0":{"name":"@bentoproject/timeago","version":"1.2206082301.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2206082301.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"32e83d3790f33da4840247d996ed3f6b256a796d","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2206082301.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-acBkhAE+pg53ZgE6CLSQYge7ndNVYYV/WpS7fXUFlTsNrksHLvXLMJycgM8WfTdPdkRwhTkIK36Q/MM7xOKdwA==","shasum":"d373763c27903d6087a80d31e278f3bd63251569","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2206082301.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqxde7Muz24o/4MpEJ6m9i+4VouSUM8qUxk6cnIhg8/QIgT3ezHffIBlauHhXquvBLPlkDUNMFh3hTuc4alVAhxWc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJioa9qACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrlUQ/7BNnXiIeGuL9oBtxiyD3ZaZmCraQiZZ0bAGI6gaBXqV+DtkPb\r\nnQYb9bCcis7FyNkmZtxoIfhWN7/grVJhBOatruNYhfBzR6sN6FuI2nG/zCvn\r\n0TvZllQp2hlGoO0hg9TvIrgQaSoSR2CGp9X0QyH0NDUVngdkbpRVftyiCvjT\r\nQSckmFuFLy/9EXnOAfyD4Rej8kI/ihCE7rnqctZw4ExbPscflJr9OvbYbZtT\r\n5c6ppdXlgDFOqpjTc8IvfJNIvtCP7WsuY/zOR+v2RavPIvTUoZxkEyACmC5t\r\nb53pFc4FYowoCElfUKdd8tUiLgvb5ek0CbRnWKI4TolCXeywLDxLcPhPUO1V\r\nTdwL2RPwK6gR7eo3EDCkBSJgxs8CJxBSDoltGtzUtenL+O74UY8SXZalSdY4\r\nLmgJzkS8ziYl2EyZGBXt/JUp6Mf1aqEq9uKEFfp+EdD78OfF8ATA7y6vCgiT\r\nfZLS/gKE6KgQgpEeZvUfDwcODLeiJmxBXOh4/uiARYFaxoCzhkRQKgJxxIUp\r\nIUChzmxeoUyczzTz0qGvKs8yyRZ4xERDeV/pKiHhM00T1TR6YGXKELWP3Z/Y\r\nQlRn6jKzBUC1HoeFd9I1PqheU3i7Jw3errkFvys434lTsgm3H1L1HFw2KHnE\r\n7qN7nGDOpCXTLgBMFXUuP5NYer5GkywoEwQ=\r\n=umdA\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2206082301.0_1654763370500_0.6325792954198626"},"_hasShrinkwrap":false},"1.2205270638.4":{"name":"@bentoproject/timeago","version":"1.2205270638.4","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2205270638.4"},"gitHead":"89e43e107472144de698a2c3ebc9e78ef35d58b9","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2205270638.4","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-haja8cBg3mcIUDe6u7QMni2CcLUf97116YtV23pBLsFG1ERRFoeKzFlyRo+H4YCOBvK/n11pUdBq4X31MjVWDA==","shasum":"0496a83fa5c424630119f5d768a8a9b79683e2d2","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2205270638.4.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCH2NssQxpuCG/hRbWkxvXV2ie8Aa3ZoWhwdEvFnR1/0ICIAjfH4JQA/NOQNK5gPfEvIC17E+uJ4Au6Z33jxSor+JF"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJio7jVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJpA//SW1koy2QlmOJH5jZgjLzKRcv2XM07d0E6ojY1TufkweNFXdn\r\neYV7/3B+vhveYxQs3qBjn3F2B/3DHqXno+Q9bjxyJ8whuL6uBvy7Ii2GMyFl\r\naxbL2okVRFO5AeDyPSsRIJYrwCjHBKIsFVITeBUYhczS+sm7OmXvqfermsY2\r\n5x7ROo5xFL16jz96ZhuI6BpGl07tZwPhWpVZ8PcjqPzPpwLx5ft4CsR3Eoi0\r\nIptFwQ58Nm4f+HlyrxF2ualim9raU6wVdTklWVgu+e4PBg+g9qnTyO1IckNi\r\nLXiykxYdAXOvcUWEJkvH8dU6AYhEgTdT8EUtYTUbtZv4SDbvcYaVU8KoV2Ze\r\nsw0IyP37bT1LlYw1N2BO4IgTZA5P3PuHmsJOxcCaxn8E7KeHcPPNfluil6S/\r\nO8JeKCFH+Va7gPk5ondZhjw7I61LbVfsD1zp5VoTr0zt+AnE4bBq8HxUcX3K\r\nqazD2JcR7pEj/poriu72CD9VTNmN/OuEt4wsKgQAWO0XBNaRPK0P4YCqfM5J\r\nRAH9sl9RXRHkhNJm4xkn9DJ/kWxyJ66UJH88KGMh+JcO+9VkBsUOReTvNM13\r\nRHp0HTIifP68UeqS/y4vKt9/qr1f+OIJQhQj7OCyE3DHn0oeobFFRrPcopT1\r\n56G+Y+6e8oGSPVfFuLPVCeZ08Y4FwQ+T+PY=\r\n=YF/c\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2205270638.4_1654896853459_0.126912438362641"},"_hasShrinkwrap":false},"1.2206101637.0":{"name":"@bentoproject/timeago","version":"1.2206101637.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2206101637.0"},"gitHead":"89e43e107472144de698a2c3ebc9e78ef35d58b9","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2206101637.0","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-YLuErbWrC9RYSoFedt7WBeHEX59h09wPCVqvLu6ngnBdge3z0xF88eu4eWwZPiMDUio6QyV75mScEhKSIUFuMA==","shasum":"31ee64d7a3c39fb80168cea74d465afc7f03f9b8","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2206101637.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDG5hi/FrvLKzWWqEGLkw1/4Y1T4oDB5ekvp0eoupTlkAiB7HnSeHuXt4MgQXdKCeXZjRcfOJhx1bDSZSMdQi/8DEg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJipFF8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4eQ/7BbDW2h5UUna3hM12j7+sVWZJPX5KX6QhDm/ie4Z3/c2woVEc\r\nAM34FzUlTOJjIdGcFuTpF8gOfrp/oyN+QqmrBKzB+gCiI3khYgJwl8GoFCve\r\nDdWfNJLyvoL03l1yK9N0RgyIitl/EbwcoLyQv2ejXgail+jrekC/pnBSqE0S\r\n1gKBkqqz1iHoRtIBAjYeJTQ1hHCqm+ftvD2vvDcQmhNBA8uf115wCAP8GzL1\r\ne4RHmKuHnlUL1uFLJT6WYrD8BXi9xPRubkAVobl/gbjGij006lutWR/pzNbj\r\n8mmFvlyCqZKIHh6Z8HIY/w8G9xzvBm0IlBe23wUTFTM2IRhqFRMvokOwEMLG\r\nrjAj155/NqbvU8UGI0DL4PxcfEmekrrlCKdebVptDMOK8UEP7Ae4flMF6Zvd\r\nT08hQoJZ1AUA/u/Hq4uXke7G/hrJmcrjSOsUmeE0MWqiwNKpRSVVdnsMPB1g\r\nr9r9o4sHYsu1fEAA6YFUhLoBOPpITiYIVS/9/ThgM769nFgCkT6EdbMd66bd\r\n3BiO7qXLuhxb9s/7TP9K7Fzo7rgRU/TyP1KRnV0Aq5EA1Ww2C38YxexrAddC\r\n3KIJd7dEAn2WoCr5WX0sWQGEKRaRijO9Y0UctrHdweNt0U0B8n5ajq2QqMqz\r\nMNyt11kQtk5Vvhqcxkn545bb4jANLy18VEI=\r\n=fPyU\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2206101637.0_1654935931868_0.09914636853468162"},"_hasShrinkwrap":false},"1.2206131450.0":{"name":"@bentoproject/timeago","version":"1.2206131450.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2206131450.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"f8fbcf58e78ea43df73b529ed4a25e79ac758981","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2206131450.0","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-xOdrkRD2YsRnKIE+D2d/BEM/2gjGGOvILQMsf9+dfdkeC8C896dKlG5Eg8EKC/0XXDevJ0lCfZEw4XBwrRgh5w==","shasum":"6237a60c73b95f1894185d273b7181600fcb6e65","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2206131450.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB9/e6Kmg39vj1dcJSddgv2ZBqANjc9ATWMCn5st2m2VAiAt/5uXUHfGQ3Um6UO8RZ18kxdMDjhEox+Exe5N8Vor3w=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqEZeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCGBAAnxoxSTr1WjJ822BXFK+CrEqpG0gP9NVfxEpc9laZat/07HQX\r\nviYEWRsu23lrBH2hFtHcECwa7fnFazGttA+cwqG/ufHZZJE4j+PpaKuuxY8M\r\n6wFu/LPrBQDWNWMaPH+ZYl5+jhf60up5FR5um2Aj5z5Sp8Mmkj4teW8AYnjw\r\nTr5Ipro2p6moT0j8fMrOVsSny8s5GkIiaoQFB5vOrWpIz2r5i73Wc2JJfSg6\r\nF6t7iB9s0Z2czV4bTvH9R7b/gTxAWUObwplTVHUaIdPFbPCsu3rMzYJxihXf\r\n0FzNGEabcZJBuu1l8S3kZQluhtEgshiKSgFqH0gW1FsQ/6dmNFkKsQXQaHnS\r\nHbWaX3GL2wxm4rJ8dwpfIBXK3eDGvJM8SGogtsjr1ieDTQeuiADDGDVSsIAj\r\nIbf3NvNJlO35XZBGA92HbqEqCTfe2J9zBSYE4NVe3alfm7Shf13JAez+LoSK\r\n13TGPKR/jpcKXBU8a73CGq7OeOZpn4VYCKoHXW1JT2TMZA8Fxhjfqhix8rBo\r\nNa5tyoYh25VSBhu2Q9wrjLIyPmXpF+eVPch3a21eQC98ri9fMvBHjY2OGSO6\r\nc0BImehJMBfKvD8pDz7EGSUupJj1iVf0GcTFh/9HJx4zmvB77fFdevHP2q2Y\r\nhCLAQtsyEOpGjdAZ0w/DSnfOeLkYW4MVkoE=\r\n=oElB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2206131450.0_1655195230161_0.0021416670173686203"},"_hasShrinkwrap":false},"1.2206071918.1":{"name":"@bentoproject/timeago","version":"1.2206071918.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2206071918.1"},"gitHead":"fb620756f1e66d99fa06cbc467207602e4aeafee","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2206071918.1","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-l9HAXOQIFeCi2HT0v6VCf9RF55RV/mFBlZXFHoyNb2pSEn1fmBpJPUq5cAarCHkn4uZc38jTEOPUfgXcO2Q2Ig==","shasum":"e26c9da3507ab0363903f8c5defdb72308a15d5e","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2206071918.1.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBkTWkjt/MJWiPUnka9h3PRrUvKqDx0Zld/cpA9W7q+0AiEA3TnFdfmgIhZaQSG2L2ivvd4KBtL0eHEwt/eIalOwpT8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqP0EACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr+UQ/9GzbOHrmxvBHkpoPurPQ2zOW7g5U201d51c6diZ0lgHFMIaRV\r\n4uh1vbSlXRxXVXA36LUQR4UmEru6SPlMFTWn5kyLyl6OH9qYr3LwS2CiTlmW\r\ny2LKr2h0+g5RJvSeRBFI2cNHRqi52AQBMhccxNRU5oy/68VPFR1zGGfjfh6a\r\naijEisaB9kES+WTur0QoONY0FHFvybpnZWvavzKooMZ3t2xDJr0sUwe4JwW3\r\nfnuNPg2TFI5QMN5+mMpjchn571IKkk6XZc15e8eCybfJhs1dOXwFQUZHLDku\r\nNq1wc5hSidK0q6Me3GbjqdLgMSz1rYTkxG8L9FpIbnnbwdwNnQo0+n08ZSGc\r\nxDqtwOHoICR53dOFbh8ayMqC2HnbRw1UqXpnFzDb2GE3hND+Tb4U3Ow5TT59\r\nzL8g08kOgiLpQhaAGR4OdydgRMCV8DsIOcF/RyMt+GvH1nYbl4cYtwnwRg/y\r\ntBQerTb3pn+JL833hUUfdY8eE74Ba+98V0o+DM5BWeSBaM6Esmu6B2EIzV2V\r\nky8L9TRCFA3elMTfmONHMwYHQ3i7QzHF3TjmUUOuF7C8vIMU3UiOCOUOEZlD\r\nAKDbXua/wn2ZuhP5tpL0ZFSESpBQ4uLgV+TZ0Qrpv3UCHaQdC0neaNoJPduO\r\nQ4U36uIrARIsW6Qht1+OAzW8Am8W3IiqiMU=\r\n=dbVC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2206071918.1_1655241988308_0.35244822783863894"},"_hasShrinkwrap":false},"1.2206162023.0":{"name":"@bentoproject/timeago","version":"1.2206162023.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2206162023.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"15781b541aae254d04a1cc777016aa40759100cb","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2206162023.0","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-2rLeDAV8glwI3NzpY2oNrwRVgqNWj+gGCZxoGZxwBxK83IDeLEcYMvX+1mkHmBXYnGKPi2oKf5kV4CqGGEDpvw==","shasum":"209d97529bc1019a357acac2c9a4b98ee8dafd3d","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2206162023.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7JAyChR9yoDCMjE+b2+Hq0laImQD5fi2vXVA2Fcu9owIhAJ3MptkxmBRFp7pGL47QOhYNIVHZ0xWYDUGz48lzxbdO"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJirDqrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqmmg/+P1QGntpwqmgzOAomrzzAw90nonYGt22saHnpLXv8gYIadUZk\r\nd/qwXuKIgSAgu/3M+PuMt8dBvt5qWui28Se0pE0YUnpoTLDXH++U3eFJNEI5\r\n2BOCjsviCdKFSCLReRijS760hq9YuJgqBXsQRcKsoPul1rqrq3NQwIR2z9kL\r\nRPi232Y/0DotX1MVKfkFBC2mRhGQvBbHDn47PNWNmHJXULDT7Lo8wImTKSXy\r\nSEQKca4ZwGTuziUFJ+L7RyDuXLCnvQ1Wfeht/8fQdVmdVbRtC4B4dM5k/2JH\r\nF9u9g+7lgWiv3lhGqplVhAVp/S3dLdiShrybtZB0PX6sYxtgURprVBHwd7Do\r\nmu1yquDObLRI09ReAiCBrcCXkBAeSfRBVxneiiEciPrJgsOrPcKrTy2KzlcR\r\nZzd7WVgc7m6AvhQTNqLgZfCAYSYjNJ/RlUpglzKi7Jpeo3rkGzElyIq9V0NW\r\n0FguOb4tg+8LwlWBtkmD3kooEfK/ThlJpDo6FPkexkPCCPUCcdzvl90hYjzv\r\nrWIXxb/2zCMcV0c/BLwV4xsyB+CaNXVCiNUQuNG7P/2PPTjBrqbHwn38IbdQ\r\n3okdaxv/cSChdZKzwJ7u5kNSvDpSlhoOGO6kJMaCPNzw7Iefap9l/eAMfq2O\r\nCjCoEvJ6z9xErQlS+tnlFMbdpLxSFv/lweg=\r\n=KWmP\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2206162023.0_1655454378870_0.42956890785412427"},"_hasShrinkwrap":false},"1.2206221455.0":{"name":"@bentoproject/timeago","version":"1.2206221455.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2206221455.0"},"gitHead":"0f6cdcebd462d3dcf580d8df0a7dfcdc02de9061","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2206221455.0","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-zeE+O9Pday942ll3gWv4CBb567fBqp2/QV3h8W7xd+FQ5Dcwmw10fLr4m2qqT1kTFFVGn9YnXJJJsFi0Xwl+ew==","shasum":"4587b91bcacd45c8621e3b9b076815c179035dcc","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2206221455.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAO8CLvtcyweE76/ZDKofxlIrcPkHth+UWftxPYZVaJZAiA20tFnaZrp5eYnMI9LYxJBSDwK31ORMjXje8bRZ4wcrg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitCOxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqEyg//bOiIsvv3tp9z7uARtITTEJLXNqI4aZr4z81EEfio1A8kyMnn\r\n1vMODXKol4CxuwjhXZCBDlunNOs7a2sAuTRKg1mGMgqCl6Jt2f9fbcMBuDYp\r\n/uxalnobA/yyvrGEwnw/lEWOcEFKn9bHV3r6OLv9W/RogGOF0TCX1IhBWdNG\r\n2wXGzdEL+Q4bbJGBQjj3QFfho3+B2ua2sNuNrJ4GDgglsmOFTbFHQs3BUByz\r\nL9cYATTMtMhVx3T3AXplN++GHhKVt1sRyReUywondMiMacpHvss3dNbiRUL4\r\nVToQ+DguIhOK1fnltZUgnL7HflUCn17LCIzO0gZR+ULNBSas5HKfEBoVcJwL\r\nivBtUftsdR9Y3fwmKXdZlKuWUNPr/mkykSFoWAZ8PKOjd/TTMyIPoQ55gRno\r\nAQuJdjS/I/OuyeRwCfOdX8ZCRExSxEfRLxjeoWfGmacMZZmd83Bq+2QBRIPT\r\nk5q1kgofiO4m4wuuNiUCky78VZLu/jOs2oDS7/2A9NAnUl30Wn/lz1vb32yi\r\n8bjPaF/m+0IY6jVcoYXhCL9o9kPNHuIJkISkO4yyM/XpvxcBlC+8aMZHYFdy\r\nKfBAq9DvvlTCIIhVExehqleAZPY/9WGRk+BKeMRDDuM++FPkO12vRMS6AJ9z\r\n/XbONgNt41mJvOBdB6j+P8N/pnc8do8SyMU=\r\n=41Ro\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2206221455.0_1655972784894_0.3262044106267532"},"_hasShrinkwrap":false},"1.2206291614.0":{"name":"@bentoproject/timeago","version":"1.2206291614.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2206291614.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"34fbeda57c3cc9d01ab3c39cf9618342ec840187","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2206291614.0","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-4k5nxA24GlYPyp5tbsTVHtows0jCCWM67X9gpqqoM5DHKsGz7oL5rZSfyO9BYvdRUUQCHQgrq6vVO8MifZ1W/w==","shasum":"b8b18cbcb2443049cbd85af7c63e09ee00cb587b","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2206291614.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFU8ntWp1/1yz715n1C5oFMD1LiDrT3AYIGDiLAmcTpwIhALZgcUjb51xOYJcs/SzTR2TMhjCtfaA1JizSxgJec7e5"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivcoiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHGg/+JcVZMeBveEUmteeqPKRqGQ4dbC3VD5duVpLJJYVfBjjlKQVw\r\nRjPAk0vYE36vFkNO1N8nFHMJUkAvO0ZtfY6BcG6aqn/0LOpCNhndIAKkJU2O\r\n4UzGsmscBMhE8Hw0Z1tdXMJKrKRn8VYiY+I0nI/UMywPt0irMsd0daNh/sqK\r\nSLn4xAB1DeBjBc8nw6/hnkgyekqU7vsYrWmkJQpGoQ5INwFo3cldd6t4iUZM\r\nyGxZm/A9IQ1DDL+2wPJZbI4u/1Kg+ulj9H2bV62zRffKcfmBLJGOr8dRFfmO\r\n9x1/kXHfn6hj3iMsNiTBYKmp6S3MUHIK1ltCoeCXE2QSrj7Hmt/SDyG5J0HL\r\nPqECuWLPKKsir2AzDGYxjpL3pTm4mxvvgxyvVZbCB55Z9QBb/9Gcq+J2tZwp\r\nlqGYMeUl+kliuWusykOg0imLZb1p4dw+jdYOfEUhhc14Yj3KmCSaWq/W9qMH\r\n2bx5TwvAsWtn5IAz4pqgSRBB7t5+LYEQG79ASgZaiN1FkdECPOWEpg71om5q\r\nt5ScD4OytjpAmzEbDncAywYsiIPln61wNVK187hvRgznDBIKxWEP297WG51E\r\nYgmrKoFWC3IY5e9qQSm0WYa4sIze6dJHTYmso3ajMtTTZPke3pYAH5RJZHf6\r\nOmiNfSXZYGzxPjF3p/oC6H22MJ4f1jJ3OhI=\r\n=7RvD\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2206291614.0_1656605218551_0.4666086494137045"},"_hasShrinkwrap":false},"1.2207071723.0":{"name":"@bentoproject/timeago","version":"1.2207071723.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2207071723.0"},"gitHead":"4ab5ca14023804a1af71c15bba775c5805e2085d","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2207071723.0","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-+x2/2PRHNfhZNcOTBhf9Vekw/+u/+IHvkdj779Er8043Fb9q5c48FtnyijhbmDZv4avDXJbtHnb7j+TF9Tbgbw==","shasum":"de140698f87d9be842da92444be30f4e17d78dec","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2207071723.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICjj/Q/jlhOL+M+ylMi2zbfwO67pVtLkhJsoxqkEYHuMAiANEdIj8msSGEWlxKOxKNpG0thb6pFAnAXXM0vxMwnigw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJix+uxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoY2g/9HVzQ98MgOWkt1Hc1pA3qW3k63JWxfFw2yq+h8WBMG+YM4Apv\r\nq8IfonwfcBRHJN9I/rY82oa/jpICvE/DCa0PxQxHUOkXUUfl66Qd643boq0P\r\nBthhY6S1oLgHjqPRgLUO7EHDFXLC/iTqpWG+hkOmOxrfsDn3RNbURCD0sxj+\r\n8cYQ3kyM9tKBK5kgDn766PEnKfrlVeFm7gUPIy+kt65YyjgqrCnESccFT6Q5\r\nwf8fFvBylBGDz53rz74pjMSSISbOJIRTq1mOzC0KNk7irqqZqhTh2hBj6Ydj\r\nc7aNlcr/76o8ytvGlq9YPmd6apwtv3jWxvjhFVwoNpd7HNFc27mZk2eYrJeF\r\nPPSiUN/g+feny8vLfhZxzs0QBgsNgqPxP/WPohonLx21SIfd42JZ5mzb5B0d\r\nZQb5a9l7hkbz0snTxQGGMTQY3HGzoO1Zi4+haVWqO4H7tlrh1obh4S2qtcyv\r\ntkHFQjGSAk3Frv/wC7vFP6pknzXr2hH8oLYBo47ZDMz0aUJT3JlgljjOxai+\r\nYvu3sSrffBuljoEIgpTHLwcqt4hiHTpVVFiMc5hpo8ghERQOXVJqHMTSc1YV\r\nSfNRg0RQlGHMkhEo7B/pFy2a5A0qSZjGg6Z8BEAkHW5XgVTxTchuN9iSiNhk\r\nZlg+ro257tfIIy0VQ3L83Gp+2rAh7NoXxFw=\r\n=ktG5\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2207071723.0_1657269168872_0.22032280278294314"},"_hasShrinkwrap":false},"1.2207181727.0":{"name":"@bentoproject/timeago","version":"1.2207181727.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2207181727.0"},"gitHead":"78802d83c6c9791cd4400e761bf22f9909218a58","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2207181727.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-HvdwrrxnDZqTFEPZXnBmZqKrRc6FVcUZ564vweDCtAKN+X4qVdS5sOylYq/Vujz1B2mIViKWLEclTa553MruWA==","shasum":"cdb3b3836f856440468ed98569ec075a41e02b1b","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2207181727.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB1LrHBaO06DQR+au4kIakr0EcnAEACMtAwGtqD/d9/CAiEArvgRlNU9KHBjL9Y6/kJ51SMzDfah1njdPcQkk1K7e84="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1mqfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrgUA/8D5pIOCuHpH/YZUNEE9CKEpanCHbUqx4iafRSEC0sb+bNpJts\r\nnaVBFampRaSCzT+mUbOCvneLd9v6nJoqSF5oO94wwyGuuvO5UjS5TMjHK4HJ\r\nmB/y0ikqRtb4canTRof4lNu5up/eDgts1LTmxJIv9DIMsXhg9gMra5xN123j\r\nrxv7M1a9ZLXbR+2vj7HRHo2zamy1LFEwT+1q/sFK6aEKlpqWv9/iW5DCfuz4\r\nh/5rMDKuwEcAoS3DZSxQRSsXTWNE3j1XkGOK2XlxNT9/FOuB38lYE1L57IP2\r\nioNlw/OKlf//DGuVyvB7BozFWxhnkVNlEnG+VbzPSOi3BtI7ErY08o2bSJct\r\nNRLxzE1CpyFaV/oBIMnUq8yQKB9zsdpKwyCd1lw1RwSohmd1HW+xSsUozAFU\r\n5hRUWx9yJGcJb7d4qpVdzPbUCCbb3vEiglQHGGrxO6hxfi/s9CpW4V0EcI1d\r\nWkuJ+ctaJiGPpQQ0Swxg/KQp8Bxc/BS9iz0HqtUTsj0F1zQlhx9rtIjncixZ\r\nwOSm+gvm43EZIoW3yIe8/zcZPyMHvTexENWcGX89xoBdKjqDn7gZCO8RWKDN\r\n+xhHPL5Ia+oNrun5u5Nhba1yVCOd6ApyX4+qpC8XRlXmPJlZwHCkmklyOzvC\r\npp/S6BkzZ4CXIHnaTcJa/qVUnlElhijhudI=\r\n=3v0H\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2207181727.0_1658219167268_0.8604462387427587"},"_hasShrinkwrap":false},"1.2207201724.0":{"name":"@bentoproject/timeago","version":"1.2207201724.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2207201724.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"62d86212e783d34fd2dfa8bd02ffb0e447c0538b","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2207201724.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-zAvMTCDIA7m4N62CeyWJ2s5a2jubKpmwpZD2v16vIlIH91xIRoP7qMoC5aAmUUdA0RYX5XafYt9amlqOeKBC2w==","shasum":"e6682308fb162806a65e51c6280d76b96964ebc2","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2207201724.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGkLFpyvuv2a+gyWlJup52UBd7NTTA8WL1v2HIpt+k5QAiApTkwgNgcaMp4qip7rhB1nI1ME1im3RF/xg+tZuB1HhQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2Q3QACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmozfxAAlHkxGN2R+98V2C+Zq3jmxOAPLkcDpsJ/fK/g48RCad2dcDIS\r\n9Y0sn5yWEoGnrqeqbID9V2ixvoNsA9cLDh48b2Bv+trwyyqtVkbaYIH5c0fQ\r\n2n9j6lrXaA11kC8ob1T0CubAmCOCp+AeFzBKrJ7FUxVNDgewhYnD+n0VfO2Q\r\nFoxX2lEKeBtN21NhUZOrgd5op1H4qrTV05FNN9ynX+vhaS/3qAUrfmTn46R8\r\nPYUYLrEN+9IRtiXKRzCab97c1dt52hEDHVn7d2noI5duHVH+p+fbiVvlItgT\r\nV8mqbsZdWIPncmGdSWvUngS02qCeTgiIRXLPcGA6tiSABI2/SH75KSB5xTG8\r\nSmC0x2BAwpn83dZQylkgejfQWrwkI//X/fg9Ev5oKcfy2XyLb/Z2aebcNe7a\r\nFLk3qs7BmLTWwpyNe+a9FT8eKZ1LB8GaebGoUkf+zsKeMk78syZQiDBbSheZ\r\nqAuYOGfyCYHnpWDVSk+VSvRdkE3GHOnMSC4Y7zMKJtd3hPYZIpMxbgCB5rL5\r\nDRbegW95ZAxTRb+n1kYN9ZgfOpIk+ChdOShj8XxfQtXVpCDUHZusv0sX6Flp\r\nJqiXdWqiDiCipZpyuuO1/JinwgoZqoJ2QUlJhAQENaadiBZtsVmPP6Uvyspe\r\ncUFWDKdNa+DCIdbC+8vOnkM8Yi7Ath3MwBk=\r\n=RIei\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2207201724.0_1658392015964_0.9634697094970566"},"_hasShrinkwrap":false},"1.2207221643.0":{"name":"@bentoproject/timeago","version":"1.2207221643.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2207221643.0"},"gitHead":"83270c82c0130eff7988664c86a7482098f9477e","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2207221643.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-6JF7elsI4lxLbPWGVMDWzbglfpGV09hnEi3h+swrS/CauRFrzAxu7phe0k4MHWQqm/aaoSTCEZJkARv+EbemHQ==","shasum":"bd639b35bd643e5c581a6577bf52fe6bc621dd8c","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2207221643.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDNOE9crYVzlJ4O+YWMvDpLLQH0v34jZhp4QMSBBbsQsAiEA0/ORhAVSlkiQWIGIe0wFVhltXP/sqwNLaY7z/3Yst4w="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi27CWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoF8Q//SM7qooIejMmMAZaJqCJK9VOHp5MPCY01p4QmYuUpd8gvzqCK\r\n4L0icyRXqqE7bphCbq0J19WE1Q7jAEYf+n3eqtf9Fg/tsDPrwWlhOLhFSoCh\r\nwGfxTcoUuxTBTq8sg26iDVcJxyBlot3Kg8E72p9OAfv6YWFbGkPhUS9ctgzt\r\nRklkn+BRml9xnWr2gRARO3yWROSyA00yAMBcng6+q22Ja52aQPTyMq4RVPF7\r\nSDtbkCxngx5VPKAk8OM7g65D6TPGr2gDc+UOEWeivYqcYrBxU/Cjm0HSb2AV\r\nj0kg4jH0SyKaLkT+jhBqOkWYRi3yDzsMMWeJ6uQxwN9xpWm26pF/VznjhY8P\r\nQlQTmkRtxSEd0E/fK+YVD28Gi5GgpNEXoDpZ+YSdS5ewhhWKKU+QtOdg474f\r\nXCZ+24/dlld0RlvkZJtrR+ygcLcSl9qLxMZ0HUHnJbdBMC2+JgjAofKfmQK3\r\n5xKEyxaHT/bmbDljwqDhHk8hoT7cng8gpFxX0HGP3+QgCcWhZKKMKeSz8jE1\r\nhtFi+fsfvt9OLsnK5+G39xrQLjvnF6vMcNElCg4nV2t0I0FicUwBcGIanfhg\r\neKyVuLB9k7KNCyb2BKoj2HNxuNedBx3D+lZ1wouOEv7z7+oOgN0xY5/qjTZA\r\nGynp9lKbkkvXVVjFtKZXLz854FMsj9FbIyc=\r\n=cbvs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2207221643.0_1658564757857_0.7903032097686509"},"_hasShrinkwrap":false},"1.2207261725.0":{"name":"@bentoproject/timeago","version":"1.2207261725.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2207261725.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"b73520d61dc1a279ec10d2a27f58891e2e2d5d93","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2207261725.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-enGiiXa1/5x11WIV9d/glQwSyDJYk5t3e+xniFlPeHa2lRw3ZxWrtEYznm/hpf9rgqIF+UxlrLB2oBRADkKOhg==","shasum":"361a9934f6a21d4ae0d139b32f10cfefde6c1f86","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2207261725.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSr8HqznlE42yUOGRBrFpTvVUZraHHGRhwRCeSf/IBkQIgNiIlfW/zhh2g3sf8eM8G7Tt9NKaxCH3dlct4r5ATZX8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi4PZ1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpS/g//a56lrkSE9358ooPHB67xG9+gTNmHqfKInHLJ34LxydGnBMAO\r\n803xbjMwy4ydcL1waRCbYiU7mf93EmV4CvNvi7da8dlKJZn6J0aHmsf26pOA\r\nh6l2JIpShQaXMDF50ROhabn9xEYmv4mxIhtztaxZZRCMhaXocaI59cghohdj\r\nqvQRWE/+QFj2TwkWn9IEYcyNIw27/pD5UOyFMYW+fymdLi5VTn5tM8ZDzKBy\r\nLDrBO/HUgU84awqebKebQFmruYGHStDC4ZLSeLSmT8iLw8LqE/PEJ0KpIb4+\r\nfwzZKYImPCkhWI9shKGZTzwAQlrUAg+xBqp49j6mowxAN4zr0ErfOC3PJGTx\r\nARQKYrLman6ywdFWAu+hiAhLAriKfZKsbwjYB+BYDp7pgjDdqHO4kvFbYERZ\r\nFT3Z2d1ENoUvub1dpyxgS81O/zTSg4QBO8b6tra9jhLfzeEA9aHRVNfjEE/0\r\n6wQAnBc/jnuIAXFy38Ts6UfyZTbbDrnPKwnsaC5eMtGHKQibFo0gbr3dlZU5\r\njUt0LWgtuEpJvO5G95U5kLa4E0ie8ieBf412pZf5yFKFYdESxEaLsz8++UwN\r\nUY0GZagNi7T2Q2EJPlp6OwMHT8Pgvo9ygH4YECWIepx4r1dHXQJ++qhEA5hk\r\nNldmiCzmBOe2xW/sLY6iGP1GGLt2bbzH/jw=\r\n=uCWF\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2207261725.0_1658910325138_0.8246267855060356"},"_hasShrinkwrap":false},"1.2207281718.0":{"name":"@bentoproject/timeago","version":"1.2207281718.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2207281718.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"5e3f3eee6148e0ebb57aabc48ef987e9b5528611","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2207281718.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-z7hWPMGbM6pwZlvTPWduqmB1SVOqCkPoKyh78aLD/cAtrQe583hQ6jD4iMlvpZqjGeM+GB1IZZMGmhxmv/Q9yQ==","shasum":"b01cbed7aecc3f1b995ae0ef95fec9c035380776","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2207281718.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmSotVCCs3n80WfPViRZCNICxdbjLTenbWx+jqIF8r1wIhALEmLR83NBpitQcPDph7ZiRgkIEYJjojm12wuLgtmxDU"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi45oaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrFMQ//em7YUC+D3v4EoPGxAgpv2Fnv/zdJ9G3sUHWoanuzAfvL41x2\r\n+2HZsKyZ9nJSPv7n7j6P7+q1/OqNHmzaBGQUlrlJCB/jKrf+nnBC6TFp/r0J\r\n/0nToALEOddv8tkD4p2q4c8byVmxx1YQ0qLjHY3HnrIWGVVuAKZ8puV1o+4O\r\nf8P5HCcJDGMA9eQllOqPmuaSdWu5dG20ES4+dIrkBZyTywOZhavA+L0VUF9P\r\nW05BbE5PGE9sLG6audelnZFc1sPJ+XdD9/Lmc9Pwc9XrXx7GYAOeXBk2sH4g\r\ncHleGR992wnTt6N+1jC0eP2AA0H7f71BDEXn3CIr1tXNhWsTmxB8y+5uMQOI\r\ntrOIXX4fcLmR3VeXMuUimhAc/5UwBeCbxI5VHnoKgG/VCdmxW+G/+SHLPC4T\r\n1oOlrBrvTHJfpbjzVGRz4DGBGkZw/mbdW+/ZI6tgdHdAbX6X36WFcpZno5/A\r\nnErwtUhswese8P2OUFW1s97DCAeX4hb+o5S/taYJh69BK4zNR115m1TnsG83\r\nP1emKoEIScruzlFegmlFOtpeYIiWbjwojevM64YN6CH+s+wWFYRZPFMQu49X\r\nT2dBodzGM8+npCF/JIyonCVLclUcOUdguPc1DedbTXFfesz3G2HnxlTgL/ij\r\nP3DEW5hsbBtPMkAppvIK/lyvJnI08tmzqUE=\r\n=eU1q\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2207281718.0_1659083290220_0.05068341687732425"},"_hasShrinkwrap":false},"1.2208021808.0":{"name":"@bentoproject/timeago","version":"1.2208021808.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2208021808.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"b82b832cae23ff854449af280f1b02f4dfeb99f4","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2208021808.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-2zY6LmWtXbzurI8rPUCqdYrdjYyxzH3DE3mefJEjnffqZZ7KfyH0Igb8Lja50Gm+8QxJ0/38ayFW9bunrG5MIw==","shasum":"7b5ba6d0239e59d0a53443817daf3949405068f3","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2208021808.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG9xQ3ZNxC2xRyeILiX1IhlZr0bK2OOjTOGA3tD/1lGxAiEA+UOy26XkSW9MCuYFAj6Z0oI9ZpwOdIsPtx9mWty/Bvc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6jE0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDYQ//QBJjq/0r/e1azkpgW9RyreqskuUJmxZwZdjC5snzsg4K7rgR\r\n9MvTBSJaoKvrMOuqRoEOLf+mi0RUq9a8VNRXRuChb71pDMgskWZPMFdV+t77\r\nheUi7GastDmUMGXflWnwq2EltznDatdbXUjzKg2DkN3F9539+1Md0T3uwOBV\r\nl2KOcCzK4aiML8vYYjSoG2Hs6x7tHeosv3jhfnNvTDqwp7wAp2Pk14fyfvfr\r\n37QWBqB+Z9b3RRGiuu0E799c3PkqB+aHOmaE4wQd6TrDpMExSwf/HIrOH7Gd\r\nuKLIOYWEqC3HEsAVFMc0x2dfmxjMtkeasHn1ElcC6+8zPuN/s7HJPiTF/U3n\r\nz42fFgewLB4M04q8C9WOsFM5hfs9pswPicY9mNJb2/ZevdPcL7WXiKALfGVC\r\nMdAwnpLHV+/mWZlqa0szLZxDyQm8Sd6Fi/CTeTPIuaYWdkgWVN/EpbuhW4my\r\nDNWMF6ZhqhZLSTBGsuhCS0qZWDu5nVOpMcDwkwGe8SVHRDaPKQlg45gq36Fg\r\nMtUtJcAj5WcVbGVZ/xdXVD3SoLwrR559Kq890Ibzoef2UlqxDre8kChCi8sD\r\nSuRYjWBMsauwVr2xn81NuXt619kdxSyIBbDhbOiDh/IslDjr9pA4MUA6gJEH\r\nLDmO0a+Gcv/ejudLWv+so0kOhvqPoJNdVT8=\r\n=BDUn\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2208021808.0_1659515188414_0.2675178400256544"},"_hasShrinkwrap":false},"1.2208042017.0":{"name":"@bentoproject/timeago","version":"1.2208042017.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2208042017.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"598aa15d3922507a106666aca29a90334c7b2c05","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2208042017.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-MtdN26EMtMuaiB326UzJaFmhi0OW3nAC/7q8m/dacmSsMF01iIKaJ6hOB6q5T9IZSECwzt4DhQiqlWl5SzjIkQ==","shasum":"b3d168936db2e6df808042d1f91bce75247ec57e","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2208042017.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICfoABR8cal9zmHPaNMq7gVyLDrsfxIek43LVv3y4jWxAiB+x4XHltR+zjPxZuvgzOj56VmYyPzcvSfYSBRMHoxoZg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7NSkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoYOg//bLjTe8YezXLk/kypu9xsytMHY4NfZVRoS4xx6xsJFmyeqzDC\r\nWUr6i5lB2Yf5uongn99OXq32x5yntAnlLz+8Gsgc2sYJGU3iPimzCFT32B76\r\nrYYOiniUcXE6s1OO21SqDpz4IMDd4KqLoiaEV+6GwHNDYjAeRZVNpINirjG7\r\nF6fiG+BHBcTB2qPzq6+YMFnCm0d++rpiBCneSlEvxzNYSP+00QazaEkdkdRa\r\nznpUaD++wrCvwpgpL2B+HKU57J6FsfCprUAqO0JUl2kwmeVKJLy/YXtDwuns\r\nemJooFQYnnPXOqTY7AX9W7ph5l/S/E6hT+1efQXOUkW2ZNY4MmrFlrSaPcZn\r\n1NgA/6EjkJFqy/xhZIPinhq+lgzpnPuspIYPxt1oRVvpOZc1+ybfdxvIzxBY\r\naZBg0yZwpcjbQFtq3vYdQILH9xZUcs6f3KYPGAMG1yWGH+xeVj+xaTFh3ay8\r\nNc8F/sXPSNXaKENCTeFPKCDn+W/UyhlheAhxY3YuHDhkoR9xBvKuS4j/oqpM\r\ntFppiqT5KdahxGsaoOaA+4eGWco4eAqipWexo4jiz0uQAwJNHBvQAyiwCd1S\r\nYSnpm7vaBt06CB9Z/Brb+mG+B+igvsnyr0Tr6qD2uYiD2rI6px4MhQuel3fe\r\naXW/Mu6SSGawJ4LET+4L2/xCHeo2CKpX5HY=\r\n=0VUS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2208042017.0_1659688100722_0.984767713357219"},"_hasShrinkwrap":false},"1.2208051912.0":{"name":"@bentoproject/timeago","version":"1.2208051912.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2208051912.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"5f50e49dee3435f3a242126437de7cc8263c2ea8","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2208051912.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-uwW3MYB9xfwbbW7DKN3IKMRAJWIP8I6iJlBeBxjqxkzC4zvHwuQs6/LFRqXx/fbmVVjM7CBxOxJ0gNcfhBnWxA==","shasum":"2dd8ef146a0c4b6be131488bd6ea2c245b366f0b","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2208051912.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjnFFLtmE58minI9vguBAHVISfSDU6jqmKCzFHLJHVqwIhAORDtnj6cKh3Sb72XPWYzYCRNtcIlZn1VUsuAkMp/hBZ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7iXrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqO5g/+OOrYgmZ7N3brAUQ6zyRcoFvCD/gziVdoOc/VUKQrzO9C/bdQ\r\nPkWPgRRSRJ4hyH2+iLeFOlUUVMUdj22GNj2Ibs4otbldjjp2Ju0ZuXAmeYR4\r\nvHaQe3hGsNfRqcyejbhtd9BAZvN3ryxeIxyDzxZkIoe5PeJzIsq7Rx5WytZ2\r\nC/TNe88OMZ9509FL9xai6TlvZ0v8tyzPd02QPxo+HPM5IhcDezBwF7cDxEo5\r\ntDZLngRmZJQcwQqnP3k+3UD/w0ooAWb7Rm9Gzlw+/rvJd0juaEhtHpeWukO0\r\nOxTuiZs5MY6bw+bx3bTPyEssMW5BMI50FidPQETp6DWTu/GEMwCSJucrAGvJ\r\nQsm76/qObI34cCTc0lg9wZxwikkjPaP24fkQY4Rb/pKO7EKycaic6YqI3mJy\r\n01t99xJ7vviJfpiyJhaYOsFhFKGuHNaaK2feeCIBfXNRbQBuTDoLAFuebiia\r\nilaECSFClIPuKlkJH7AzpDoJcEl9jKKRHRtruSDE4t8nOJN8CW1bHzKZDA1V\r\n7fP2vno62wF7BVZXKj20NLtHcgWHqOz8DCFmHiXlAsb91uw4r5vCJNWFt8Zd\r\n5gyJgYvNka4GrvPkqA0FlKAEDuSp1nYcxNrF8KVSHEamzrUQgRwFXYEQBibq\r\ngyizRiPs8mDApKILc7gafrOXOkyODedcNP4=\r\n=euj1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2208051912.0_1659774443512_0.70980698098509"},"_hasShrinkwrap":false},"1.2208081650.0":{"name":"@bentoproject/timeago","version":"1.2208081650.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2208081650.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"beb9a33429ef933995a664a1aa534cf7ac0984f5","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2208081650.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-ncSdUymfO+aLVH6UvBdcKXKjaowAh2qzn4tuVn3B0c5UKJ0owmpOMLLvBExy/6+DmZ7jS2OTTZ1/t/Yn+KPypg==","shasum":"8912318426625d732b10caaac27f44273bd67148","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2208081650.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE9d21R0UF1FqYCVop9OrA4Dr7FBMXgPRwi2d0xRDLflAiEAxLmrO75Aga3B8vzfyF9KdpzkEEUIKuxerv3XltoHDvY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8hpTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrCqRAAlFCBPEEuSvHn0rQnkh+Ci7nIgtnMNx6Ko3r9Ik+URk/1ENHc\r\nwZcOxmSYtFlmWx1CO/TrPrqZt0O7ky66IpA2nwW5Qfp+JxEPmQSll9K2AJty\r\nSffy+9yJg0owuAk/MCyUnrAFmWKtDaWGivp/ykZJTuj2cjH55EWZMiVfjC7C\r\nDgoh/G/RKtaUEck4YcP5PueiirO6+9PzR60l+2LhkNtrpYHhOa90/FUcS5pE\r\nrlZOJi/s1DS7Hp9uM+aCZ6IqL+QuCGh4BnUiOENbaEvvIYePBdX4/I4kNXJu\r\nUpFVu+SyP2mptshrnK3wes+C5N9gYV/FQhSaglr7eKOLSvsbDdh8wnWCNgVB\r\nPkMAiIlJCCuBYT0Gh3qg51+8aEEPeXwCEaRHJURfhRqYeQMO2+KmKEXUO7Ga\r\nstRcckjCkMTjMNK/w2o6N1xWXCQFrqUQ6+9UCikdE88S1PqGgJVJWdHlYUmd\r\nf18L9j7qzJN3+qsCothoAeOLUrHPLMzmBQrMbGhrw36RdrZia3QmfleDe4wp\r\nPD7bDFB0860Bu1vMt5T4INZUIv6h9z75uNmdhjGusINCrMBifMeem93Fd+xV\r\nhRuNQe/Ww9xEW8O1t0dBvGSDAlwBMX4Nk9namJcZchL2QcWuUi/nrkGnLQvJ\r\nhIsxjdlgloH2TwLEXzkuEQPySNFtQ2DR8hw=\r\n=kN53\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2208081650.0_1660033619324_0.05762556886407144"},"_hasShrinkwrap":false},"1.2208092047.0":{"name":"@bentoproject/timeago","version":"1.2208092047.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2208092047.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"5147b5f8b54805bbea52be75a64d125a06f88aea","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2208092047.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-weRW4dBzUIK+j77e/BDd+VX94VOSsQ1k5SjUWcfs78YyP7lp+c2SJUjGXAnqy6vRRYfXl8VnjmwEX+HRPjV54g==","shasum":"ab0e5b26173d8852ad48611e3eaef25cb6cddfe1","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2208092047.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNbh1dmFH7MpqNeqBqSE6WwtEtt8K1VC9z2fKbhSOaCAIhAKd9KLu4Xd7/W+xfjWS2mLOEsuIUqWXVrxlged/4TBxD"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi82vtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp43w//XcYg8k6/01vVwpcx3tT1bkfsMP5D+vhpGtTePzbiqhYpONAU\r\nt/YqZoNjQjWBj4oRnGn8wxjYmDMGL/tdgZrHpSjiwVXXHRlt1qM+zd0f++Nk\r\n3Cw8mzIQvsZ4vcz1Gsdav0J9b3ucG7nfdZJWwNS/2F5vfIbXaYLrSXUjPkv+\r\n2kS6oJHVxEME7VYkt/XmimpTQ+ehQLJJ/ZsiQ8ZcMCe5f3y11z5QmJmp9H6H\r\nwYEYRh0M2rf4c5y5v8bDSFfmJq00PBbKCw+CEUIf7hwu07SC907eyyO20tv1\r\nnfA75cbzwqko7nfoX/0LauFCsWhPrsdDxVmSPWJevw5j+y+OET1SWG2tIlon\r\nn71/y23PfN1PHOeHJLjG04D/ZJ4TiGwNiMpkKy7GIi1jGPKrWd/mnpWpDP3j\r\n129Qu+b7VBJxwtuk6o6k8eC/VwlPi0yRkQjodWpKRTnfO99O9fac9OEcAoVA\r\nO6GBzSBkTwbmdx/nm2Kgz9HmoereBeTSxDzeMNKy2X9m8JtfxnMQmSTRtAuL\r\nCYKXC0WGq/4R7i/2U5YFIIPCayNV/NX+bc8CatvW7A9XbTxhI1XNoO7HXEKk\r\nLCx6BAS+whtGF9v24AsqmA/UbOaFq3UXRD4q2o56/k6GIp2wfJShgMWVfzdY\r\nCQezpNrczKv4zn6x1YyWAd0w+uMGYSkMvpo=\r\n=PqJT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2208092047.0_1660120045411_0.3915092847875088"},"_hasShrinkwrap":false},"1.2207281718.1":{"name":"@bentoproject/timeago","version":"1.2207281718.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2207281718.1"},"gitHead":"b2cc07c9f0ea3633ed63866b9243ad0bc964dfe1","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2207281718.1","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-MwH0rJTiLgBUDOUnr9E4IKL0qW8jNnL8nwTtc/KBwCQWcbtBktnpTK+/Orgbh9GaKYdaxFRug39NoxSQIwUexg==","shasum":"a543003a3c3fc2feafeaadfdbcb6b34b550f7f80","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2207281718.1.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpXIsVKbkQyB6R+wZsVx6xs/HCb/nkhqJK5Hxw6ZjOtAIhALAXjkg3cSWaJ+qjZtzGgVkAW3+36r2wRJAgk2kn5vPF"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8+NNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq0Vw/+LOV02PiqGj+jjEg/sSPDNXxcE1QFaEXfGDUNxNcCsj0ejFyS\r\nUjwZKKBRMddZkXI2pViArbuS9n7BFf9NlvT0ukxO+4tjljfPVRlHnsUgaZo3\r\nXtFuI1Bw/espbq/6epnWpMyBbVOHEfPMDiWP/agkIPA7fhQ1MwmndWIzxrQL\r\nNnWo3wvr79T2INckgdhD2MdMVQLGNCT1UbmdT6uAkt6r0XLs54p1bKFJZdcW\r\nYNdqQS/CWWV2MyL3RBYgRWKw1szbWAe2rgLPbLjgSvIK0fo0HtPlG4iL3DOY\r\nqPee8OHghEeu+HKf6QFeYGVMhTcS1mBbNO1oRTLiExj7iFIJHoFkwAeV+i1I\r\nRbGRC5cz9am6qVFJ0oJPEWNQG0IMU9xf5hWsWS4V7K8m29adGYlkvfKOX5vt\r\nAYZZzNagtvDrycxNYga3f05eZZ3QTFdvQs1V3VwMRQOYZynK/97FaBm3PBtX\r\n1x5Bzz8k+aXnmZYnuRxHy+fkIrA7tU1SxR45k05azcwwCiUadaAZFHcIH681\r\nsk59Hsu4TLOL6xKvYgtFYVx0RssclmmfPOJ2o5tgqVxTvtk0lAIpyuFI4l92\r\nqqTj8/cR+bRZp2sGO4bgbMm2iiSsu3/2PFgkgyUFZZFpNs+SEaGusqipdEyt\r\nPgtNQaPepoOUicdFmlkowVbscqWHaAHDYlI=\r\n=90kV\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2207281718.1_1660150605663_0.9144572430597246"},"_hasShrinkwrap":false},"1.2207281718.2":{"name":"@bentoproject/timeago","version":"1.2207281718.2","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2207281718.2"},"gitHead":"b2cc07c9f0ea3633ed63866b9243ad0bc964dfe1","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2207281718.2","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-WhCUnY9N4Gb/KpTV1eZd+SjcwXpnIU5JYBU6bRXNietfSGjiFjc5lsgCaceImnTAYqvCANiTso3Ras0DRQB6cA==","shasum":"34c6568666a1356da3a173212ea9eba4638282a6","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2207281718.2.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/ipQ4FD/OYv8CCJdKkCcEquFeMZmxnhlkaoSfQK46owIgXSWoC1XUJjGwEL8JYP185LHvV946UqxdJiPX93W5ags="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8/WmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqgZQ/+N4Q7AuEDtkssfft0WB22zQ9KzY/tImThVT0xigtmAmYLg//k\r\nQyD7PyOwn7dRbgl+bjIwu4jTgW3Wcw3/nxxOZmUfTXCLnyYekuRbkrg5+bB9\r\nzlubsoDu1ENN5eLQ7RIR3AUzQSAYLRFeNqGj+KnBVWZQ9vZblXIzHy3dhuzo\r\nVg/dS3zJQGctJlxVGbSzq45/VaBUSKDAuBM51QdCNJLIiCI1pzZ6wIyg+Ch4\r\nnFE9gnWQTpgiiGdHl6n5Vr3saGOJGvlT9tKkyObkRpUixtMbrMBW6bva4Zkt\r\n9LLYtR/VEUBOEVnEL2cgqMWUtYPiLuDC3t6UdvWpGTj4co5GbO71le/wGEnT\r\nMykMXkKaIOo9bXMA/Ilk5bui8BLvVKwJ7m0zxPSprfiFy2zOKlOi5Cx9zU1e\r\nqoTvwyQr4RwaYLfYmegS8ucmPWUeoVpfGyC5Ria0d0IEftPicQbEYKNvFnZs\r\nM9erTj3vQMj+JSVlQ28tYAssobiqFMCJJUj8BVNrfg/Z3mG/myhxxTVHFrsX\r\nWEAFNMV3w/NuhFFJFfIeJ28xawyl0eHOqi7d5LrbLit73wfU+l9OIWpubvtA\r\nMlecEnBVtOhUBAbtmZUN3cf1iKYm2HPMOKJdwjkjp4hb1hmwY3WTlkSu1lLg\r\nwEamtsoMjsD02GYh7+1KMHazg51u7FOwx0o=\r\n=YAHT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2207281718.2_1660155301988_0.9873471798069744"},"_hasShrinkwrap":false},"1.2208112015.0":{"name":"@bentoproject/timeago","version":"1.2208112015.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2208112015.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"83d345ea27d61c78ced5f68848c4f342e947fab2","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2208112015.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-aPrPS+oksgrXxYJYBs8IHHKHlvJl+9CxKGCK3ADARbWT4oZzR5i8Q/EKnK0v4VhdICgTGOh6NGQ4pXgwOcO4dw==","shasum":"156ecd99e8630336b2c9ea798bdbcfaddfcefdbb","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2208112015.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDes8aPq3gr0oJP4HOG3j2FVrLqRN/iRY4+XCI4uZBfjgIhAOsl8ysziZ42icKvXZwnkzt8z3YLopHZlh0psfm22kXr"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9g7dACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqhmQ//f5ofUOAu0hW6ZmIBUg0eARUYjD7XNkJw6FkTXRxMgcZhlZcd\r\nR3TOPYLyLJvwTEvYI910RfxrVBG/d826S6RX/zIXooELBTv3UmVjNGurJ6lW\r\nuqHM+91rzZ4aqNgdNyjvYpuvWzQ6lY7bvOLdONX7/y4WoCOENfSCs7KpLxeh\r\nvQDoAZp3mkAGkK6DGrpesDaK3L1My8xEDpzw9cp8FJQYB/kNCb9D1vYoPfMa\r\nBM9JpYjrML5ob+vHJPxIWonr/P8+GmirQALUWiUUi9btsX88aUF0avmweqUc\r\nq+DPuqnohPDhh1wacuHkSnPYvJC0npxrC9K9nZDpYbYja3JZmAHT/hD8Ig0w\r\nTRi1oVY5jLQBEpvazHjAO2rPbZEJHSQWG+MDAV876u5+RFfvCMzPCmnoN+21\r\nCI7nQyzkGqcb2O0PbQvJ9iDkWdP7SuPRPt/N2Yuudixbsplzu05suFZaBFBL\r\n2A3gaubj+pQbLXUFteu0bRqK2rxxkmpkihOEO7c6EhAsHYbNQihQDofhZ21x\r\nRa3DfF0jtRNecm2Ty7o3F53/kE7iSqt52RsYZ/V3VtrRPpDuAhR/w0B+Y5pD\r\neRkn6GoMGyEKJAQm6eMU9YPGmZ5DOZn0zaDG/CXSDonQGIxN75LImUuBdt00\r\nr6TVZxhDQXwO4BsVhBp7+wjZ5zBgdoHstfw=\r\n=LE1P\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2208112015.0_1660292828999_0.701191055434303"},"_hasShrinkwrap":false},"1.2208121708.0":{"name":"@bentoproject/timeago","version":"1.2208121708.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2208121708.0"},"gitHead":"c9c6de085436b10c2fcf8e6c10541d6d2658af93","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2208121708.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-pex+dGlGnUh7+PSJT8fmKanjSF6GS4ZD0CJSudRjP5qy66y3cF9kmnTRY5zJuSzeZEgcHTkNepPx487k7bCqGA==","shasum":"a4f1a83bbece3ad7e6e7d8dff8a8cbcdf685eea9","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2208121708.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCH77zYiKp2hO6+4Rvg2PSeFA4b1KF5J0Lzv5KYcBXZWAIhAM2vKiUZwjDHShKT6wkBD1/xItsg1I52obhA7XXbZewQ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi92AaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqWOQ//Wpz1Xpd0Dh3TiXAiFD80dUrv/Vm87leiCw2jX896O7Fk3nyI\r\nsSRcEZxqgRn99nVp4DAavtGbZbA9u7NxBdjVn4bz9cDKgqXlvA1RloenNfTA\r\nA3/WciBekYs4KO/JQHoeaZ/ZMrR//mEDJunUCwmZlxHveTzruWXsAzW/Iq0v\r\nfcYACnoFrFLby1TfZZk5+Jvvea0jec7Om4fa3C8jYzs/6dWHxIO3x77tDLB1\r\nWJJeaZBlze18lYUAzfcnHjRfeV+Syi12n1swZyFuXnxGWIk6BEn5ARjq9zrR\r\naCTrZMBypsMHrFkLL4g+ROaAcInzylAYzUyIO9WGtTwHIykwrDOdBjVYPOpW\r\nraJJmAS1nIgkWFA3l/xy+spHgA3KcmGUJtPZBJEg8BIJg150TtPyWxHKxdKx\r\n+7TDBEazspnnrEIRU8mYFjMdDrj4h7Xr3AJueytcSH72WSqILgBUw/r2/ZO5\r\n2JOj5xROMgoftJZNWjFy4i3u4F5A9TswmgXQqrs8HR59S9i2NCH3Z+Hh1fOZ\r\n7ZmYA6euvdRWyV4bf4NuQhSnZNO5qw9aCooc8V5jGxfh643LclTthbLnOOOE\r\na129Tiuuz40SWWX7u6KGWZ2BcsEq5thwTiFubTaMOvDsL0c+JeHdmQNUQz9L\r\ncJjtAwOy68LEcafgJDRXiKWdYaYEJ/QqA6Y=\r\n=ipSd\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2208121708.0_1660379161914_0.1283979415302492"},"_hasShrinkwrap":false},"1.2208051912.1":{"name":"@bentoproject/timeago","version":"1.2208051912.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2208051912.1"},"gitHead":"c9c6de085436b10c2fcf8e6c10541d6d2658af93","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2208051912.1","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-jvisIP+xXhQeS7boA7GSMYDo3Y6ARFhL2aCJuDKCBtZdCrICWCLACgmH85InGGuNEx3quCxq6cY6DF5UsyvzLQ==","shasum":"5590259bf99909d0270359129a22b0a7de9ae16c","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2208051912.1.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyL4pC670dB13JBU4BWJPhm2QcxGJXkd6iigoGtnKpPgIhANmf2aaC6c7Ad67p0FlABfOcSlwxyNSi5nk3dDBT/Jx4"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/CK6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqgyA//afCECD+u6mpd0VLJYAqsHT5o9Z1LhuWEjGJKO+t6qr8iinyv\r\nzsqERG8JDapn1x/P2jcI+tkPJjjsL6cwj9ECQGO7bxZMOci+76PXB5CdCSVf\r\nlLKspPK7fdMC1dKhq97LCJU1RmvBll24SL7vdPLoBHJNddqv3GL75/MZKL/I\r\nL2l/K4VINLC8fExH4Iz95fsAPN0wDwRc28Q5lyi6B+wmSlIQcAgcIQzsmRek\r\nOG5xVpBXGI75QNOl8Gkh8tMsv0N8bIx0rMWa1vSyFOG4fP3FML5aCqlo5Z3w\r\nfYUZSD0v5izEu/hgaOK5LKRZryf4a6SrBOnJPC5koZJwJV749fBcNBnMcpZv\r\n2OQ1ZoqYi/BA9TQ6G/u+wS/Zuae/8XJumuyfa16HNrWZZs0jOBKDRxXr9UZ8\r\n5Z4DeNTu52HIhAFLut4X0KNS8HO/ZbEhkSQJ0+sCKmgMKQlWU2ehRog4YnZx\r\n+tZyLnp0K42ykIrnLl7jSHm2P1L9WyMnb09uodyC6O4D1NasBovoa4lRJZjC\r\nPXHpoquq03B9qZrbo+npW2r1k5rqFm9g2buGMF9PYqjN7u2m0TnceCO/UF1r\r\nT2ZP+rPDO0z/xqk5rseZEBxM2zEPkT93uqlGNi0HdH0nO/Pm8ueZ72vf5ETv\r\nrusmuDpda4Pospfs1Ohz9R1Bwj0PXD+Ne6g=\r\n=ADep\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2208051912.1_1660691130131_0.8654727957638177"},"_hasShrinkwrap":false},"1.2208172101.0":{"name":"@bentoproject/timeago","version":"1.2208172101.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2208172101.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"372d5623dc25138bb97bd48cd5f97f3be8008658","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2208172101.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-fcXiu+qf76ZHN4PMopX5sO3hDNB4WgnJVS8/onT1dGwPTsNbrLSLPag3yE+M4M908DcfeZBF+vwT9iU1v7ojRw==","shasum":"20b22e98c55ec911309834535838ed5cdfb2c061","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2208172101.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICF8w2XY/NkY/bMgTWk9sCzHerhZsVN69jK4cRXvEnbFAiBnxVtGqnxjeeD7vsCvYrzBeiiCaw4tAUB+kp6HlxSJ6A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBpA+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoFtxAAgX0RvcukoVoIru4jJUhD8gDzzbs/7MAhn1fAIZftIfbcYO6C\r\nzVo80wbmNUnYDvYvtIzAD9zIkce+CgHI4hxB18fu+J2Q07Z2J/HudNBWI56a\r\nP2n1fPPGojEZsx82JdSiC1o+kIJkvZGRzgrbmy30tg9jrxorexQCPjVE0/9V\r\n3S0UwcooEYIgpG50q1RhQCGQsHl/GfgJN+MdVtMa1NnQdn3wfJQ0UVDvZ/eG\r\nXJybcl7UIqTxbUC0BJkc5H3ELWrMeyv6vrU5DR3gDHBaaUCnd6wDROAdvlxz\r\ne6OfRO2Oog3BMkZHYp93K1Op0bjYh2C0qOifP5VevFd30jOEk9iSAqvoge5L\r\n/BkZWKZkxftmIpsRxpvujC1xrX0pUvqPPGgmdQNKLz3PWsdJTsGYxBFlMXsm\r\nEIdmdo8AGMdC/8Qaqp5CZnPt9MRLjQmNvEkVF0a5DsXAkKGREU+REbsV7q75\r\nQAcKfmVW2cH6iEoAvv9juLw0lbGTWRu8SY9M7+sMEaHgra+trkW9G4iuCtXM\r\nIuRbrKsB/h0VlL3L4+2eGeRS2lg4biJ9a9uf+wiqVtacuFnyJHFTTGsZ+vNj\r\nF41izafPlA+pKbRMApFmdnPAmv+DwR5Iujg9oUSRuoR4Pw6PIOsM3znPV6wk\r\nUoDkNzCh71ktZREBKVcnWlhq8y5C6z8pybM=\r\n=yG6m\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2208172101.0_1661374526611_0.5642392561537868"},"_hasShrinkwrap":false},"1.2208242209.0":{"name":"@bentoproject/timeago","version":"1.2208242209.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2208242209.0"},"gitHead":"0775e3db3f5e3447749a9de6b4ef38433f6db4d3","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2208242209.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-PinUJQsIlp+1LbAsW8xgGBFjFdDJyCbpBpdGD5AdwLdl7scIWebwpnaYAjsfH8WnxxWzHcCvlaiImysAl5lciQ==","shasum":"1c4c9b9964099122abf98da73b91dafb947fad5a","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2208242209.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDh7muf32nWRzonT+KS0HFsp7IgTmCiZKKDIVWkNf0NqAIgOxVIsLbysQUsrw36uhr6A2yyPETkMXrwE55NnoutV8Q="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBzIYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9yA//cnRBw2AzAhnUvsjrTR0lrWZDt6CxsDIymRoPxqf6d0Fp6FUP\r\niVljbyMJY+OqO7Uay1lQ9YJqSQuaigJ9VFjRfu4xS0WSqbViMbYc+ijO6tO7\r\ndgBRLhV+mzRJAS3w9fXdbmThetB+bTp8kC7cxF4aQEfTHPtdORVQf0dIov+d\r\nKXqIjb/OAlk7Gg0mnmaxGaFCSgK5HUeT0an3sJSMi6OPFeOzY5Sd+09f58IA\r\nBJcAwZmXXi5jenhsDuxurWyi/QM/LxVgcX4gSNV8e0a4OzUdrjI9YLCPnUZH\r\nYi6pPrDTLonjxHq82BjPyiPxVLl/f6z2pbhrrUde/vjWaChZDK20J8BJaM91\r\nAKLFE4mFJkc/nBh5+H/1VyiIRR5fQCb+EuCqM7RLfi89P2Pq6HKJU2mS/Rce\r\nIBeSxpSes6uwExKqr5q5HS1BJW3CF+zywXwwONc93wbhGC/qnD4ohra4kqxO\r\n4MQ4QOmI2B5XX/AZiPksqLVhYKpnzz5xfdKoZnTcdP+A2NfZjcewVWh/LHPO\r\nx8XsDvuQamPq78zIXYzjey7ADw+EqiNw8xrgu0p7RsyIgE1tguqLIxFPRBgL\r\nw8sYNb2LQwxj7GxVfnE9q083TTW6cONMSu7D5tpAEY9IuFFEIwMX//7bh2qQ\r\nVaSuPcADjP8JY6ysUon2N83TLht9T0L1MrI=\r\n=SrdG\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2208242209.0_1661415960476_0.8159639159346246"},"_hasShrinkwrap":false},"1.2209072154.0":{"name":"@bentoproject/timeago","version":"1.2209072154.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2209072154.0"},"gitHead":"b0743385edcd11eb02b6e380c4fb5a18793960fe","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2209072154.0","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-KqB2LVekM1G8c5fao6m7gv+d7XH4QYmoP07emcbH3K5w4Ah5Urxkukjkw/aRnKV8MPytjWgkoWxngza9qUqfIQ==","shasum":"fdba05fbfb60f5425d51ba199ed4e50808b1ff2a","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2209072154.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkDMZp7C/vzpqCJ66MwBibQWzwIVnN7imEmb8GzDubhAIhAPQCLKdlekHPo5C9TQiYcZug20hdvIGKVJyWKef78DJ6"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGabcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoWmA/9ECAYO6TWfQ8M59wDo02PwnOKhq6o7/8uKAoq4QCANFgiTYML\r\nz4zzXwxxfHspfGQLxp5+sFZcv7kzgxl8gXQGpD9OT91e+fgfitaTVGifrNBT\r\nLh3AEPbT9C7PPi2dEFfj6xJb/tz9AaHGeS1WZHJ5qgB2vRoGPSBl+ohgQxxI\r\nr9WEmSszaJ/ISPtBXLmD/SokPDlDb91yxxcaI2ea7tlPCsfgpBdW6XMY2yhR\r\n308wwzMQtm/yLZhyoXS5262p9x8DGttp2h1V1Ghfl8x3EI1UnNVRqlSWnvZf\r\n/+WUtDes29vP4aCgqKj8iaAlbWBuFt/BfwMzUwC+f5aBsfRDpfZ7v0pcBIAF\r\nE9OG8kVvosBAvYAiHglt35NefVVFB3z/Wp8LK1NFamWFI9qV7DVif26R9kqo\r\nnwQuQiNLPALeM5nFuuLp7djGdzXyPDUBIOYAAFxRUPTvMF5tgJLld6qmsLEX\r\nwdGSylF/Gt0tlIdKjKkFokORgfwF1YQDyinfrQMdOB9kFm5nI8LZF9Q1/cpw\r\nstCTugiiy1+UDtTAUUvkUzFU8Es4QDsw22RzNMn5ugiq51x30QTqQ2Hn2S05\r\nNukDQ4mZDfFbqxdnDXvarvl5fAhsnQvDRbpbGycM0Z7Brx2x98gKpyRRYVXX\r\n+SRE9XED3xTZQ/DsXWj0gynsXyt4vmAHV1Q=\r\n=rMNc\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2209072154.0_1662625500477_0.06420786931376776"},"_hasShrinkwrap":false},"1.2209131909.0":{"name":"@bentoproject/timeago","version":"1.2209131909.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2209131909.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"b912a3976adc47e6a81ae645cb98e51d1e778150","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2209131909.0","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-wiMhxUFdIzlanDw0P9RLebYnMXDeNVid5iJkJVu6VeAh1cpFDKXFuOmPGqmaFs5xehQjP5wkYjnOuPuRKpI0xQ==","shasum":"b9de03e70859a133fccce93f79e74af6530691e0","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2209131909.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCh+3fT/q4CzHx0ZA2Qarr2SAhcapY/BKl63BddMl6xwIhAO7F8Z1Oe6wJ14sp1ItJQIxN8v/WNBfOy3WXu1fT7kdi"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIZQ9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrwHQ/9GYE2y0r32Aa9Tc6vKhntvxSy/n1YCHeFR14IKlJuqnIW4mcq\r\n8Yq2sfeHaZROcyEb/g8f9NRCJWnNwIrbzuPrwyRxyCKmAxriRGBcS2vrlNnS\r\nbPqUdjSPKEbknl+5b3zNxmeqWOCnzWGaXBGI9A7J9jejOKyMShEz9Xxjisar\r\nu1myEng36MIm8PHXBydWgmEHpufgjgEUrTMUtyiYT1ZqOl4MaHnF8GHrGSGP\r\nYPzEeMM2iLIAwGd+G/2wq8VaevhjCooirEr7gqY/ZEnIOEOdNZBL+WDw9vdM\r\nani5d+OMQyKf4U2E98SaCVtTcY4pbedTKsuH9ly0P799BJh9KSP6qUu1Qw4w\r\nyzpLCgFIO2cGzGNvQhcmx6aYZtHluMgPqrUGxWab+kmLzLkg4/xjDGorVugO\r\nyA/tf3WQSL8UmSMR7TBKoPDAIKNRTmfsZ5XY21JvLUtIgEZ1IDM3gKInGSxR\r\nod1pvojJ8xI/ZYug7MeGlXCJ1V8PYd1CSnYjVik5eWwJeAahSCyEYQ/dPOJE\r\nWlQBBBpmJFf3dBAV5GJUwJiDEBUdPdsbsxqO8HIzPL7Il6/fNFIx14vd4dT/\r\nKWEWhAL6Y6n9g/sxsMv0z4mMyaSR3Yqvkiq7m1cPky9uuuP8WrpsaN/bCpKu\r\nrabOZW5CkuVSEWDm9nROn3TQSCd5k/t8bAM=\r\n=Z7Qd\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2209131909.0_1663145021448_0.18482929866166242"},"_hasShrinkwrap":false},"1.2208242209.1":{"name":"@bentoproject/timeago","version":"1.2208242209.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2208242209.1"},"gitHead":"a64b6c7fbfdfb75c935b112118bddb3fff58ba57","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2208242209.1","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-N9qTuFzasKwpIyhxKbzkPmJQs1QI8/4av0mrrQd2dW74jeqZ1nIzE36hD0Z8HcxghjYHJepSDTpnCKlRe1lu0g==","shasum":"65fc37f812f603f5752d6de34e5ef6e1f2e2bf03","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2208242209.1.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICoZ/aDNO1+X4Ie3kzK5R1jNhBdQWpZuvJSzRQJjF80tAiAw1z2JDUaXqqtPVKqKna428boK36n2CW7V0T8ooa7zPA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjI1XSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq5og//b3KPSuztJwP6r/LOi+Rwd7tRqUVxQ5SauFBhuG2zudSlFxGa\r\nmTrKsi4HL3PK0mR6ptCp8YqY13AAU2vv02bEi0icU09f5bN9rtMpo11zvOeh\r\n/pqj+39H3n2L6aR96xkT9rFbCoyEbVINQXlY7cmlccOYURc5A+EHCyEixNiH\r\nbu509fSP0kyRKgSkR3NMYzbmh0hNTXUh7BkZDxaW2iTH0yJWpGwCFodRFeTN\r\nh1urmFXLzPiK+iMOrsHzpkaFbQxeD1ySp7xbOFfzyfNwD+33VsgWb4kUc4bn\r\n9C/1EgwY4GvnDf5znSQ4ot/RZeg1LGflCvIpOMpUFV576Ey3PqZB8PqC/mEK\r\nU0YT9ZVcXqrw4EjbAZXpyKwBmifKYS4t1ykh4exldEFtVPRSNP/xKPrgFHzc\r\n9vJnyHIaPxEWsGv+6AEOhZ6zOmTKNsRovhIvRuMVqWJ8ftMJ2Nwf9iMmiD2H\r\nL89B40WnmZHdtb37UORurRHWp23DJeOfX63B3gpQfzSGYPl66EhPLWASwcZu\r\nbGlzDcg6kGxjHKPhCu+7AVAAtYKA/HCbTWfKLWUVFtlH9/nSkNprzaOs9CHI\r\nn+frIz21ZBeJbGPUqJ+TiOe22736bhvEYPBTN8nyeq2Cu/KJi9y6OPL7axe5\r\n89LYYP8Tdzad3gplYDpVA16mgCRPK8VQeVk=\r\n=KEbW\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2208242209.1_1663260113646_0.703169594619419"},"_hasShrinkwrap":false},"1.2209142312.0":{"name":"@bentoproject/timeago","version":"1.2209142312.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2209142312.0"},"gitHead":"8484b3b1dc31fb138a231b2368acfe2cb4eb913d","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2209142312.0","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-7CtpkgoTEqw0CXxQlfEH8N0lBdtrutgz3HS2fGhT160DayGdZ8LRJow3/6GkqIbYIHaUDJlCexDLIsszu3fNiQ==","shasum":"7534bd4019538e00b8e48c1e3ce791fd0bc4ecd8","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2209142312.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAQ1W21s6lTAUWAgmIQnHs5J7emRDSMMbXG+dsUI993CAiEAz0w+LVDI64MMP2Tn3mFF9LAI26s+ljIsHcd4riYco9I="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKjmBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIIQ/+Mtps9tStN7GmpQq7ps7mk3SQPLxMdmXmWq1rdwqGdee3zqJ5\r\nb69S6vt5uWJz/Km5ArPBeaOxmGxyhsGobnKyqC1ynxU/qXFmIx0Tjh0UTe/U\r\n2K20moCtTWesP1gnOYc75UslKWKcyUKghIUgcpucdGPaU4LpLdnqtflZhC9z\r\nfWL/c/vFTOe0fuurh3fCryq9pIR7tvsa/g3d74s+1L3lHBlH3tl1pceJMvGz\r\npVherU7hHAYOFUdh977gzdxWSJY7jD7AMxtqlQ8O1XQTuH6TRqmF/vf1mcr3\r\nQ84gKOYhrXedK0U+775nXEdDAo6rlCyUcx72U3ioV810Q9mwK4AdHEcsWe0q\r\ncgbW1J8RFdNlhhA3pQY4ClbL2M6jzFoHmLQ/iI0bBx6cOAKeUWQQ/xxnYX1H\r\nfIlfLAetugnae876gsXIdCI3Zq1AjXTZnS96qYqWCi55MgZT2u5ZRtND7JeS\r\nBpRywmN95foUZv9u5gW79itGkCNcVv1rw2tnV/krwEM4ACVgz4sYVtuzw8dn\r\njCpbPYNpXPCkN1XZfsHjXwhwwFIMOX+Am6fMDW/mYcP5QuFtr1m5v0DGvHad\r\n4OmM+YL7Md7rF1rOKF8M7YA8XvxkxSPR43RsyT1WDXenIkYt6TVfjm3rRFBJ\r\nYCqZPcvmIHcsrl9kEOCU4Hm328hEfG3vLDM=\r\n=QXi0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2209142312.0_1663711617501_0.8874944670286238"},"_hasShrinkwrap":false},"1.2210010655.0":{"name":"@bentoproject/timeago","version":"1.2210010655.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2210010655.0"},"gitHead":"b0c5acce5be2019b787b6f4bf7feb13b045ca7ff","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2210010655.0","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-eAfl4Xk1dLt1tLLpWXIjU0SVzSS6YnZWg2IWc6zMHTBA0K3pIfrygCxaXij1trxR9Jh19WIwFDAthtmABkWg3w==","shasum":"1459986b8dd22029364915fbc3596882cd2f5bb2","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2210010655.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBuE1SwB1OzKMReqkFPoFjVkg4X1RVk2YYc4A+xb/Pb3AiEA3roVE8v7dyed5qSIGR4PnMb/KSOIgLFOygmBUajlfGc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPGQMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmprvxAAkvuH3YLaI3q4+Cu7vWLA9HRrY3/Tgx1mWRemWJITPOkI07GO\r\nPXtIXONXR04qBl4rqhTJ/ZYl39veXV9J/XnTTFBqGEk9eUyoGrJezK/L+mmS\r\nqkZWvxJeLV2vl7R0lXmAUd7DPBBvDvBZYY7GUg3lFO0v/H0ntBVKkNfI8Tt4\r\nSOjcHTP3OsMNmcxozeOFD/Dv/9WUVaIOsDXd4M4KWhkTA+r1yGWsB++gBNIH\r\n9yXRER0d2RPPLtI+t2GLuCumgd03XwjeYQTIx40mgUU/wXMEAAcq/xCH/DbE\r\nQZd3spCDd4wGjbcbg9lrIendBuqGC1C/oL3BHkwepYEyQ/5HzejNBHwWzRJz\r\njNXsMEuaNdoxZfjO2jpflyol7WH+ntSwYijIDSlMGFbjdMsOev1KzL3u8urx\r\nNk2juZKSe3NIw2Kgk2lkrwzlJILXDj7Q96DOuo7Qi0Vj0RmCGCPUuEM5hxFE\r\njlmesjlTHewKXDt/CcyMJorOT0yXazudBfWiwJDefCiFYYLl96AGquqmTh6r\r\nDYp2h2U/ZKa4/QCgOYiU3Z9lxBYxh4dAXjufV6NoZ2ojU7RbuL4tB3ti1irQ\r\nVAauxmMxX8RNSO6lYPm9WBvpI5/2Hc9sI2Y3QBPck4D1oZ7bsDifw1NeYbTZ\r\nr9ud6Ttc13nZrKaOZzzkDsgFgNw8vqD8sOM=\r\n=AYgx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2210010655.0_1664902156022_0.5748114064574354"},"_hasShrinkwrap":false},"1.2210041838.0":{"name":"@bentoproject/timeago","version":"1.2210041838.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2210041838.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"e79aecc1c4639b06a7f2843d961bb14f293a53ce","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2210041838.0","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-hiXBr4kxpd7w3q5LZK9zadNyJ/dHmnyYTeCdtJeghLQWvwUAZUacG1QeObe4Bd9+X5/HL/b4Pv28hnWA/xOvFQ==","shasum":"f50bf63ec73a7b027405defe04523257a0d05899","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2210041838.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAV6bifcfUauLzskSxpUtudVhmGvN9Yi/TaqJYM1NNVSAiEAuwEUBz/NngCO/duAYPtqlWLBQZpLBTWec54sttC6ufo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPUCCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrGPA//bgx8t4SCk7Nw2BiZx3XiNZDiK3xyTLldp9qUeNqpiwAzUFp4\r\nIFhy1xzWJ6bgp3Ecc+oZD/s+P6bGiltL1ubdbBm86b+tKqkWCekalUeCbkIh\r\nWVHH17HjpacBilNgjeMHKlBfEenPOgyEW44RgX7MUnbaYe+3VeOR6dZGKZTw\r\nNlC5NSPjZ18XEdoe4zxEr1LD7dKKl88WQm9lbtV5ZBbdztnBb+iRi/nYAosn\r\nBDzv4hBaiHJXE23ZPe0dpkgpj9AV8WOOg0alfzl4uGpJwgYhQErOjbF58pxN\r\nC7Gj56rBdh4tv480Gx/vok+BI3z6e2sIF8K+2WOvjF+ExQLZn7s51P/BEMDZ\r\nydIQ8eeiVE6gVm49KmptNvmNGjZJGHczu9br1lwGzh0pVy7FnPkDwIlEiTch\r\n9+LHOTdt4MEfCOwZ+k4R4rrM4vdljlr/c4oTGwuhy/QYJ/+9ukQPXaARhjqr\r\n1tnBD20Xr9MDT4wuQ3FpGSVZ9DAFwlWOTgKZKx5OztXCJdhdsYe7s2Ay5REs\r\nXq2Icpl3ywdbp+5JYuGkokGKaiVycrDe4mqgP2BVkOsjTYivcetdoMfnsk7i\r\nD3oImTVHxZ2tEAmxIshxOClQQblK0OhGpCNgUHySOJcTRnm8qQgZYx8865nI\r\n39mWgOt/GRDpp8eGERI9PvADCE000y7f7Tc=\r\n=sJ34\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2210041838.0_1664958593979_0.8043648389778193"},"_hasShrinkwrap":false},"1.2210052034.0":{"name":"@bentoproject/timeago","version":"1.2210052034.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2210052034.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"8a0a0067f57f89d0566ee1db3d4bfeea072d3c56","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2210052034.0","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-apDcIx2mQItaQamQ/Ik+0j2qJDY18gptMhFY3VdlqoybujjGv+pHowsiEjUc4bKvLPy8p64yPGxdHeWi3eVAWw==","shasum":"7500dfe1344ffcefa3fec045d92929ef95e01ab4","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2210052034.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGAinhAHnw9KGwTkHICQGTrGePeuwht6jtbGfX+OxSQjAiAsG7zkKsAnjP14gNL0qYNhO91QIEDocA3E/KebUtVxOg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPpDwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1/A/7BItRjHv8MvfwYqqQfK6g3CugYPOkDLIT3j8hUErOkG6rIf1u\r\nTZOy8w9jX1QVTn37atSukl4m3QFS5H9IWnfYm1Y+SZIp2Z9V0yNr3EUoTkJI\r\nlZ/5tq4e4o/o9gwYuXk8HOfNwC7YdaAL434zOkAlV4/VcTETmF8+eAlHE9pF\r\nsaz11fT+CWc5MnmJ4or49lthZeZvp0A5XmpeOAAGTFd16NfWFghYmK3EuqKf\r\nKbRC1i7nZtFOlrbacH+D2wscHTu8oUmT/c1ogRivDQ01qVrSL6cLaE+zRq8N\r\nKPX9FBnmK8axbRfIw4Kf0pWlOy5LiH45Z0mhn7tnESybauH4QXlwBO8OKbO0\r\nowMTcKWko4T+c5x6uaBU3AewenQbZP3PIYVXBX2FvGyQZOw/PSpLpWWs4gLB\r\nc4Xm83DeG3//Tc3JposnPvdYZADUreY5L4yUJSpDfFrVWLXww4kkdil8XjVq\r\ngDfdzV/36q+ojgBW6GHanAjZobxp3+/gkkfPX9zguiGHGaT2fo7H4xUjuueW\r\nGA/03FxKbvpffqd4UFOQMo+486zaQ/62oTYJjWX9U4jNxiCDyM1nhHewqTjD\r\nHKaFmDwiLGSYBMddHFaGj98kG4bN3IWoF8jTSzCIjOZOkSKbeX/pCiC+l1Go\r\nFuU5b6VllZWu9UdzTeUhQdkMRUMaz7VmRpE=\r\n=cjEH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2210052034.0_1665044719930_0.2077010311862748"},"_hasShrinkwrap":false},"1.2210071758.0":{"name":"@bentoproject/timeago","version":"1.2210071758.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2210071758.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"7c969ff5fd5406304f6a9867fa0db59b74e94524","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2210071758.0","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-e+l/4wsEaw6MqzVyTQ/73fiCM+yX9EMDcS3ixCK3r48g9cb6Y7uq9jCcEdaibQ/uIwWt3YBRlL/fVa2LBeUYQQ==","shasum":"c43232b7d69ee2a63d2851ff7edf7743a1692abb","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2210071758.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrYI+bF6UloaVXgfI3H8lP2oiKQ/mpZU0ntfdo3l2YygIgW9tnfEkmO8eS0UKmEtthG6sWuDYbHnIAivhnO4ipU0k="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQTPkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRCQ/+IVhA5Clh/ncBskzCdUJL4soCNanZMF18UElbaR3a5NeW5FQj\r\nmf+ZzLbTYJwUbOCbY7hQL+GnMwKbSftiuVKZEyRPO1kEgVS5tEqhX8jrZicr\r\nw79tq6MvlopA10/N+Vh3SIITzCh6IMradhatFql8qPL4HSC2cnObwt7I1zLm\r\nh8omdkAAMAHXmZ/Xm1UGdHjKD/QWXXjGVFAcpCe7Z4hqInzGi3dpppo+JUyE\r\n+KSQcPklf4WRNWQqTESejFGhBBCiG6Afx+dT5K+ApXYGEXE2E+/IetaptRkE\r\nMkUni5eUEIqvBYcJKUFNnYF5w/ms2GPWqDGgHcJuHMb6ZM7aa1kS2eA5ukD7\r\nu6tILBqkd3/YDU3PdxMdWoxGJBZu+3Iz6Hv+N1/M8NZcr6s4K208e5SUl6CA\r\nguKldNY/LC9BZaXp6J+X+BOVCm6gHYqzTaNX47L0tOoxkQ1lcfBwmIkrGkCl\r\nLGxX0ef3otdsiVGhbRzMN+WVVMwuvvMVOn+70H2BGri+KBzHf5Ek4HtP64/V\r\n/pnUVIbmf2LGqrTQnac/uRKaRaWOLSvDP1dm1nQtYwDVmeh8WL4UCb58MmfL\r\nYOQhJJS51ib+b7pcG0aTDNpd95O1pwgcQLb/d80ppalxEIhsTh50lUphAE+K\r\nMLpp+piY5lbqrj7Iilm8JBQrzQI9ueTpIp0=\r\n=kZ/b\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2210071758.0_1665217508190_0.9677862711590188"},"_hasShrinkwrap":false},"1.2210112333.0":{"name":"@bentoproject/timeago","version":"1.2210112333.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2210112333.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"1d82bae06844d5413aeb632cfb2f3ef443548ad0","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2210112333.0","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-vJvnB8QELW9yWViMOlcDAEO2nePEXy+UV38j2Cqisi4jdH3J0peHc3VQh5MHRzDE6p36BmxMJ8vV1qX2m9xyNQ==","shasum":"7232bb2a8e27eeb7da85797bbe39c43493a0120e","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2210112333.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAHzT+d/MYVOcXed7lcO3ppTrIA6kyLk91P6F8d2wD2xAiBZkfylaxrgJ69ivwKJbzxW2J0yKqVEH5LuZpZxhXDiFg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRnmrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr5lQ//Us4izvHRRWhLgCs9HfJ9kIILS2QEQFadda/C5SFJsv6CIS2y\r\nNooUtGRv4IIty004JDOvVIv7so8TWQ/j2VtKpZ1CeXrXCLJqxi+tLgcCudTM\r\n2gX24MbvC2ohsdeMKtQM79Ft8vDJh3nCyxJvi27VCrXY8j6TO0z0l2jt4Zrk\r\nd2w6QKfZhks/sYLFlels29Lz+VFg6AIGc8MeE9qNyB3LgIj1/SS2uZVvr/Ap\r\nSq5k8u1ETWkyEhu7zMgZoeqrVWHCpHEx2AjHfU+YzxjkMgIULohUrKuMsh6I\r\nENJJHQK9s1+de0Owy43M0jyzfL2odrTd6Ygrp54OhPJ5GaXBbt9/wy3DW95O\r\nL7JTN4/0MlZnzdIpuzlmfYgZATpqgawGynFtCaGmM3kogQot71xLsXFr/9Wn\r\n8P8KaMHbTUciiqJ/bzqekriGGPGoMS0AFudjeNBv/Rqv/Ba+M1+5Jg14WMue\r\nzP3EhMhwGh/kwlzapPkNWw6GraKptp5ud/rhylVAZMfVxGXIrB8/23QX5K/T\r\nAO95h00ekXb7ql5RZRKJb7JKjO/cLcFbod7p6bspYidnhryGgrOqEKTPzfJ6\r\niYE5CE07I0PNqO4NgNwgigLJ81RT6frx3ud2yof9UTLcf06Y7Q8AUmiYxNOB\r\n4Tj6rwmahbQYXGq7FzCM0+CwTSpM5M+7PuU=\r\n=zk5E\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2210112333.0_1665563051363_0.4065921159271415"},"_hasShrinkwrap":false},"1.2210142102.0":{"name":"@bentoproject/timeago","version":"1.2210142102.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2210142102.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"4cbbe2b23e7b0c5b0c005c94a574ea48a45f7693","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2210142102.0","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-Q0sM92k1eUIB2+vDhPAJZjkcpeUj0mY6tiWme1jki7ayvuS6v8qfyXpVaGK9BxIL6aFX7UJiwX7JJ3dvsRyJTA==","shasum":"86482221c87b7b80f5156a179aedc29a245d863a","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2210142102.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBc5c9a3orWaYtEGwlOK8l0s3BKalZEcJ1UrXNGE8/UMAiA1/53u9ClaQJ+/rYLcudTMBYprVevMurVzai9lUeT5tw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSm41ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqA7w//Q6kxf49CvfkO5v+ccrqhGqI+mhB5QWdYQoWSu2pnfrQm5emP\r\nD3KOW19vGDtqw+5LovRes2JCk3iFnoyR9AM8nHIXsH1H/lt9k+wKQgAApPVJ\r\nlHKuuC6yIIBiB8ks/tWsy9+wOYpQSku2Ft6bvuh+H1K8hPI1ttu6JjhLlVG0\r\nOpTi/uCbYGNDqg9gwZxm8mbx6B6GUqmsYE195mwOAJ9J2r0c3iWbb9RWqSvc\r\nA/78dNDjzU9DfuAvtSh7ctJ6r8OHZud6SDrLj+Wb3/EWcKaGcv96ejcR7UJv\r\noVgplrXI/C7ucnaiJo+M7mKqWH2F1F54laf2CkEn6TfnCyU2FwMNzyntFSiS\r\nwi/sa8HYExHelbQNtoBio1Ugn0tTUS7Yomcq/LZ4WDOa80djKN4K6VSEcC0w\r\n9rDCSasHOJ9S00fhhox4zcx+SLVvlsnXtWVUhQApmid7rh18r78B8i+HPu8W\r\n06XsFyKUtIkotBzQQZy6hDW4ZcD7HmXJCHJupbxlAKJ7Xny4ioIx5bHEkXD6\r\nDxPV27lbfBEPCRLj1PZGJRUCCkSHEdBBvkFgNNPvrL/6bhGv0aXqmO53gedw\r\nWBmqHz0qQ4a3cyzOZ+OzGcTBtJKDTbnCCEi3kfrrJacGcNO8QQ2VcRGOgqd+\r\nbgca1BikME5G8bCQjeVZ0vC1zm6bVkSWUDo=\r\n=FWZ8\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2210142102.0_1665822260813_0.876655649860212"},"_hasShrinkwrap":false},"1.2210172057.0":{"name":"@bentoproject/timeago","version":"1.2210172057.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2210172057.0"},"gitHead":"fde225e8d98aa5d96a939351e6e53cc7abb13cf6","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2210172057.0","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-ZCiQVQyyTEqlVZN37a59BIa8iR1vFvQ+9f122TLGRVihjAxpOyhF3Q10CHSjSn3qRZ8o88c+ZU4gP9Xssl/f1w==","shasum":"6a68ad8254451eef5b0bca2496125596d0469796","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2210172057.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBdSnENqutddOdb196GSGyczhSJaAAfwohF7v7G1tCgeAiBQnizPiOmMNEBbaArZlevW4JOji40BHcLjZdYCkUGpZQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTmNxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrA2g/6AvzdYuZzRs57HWlvJGESFZjR5Gifo2b6aeLYp+/4qWAX34zL\r\n8LG7ml2GGUMMLVYDre5JlFr3315GnUQxMnLwiYCgvGgaQZNpQ6fveo95pstv\r\nONEArpml0HLKG1SEGqvu7PXVbGOYkn+RhIw6rra+1yUXPPy9AN7hRkypLpEU\r\nxXIsO2DKrBzYLBU9hIvv9ZlisgSGOeXsLvmCpX4pPQY3xinFVBMMKJCXwqFh\r\nalE4PeXwfGFRTqOU9KKTdjx0KGE8B3n6mmGx+WKDAbOAmv53YCd4pOtXOpID\r\nyaMCO9Y+MZ1MQjr9Zt7T6QcqxP5u4+JE2dXV18UjLVeeNQ0KlXPpW8wQDq/O\r\nL6hjM81kh6KDKbfpIEJ9p67gQuCAj2VR77jl8Pz1mfQ63GDjbRrLMZdfW7bK\r\nNKpgkARZHvVP36nGQlh3Uui4AWww3X5zbgly7TL4btOO5PkeP36kyigjM8ls\r\nU16x6cDqa/HPymIpE6n1LyplRn4F5DWRvcSjy7XxwkLmIQYuRn3viW/+AA30\r\ndjKOPlsLCyp+xZpYuY803pNR0nTwXQPjpps38gKeM5n1q2ygnKfW3ryP7Z9O\r\nBsUfGNo+OVvGBW03k7spn3zbJXtIHADmqjCc4IgUr4BPqUryLQLarjI2CcMB\r\nAIqNvJa5U92Zejp32aGh/X3Pj4k27YT3d2g=\r\n=BFeg\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2210172057.0_1666081649277_0.6522759886809761"},"_hasShrinkwrap":false},"1.2210191347.0":{"name":"@bentoproject/timeago","version":"1.2210191347.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2210191347.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"b2888af97582abcfae901ed340328b22e9caf2fc","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2210191347.0","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-E0l2F/d7qTvOGNU/oP7ssm2ay8QJD2/CDJe6ShiyYunt2pYYfbqrb41vFO8d8J7jm4pR2fWipTEaeu6bVWo+mw==","shasum":"2a3481aaef42d5443c2d2cf16cdeaa6c48ca89b5","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2210191347.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHe0EHe4F5v3QYXPhA4nwZ/epZV/jju88qhfHKAkZ+jnAiASFuMubS62sqLIm2gw+Xr4ToM/nlYOggUMuyT5wvBO+A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUQX8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr5yA/7BirNjy24ULDqjjPkOwhvijvSuBudP6xOQECTlqUECvbNO+t2\r\n8J6VkfnfgnzjN60JJJfCU5FEboN6/cpCTh6MHN2/h/cVe9DjpBQKO57wkivG\r\nMS6lHpl5UbZR/nvGPh3uCyJQu6p6DbEv/RL+JKwkfRiurzPsR6KzS2zZkmFy\r\ni3TH9HRp22SWDWZIvvYU/ZKHbONf7/QiYBKGnJqPgXmcbJjixxQeyRy8Npeq\r\nvoTUdtJwDuUTW4iONYJxWkCIcdWKIDcI23WxMU8/vDPQIBX9Hgk7twz2VVr0\r\n3y5w/eG5MTTLXCMxJ/Q1Oim225yF8CQwfyyf+sNUMuvG9TeI8TChFg64vR5e\r\nnvZBS3ay4Desm+67t7A9M//xGRBI5yOKj/nRUOTo+eBuhNdPX9LzDpltZUjz\r\nZFlJ6wrIkVKYqDRu2VwTmQsmA3ghSklh67Wpe1f4Y67l4Z78GZV1PTXY0mcV\r\nCD1B5ndIl8+sOqacTif1g/6AnHtBXTGBodgxPjqjoV2uFYSkR7oYo5lNG9Us\r\niO8tkKL6Dg4hSR/4ulzfICrJK4QtDU1qqtERmpdcFkUMavCtmIIJ+UL73VqY\r\nVNicUFALbH1pBhkaAPvvosaywsQ5MGknOGK+PyQYfsRSjYDBnNTyQuC8BLCM\r\newJ+rwnMs6x6pp5h4E4eBKX4aLtENKj8V6o=\r\n=l1wH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2210191347.0_1666254331719_0.9662738796224226"},"_hasShrinkwrap":false},"1.2210211855.0":{"name":"@bentoproject/timeago","version":"1.2210211855.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2210211855.0"},"gitHead":"07d99f82baf83d9f0162a6c7b8790cef43e820fa","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2210211855.0","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-l3fc1Xrr7FM9UI0uZs/Sl+uXpVfp52WzPiLIXMZuVCqkBlRRQgK15dT9EiGmOsISlWCKrAEHF8b5NUwrGtLtXQ==","shasum":"7812033c44370157395132fb9958868d27278b7c","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2210211855.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPVPMC+5rXjgr2R8dJoVBqLLfmtDXJSZHKcPZ4rZ4G5AIgSOQ60NnNEubOIAc6y7XEwcddKxQ4fhyDoDdl7YKm6V0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjU6iXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpqiw//eAiLy+4R9tuVRCGy5Q+ON//6QDo3i+EfzlXqR+s8ztwVHpyK\r\nd8RxlKj/5uJQQVVY3Xvx/XD2bAH6Jz6+LYryBBBxBy733RSql5IDNAnJ7eak\r\nC58spdzsTHzOKRMxs/K/0bHP+e2uG/s09Uc7sFP/IZNRantJvOok4gzQVsCn\r\nXi9wS5vRC2CCOlKx/eoCeMhNZgvyJD3r+UzPT9Zay0L+BlpJuVqDYk0/UL/H\r\nbGQx3hLHtEFidqtdk7/+PmVWULEmS5rikaHrSy3fr7ck3VgB3+FmVas2gJzr\r\na3c5ulfv7oRt0lBE6zPoYbp8llk9uz6/klN4DpSTN1+qls8W4dX0bIzTIq9i\r\n1i7lubpBp3kcZSyKnxFeghzQZ5Sucmcewzx0KOW8uQQcc3/MavVJUimeQ1XA\r\n+SAbZv+gGCA1/DUu+V1vBD+jQqWCWD+mgGT6Gc7JKjovHDxQOfnw2UZGE1v8\r\nL852EQylF6zL1nD+JIkWqiasGQe2V6ajdjI4od6HA5jP2bx5xckg4xl4/Jl7\r\nCUvFjLDP6rFplQVAbC6Lf9lfMyZBOURnQqqBz/w0gkMrg/dRJj3Vvpn+7axd\r\nNqJqAsDh8aqXtF9ezToWHPtfAf/jSNDZVEJNXpggBA5CCIsRXm7yir1AgbD9\r\n0iba3Syt6TNJ1ddRjuLQ+NX5YhGu/CVgVrg=\r\n=xoGE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2210211855.0_1666427030893_0.3998411603238292"},"_hasShrinkwrap":false},"1.2210251605.0":{"name":"@bentoproject/timeago","version":"1.2210251605.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2210251605.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"a1f66509b5a6104dc33409f285dac1ab133942f6","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2210251605.0","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-BOwn6Ld6aviiE+okgkTo5otA/FOJ1MHyn1j58Yvhdoi80uvTsBXEQWTyvY4E9/jUp1KaSipUUCHn7FO+aino/w==","shasum":"64d84ae3d06c798d8798b05498e3a59b82d5344c","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2210251605.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtkDfSQGa0ybHVaa86o8DLxoOD2tWPKCKYThdPcrc7jgIgbVLFitwophKPhANsTPjHw5T2tVTTzvgKS3uSw6TwBAE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWO93ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmonCQ//dUWNWwk6VcitoyaDsXjI4vRiu16E9pivWFGO3rAfuW2fZ3Z3\r\n22n6zqDMBOlx7QXoT0Zc52g90zpSyz9yWLOF8v5o+OHZkZV0dIsdl7Th5w9e\r\nTCy2T3QMntRA74eow/U8kR6UP65jJRhUOkdkoOAhBp3f7ePp7nVFY50npIfO\r\nW5P/EqX4p526dGh9lEucHp/8mohhFay037NG9brSYJm+LXwqDK6tjpJALbni\r\nU5Nlu6g/1RITmRmgvBFw4boMjiutA0OCKgPxj75Irt2CF3kQSSgQpIQsJ/9I\r\n2QSdWwmkzLDlXtkjz0EKPFcnpjqQ9evR/5vTtSYKlHZTglYKLM+RicLcGgp9\r\nGFhsyeW43QfSryIXDkCFkNDjfvwte6pMJA79r/qs+szI0bTkpZk7buoZSlMP\r\n75aMqmhQ4h8lhsu9QUrQeYNnmUbHaYyIICP0Y+asLQvhYcP3QUEhwMkDmXkL\r\nHnnQJ1qfPqdgRXgpsay3VHv3Uw0lFm/mgKOgCNcyylKPb6OiN6fQXjlBzFlT\r\nNSojSw6ojh56kajSPOo/IH2sIbivuBYFM2KVoPG70u0ZmvORJvomV3sz+Q2U\r\nfFnnutU9NG/FsJkNm+w9R95FQLawNhQRiuqTJB3zLzxjhY0jy8faN8iQIVrn\r\nVEb2sxf3UkLD6JgGCc0ALjMRof6XHGCkY48=\r\n=wQ74\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2210251605.0_1666772855326_0.8503095221476669"},"_hasShrinkwrap":false},"1.2210272257.0":{"name":"@bentoproject/timeago","version":"1.2210272257.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2210272257.0"},"gitHead":"9664ef260a4ec8fcc997a65025bb11a20fea937c","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2210272257.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-frm+HuPUjpAEYo+1FvVw0IWHLKOEsuWvAL5nRvkukVPI19EKVct74Y+gURvZ4eGl5dLxaiO+ba85FqegYrE1ig==","shasum":"e2ca0eb3e6e8c6f9378363c47d2e0c6185ac6f45","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2210272257.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFTDPEAvWWzqeg33RveCT6XzI/fucIiBxW3jJdvWols0AiBP4HZR4M/gregO8j5nRIAPkKCuFVADfDWXnDmxuMJ1tA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjW5IYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4yw/9HVdlDV7zg0qaLH8sBZQgwFex0FThLMYISZ7lDltHtJ4X9Miq\r\n0YuLF8Cw0fUnvTM6uG9sCgfUrTmZATKV1tXqX2BcGJm4KyL31e4ufmyxzXG6\r\ngr5M8sKz9jt8/bpi4RG2a1dwMmV7ALT17xOnESRoh6RgORM7R0v9/mehCzl4\r\nSo0VnGPqUR9/+MXiixE2Mtx6dsGNnBY4DfbnNtyJw/RzoRmJK9Vio4Ep8e8s\r\nf9UtmYOt7t5Fz3hy55AVjN8tRML9fy6CzfKsTrd2umbL6x6B09xevv8kz/gn\r\n01enN9k3ACAYu/8F8o3G1PP0FfKAgJA729Ff0nxHwKGN3K33lwo0vwNSHFxn\r\nlRiV/zw6MyH/9X0P1JgFrfZCT/3GyNPJ0LKcUkU2+yea3jwdPl0qxN9n8qXE\r\nnYnOo5NW4OQLY6uxtMitluRyuBhf5GN++2Z7BlSDx3Yy/h321m+YrLOghr3y\r\n6nDGNKAJs1iihdmL4NfUm3iCba2aqg3nF12tSvJ50sFFcjvbbYStO901TmWL\r\nY/m/GROPotwlmp8kx0VV/11rJNMgRRalz/G0RPla2iGNEv1wVYFMFrZI53I7\r\nIYLLEKDQnUQ/sl2qndx5YldYCYo+a7shAe08Ldc3hm6r+7wXGet6Wy6DDR+V\r\nXtkYc9Gi0deLx8CxMVmD3IYEVQ7FYQ7GZZo=\r\n=JRE2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2210272257.0_1666945560416_0.8508221138006729"},"_hasShrinkwrap":false},"1.2211042305.0":{"name":"@bentoproject/timeago","version":"1.2211042305.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2211042305.0"},"gitHead":"592500a0e400703252086eb8ab7b1cd46d674ff2","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2211042305.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-Sci1cJB5q1M1cRvPUMzg7pD+oHTSZTap9e6swejVoyTQpZc14BeCD4IjeZ0djKjmaNamfD+7gFGwVOxX8PwOnQ==","shasum":"74f01f635940f60f6a163c167bd9c0d6a8408d44","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2211042305.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDE04Dez2A1W88WNzhvLfbF/J1AoL0V+e5Wgaf6/4wRPQIhALZ9XgPyStipD8JthQqBKUtAT5adzjWVnV1FrkGi6f2t"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZh2mACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmos/A//eFOk/3eVbFLm1lhb7yQxUW25UKuIfWT1n59/d8GhOb++ShtG\r\nr/s4sJdwOMIc7KUhzMlOEwRWUXcmR2lAqiQUwjwP121POf9Mtcb4VEFNl/U6\r\nc5wtj3T0TIGPwtPr0qX7VswiHqrhcDE/pcd6E2BhhKX7d3Es8Hlu1g5JTo8n\r\ntprrw1yWghCXnTtLlLyMqt2jZ9mG6gTDVZhrzNrf2RtH5lJBzw2MJn8lFNbn\r\nKALE/0uIYsOFMNDgfhVl1PCYiCP9Vw3dBjKgpW3G1bM9AXve4yoXcF565JXi\r\nikyj2rZnW60WJfTLlWnTOJqATxc6RvwpXfiy09n+mbTUvemHC3CjYQr5qWCf\r\n7+PQbHkavdrekxkwp+CVf/OiiR0PbCpTQfvL5CA9cdMVNU/QGCFr4Z4x28dI\r\nUo2h2tISEHbFYcGGP0O8P7hxbqUx3EXRpJRHcIZrrk1O13Hm/0Xp5gCgm85w\r\nscw9F27J1V9Qm9vTPt9gfhrQffGcn6lR3zTpICXuK9IOFgg0P/Ho7dz65owa\r\nDFAOsKjiMZJascRc6+xEQ/dKrOT0N3qM3E9tYoUZAlmg3LeMdMy/Kj+aBKiT\r\n5x7JQmgjIlyWtnEOdJuZb+MypaWjdBu9Fx1Iw3vVW4A6Ee7QQdLAUbjB9fVw\r\nu70OsTrSu/O8bXxgjigmfFcTTahsjx4FTts=\r\n=p7hS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2211042305.0_1667636645975_0.523569743449954"},"_hasShrinkwrap":false},"1.2211060024.0":{"name":"@bentoproject/timeago","version":"1.2211060024.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2211060024.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"f6dce0a3fbdbc90de3eb1773dbfc31ff1e476460","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2211060024.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-pGw6Qm30Vp2VYFLkdXYKNrVJSqnvpV4UVVQgSoVscIPO++VBWoZ4xjx0KqwhAuFJ3ib52f9vASWd1Cigr8MLgA==","shasum":"74565b1dcd565c312447311393595d9cbed21922","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2211060024.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9vWc8r2H5SZFEH+lUwCqGYdSF/Mx0scuv9j8XwlimBwIgLwV27XOG9pU9PWwMtlnlCViVMG2YA68MwczvGhi7KBo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjahJZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr8nQ//dIKNQaEfjETnX2Udf+z6eUpWA2TcIIGHzlmb2kVvnQ/A/UST\r\n6bg3HWfdCXaUJ/W02sbizPvh8ZHzYH4+fU76HB5nVNjKqatdSNM/iwwLFRcr\r\nKb3jrYfO0S7Uo6ZqKQ/+L4enDkAquC/OMMQ4iAdYjs1QuD8W0y0l3fwRMnEO\r\nM5DdGnTn5JNYOBerHPsbPlusqXVyyJ5Sd7Iz6Quxn40+IHnuOsn5gCUbKA81\r\nNijKwfvnT2nquYCtm1uc4CGbs1UTzLBjGM0O1olOOTwLYa4WUgp2WYJXwwLO\r\ncDI0UFsv911lovbJaacaoVgpaH7Z8XQ6D+o8dbGhXtAnw5WobLimPXDxsU8C\r\nFXYOhX1vGVoIwiXaHmDDzyZEFILPf146c+q9UqGDwMnCpzHop4ikLoSzKDaq\r\n5v8KxDWPPfZg3NNY0vwva17YrPy5nQ02+WcnNfFaGI107m6OnRuEgDTtdXBu\r\nVfTeXlBs/JSRg0Z42fCY2S5Oyt+I+wfX/eflQAeo7AvaW1tV2cwx91qCQppK\r\nll0+6HKUH27h+HUJdU2gv34rfqRgf+oevbI4n0Xii0DMAok/AKNNemergm8z\r\nAGzEdBq0H7HDpMTCavGq45hn+4KWLcW9loES1psLyVGLrkNddheN7FariEXr\r\nHO0ZuyWVhufQSj1SJfyNJxVzUQbIEJb5uTo=\r\n=rePG\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2211060024.0_1667895897143_0.9253508145387987"},"_hasShrinkwrap":false},"1.2211111611.0":{"name":"@bentoproject/timeago","version":"1.2211111611.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2211111611.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"f9c1138144838b5c4612a779bf407d2b2413d105","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2211111611.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-Ei9bFmY80p+eelROzKfp8QK6wGJR1X+beMZJJz5Nb69ByE9lsIyNIrIsYzAxiWAFFmFrbQKFwysSDnaZe9loTA==","shasum":"7f8d67bd73b87426f94b4457fb19dc4f476202e3","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2211111611.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDb6lC+dX8fNCVqm+dxURncKqs9aIJVvL6RoNzmC2cO6AiEAxDeU6s2uE2XCBMD07k5VPI0G7AosdIqsYZUZBk6N4ZM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjb1gzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5jhAAmg+stHZJrjBtXUmxd/jPlCHpBYVL1vaMC60S9ufOxyrJYQDf\r\n0LKNm8yWXKLjCX5eHg92jwTLRzsXTIAViNltWtLf+89v8/QEw3e49K+lyPNd\r\ne1iOcUIgeM0CA4wyrNhaNfYDXMa+kyLxpldCx58kk3q3DwNsVs1wHdGakjds\r\nOOfffkmOKBQVSPqjvrUlavf6UfYFpjvh10lbWgSo1AKn1Jie0Wnjl7mxJmTu\r\n3vRRr4ZjmZECKeIZNutc5l8epiWzWH1WCPS9fDwqo0kTY5QcqlDwo8rDRN0J\r\n1BXb85B0/pb7lRiqQCm0Aq8mpi10qrww0NBww9sYjf11HiBv0dK4tvXt3Sec\r\nlzgLYkeYQfQGJntwa91LvVLez+nDj3AvW3//i/VIrdA7POd8vq6I07XEAKPC\r\ndPxxDI4pEalwnl/0Ffsc+VkiS5Ku24tPjvzjbXJe49gXX8/I0D4GFikJ9MU+\r\n9xSdr41ILT8Z7MUV2Ti55Tcu7Y71E3iVSSOoL1M+Zm5yq4kn/tp9/QZGEy0P\r\ndjqUJzUbXTpoUOwmA9xVG4/Q2Y08n6Ux8Lzyx26aEa1sbWS/xiQkixX2ZLam\r\n4Vr12bU1wH+7GERjrIVmFfYR5Y5hz6rm5S1lgmKlzmXySpkgVN+ilTTJGx2z\r\nwueonpMwFiu0Px1e31xvO9caUG0B4dnLIAs=\r\n=Gw97\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2211111611.0_1668241459623_0.5217797605496006"},"_hasShrinkwrap":false},"1.2211151402.0":{"name":"@bentoproject/timeago","version":"1.2211151402.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2211151402.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"db41c24bd071b6322e0a5188c4bd74aa94cb9d5f","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2211151402.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-WD4oTSTAJi7oop/qY6mJojvol07PC+LBhl7Hn/P2IU52i68N16U8ajDo7JgHP+vMoibOX7qZD83N1tiNCP4EXg==","shasum":"b088c8515913eee31171d6b108e2dd36a4347167","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2211151402.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD45Nk3RK41zy3dMy89A8gMQvpJw6jBhgmDup/glOWF8QIhALwcQQVK1/5VZQfDrdwll5OshxOnMmNV22XKEIBCaZWk"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdS8OACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq85Q/8DWCJORCkGPkrbMOcHaDHl+km/CJgICBUtXqvtmR5WoHJewzv\r\nWo1pec526476RHkqsF8p9ruCUfdKODjirywOqRNxD9/ebsaXsdr6iBa0rmU4\r\nBE8B2zng3QFp3RY7rww7qW9oWL4LqQ0bQyLqOUtvwzYVfKZ8LozbKJcqD9p6\r\nZmld4KDlENQU5oi6oa5Q3xTVXEGsl1AtLFNXyUqpc+Gs7tkVtgOyhH6Ozdgo\r\nhAmHoHbiYIrl+xOmd02gF/cHFIaR9cPS94BgHc67nh4tNToUqnm9JRKvLtmh\r\nVjDxX/NH1inbnrJxyBslxLcj+PfEeItkFUwSzky1W6mSJXuQWLAWN3t2fcpt\r\naFhxIEhjV9RFjQ+pqwEP9TWRIjVtPZRNdil6UJPiTckGqme1m2Cp2uMU625a\r\nF0NNDjLckVu5nogzxuDu+PpuB/6AZGofV+K+PHWmiOudIhbmlRkCfzzaxi6p\r\nWWDn3cH59dgX06O2Wmlj7M4HO/ZFiTAI1fUEDdkt6QlYPau4ialpnV0G8aiu\r\nU5IUiuJ3YC5EAG1f9Vko6YvM7xuaOgAcV3oBEBSdDxPX9zifyo0VoivSNja5\r\nHz2WiKOrzCaUfU8UThMHFhIIQKEsSOM1l3pYDZFxlwopWpqgaT+O46w6jzzz\r\nnhDIrHJiG37ZRXeXAEowwcp6r1MiKkv3daU=\r\n=dxBj\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2211151402.0_1668624142024_0.4544397174458963"},"_hasShrinkwrap":false},"1.2211182146.0":{"name":"@bentoproject/timeago","version":"1.2211182146.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2211182146.0"},"gitHead":"d5bdbc6c36475eb2c4c14f2b02a112669f244641","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2211182146.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-Ggdh+bhcM1Nh1QcPfpad2ZQCfmlBU9by6B9b0BloSnm9f0LEWUfYDmj7HEyR+ewbHj4lpZ+a/pzUyozdyEC1sw==","shasum":"cc982e25278217c89cec8547901c3ce11e2ca6b3","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2211182146.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHvh5yHbnYtzvMpY/pn8zffeF347Hil1v2RCtrpBx5T8AiBa3BNYAFZAKeC4/vMrK6Cb+h2NaubsVc4rrsMNshdvcg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeJLmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmog1Q//cjrdVLlPk/kqhmH0pRDtUIuvtrUevPFIcFmFWHu16fe2Yyxq\r\nivFdnt4t6EvwxYkxyqyKboaoqL1BG36sx+QGc0uVPHFZyneguMIzmTC741FD\r\nBUtd4q9GakxzaOFNBHoYlFxD4qSC8tN/ouss1n2CQclKECh/75hkNyi2riQ1\r\nE/rc4OnB5VVYj/96kxa8TQTbMgWM9i35X7bu6joVnoGhAy1wSiIVBin+HI1j\r\nn0+/pjEzJx21d9CkapCvhvQO8LSWIC5f3HVJXt14mkzusz4DMys5YryBKRgf\r\nmT7URz1v99khVO77v31OvvXbTFHCn3FpiSn7HfjeUjsY6U1ufGNA+WnGD3Lw\r\nNkud/SFlCfx+udkmYpaotCc8DNo0yfX4/rzQDkAaAoXBhC9nbQK9I8vE6S43\r\nKcBrpymS1S6ORdv71jVBaFVVI9lj1tYH/qMM9L4p3HtoxzBqDaY3vMdGuqs8\r\nP6F2z10gWQWUiYgqAnLRjAoGSR38Tsiq+5e74bKGMajXs4GlyPM+7lfXts7Y\r\nadjAfw7bwUqxGsZDGJ3FZjC7YUR7KP2P5ofLwek10xVnR/s6DQN3in7jV2AR\r\nPxvz2U3U4z88ytdHDNjCM1aMXUMG9uKwwQ5kuPI/ooOJzjEAaeXNhoKipwua\r\niFnngVlC0m85sFmlYlkFiXSPcyn4kRAsQUE=\r\n=2Fxu\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2211182146.0_1668846309683_0.7269613400875619"},"_hasShrinkwrap":false},"1.2211250451.0":{"name":"@bentoproject/timeago","version":"1.2211250451.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2211250451.0"},"gitHead":"3f47d465c6e6f4ea83045b32b2c9f56eccb943e5","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2211250451.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-aE2K7mo8cKa5Ei9ZAw6XTSGQiAT3Hc1IkQlELZ141NaeDyzVZ+PIcoaExA/CFarMOjv+tYzKy3Dux8I6dahZyA==","shasum":"e979eb1591971daa3113861073c5483b6bc66989","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2211250451.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCm/ymXN2LV9HzA/dCJ1wL1jbB9vCuxowZ0hVhpqPv5TgIhALIifXvSlzbFU71KiLw974jVMA2mm7UekXifnHMQaqw+"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgHu3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr+Uw//U2LPiTuE7wvL/ZP+c8c3gLF7khovHIcya1SGO6NkGfLYKIZC\r\noN0Kjc/EtOX3axjZ0o5zGpRzM8501yjtf9mSwUtny4ePVhmFZSFw76Pj2myT\r\nD96zYFos6W2fL+nOHMU5PrFxIAe1TCOiTtMSwlOaiLO7b564+J6d03hVRbtC\r\ndU4kQuttEjsVSH/2biAUEnApKeZg3VfoDwQBYOBgmlSKj57G6V78TP2LNQvM\r\nKl1uLaLe21AiU/vxWTHve/nmyl+9MVUmc6hGtYDTWGiYsYT4b/7G6x2TxRUF\r\nlS2GzRqHerR2bB6QBsPiitB6WzNubkR6Ida1BW64VMM5vSVu1Ya3GGANeINO\r\npvY4mXPmQMunXGfnFcONWXHvGmKBPfyb6LXerFlaQn8I/VHXdcw4lLpYT8H/\r\nSlTtqHyjtcDib9GKbw1k7V9ODqfMQRUGl4k8vJAJ24ohSuf+eTTlu6TZGoHQ\r\nuIP8o1oJnBRwiuDbbUL9JJ07UL9osE+SdRO/kVt60bp8R0hzC2WOcFNYkz7R\r\nLoCe2owNlXHmsHk9zfrOv0pRNe/fkmBlwUNGuFhVD9aiiPQ+5hlJyNoeCbhQ\r\nuX2U1d62Ijdixwuzmyvk02YOiqMExJNzhW4rVv21bUek08G+s3JH8ETIrsuE\r\nuh8fznhgiNfbm/13SqvJimFC4TYBnEMBuA0=\r\n=1+79\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2211250451.0_1669364663275_0.8748474056482365"},"_hasShrinkwrap":false},"1.2211302304.0":{"name":"@bentoproject/timeago","version":"1.2211302304.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2211302304.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"8ec16ecf1bb95c1a6368ab455a6cfc7b1caddc46","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2211302304.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-JrPLEj3ciqNQ/C0mkkJ/wuzxKGRl3dXbvqcDxi3TctMrXxuIgzIcnwEfgKOg6opaNIgeMBbs3//lKmvgSv+nrA==","shasum":"1f684ba20c34a9e026e744f9ab8e1e9eda2b1f93","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2211302304.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEY50osJ3YaLb1uWkOZW+DbNocB+bD1ZXl0Ad2hhvHJNAiAknKEH3Zo70KTwUgs4VDYwSj7cpwCihJKBA2zHQyb62w=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiGSwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrzOg//Wl5xj0yHKPZ+8Db3XB1cowT++K8xCAdLwVn7jtiPcxNCwS1c\r\nFfOix2i2nkceW6mmJ1KenOGyH1NjZZNyfBOz2gvxVU7Ewjv6gw8dzow99dOo\r\nUsqQoDLA8E21uau8NLNPC8VDfhVtDZQlRw+FWhQl/vQd0IBUURD0PtdEBzsF\r\nJUapdjjBY1n+/RAb5n4BhJY0kSVNBiReR46rizyeSiSghQc58wNzSwffwDoc\r\nUcus83BPXlEH4SXqja8mb7ts3XgUJn6M4ARgwMHbC2UzY298vprS+y/LKLHN\r\nr5HvokHWrEOUndXKDu6SUJ/ipBLKKlTt7Axpwow2zlmalOJBJjinHfFe9Z3K\r\niOY27VERxkjab6u7284Y3FjX0AaovbeSsjE3pVxz5mOpy1fteiChVvtJGZ/T\r\nnxpOLM0BDGm5vLFvgpX/Rriog2LQplHM74Dyx4ekPQnKvVwRnCyfSKGLk29D\r\nD0VNAigUXpgCfDhwSVnk5HIz01G39i9S21ejeBcsZlBh3CGUxzBdgW6ZyRPO\r\n/ON9B4XJh9YzEYewKVk7iBkgSe1os9qJojSDdqbl3EHYIHhfvQnJqPU3PD2o\r\nL1oilXD8xD+n+X/oQ8DJ7ouPQUN4cb0uLGBLXnBeQC1ui0QgVXbBRvHHkJnd\r\nJ+rQ8ObcpaU3/ewsPiG5Y6FLc/LHBRPsVI8=\r\n=Eh3H\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2211302304.0_1669883056662_0.11351475855706528"},"_hasShrinkwrap":false},"1.2212071834.0":{"name":"@bentoproject/timeago","version":"1.2212071834.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2212071834.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"9e7a659da459058028a29b649ceae3a2dda7771b","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2212071834.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-RqiEeiZaAMX+Is5QCvbDl7qjjwLq/56sz9QWU1jbv1YBMVLCorXPL+21YugZspsQyVGXCQ76u1s6a8OWdYzXJA==","shasum":"7fe17a44ddc711e9f068cdda6df33dc88ea32ed5","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2212071834.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeLpi1XF8V399rJbNmAHfpA7ESsW2mRp7GHDHf+oRGAwIgSFDJVb3ejklswflh741msKveHRqjJU10KcqAb+1i1fY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkOuKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrCxA/+M//jSImnKqxijInogd07Q5HYmmIVfTydryt0ZLatK5g+GhWE\r\nhyhh//AcmrIaJHoIPo/XD+Lr4X5b8xKxIUEflwFNnAAEiwKCRYY4kx1dTnNu\r\nCGVCX24oeu9ruDChI2hOC2unLst2IBaJXeydaTVRua+ggJk4FsIsS66uW3JK\r\nj8fGi9+z/VC08UJSQU24S4gfQYP+0fc77rWNfxuJiVGlKUhpFBNDKHn3Xdx0\r\nCRzdBdZ5CabO1HlhW/n1yG5x8pX3xNzYYJPRTSBcaq19RglpyGRhrnnqgwTh\r\nyHC7VJtIsIsyo66W06GvMi9czfrZWOxiIwKHn5ssrQL4jI6aZ1kmKK9/tHYg\r\np7VmIEZsZPsqWf8egZXyeMGR43EGc46uq6TagKYgR6SMWNCAeyOELhAdjb5r\r\n8kZ4s5SLGBJGYpmev9Hl+Zl8MY30dmLTgH4WU86IZAFzRF5TDIgNuhePvdYS\r\n6pzJ/W6hBYMsZAFQbRXwztfM4l8GjNnwZ+0YsDUQfuijVABbSVL6P2xUtzjQ\r\nnerfhbwgzlXUauwyYn2ls6z9O0/cYnHvUylp6RAbzDkCLz0eWX250uGEoo4A\r\neiRZC+BW4m3ag2gu0vBih+RuwCee49tHSjC8YwujL5Wbt5JrziC26QgJ+hjm\r\nFxkrswOPx5yVatxfoKmO2ETvttIE1V+pqDk=\r\n=etbN\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2212071834.0_1670441866174_0.27594997168122415"},"_hasShrinkwrap":false},"1.2212092023.0":{"name":"@bentoproject/timeago","version":"1.2212092023.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2212092023.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"16bff17f2a3e911f517c49d1fd2c74c8089e78e0","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2212092023.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-i44JQKKcEQq/qliO5m4Ia9YScRLEMFM8EIOkezmKKa2RCG0i2cfp4dR8lgc8En1JM/7m6RVMv8qm3g9drD+cmg==","shasum":"28c473483adb49722ca461a089fa8fa080fc5c57","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2212092023.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICXad99rhiWZR3wvlUfLROkoAuRWidyCuiA4OOALKKHkAiEApy/8C6vqxx+zVRVIrb8BAQ7hb2QOiZ+SA5NNkSzPMFY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjlEJJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmojiQ/6A8D6SR9No1aOpEvtMh+I/vm0cly9fuEBOm/Hq0vRP14JiP1Q\r\nMi25XOIVOm8mQ02SwAxBj7t7W3BV3GpTVfikWU3z0ZbMZMejDxkCr2H1TpAJ\r\nwGo6SmBBZkhj/wmVAsA7yyT3TXu/qiKdp29Gwc7InDBSNXO9ShRhJO/8jJPO\r\nFWHx6m49GWU6+NEZ3cZ7xA2jxfFfWAN/7nGQv1iAVgfQRY2ZeX2ogI4ImDP3\r\n8X6WOPPVU5dj6r0g/ZUUdNRUwADISW6RnEHLNvk0RSkPBUGXZG9j0mctZgBA\r\nCZhII7+MmWIDGNC3cyIVMEiyd2r1A49E0Hiow+WvzHsd4zJyuYwJeFGfw2ji\r\nPg9eD4x4ooShLkt67Qf4lImCcZq+Ye3VHYSZ6F74nn6FnXlx1oWc3K3By9H4\r\ntPsLfVRVTPnUQOkpTbtfKXWUq6nDvERkLigGXby0FNTtLlFJZkqbQ/nWCPd6\r\npKS8cSU8htFeUP0cx4M0oi4Krit8svC2ynhoV3l/gJhiX2j5pQ1Z5K82IJ4a\r\nFkr+E1vcfegEX9um6fzyyVhHzLKMo01YHRf9lgtKy8MvkEjhoC/l+N3tV+Oy\r\n80pXNhWbM8BZQ+p7ejy32jxfUzmsUQaLubt5Yc12bZbhOAQSRVqK8qVVnyKn\r\nXECavmzbeI5T2HUM5mjiZgXccASYEt7psSg=\r\n=UYT7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2212092023.0_1670660681434_0.7026470491127452"},"_hasShrinkwrap":false},"1.2211302304.1":{"name":"@bentoproject/timeago","version":"1.2211302304.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2211302304.1"},"gitHead":"16bff17f2a3e911f517c49d1fd2c74c8089e78e0","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2211302304.1","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-GQGEr4kGyY4gtbAasHES1N/c406F8ZkAdDwj45vSK3RFZ6njsjjiYSBp6mbX1fciT17uAItne52fDIV3o4G4BQ==","shasum":"466ccd70d611dc8ace53d8820d1044310375aec1","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2211302304.1.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5az8oonmwxM3uURmL93US+gbb/q2sbfNoXeIw/WIMIgIgSX/fI2HqD5bi+fXsdcRb48lF8AXYerAVcuQfd37yEl8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmPQ+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpceg//cnWr/D63GbBT3KprDdLzXw9sQnoFuXsdZ6Tpby3IxyrW6dMZ\r\nxLQ+4EP9w1Xn6etB5ddlihhl764g1p+QeQmy/l9yLD0eHwURfowBO0OHN83r\r\nfttx1peIQbNkeeBLAORQvnYMrUoEY/2oTvV0emlTF9N1PzbwONtZrsDT3KKn\r\nDfXbCnDlOaH3+ipKt7P5VV+crxs/zUlsoma+pOTibEu+MapwCvKBq5g9jHun\r\nr8pbWM1qwkktqTl/hihnrBi0VaPkh49YjNhELrouHk1rMFtUM4DRCkpeuuNe\r\nMM8R0qi6DZ8/Z9iIxWKgO4xFHEPBDrWl3JuOAIw07+BYqBUojoqNxok6ztje\r\nGgufpeacRUL4cp7mLXaRdKHYnwJyk/dLTzbyjhycNDVg+7IClHsMPZj6d6i+\r\n0xH2tUVTcp8zDtIZiSM7dkvLdWjItYPmGB+cUcOh4BsW/EdJOIuVuwZnGh29\r\nLlJV9+/FyknG89ifkc3B3lXJRwOIqnhVMQupyvTo1jGMTQvBs1g7MDDGxhDD\r\nskyHVetWrGwAqQ9TV3CkTbMt+hHv8utA0xNqmWMLJFhol174J7QDPX4j7g0r\r\nZB67MkeUxHXcfFR9OME0LTBhXu4bXHjUbHtI+PUIW4TjNv404DjTPCajscMA\r\nuyNnhlAHMHziBMv7y9jjbrCCPYjUdTgkDbE=\r\n=yYtr\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2211302304.1_1670968381746_0.6060952622137734"},"_hasShrinkwrap":false},"1.2212151632.0":{"name":"@bentoproject/timeago","version":"1.2212151632.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2212151632.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"6754eb8b2feb7d6eadedb57776b91613ad5d6dcf","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2212151632.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-VgLVWhVDZ5b2zZ+4NoJK2/bAO7n5a/7qUsU8e+jk1kHPH69WycL/CQ/LBxrgxQl4/JMGYtpkDyy5SG6lHo2MvA==","shasum":"9474d3fc4deda3fe3d65e043a7da024b8bf30df6","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2212151632.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAO8+GQ+VpltUIdVsyeJycfNksrkFN++g2kdaS1HqL6PAiAKGC/cHavZ1fHVRuVBk4hTQl7gsr8zpP3cqh8Oh39G0g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjodoVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqKyg/9E2qmjXvtdd5eHb6L2Nop0xo5o1nGvfbvfGFEA5r9WXFT5hLa\r\nKC7Ir5hmpzodDwD6BcfYgzjhnCM1vOn+feT5NghTiaUY5Gtc3iHoov7mk5CK\r\nhNADrsiryuhwynOKelxIokXT3I/7f+LxyHMlhN3eS0mCg+Yy5Q6eyhgmAlir\r\nTSpow4tUXuqLEUdbdA9OGre/hsOZ1808JI4uhI3vh6OlVVvWbD6OBc1M1mk8\r\npllu2MnAzT1VmyYeXHMcNmtKQI7wTortn7cmHyLuzGhLJouuiW/T60/D5C/R\r\n6yQ5qbTh+/oMEHxxFAY76Zxtei2L9ff2RLd6TWSTGIuVUkS2Ixxgda6RmeBr\r\nFgdYy8+yRtDERYXF454AJr90QUd5IxS1KG1O6UamZiO8iV3JaotnfrBLy8jj\r\nX5FKyBO5EP3j+ehcQeRVAJ/uRLJ1iu3XB+zeub8EYdtVFt6g/tFV2xVuBI9W\r\nWsB0eTEAbCq1xT9nhbUnSlAW90MgGvyfqu3k8opA/e3xAJeeugSA6LiCIc7z\r\n7hAEOcWLFIAiWGTq0CYnFhh5oVlRlSaYZOoEnO/2xHYE6xNrO/Mz6EYb+h/N\r\nKQ+qQMnV0JYqFTkpFyA0xzNuGrvORvR/vkPP3WUYyA0mkYzd+r9rrT7+wXHE\r\niNzdGbvr6sRf1bMJXIUfryb5AndHd4/0Yfs=\r\n=Np1z\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2212151632.0_1671551509578_0.6215483497206149"},"_hasShrinkwrap":false},"1.2212151632.1":{"name":"@bentoproject/timeago","version":"1.2212151632.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2212151632.1"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"0daa515ff1e284cb2e31dc8fda7f29c073e60b60","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2212151632.1","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-jwF06ND+CDtfkJsVHREwaJZutJ3t6AUjuV1ARC+tBVAcOffukErE8SMGD1yrnifxY+xnEdJjuI0opzdJszhxcA==","shasum":"5d0bbfede816e36d487e27750662122ba5ed84f8","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2212151632.1.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEFidqkh9qFfPjCbjuUITBll3/0/s8w44aHaR7B7ikwfAiEAiJgfz2tQ2ZOXth/stxyWEoqTzAxhEyn5qjmVrZ2jJnQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjohZ0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmop3xAAhEX+8XXlOluduIImEfHdkn4PMZJvjIglqRBRBnL0Vpp15Bfu\r\n381g70OhRkTZDbndbXRVaFPBYeuTnfnj/Xc9hOKeuTxR2wpOBUlT2d3DsDPy\r\nYR0wJt9+Blr6J9DACOlnPXstPpl+GwdV1QnEH5g8wfddx0p8UJlHLGRSYx59\r\ngzVXVP9YYXD9uL2vryJXmCyo0Qqrs+xcSoPbt462o8fyWGsjoRmSEkkecxZv\r\nf2AcEhzrV4Mf/Mojg2lbKDkWRPolhuegUBMwomjqJ1hCuY9qg8NtkyfUxad9\r\nwvZNFaIHOHQv9vjDCYYza33khm1pLcz2w2BZy22vohwt58HBdQl3c3HPyVtu\r\nYMsI0ukMvdeUFhJxUy0EYfrSW7ZvfEFjFwN5HpnGoDldpiOE3FERVpyzLhmL\r\nnHFehCi9wQzRgTxqakyyvt6WOnLECbNdEh9INSV4t1PjMTzKc/oajf9j+Vjy\r\nrZByXLCYpkqG9ZQWcFLzqJ5AmaYN3PJ/gxly9pdF4WztClmLUoAwnH3CEWvQ\r\nhBLh4hUsKv2G3bgBS+faT74arSDWkf7HkF+dxqRU5pjbqdceEaXjvqlhUL4/\r\njKre4+/ogmcQCZPwxGd26Y8dYpSZnbrqQcXMQA2apt0ugDvQyyoWzpJ99o75\r\nCfGpy61p0FpDl7/B9NU8IFnwxjuCQLzPtfA=\r\n=4u35\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2212151632.1_1671566963994_0.39398147508040005"},"_hasShrinkwrap":false},"1.2211302304.2":{"name":"@bentoproject/timeago","version":"1.2211302304.2","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2211302304.2"},"gitHead":"910a4ee7a16075d9db8fd2c6c5bfb607f22bf54f","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2211302304.2","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-sC4x0FjGgAUVMCUNI3O4idScICxM74AV6ePcHZyTpJ8sM7uXh09ULvzcza3IGnbuZJnogTxmARAlvNBkxN4Jfg==","shasum":"adee36f244e9414594af8054365e8005c9d8c900","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2211302304.2.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIExlp0eh5uE/03sAZLyV739PRyDsFwzoRQqmsiv1Sx9hAiBAk+aQKZjEtiQMKWA7b3u7plfF/lWhtCGKmUwEkmLr3Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjojfwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmooOA/9FtObDdpee1QBRFOp7aJlUwNxvw3+v49JHEMWVx9NkXFcR/RI\r\nr7qvBEIvXB53NFgfqMKePf2NDM1/qOSPbNPGYOWpUDR5HbsfWEdKbk1LCl3K\r\nBzazOjJM7NVnvIp1iBNUoyyilKswfQTLY88tmiCFYFyxnXCoLnFm41EBSw72\r\nlROpUPPI8z7U1q2DVKCWnuds3iYUp+Y0MojhM6EUnixKAPlT5iWv0Z+zJMlZ\r\nWNw3UcuabaDuCuTZOlBx20Nbe0eZgLh8MnRZklfMg41imptZF0ot5hO3Oj4w\r\nEdFPMloBEJTovY9fy+WsCPPrGsn72yo7kWdMB9l9Q81be7Js1c+a9bLyMbZu\r\nizq+w3YOqvhd3QdpArSNj9i5TyFKlU44sqoni3xCdo3i5Fs7PXxG0FtibVM4\r\nev2avHQL+wuIzQRakob6rLRfYq/+6Vxy3YUiZnzOiXG9AtAfLBxblcVsjpHp\r\nzZ4PukOhH4utoysy+0EAPbkDfd/dhFu9d/m37P9CXSe0ExyZhc4O6//Ng/6V\r\ngoaX7ujsg9JYNhqbZ9TSYEdXxvYvWMsjUZ2nfnw4V7TaAjLkkcGEJWQA3ZMv\r\ntFRTA1YJmEHyq5GeN8ztJ6kiP3PGl3AkarvV/zrmDLroDIKg+oTT0MhS5fx5\r\n/IABaVTEjVq3LzT0JU3m06Xxc2znXDcFQzE=\r\n=+U1t\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2211302304.2_1671575536512_0.07110343718768863"},"_hasShrinkwrap":false},"1.2212151632.2":{"name":"@bentoproject/timeago","version":"1.2212151632.2","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2212151632.2"},"gitHead":"e3ba25e45c2728fd6b1c91daacfcf7d0870ba6e9","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2212151632.2","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-rSwKv0eC0PJeDoj4IqufV5tJikr4B1GaCEE/aTqANNAUz0acn7VgFjbKzHgEmiLlnyaoYdu+EegQVbKo7kIKSQ==","shasum":"9cf9567a364c649979cdcabf3a75a9ad14c858f4","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2212151632.2.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEkBsiqHid+xni+lfrwqKyHgo2pEOTuKr/9XiWHMXWtnAiEA8lIBCGwzoCOTiiZt5cLuksTiLs+qKBsL/YPcWaWAjr8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtG/WACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr7Tg//eb9u08YASK13e8VCzE+Kp0eUyfNVJ5RYdAzSaWCDw/ykEIeU\r\nJEaF019bjxSxxwEK0uhm7F6m0LddQ8KR8WEJ8cdaxSWdbqDTLGVyLRjJebz1\r\nOeMvEFArJdEVSpce4PaFM7VB1I44bGSNJWzLRLdK3Pc3i1v2O7ETuwu2ON6B\r\nI62uokKy670jZDrfpVoRbbaj1WrPJSqwY+a2OHThUlffitwEpoJInvB4u25e\r\nzr3DlwP7alCtLIPK75MtNFkiNWV6vOKvqRNCUkKCwhSE4lDhoYcOflDPX5RC\r\nkEiQicTuH1vQYFhc5uEMjtEEwAf0FI7LK2LqCs1CL2Kk0VJFGkD+MkhtzzmB\r\nmOWLAheZF2mHeLiaBSCgMhi9ABDnSnALMWpGC3O5DEXLdXTKWDgEV5K5Dt+8\r\nFFXHG3lx5WN8qPLGJP4VkjF/0x/LuEBGP1w8Kuvw8MREIXvCtwKRtYIly5sC\r\nuuMNrsGt73EfsfZgMh0nI0sPgN3pWAr6osHrd0bHTqqEyXIz/KsBu63u7BCC\r\n935D67uYB3yd2JS2pmMDDdhcPpCSZiTyPuThmEZALZ3AskpDukmc6rBAoBTZ\r\nZON1Izh9qaUSFpfJ0F5jkdgKLOk1A9RB6XwY/1JF9IACHlda6WfFdgbtDSCD\r\nmGu4E6CkWdW8rSOvjcnjmkxkKdlrkNomdRE=\r\n=P+o3\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2212151632.2_1672769494402_0.8756483070403005"},"_hasShrinkwrap":false},"1.2301031703.0":{"name":"@bentoproject/timeago","version":"1.2301031703.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2301031703.0"},"gitHead":"e3ba25e45c2728fd6b1c91daacfcf7d0870ba6e9","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2301031703.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-e+cQg/jymy4tSgZ+6E3ZYjc6DFH2m8sOcJhMrxNbB6Ffz6fn55yAV1eh4cMZj3q4QsUeCIPy6s3G/FdBDKT8zw==","shasum":"4714e3b97e3fe8f70b537e8ef3f09f1275a1219d","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2301031703.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDa22T4+txeXRDInDK7O8YPKx4vQE1Jgy4zQ4hKO9OK8gIgWc9DLBwO6i5NYvi8nq5owU4f4J+rw3XZ5WJD0UwLx4M="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtJAiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJYhAAgyxWVCCL4XSGKzgV+iQa+TlGhtpzqfwgxU02LzsdGnJ7xFlf\r\n94rtS++o1zotEXhQRWia/udfcJ7yY9hUfEtUUcxDJ/vzROHtak1KL8JB2cDk\r\nV++bPZwnKqHoe7HM5hzBgEhQmA1cr8Jp5pibjPqn3hqkOiXUabqmLelvykFA\r\ng4mjebQ8V0u93ZJckemfMg3mSvYceMiMhaJYRi2mjku9PaK+ykhjlWELArRm\r\nEAfpSx0KP8EAwFy0fyN23dRzKVeILzWxV0PAKy9SrVHFxIs6xHnrDUs+1+ZE\r\nwJNndPn4qXR2CYdnS3Kx8TuBz9p28I49rXS/rkHteyLQmTxW/q+0HJBBZR7V\r\nxYllQVjKjcFuK0kFBBcetlhpZkep3yIvsUV0VrAMAVoyaVXxIo2Y3Zlsu41m\r\n5CLjGfPovtZK6uTFqf2Cnr/P8ZB7/w8lbGBAD26qxv80v/HQBeAIMGj2+GXN\r\n3Jf+MzNe1kRi4QDD+uEcczoCplj9a1bEkmG5jxDxHXxi1RnFRsyfstAg0Kkl\r\nDRKg+yji5BpzxhSZJC1zqa36r0irl3m110lzfpZKQmRxIxI13bx/u+yocaSY\r\n/1tQlQOiT/33n1zNeEhm5J2BXv5wS6HMZc84CQlqSG7diIJ+ylVism1+a77D\r\nAk4p52XNs/5Gpe2rm0dbwcY0+CtmnbDrdP4=\r\n=DAOB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2301031703.0_1672777762134_0.5998193082781271"},"_hasShrinkwrap":false},"1.2301032153.0":{"name":"@bentoproject/timeago","version":"1.2301032153.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2301032153.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"418b16026c82f72bf8e885668d34a40fe043c9b7","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2301032153.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-mW2cn/i9vJWGoSBu2jBB60f5QfwE3Zr8uVMwGzjEmyJtbO/3KkQ9yVyjWe5vVmStj1yrqJF0tIUlhAFDJMvTsg==","shasum":"1464ec183268b1f6f53b97293f8f300ebe4d423f","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2301032153.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBffCbpWJIA52a/ZopM4d6viaOE8nLwUFLmNBET/eSlyAiBx0JA8rk32duyZMKyTnN08gV/boRUGXaOxzGuXyJGT9Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtTfLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoddw//eZ0jSi/Eu52I1WHx1Y2QXTJ6vWg45+y3jjg1P6G0aDlQmqJp\r\nnC8VOONbHTUICEAYs8npGXmWODCMncCnpjxzpeK0JWVq2VVrkvXHMDvRDy+8\r\ndVtmMnoC8CWtwrPcP7T+V5nkDzi9Kyza4XB6XM8PXpW8ku3f6x+GSUfsghvc\r\nLekiRmxn8cmhkmrsUehoSGtxkjMXf0Vw4YWdH1PB+tyLX6bNUllIGatqbX16\r\nG/DyBFPFWiuQzhvBgaJAHDzLTFqRP2Naix4QBFJIcvDCHW4WDyuTjX7UJdjU\r\n3T1k9HWWa197N/sWKUh2mT430mbrzZ23GLQhAoKfzpxZPPq6iAN8INQFvrhb\r\nvftmo08TrmhFAW3a3ZTBSmriygFkqw//DHxobenNwisy1z0kkucGbf6o72Lj\r\nNZCuZUB60kbJOQwg61twHljlYGamOAyJuF2K1Qz8tiueozDDdBEj6br1wcLt\r\npilnGnNzo176uDBDoBMjEIThcQZrwhZTJZI8nv2GNobC4Wgl3395uaAOXzni\r\neyGpWrx+REWvxZBDPg1x2irKWiSmXPv8/XW59NOqrnHpayGxleHdALUCzsEi\r\n+XjdPRs9Hgn20K9MZoReqeTVYM9EwOYIS3X31dJRZlLFf7zDgRCMh6sGULOz\r\neSiAVLm68YZjrjiPTaL9iGkmxuVRblgwM8Y=\r\n=occB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2301032153.0_1672820683530_0.9581737112417419"},"_hasShrinkwrap":false},"1.2301041800.0":{"name":"@bentoproject/timeago","version":"1.2301041800.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2301041800.0"},"gitHead":"7026aa71b81896aaf30f29b822e1a578138e33e2","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2301041800.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-wMQ6U27UUQYHBLqIoacQ3EhcMrdpi0bTGr67/QrvdDDCmF6qZIuyM4PGqyEIO8Y51tTsHJKzEg01l1K9PWeT0Q==","shasum":"0bbef894d453d585d394a29e073fc70ab2265bcd","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2301041800.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfeajHgX2mCy7qwCsZ/dRqwgYxidIDVctAdbTpX3XHrAIhAOjZDeyyWjGP5+s2ZkEAZwgUyFHEwDr1rg2P/AwNLoXt"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtolyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmppgQ/+OXCGGhaoRWnp5S1EjC8UrwgG3IoUYfvqh8EXIfE8FhjRBQcE\r\n8T+SNvF3uUHGA1OC5wO+GQRucFHGDrhvzVBM6WGbDJL06t/ysaSlx1Wvxtnq\r\nyde3MpqnbyOBYfko2obi8cRLTkqbb5cVPAmzMsXK9DqMfLdeF9ieMRLjHA+F\r\nXwmUOSuccCMvqXMdEyWfvYCYOu3zAVAJfjfIib5n9tFxmwOJS82GmNFI9e5b\r\npO79wPc1lcPHgDy4Qe8Mt/huJd6xJ24IcQ3+zSbWw19b1i3nf6B2NUwbh8p+\r\nXsizQKsNrupOZvjqRBoqseawrp+jqSTtXRn4KBemSLnfVTnZD1WMdXxLMwe7\r\nEGPQPMh1X/oAG0oC7lnfw34WAbOgpN1DDYe27Xa/kCJdojZdIMqeZdUI35W/\r\nlybNjOlV7ycAjQgYzBs/tQXUHOgfaiHt08dHuHkUacrdsRiWuQXxJBuWqGEF\r\nZlGxWEWvgq/YoCaZoCmLbIx+3p1Q8mAjRu/5KbBpyFzO0KbbOXpFiU+QWj78\r\nYN6WnLuVU1PcfRAHS1yP9HW05chryzZZRf8d2VsC3VvxqvJKyMnLL8lXBKhH\r\nAMbvkCM0Gq8HHp79LhMhwW0rq1O565LPHfmkKoNSrVZYpY5JSmFNe+iMYeFw\r\nXUWQQKZwsxXH2YTRGJqpIrh+KTAZwZVMWTA=\r\n=woib\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2301041800.0_1672907121988_0.45034694327428104"},"_hasShrinkwrap":false},"1.2301100345.0":{"name":"@bentoproject/timeago","version":"1.2301100345.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2301100345.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"12a8a2eb9a3656064439da35b736023090e7c78a","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2301100345.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-K7m8EuhFa1hGaxDRNdDmJRsYAx3eJXVTqfhVXrP0p7RuouRPhTX7h3eZqR4VNylopYPo4UH/3ban0TWgZoEGIA==","shasum":"4d4076f7c6f1c2658ced838b73acd9b7552140b4","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2301100345.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGe22wYwvVz3uBFIeJZ/Fyrs3KcWmhb8QRcFLXq3tj8yAiASZTululPUd2TRK9APuqLpkARDMKECpb9Rx6diUtn94A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvSDwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqsSw/+Kw3jKNczi2BAf+1BuW36dlM7EMILZ5Gh7fm9q95vL8JZqVcG\r\n8JqOdUcPnH79ek9cc6nxyBq/dxG5lPlrTjSSHUDORGqDpGwGBnQPaXkJynIN\r\nPX3CbjBUd9Xm1vVe62ChQCGwfYVjsEQhMkAk9uLG0Eq9steylV9X10Y4Y2Yw\r\nuKICe8wHwZx7bUtXPv2McrAcsmektaIm05+bXUuArzfJD/0w3OraBLCIGNkF\r\nYf/OTTUl49dIwqUsfvkQHtlFUYElGsShiniS5J3MRgQuxL6hThc0L/EwvX2t\r\nxgAi5KIF/I9Lgws4s5PEtUk8QD+tGsOSQd2hr0xhxCA02hYDDxDAKX+DBeMS\r\n4ypeXlslSFC81RTZ2id4AzKww50KKDV+ZfPm/s/sjZSZUK2MITbotxxEXx0j\r\nH4qZueXqFea2Y2N/OOresVDnV6W5hEu9aEhVe2TFL24Ubb6MPes2eKhdOKPG\r\nd5VilEyG9mnjjtKe4PfFTJj5TbPonOmqWmAm98+UZPHXnSayJbvABNfBpkUw\r\nduP5B80AebutoStqnzgZ5+PJ/NcsXJL73AICtO49Sc9cYtbMuk7zAWcru7mh\r\nWUDP2VjZzcoC1pqv6qWkKVrvTAZIa6RYL56lxik9O5edxw2aEY00ngVhtO0Q\r\nXk8iCE0CESVecr2KW2S6vUNCCJwTqsdymJc=\r\n=5sZi\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2301100345.0_1673339119788_0.7821377607747582"},"_hasShrinkwrap":false},"1.2301112346.0":{"name":"@bentoproject/timeago","version":"1.2301112346.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2301112346.0"},"gitHead":"290809452fa1006da1ea148fc925beb127bc65a4","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2301112346.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-ciKk/xuJ2u+8tM9dYSstO16oCrFK+wHJJ5JOLTQUXnDofgE1mayLxT5O+L0b4IN/vcKHFzs71nlVFvJoAqD1kA==","shasum":"1311824e76bd1beb7ea3cc13862ce4000b7b43b5","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2301112346.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC1bmti1AHJs+vcKTxGAXRRym269adCu9jkGV+QdyVrgAiEA5jfQ3IsRgK3P7+NWDAu3Lc1eXn9nr8ohmhV/ecpjUFM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjv8RNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPpQ/+J4PuL8BgU0hKdm4jggJzoMo/xII9iA4WE4a86G48l2xWpwrB\r\nsv7yLJSo2WPxXuzgr4zkeo/kXGZX8oW3kAPv/eBjjfjs2PUJwevVySRER0D/\r\n0fRa/2V2Mbvktkv3vm0rOXQM43SCeH1lm8mLyQwIMgbzVr0TNdkGREn5TjyR\r\n40ewEuZnJRZ3yhdbcOd9yKW7Ql23iE2u/q5KisAQN0RX1j/9CuwKkQII1Ckb\r\n2c0VbjU+DECw819gl7nYLcL5DHhuEL8bb66FpeNRRqEpANBZMf44KpM8sPeI\r\nHPY+JGQaf3X2qQrfU0/X0a4rBt652st1EN1znbM93YBqluu9HWaNQ30ZEmkK\r\ntUQfy9f05gejGZQ/eih5G+/dHk4c0VEIUpTd6hlonvbEDM1AUKGxib/I/3gW\r\ngO8SO27W3E1G5nWp70EqDXk8FLKhw+3nZOva7WCNhnqcLYZ2dPVh8sSmqDDC\r\nFOKg9OB/zpni16Kzt517/qr4oqtWckCAQydI0JG87Qd7Ezaa5PxBWi6hroPc\r\nMsXn1r4Xz0vZHCGiWpGnlCgw6iq5waHEjmWRtSfRYgL9HbZI9/6TOKUvrM0f\r\nT/80d/JBOryERrs5IQ9ud+ux6GXFpAtWNw3UzIdp+Wkry67eGM/TXd7IpTWi\r\nJnmViY1mGMQEennz9pZIMvGx9F1Yp7dTLpk=\r\n=rXi7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2301112346.0_1673512013657_0.43156829156954046"},"_hasShrinkwrap":false},"1.2301181928.0":{"name":"@bentoproject/timeago","version":"1.2301181928.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2301181928.0"},"gitHead":"8d4b04c8f4aed6f3fb83e6cdd785a334ecaa8a4f","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2301181928.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-JME4imkgLO744XelLZEfl15i+Kxz2dyIPqGbwG5H9CsgP0EHwUjmkhHJzU7S53MWu3iVsk5lLHCN/SR7LfD75A==","shasum":"5f2c5272570f4462e59491779b2b78f3bd818dc7","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2301181928.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGpi/0p5Tbz94Xrnyqe1eNQmyX/MFx6nFoN89luhnqISAiEAwPfGmln25b4DAdNympzh3rDHqvsII8Vac1iEGEBLcIU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjyP6RACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPxg/+OlDAZfmfVZvE3qqlxZXHEn0mGFYvMxWor3AsK0JLjpsHK7CH\r\nLTORAtta+kdWfn7LDaXHWhn5DU5M0rVnBnauKeCWbiSOP5juWT2s8XNBjvqK\r\nn3wi6LuWLDNWdLIzNcAU0Qkbym3hy022brQhgpsTp37oZPgB29Zht/AIezYY\r\nO9lmecrXneA7jjnf1RxEV8H352FXe01aUy/qQpXyrc3jLjShyhF71zzueN6r\r\nLaj5NTSSr9M+1YiduwlIXyBSLxPXndgXkVZUbrgayFo8Y9Zf2mGhz6fvikvS\r\nOV1Zl1EPx5syUlnhcsBALWxfWz0JJoRD+anplkQENUdZnGRnZzT/8dcIfG7F\r\nCFmUjrPYYFgw8cRg54qfzbIDgASnMCXGZ6YlTcfkHWpWkydSmBdUFzw2liLV\r\nJpESJy+ImBwTRuAe/yAyi/X5Sz70qXEYd1MqTNvT/tY2EYLhuCukU4USER4z\r\nfO/0XJVcWnUvd4LUO0c93lxXjkrLlFQ2xycKI3DKf/0y2nyv4i1NQ8p4KXb4\r\nRMJPY8D3LpAA14HV4RMxb3zFGWMULr2Dcum2KpVRkIL+F390hSh1GFAYKbuY\r\nb6Y04jq8Iyjkbd8ArOL6duEVLcFGgYvNsWWLag6Oev/T458HzRCITeWPa4bL\r\na/qZ+r5wjRVj5RyVVkr0UoXy+XBpaYt0mLU=\r\n=3A0g\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2301181928.0_1674116753349_0.28132896402879237"},"_hasShrinkwrap":false},"1.2301261900.0":{"name":"@bentoproject/timeago","version":"1.2301261900.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2301261900.0"},"gitHead":"a6ea9dbc37fe6d4b0f68e25838c857835dd4f7e7","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2301261900.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-GJUnt6VZ1jMCo2+Kp9DYyEuO3mjP5UAX3TfejB/Hg3fbZAqB+jsxIbwQd0b0V3wVhMk67VJ3OuZ2f7Nj8+Cs2A==","shasum":"387afe895b7790792096ed9b08cdd48107718c3f","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2301261900.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0iAAiZzIn9UStYCeJaq6jiXZA5TKwPqDemulJM8K00QIgAVCScVdgOzV9NiZp7wVr/YNjhaPcW/XMDBErTeGVOMo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj04rQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpp7g//abpaHq98ZRzse7gd7yWGoGk8PPiDCQf4Z3KY5vs9CURAoEGd\r\nWnpH9eJkktD5vJ0r9zUIqMRE0Bm2C9pFnj52OdAfFl8YvZY3fcoV1E4nL7Ua\r\nBRkKf4T9kHtIIL7SWM8DxDIYA/a6UaSbkJDNWv147pLMrpmeicMfEnLHWqPy\r\neas00dvA0gOROzN0EkIV2KkCiCOISqhLVsrZyz+Bgd0a2rn5aV0IwnNZk3CT\r\nSC/71H/rLRg5SgIgezc5XIUrzC5F38jpdgNgEhYsTezqyxTFCPiwopeeS9xd\r\n88TadaOLvFqDDFe7bzEOcumxeJZe7x+Vd1RMvEtjdVzmNpZ/P+q1enBEeiQl\r\np4rVYKYU77ORwqp4Z10BlawNDASsU0FplmNnWfA/YzREySxulh+lMLXyPHNj\r\nbMzLVWrCSj9IYWBSwZ70x1d1/t5zaQr47nzWoyDyGJoDpecRM28xe2G1e5br\r\nhIIAibp+Ss8ZL4WKvhFw3KsX0J8gY24aAM8vJVjH4FUySUyFbr24PrGP0OFv\r\n6ywWNzDQqymGSoEmrxxZkukoSpEuS9VN0n9uTKyHfZfOCw7OrEGzyv9NBIBj\r\nSCFC2VbtPuyaKlu53LKoiEzbWuZbEgivtndpqITjWZgL1i6t+gY8HpeRRON8\r\nIPrs+AqxSgfjbw33HfvaDck+dr9fsjo3Srk=\r\n=3m+5\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2301261900.0_1674808016367_0.6209730887576366"},"_hasShrinkwrap":false},"1.2301301810.0":{"name":"@bentoproject/timeago","version":"1.2301301810.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2301301810.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"06d7a2baddf76737d7cde110a7b4bb9351feb38d","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2301301810.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-tuv2xfNvCn4y/hZlD0a++11X7ijYo4syGPLsHoNpVflheiXQxsMqGE+jve3SU3IMCDM5NgGogPofdJ9EbhERAA==","shasum":"063c6e16b6b98eb47e0626d4356156a18ecd40ed","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2301301810.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCf2NPzecRmKZ6IU8WJA6vsFLAxAxw6aTng2a2KhzQVlQIhAObo5yd0Wy8s5xEej33Mi8zKpXZ++PtQhOwg+dlzwmkD"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2NCbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrKxA//VHvJSlRntRK6lCfmDD2qww6NQK6znC0Plbyy3Q5nh+2ETNwP\r\n3uXNgOULySa+585nEXs1Uxqe4LuEpyA3SEwH9aixqsfnXuhv+BdVTze4eqfU\r\nv+MivLXmYPNiauYHyL15NjfJmHfshEOmYp95e45PrALXMY2hfUiGWERluPZd\r\nEPSfgW3g+ELv36jaWBeu2rvK3BJ7QNefeqer1aa6BhDBRmP+AOF7qvMptXKc\r\n7DmeTjeOUWuxU2AgjWwjOP2AjxMshYPOewmBBHxPuehrFqSfq2LrSC+3xIV0\r\nLzBirp1EDcl0MLfRsveZNaoEdNz+hAinbcdKun0fsJHzDFJxzNBzci0CoTgC\r\nUUZMTRZizLxYBhn1bu8WaqIkBVLbV4evoeB7/11a+wEJHkziY6Mw7wXvf77Q\r\n8nywYVJSGjuFAPbll2A8Zs8FlCljhIKJGWtsnRuLShuw+4yIx4JcB4gTmSk5\r\nwLBOAlLwNH8nDo/IF/1OYSo8QCAv1h0U8I46AOUBT57Xc1JOI4Q5Jln+xCFP\r\ngmchY5TJFBa8p+Tw21booi9uO9z2azUfok9ydNwje4zXwxL/00c4msb7GeyG\r\n6i872TRqboLOwdeA3VBOK5bvemTWbP8f6Ik9DYFURJ3keHdgQUB7huI7JnCJ\r\ndJs5jJftxEURdVosi/2IY6F67YcDd6NrFoc=\r\n=Kn0c\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2301301810.0_1675153563139_0.3950222976917097"},"_hasShrinkwrap":false},"1.2302012254.0":{"name":"@bentoproject/timeago","version":"1.2302012254.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2302012254.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"e4c14ac075b71415995f07a6bcc3ca93a8af5cc0","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2302012254.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-H7M0yELsYcExotL/CBwIDgjoJlZwc6PAzWA8vo0JkZT4i032qy8VxxKYVtgsGCBt216r7/bIyH74IJh93V6OGw==","shasum":"c3ffb9a1a40fe3262c8e7ea77d66e4d01e37c141","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2302012254.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEZmKTCuA+i2bxYbXA4uUSvE7C/QATqbvTQ5QTQUxg0SAiAKXvBD+VrIIQ7pmjfnr7jhtr6KPwHQNVWl/0kU2I5uaw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj23N0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo8MQ//SU5BA/p/flnXbS/F0VCXDHeoH3rDDA89PPETd6IhbaWBXsoQ\r\nTtS/0lEjedaL/0R5FBTIKw7xgZ5DbK/sJZeBXzmkp3NiNvPlOc5J+rAQ5Vnc\r\n/B/clAVoEAVRK6/4EeM2wRlhev2XmG2f6w5A/jPpz6/NFnDC+9wJ+6solMjx\r\nSOFKLd0WEYs93q/xgod/05ihgsKXIv7/BcRGux8QGbNI8yOdQNfZIZC+li/k\r\nMa0h+H/KdGbjS0nDoyqDekAo+dSlr+J6iMt6iMSXwiT8ZQn6xuZ0dBNU5FrL\r\nTAjxCQtoakWovsKybZyzdKb6QZsUgqS5JixlnLP+M5yjpuVA7qjOG7U+bYBR\r\nNPKeA+wnvTKEJpWF4u7jHvx7GWFXd5Js6UTeQTJKvWgykPX48t0mT6AFsaY6\r\nL1SZiXQbzoDkmd8hMYegN6GN1jrErrASZhQt4sULhHLkrV3BQFznCDHXZrpQ\r\nDrsoO2nj5yjo6MQfC8DnvOcIRvY+x5bEmsAQUI+izQ4FuiS2uJr2musBj4BZ\r\n5iN0jZtEWeA3Syj/tPg5Zi2/loEfeZ9k+hsEoiP+vuEEbZn+B3OH5krVyp0T\r\nxLr8JsUDqHNLAnRTQSmi9pWOJ+IlzFGbRKQ8X9VO8eT+2tSOpeRZXuGuXOvk\r\nr+qmQaeyWYNm6BZWDA6V+NVrUgJIF03wS0s=\r\n=vEnn\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2302012254.0_1675326324186_0.10391424874714428"},"_hasShrinkwrap":false},"1.2302021743.0":{"name":"@bentoproject/timeago","version":"1.2302021743.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2302021743.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"a27cd72c15b628053806c94efc4c96730603dbd5","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2302021743.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-1OlnWCGmmDbL4tWlFCnp71SDN7dxMLdDf92Kjv0LQeikqI5PZJIYUJ7jO9/ipICkcVBGX1DWd0T3POgxGS8weA==","shasum":"10618aff907a0c20f83c53a9f5f03ee28452963d","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2302021743.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4he8NfNBBKlIWOAhrSVxKWk+FdvjUiI3W2Y2IIckltAIhAOwzgEPbRcs7x7UXDoAJ1eYBjteWEkf3hjfjlBmO/u2S"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3MUdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7Zw/9FCgDaHM0dvRszZpYeUSxgxhNpsfUU8Jd6lWU20taW0PPnC6T\r\nrWnTh8n6ruYpz3gMeZwHSRhJ/HO2qg5VwbmNgS9C3zCIEoENRCGoBGrK34AP\r\nSQa+cmw50nqeNVK5zhvCkvrErL3AddcSfbS3DuCBmgScXOW/2ioWHwquLtN0\r\n37KqfL98a7lwxSo4k2dOjGqepM/5HuMfIWf8e1yF67Uq6ANPdsSitE0IGTqn\r\n1C5iznE0uOh467VImVfn+1ZICfV6/oeFIcGOsp6Kjc8sCk1HPUpWRR6nAe7N\r\nbTIsQEpEAbNpnVnccqG3Za/TE//xcjvfeSb7+evo/JCI34SkqvSkC620har2\r\n0p5uxBaqC3gqzGjtxYL51IZvA2sXvdHhXFNKLYmfhqU1VGLoRxJhcLaM2aub\r\nIQuaam0lGgJdsyfvUt03sNU7rrNaIb/y5YXv4ueppwKHBcjMvKfjhI7jfzyk\r\nOzh1zfP8DEbi4PFX0hZ/YACMz1QlAjo8e9arrIOk3H/Edczu9ekcgVRtOUIF\r\n7I8X2BzZ5Izq6LwQwmzzOFEmAPnoUv0NUXjxXC6uvPPrly6xMhkUxkTI+kzg\r\nIBnHcb3wyNnOQXZ+ir4lKRvZnhRav4neMSQn2Z0fJyNqo9OYr2KENbhlgN0V\r\nYWlBAEQQwK93FSwcHv/CY/1oVuozBMR3uh4=\r\n=BB01\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2302021743.0_1675412764898_0.8633163357111089"},"_hasShrinkwrap":false},"1.2302031721.0":{"name":"@bentoproject/timeago","version":"1.2302031721.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2302031721.0"},"gitHead":"f8cbfb0c4e4db6b8dea923c0afdf75aa7888e4b8","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2302031721.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-ebJGAwPadZ63iJrH04JRqdqOMuRs+5Fd4xshy6BYNK8aCzrNkNTCc/Yk7Qf5koEjQkYLzvKz23Cqqh6iOst0kw==","shasum":"a45681582c1d10c013ba4dae821111aba4a9d6b8","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2302031721.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmFAc6Rkp8u3LTgY0HofYGvmiP9vuUbrxmvlsI5YbYnwIgBt6t86jOrgI1LPk/lGGn/CLRtYjhthVvLQWg6ste6Dk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3hYhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoX9Q/8DDCIHs9fEWZ52OvMCS6IiQPOpgrJWQ+527nB6Zc+UYN4apu9\r\nVBF1DO1oDLTLslGBQ+fyavpyNncedMev9No/FmR4m/2V1S2yvXeVIqDK5mgZ\r\n5Z7aNK2dE20kV4Wz9bR608ongJRRtzdEiEihXv0v3phCFIrHr7/xgJGd3F/x\r\n545dLt3r0swritfeoOSB+1i1ZU3QCVINXD+HVf9tgDl/Xw1t614QpF2wdLU6\r\nUNcqiPyE+L52CjUm3tHmx+Txli6gGmA5isy+xDVRwnRvVtrewQCMN0pCaMbe\r\n293jw17SzqC+k6QXs3Fu6joRVaAd3IEAdF1jmtRPI/0kJZURxTNVwuEMB+2D\r\nr3+bRr1GUkc61NrlJnlg4MyP3z3Se5oE0BvhYKs9M9uQFxjihhLGM8Xp9m2a\r\nO51odsy5KBoN+I49fJC03FCcv0y4gIGgyIpjfOnl+zugmJRYCuWJYLdn7a7j\r\nJNW9KXuVKHlU1IgVs+DGKVH069WImm/tIYECc2z8hlm0g1S+UjowbFzPPRXG\r\nWIELgYrv24o0EuYRbd37SWhmd6HITdAR7SNKheSVrolblA3C9Pir0t8NoWp0\r\nYKNEdykYaKzkMSO22/PWStPedivT9uaL9xVbHFl72R32QbfrZU3XB/CZdC0O\r\n+4rvmp2GbkeL3f/R4d6KJKSflZWnkLYF/E4=\r\n=mVEw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2302031721.0_1675499040877_0.6750272091991205"},"_hasShrinkwrap":false},"1.2302171719.0":{"name":"@bentoproject/timeago","version":"1.2302171719.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2302171719.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"767b9ceecbb9759948c2b0db6f66c49097659f98","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2302171719.0","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-8K3clm7rAsePZQ1fYjWYrsLP/frqv5F7ZO4C9OAksgbUC78ApdmxuwVdR/NxirQzBN7dkS9zQYF3r2I0HLvZig==","shasum":"671c883920105fc7cce8b4072f694e36b7737833","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2302171719.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDqroNPTVq+hDRmiIVA6+ucbVWeFGLCWt2TRWuO2B6qsAiBwYcTI+fmP/JZpGlZmXGWPC8qkseqgIQos6hjipgyaXw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj8IrzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqzXRAAnjzcNJ7ZyC/Ax397Jv6szAc4QU4gyhYgAgTedfoqvuvjf1K8\r\nMCxU8qKw5gZbNzVvI09omGSgd+J66obm5lixJAaya01bjb5/a5EzHc4cpbz6\r\n64AsDVmrCoW9Rau6pM1xii0UHY0bgyy9b0QGA3d+sZqr2nvh4eZgVpW5ajbE\r\nDDaIgpHYDcjyCidCNbRGUxzJDh98QnOHZxS7044JImPF2EGh3OnHqJh6S+DY\r\nlt6NK9Ju5duepvJVRhghvX44Nk1MuobpwHKPDq5TeA2bkBuy/OPuGDGLMNwt\r\naxEOKCW+yw7EtTqvcrm9U2wbM0ZSk2gSgA+iA62h72ku7yyG5sBVruLeEZOr\r\nxhc60QnStRj/YVlVM+5uQc3oQuzeuB4RwhG+P4JVrLsrc0lS95VP1ANj+yOx\r\n0qyrJvBfzopD0YBg8dxzJEjRUNnGZ9Fcgxb/Qr84byD8bE1rGUbIuK968cmL\r\nz9KAYNIBW0DquRyOOMOu6FL4d3ZQ/qjq/tA1Tw799qVa/MUpsTziAoeR027m\r\nbaK1Oh+XBK0E7T5Re/S3m9619TF90qPVw5erSOs3C7eDCbcSV+wKjsjTsTJr\r\n69VmF/zFs6aywzlkn3quhYcYcPHo1YDAzjRhZh+xGkgPFU3AkOSxEM3qlpV1\r\nDcfFa25nKjAiqLLA4TCEpcP+5tHHlYk8NN8=\r\n=E+xa\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2302171719.0_1676708595241_0.520385997649971"},"_hasShrinkwrap":false},"1.2302271541.0":{"name":"@bentoproject/timeago","version":"1.2302271541.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2302271541.0"},"gitHead":"13cfe7f4354a82bebe08fd29496c4c7de848a18b","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2302271541.0","_nodeVersion":"18.14.1","_npmVersion":"9.3.1","dist":{"integrity":"sha512-5H/uh8sYhzeDMmqmRP9wGpRohytBNj3lplkNcm/GRpZcq45vxylT3jNO4oiwLTucPHRzlfZg6ku+5H7S96Cxuw==","shasum":"5c76351ec939b31caded5d9e4cfb773aed08c6b0","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2302271541.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCum1woYa8C+gWNKczwNnD7CRXCAKiYqQY16vjeueWdJAIgUf9AcHNx+A5EXluthaQycy8W2+qPW7JHUsWPFAi/CU4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/jjpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoGAw/7B68lKv9SMQkDwnl89Yqws1VZAKpN0alr0uf4SAUip6vRndhb\r\nm8a6hb99ctL+SGPKyLp/LE+QWLRY0VvkbnVS+u214DD2tpOBglZArUUtzsBa\r\nWWlRRAp03/GIxJFWWAm7R4O+zw0g2GoniyWRtYP2osTIk8lHQbiVeI/Dc+BG\r\nmnb0R6ZzDGKpmen0DrvxpopDwluZAnE9tJFG1AU92iCAlfVz4EKmibMUFeH/\r\ncqtyryUHkuJ/FnvJwmqZU8EPEa+CpZ5vjQ5UEuSLmEFBnc6ag9eXKAQGnjBv\r\n9yuIAwMu/HQl3zNHPxGjLNbhc7/O9Zu9XJ/lyowpsBBIWS1Ppu07UHJLvt7+\r\nTHjDJ6F4MuN8o2SFfCqKWyRibLk2ZGvx7/1U/hUXVglHZNg4jspQA6diX3zf\r\nURsuRXMIEmF17LYXK91cC968vuAxi9NSveiGNYjoptbdidR+A9RXjI649EG/\r\nkjiqaps3F7eOjB/PxPM1aELTrONutweAViLMfeOzbVJYMFSfn79gwwsexlXN\r\nBqJe7Z5dES2Gk310Vza7hxIaX7/9WVY38xE1Hy/tcm3cKrKrjVFPDW75bWEq\r\nHQDbzCCtAdum3UVgE5PqPlBa48iLILLel6Oc2iFELihCjbqJQ2O54jKtlxPH\r\nki14ltcngktpzXuACt70lh6mzPN1VIP+/C0=\r\n=GPwc\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2302271541.0_1677605097120_0.616600047169884"},"_hasShrinkwrap":false},"1.2303151529.0":{"name":"@bentoproject/timeago","version":"1.2303151529.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2303151529.0"},"gitHead":"d02f1bef730eec6d78d3f2fa5968ca88a60acf17","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2303151529.0","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-uHJ3LOhNaAgoaqcteEKf9UW4SHyMDEG9PmoMmiQ+gYgetuEjuPtSd291YCdTPTQCpK918f8+Q3T3fy+6FB3KIw==","shasum":"914c5662afb1bcf83fdae2ea1eabf2457587dfde","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2303151529.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClpssVLli821I7XrYE7Ef77ICoN71Dua9ti2CMxBH0igIgKaFfVTrRQido37Yw1zPGBl1krNHVtMfRaqrOrhhnr0k="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEfIwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr1jQ/7Bte8kcRf+HXn5U4l9b9LxBcBzQ/dpR9JHT9gVB2lw77DbHen\r\njc+y2+BTL/k8ySAaruy5biA0Szcqt6cH1PWFM8P2rTCWwWSeqV5mEsA2WnQa\r\nZvMeKcEyDK9ZzxUr8nweSySMz9I9c9UXKYRMwDSyWC9oTTEup0oJDF+UOz/2\r\nqo3mfmqRk6jnLKLyxXrFYIJ3Ms5EqTxY9dxf7A+Mi7r9OUr+kBqlV97k0dQS\r\nOhXVoDP84Caes40oEpYLYl2uROcDGAdbni2t02R9WeHGDJF/ESegNKLy6iHq\r\nO4DIjd5ulhwhh84AmRo6omNyPX6tzsjPCRx/g8SFEpfCrjY9IP9eHe5hBmOJ\r\nKqjYI6AjT1711vGTLl+blJsVmr/rCIXmE6sW5yRXR4Nx09SY5wdvrpk/cdDN\r\n1kSvQ731Cm9LUPuvCBJsz1m091L8D2+tpuZOBzi3Mm3xmeK7GfYJ2mDmidnE\r\nO1UTUUlFrltIAELvwOUm0UKHGA50rsmN7T6HUnQDAIOotMt+UoMA3faq0wtN\r\nmJryuhF0yxeCQY00yI1QrjZ8TcSM9y50QdiYZoIXOrPH9LTxIFoFm2jgXaN/\r\n/WXGnZQ53HBfW1DJz7IZkcYKX/96TLP2aYjK77ffDufJ8ObKPpAuRFIozHQQ\r\nHDsLO56wtppqtuu+3H74KmoJmOXmi0mFRSk=\r\n=TIAO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2303151529.0_1678897712371_0.3248407683432746"},"_hasShrinkwrap":false},"1.2303151621.0":{"name":"@bentoproject/timeago","version":"1.2303151621.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2303151621.0"},"gitHead":"d02f1bef730eec6d78d3f2fa5968ca88a60acf17","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2303151621.0","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-EKN0zm6V6zqeBS++ZKfniA6VinnZpQ7AkbpmaFfptvyRorxX7ifFeHECSq2LPeGt11iqR8c74MSSr82/Sj+uPA==","shasum":"968348adae4e10a5dbd94b2b4943d2774d806ed1","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2303151621.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA/mY96+4p4jGTzJ0XAwkj+3WZPew7gi994hkMMKA9NZAiEAnwQXM2ydFCYdSzLdstGAZGo5i2Ltqjqrinnl1YOZI9g="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGrtGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr3KA/9G/InRH9FNw0dG5/NW9GXz46GLawA1UsitKJq+Wm5VKB+gDUo\r\n5dgHJaTa+BFf2YSqjeEn5+v4hthPv4ZM1DRe6JdKgnFyvJFgEQT4riEsvyRZ\r\nizu/YseOl23Xcv6GgMZOSfiXv8dsBrRGET+ekUnqiTx6oBVQa+3/O4XQcZ61\r\nqkN3PXcRYlV1EjQs0zHyfz8QHdQ1i5EBeO/AM6fBgXwZFI+2nbvq/qAHHTls\r\nBvvSncLrCAZpazZiD7fdxeAp1zfEhMlUaf9XjEZRsEYolgtx4xwA89aoUErf\r\nt2dy2FHeESnuJd53j3dt2z4XqqsGMnin7WVhZ59XlbY5VQaMqLhEFZqQyvzu\r\n4Gk7zhdt3nEgt9iKcdtLgCAelkAvB5Duf8W9krzBV9CoRAYYrSYF9MNrf3FG\r\n+sFYfd3f7Mh+fZ4GIHuPo5DNes96jJU0RKsbxaSjDIBE7ijtAkUQ03Xx9s2B\r\nV1QyPyvdhGrhkjuSNz86Ym279wz9QUUimkia3I157wI9ySMRD+o9QwaPKvhC\r\n61aHog718O9R8dhs6FM+eSsb8Idnn27HjCdVmomVFI7ZtrH8tYwHFfT/Pel+\r\nF/u2mw3S271mi66FJzeBtEra5gmFEkxf1G9ruOmLK0S/l8BagUT5viTp3l/g\r\nNowu0oCKmStidFF8vtKCTPECIX7f+nuglxc=\r\n=G8nK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2303151621.0_1679473478505_0.3325868384155841"},"_hasShrinkwrap":false},"1.2303231800.0":{"name":"@bentoproject/timeago","version":"1.2303231800.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2303231800.0"},"gitHead":"bb614003484012cda74511a460e3958f01512a79","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2303231800.0","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-WCd3UWz/opsUASfvHHmFror22XSgRM2rdSpY2y230xBG+ft9FeVDHCSCvnDOdoIk74RyDWSPBt24ssk8th+6JA==","shasum":"2292219010727424c700c8d433db15ebd5116a02","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2303231800.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsjuDDt7TeuoGd5dIpE4zsEurZ+zhE4VCeDeUt68zN4QIhAI/bIvagbRM/UHhiyzQbfYHZ1OOELQGr6/Aszp4A7Swe"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJAr1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqbMA//UqGkBqzHpq6JahmPcZbCGOE8R4sSDnY8jQDrMPg1CWIFAmoV\r\nWf2K0iSRoRmGX/0YlgJ3EW0DRdn4SnzIMHVUQQuYsskODo9TARmcqdc+8+m9\r\nP/8lgntbYWmTvhzHes0blurc5Zvm3JxfMP2e6G/hTdAqG+ko9+TxOG2BcVZR\r\n8jJRvYE1jW8BpTkGQrILRpnQttSGBhZK6hGZWWozn48g055jlw8zgRK+i8T4\r\n4Isiqj2RJ8hGln/pF33s7dk3uDhJlC+cDjZqKAHgzS+lcciPnsrbB9xDuAxG\r\n14AawRNcR94iYvIbD7zk41qVcn4NU6nWpabX2+o9REI/zBJ5/p+s0/Z/nOnf\r\nF0b+hhopp4hv/7H28xAB+uus519tef56DyC4CmOvZvI0VkaCPKN2rlAitixC\r\nEgFUEeT5kmSq3Ty52hYvUWKxqvUVtBCV/UwPgTIPt1kNwTSKH+lGAG0oqhRb\r\ndguG8+A+VL0daMIf7zaZdjtvv4ykErOD57cvcgImOOJ1iay71WhWCpmxLefA\r\nSSw2rmPmWcoJrM3NDfni59A6xLpj244Nz7pm4PyrM32Pem9WvGdF0697LdpG\r\nNyMPT4ZZCZ82qV5hqIWd1zcksntnizZXNB3Mm/3MVYXguGW/MuzAZkOAYsTg\r\nF7LtMrB4a5tL+nU3ZoQNQwhg2yjLr0/GGsA=\r\n=GTHK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2303231800.0_1680083700909_0.9723359623674945"},"_hasShrinkwrap":false},"1.2304040531.0":{"name":"@bentoproject/timeago","version":"1.2304040531.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2304040531.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"201864e5a81ca3bd8ba23d3a14d9ac4f88d7a66d","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2304040531.0","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-wKaqxy6Yv1sQs8l5bCr2ubYRh83JYd4fE3Q7HoTo1xfUjs1KLjYU4JfSfB/cdOSDv30JWh+vO31mIC9U1rWl7Q==","shasum":"e8c1d8d4aef4d869ba67091acb5f0ef1d2d0d552","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2304040531.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBFBjIbodvC0bf+T0iyj7Z28ra2h0VdJtkP+AsQ7pqmEAiA7qZ5MX1I3qUowFBomubZ1faCry/8+/b4NJgmeH2FGNQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkK970ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMvxAAiJhsGd9MAYmGC9Qw7Af2aUMYp49lS2iZDmd+6GSIrpZxChEo\r\na6mnBGMfXXVX0fNns/XzsVfj0C+SX8zLLFffkODCmpkV9XCONNcBDQnqMSkA\r\nf5v3VKs7OU+eMKFIs1hw22Gere+GlWp0RHHzaDqDQT0AQJmij8T07wvecJ5g\r\nMf5nDaNMrT1wy8rieYro5BAKwzMwH1iAfgLRXNQssK3qXW7FWaWdj3+x0bXc\r\nwXIt91ukhVZ8T/aP02k7q12707XJ8jDEAihu4oxg/F5n3GdSHr5l1OEYQti/\r\nZe6DlH9581zutL4FqJg49ckrIQ6AtbfCfEBVFhJXp03d6GdkpR1EooSqn7dz\r\n2yg+SBMHj+M+AqrHLjBI5mXCtG5DO+UX9a909IbUW3a/TzcQqc60+SAQk+2Q\r\nj7UIVTlzdu8SBt5vQgylnGKtN6uUEaJMoPTB0Xf0abni9HQXrK7VDoJHMD+e\r\n3ckKsSL+SsdbWolkgofT0MrvFQi9VJeAtlqRYscMMrdUH5BYQY+0yUu3mu+O\r\n9G0fzkUftpefhVLUzsnGj1y1p1bfqSlhbCyHgK3n6rLjVo23EtIoUl6nWaSy\r\nklMUfmIa+IDNATJ5EMKV2SZHNslKwEccfJrhrg3yLB6+vwUJXpH9NKqnUwy5\r\nu0sj1auXaXNaaABHFKQBqFrUT6F6fcv4nN8=\r\n=fUrE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2304040531.0_1680596724166_0.3797968517278467"},"_hasShrinkwrap":false},"1.2304062309.0":{"name":"@bentoproject/timeago","version":"1.2304062309.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2304062309.0"},"gitHead":"988ca302278a65b8d468409a444b029bc633cd01","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2304062309.0","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-KTgpF99W2KthYRavu3I0iQUvyD2S0lPpeT45JheL6iWhcqp9XsJlt74oZJ73N5Eceipel9pgbYGkkMcIQOppjA==","shasum":"692aaa279f9f9e0f495d6d0e938a21a6c8633f69","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2304062309.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDzHSW/9tMS4O854P1lY4pvvUl3UDPPzI4tKvi2+c1lsAiEAiLD1Usv3755iSopYA+gTzjteyfuW2l5SDI7RId5IL8Y="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkL9NVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNOQ/+PFS39SXgjSEq5Nfjm8FvysANxM/tHLcjcFk87s3/XMJhhjUe\r\nKu7SktzIGJwUigUsWwKnr0IRWfkXXCUvC1T47yt/iTeJrfG9lwH+7pbXwgc3\r\nXFZUYrbnfJKoxy8ptJEt3VPBcRqJGdAIpluHIPGVeiPBq6QMdHWjUUvKD9/9\r\nTe3cclrRt/c7yNMCr3jR9ESpTocYdWyoz+mFq4uyU7VeoVrfp2TXJaOK1UFe\r\nMsp99ynU72TdEBVndkOE/eQur8VCUBCuAQXYHH3/TT5JFYCY2r1P/M3trD0k\r\npOWNtLoYMCavCoThNCGwkYkoQh4ox7WzjkCUlycITesTqwdORqCWkRXysIHz\r\nLtwG+DSulrwmvzAxpIVpqz13f/4SWEm6Ahz/3T1yhi5ChxNnbt2+fS3sb0k1\r\nxuXVczosGkJ9KpCX7uEfi5PSj7BMFsPNg8LUQw+GuLeoxc3ZEFNNmXRMPzHv\r\nGnNFQGmqCkSb9NYaxn0fyq4se3emMbnUkIypfPPytUujogo0cCXcYUi1jeYS\r\npRBcKmkVRJDakCh3AL0x1ZyEi3r96wu/TCqKus9r6pDWfDnhzGs6007VawkN\r\niwjz+GpApGBdq70mnPlGDixE2XLIe/FUy3m/52Qe0SWKqVT0F/PlDlxgkD7V\r\ngVdxXbcNHYwVSjJyjMjCiVi8akr/7JT4vNo=\r\n=bxqT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2304062309.0_1680855892876_0.6954972493379583"},"_hasShrinkwrap":false},"1.2304122229.0":{"name":"@bentoproject/timeago","version":"1.2304122229.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2304122229.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"a622b88bef291701e9f95f448f46d014e6e12d5b","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2304122229.0","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-xUmvVD/uAZtDDZ2H0K4DQThMHf7qqsddnU09S8XmEamx68z8mg+ST7eMTZYNkmko0Ru0jOGKkmQAmavqQYuLNg==","shasum":"0733825ce1620f01d9660660930264309e8b24e1","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2304122229.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFmYg4dayMGFH5ORGpAA4f1st4m2OOxf1E3cABhX/uNbAiEAvu4hZp+BpN5vCsRjlU8Dnz3iEsiOYrut95K5smJhMaY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkN7xVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRYg/+MOjNcsEyk6TspEXgQwdKGDny7if5PToUKjDF60gboKHYRBAY\r\noyqhPXNKiCkCjt/BHn29mcK8+O2zYhlq3MAF4yjxlSl57B5J1q/Cr2y337y1\r\nzYG1W7jlD42ypuGSTaU1h8AYIpjsPZ8Ih93qctiaML8Pewm6vvz+vLJFW7pl\r\nVGXobwgmgi7CHc99Mqbw6nhfNhvE/HZPMqaPzMgmOocxZx7i4ais05Q0G57K\r\n87ZuFt/1y8q07WXJ1Ggx7UuJTUqzR7CVLIi6FDqujMAlC5kpBaDHLPDySagZ\r\nIbcO1ILP5tJ94Yd08am5F1Zcsy8nKeEWrMgFKAHI8cNAV1KXqdD9mD/Q05za\r\nyA0qv3NT7cMZkaSWbPRM6qA9+tLdhTIBr/IjBJuO3wC5svzQLxeC3IEXwd8l\r\nHp9tCtX8zLs1QNeuT/hC7eTaB6+trRMUa8nnotpaHddh3YfkIbMwJ/yNbxlA\r\nZV+nKfENEfxvoFTDtsA+C03ESwO8DfCh1kKkTgqcgo7zReaYCm+nBg+d96vw\r\n314+BW32MdeuuvldAZ3EqgnBApzTTIQGRsv3MrVKuOJrk/6MSV8GpWlKjDH7\r\nIJ5BbYzjZ/h4Z+Hl3+qaAzQya5tIjrSuSIWnALwY/LdmYVcqfngfdFdQIMhB\r\n1BqM31385S6lS6OmZ28HsELVLxGtwZW6keA=\r\n=r+Xd\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2304122229.0_1681374293089_0.23249900519395394"},"_hasShrinkwrap":false},"1.2304132133.0":{"name":"@bentoproject/timeago","version":"1.2304132133.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2304132133.0"},"gitHead":"453223019920559443567aa4d698b7ca016b28d7","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2304132133.0","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-lae46nxy/KoD6Oe6XdSFyDTFYM2UFDi3I9nA1AmnCXHfqehe3b7e3PiWQ9jvuC9YbmEMPvtDV9qoEMGKSB7Pnw==","shasum":"de832fbd25f40ac7b7b55f60e7cc3746c2121081","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2304132133.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8MaplFzu8whO+1TWUL6oPw/z76wrjRnlgD/3oDx7TCQIgcZkkmUxWWwRNvM7TkDEo5Ra65o4X9HOkAVw1Z1MIAlU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOQ3YACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDxg//d6PaA6nOfreOfvU/oRbkG8DIjQw2EBZvywGFmy48yKzoiFYL\r\nlt/8WpGbFan1d8f91/9NMsBw9V+8eyi7+C2WlZDApXKGl985j+NlUlKovMvs\r\n9+Bt1uxW7bEU+JeXJEojFBAudBxlOJ7xD0dI+RVF3+Z/9dieyNlz/hkg54WS\r\ngrjKYT57JQnkcwQoGKFKwyIZ4cICCFz0To+M8GK1ZRsTf8g03LvWNx7twqEA\r\nB9UwtToKJ0E/KMBVBnxq+AdskztLuPhjkMRaNVHoWaJdYrp6VM4qKDGV9VxP\r\nx1FRUkmYBIhf9F3eJdNXamR+nF8u4/1busRCbqwikevs0y/ODdlgyVpUXCa9\r\n7U0auDB2KnCk+d/VHUErfoN+Y7XvLxjcryJlAXz/U2jFRxWBFYcjrnqhmffg\r\nYZO8AJqwU7N55AyrrVvdW80R/id4I9xgMq+nORUw2pSbkXCCx5iMQGr/JuAp\r\nOUAoAIHQ4T+DHugu5xgyD9c2YeSR1PyXLeFnIkxmEk4JYG/qy5XAVvyqPyI2\r\nVGO6ACM5q+lDkAZ4//hAtKPUNlm+x3mv/7NUrEkyQ7W8EhjjCU/km9rLImjX\r\nVQCkC9q3d1RBUaE/HcbZ+osY26x3RMEQTWAr6M0cnLkBj0djTIt9/Ax1AOVm\r\nMjlRxmovd1T0eo3pBDkcd8GEf1Oe+ojwbK4=\r\n=Pd+5\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2304132133.0_1681460695850_0.5241913909134814"},"_hasShrinkwrap":false},"1.2304212144.0":{"name":"@bentoproject/timeago","version":"1.2304212144.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2304212144.0"},"gitHead":"74060fa076cb05cd0859ed848acd32302f1e46dc","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2304212144.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-VjSKnNYeDLazv1hqlnAx0z5bp1H/XTHvalo/XuKQlt6apXNiei6TxzIeIQzIFK1Vy+p1afgjw/drTAcZ94fHvQ==","shasum":"7982150c42c76bd7d21220d981b6e4f583d12339","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2304212144.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDT1pMVO3h5WlmyMkoQP23k4JMTO5mK+j8XqES2WFyq2gIgUaxpSgwQ5wVgizNSx9rcVgqlMlITTDpNXO8e394epMc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQ5owACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrazxAAnPnG7H/PVUzCN0erSWWeWAhf16KAAiNa3edRPtnNQNjaqkbj\r\ntGJQyWjv1Di84PR1twrWSaFd1K338RL+1oUkHoF5IpwP96ItPzlDixEumlYs\r\nySOWAbAWrpAhqUnEtJCAZ6PiCSiNZcUWWAcgCTMeyCbzS6T5bmkmvFy1v7m8\r\nMhokor7MyJX8gkkIspvlvg/eEQqxuyrZR0MekwIkUzdp3Do3s327FEkPOPeh\r\n576ibJNTy5uYPU83fxrCEpN+MrheIG3XN9pu3xPfuAuzBFkYEi1FUc2SnWeA\r\nDnVPWbdFtjugjuGaVfrRPrGbCFPCHdw1anq8UWqQiqNDd8SQVUPgk5hwvpf+\r\n5NtAf5fW4awb9udXzBDGakgogwFRee0v+6kUY6UmxBqdNMLmIiI2hqyvJhzs\r\n/7L4r2mfkgSOKixffuc9ozVnFm7eOFDyNolrkn/77ZuSoAw5nQU19nWecywI\r\nlfMp0h+yP8l2BXWKpQbtzEdFm0N+QoFAtzHf4ThTC9jv1n9Bt1jT14jR5YMl\r\nWR8xBUtOnn69iyjfMmvN93h3Za8yJUmzIYRu07xluZbxUlfiK6sGaxtcOnJe\r\nbComDDPSN3dZ/dM7WXPpOlQlA+7tmL04gp7kNtTgg2Y24yobwCQX2OHfL7AH\r\nVQLaa4jw8PSysdSOz4QYCWMqOvgMuRx6azg=\r\n=IKN2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2304212144.0_1682151984270_0.901485121319578"},"_hasShrinkwrap":false},"1.2304241924.0":{"name":"@bentoproject/timeago","version":"1.2304241924.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2304241924.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"f962c0db0e4934715d4bbce41c2220e6cc8bc1ec","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2304241924.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-HROLgxSQ5n49fUPSSksuy3n/4VyXyfKu4dy+FnXQkTR9aFARsZyo2NRmOuh76oBLV2qO9yAvuAe/DnrBVoqIGQ==","shasum":"b04dd019169be681e4f0b01e702d6e07828b7458","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2304241924.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyA0UNddIiqU0MsULTDoW7W94mou5LHwCfRHnhCPUrogIgc22Amlnq7rOL4YCjNC2xIKS5yx1nZhSo4DE9zvN6Ib8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkR468ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqa3A/+P51EdlrsIWN3Aw3/11pVfWEOLXWOJ7Qrt7AFtLty2lqjScR1\r\nsW54d0B+8TKeh+wWSzdyQ8k2GaqBB0YkvMKEdCrhvOeJTppUKBUHVbtNPW4r\r\nss7Pa4BOBTNFnvbwSM5h6WfhBH3rs6xLuCSeuWiONujZaBjvsLy96aR/LFow\r\nAwjkYlMoVbBrxlNjoSEBw+tEsLJFnqsSM8DNmEpJSUNFv5LF1dtpnMALn1iG\r\nb90BDftbO3ADNkfwWBMozugkXGMFWQrcC+wPz1UEXJ8NQb52WpfKDz44Lt6X\r\n22jfYP/L8GV3PRiOpIp6Kc/UGTD9+RciVkJ6RVSzZ3jXk7zkIeINN6VAT9kt\r\niaIwxTIWO6dgG+Sna1e4BZYyktn/Ru6wjgWi7ddfmgS0eO8vaTdjvQRri084\r\nVOLZpQ71wVUNhUXHwKXNzpvW64WP78H7mVV/h/ORjdryA9QFaxQ6732sRZmr\r\nkYlT4NqAPuOMDfzBI9DOPNEgSSRw9stCh7Nrjepcwc2SxgaN3ozJyRcOI7DN\r\nKUOeRhTjlmPAYZ851MNtMItMvPu8jqR8R8KbJvi8E11E3Kx5wq0llJqe29MT\r\nTHFvptXE5lBnQGxm+080jis0d1mpsuy1r/sxWUSZEhTyYWjI2ePVJTmIeeNf\r\ngWwv6jLNUd4DTemcp04n9StIz2H0XhG8PRA=\r\n=B/qT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2304241924.0_1682411196053_0.527555006390517"},"_hasShrinkwrap":false},"1.2304262219.0":{"name":"@bentoproject/timeago","version":"1.2304262219.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2304262219.0"},"gitHead":"1e6e00ef42b6ca33dcb23d56bce6506f0b5b81b2","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2304262219.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-4lNbKd34jphItljsXHVwNbh/Y+gCyUWugTSS9oacvASJcFubo3mQLdPON4k/WHSwEAumteJlsSk8OoaRX5ovcQ==","shasum":"5d313e0d97b415a14a6636673f11a9db5b0ae810","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2304262219.0.tgz","fileCount":29,"unpackedSize":1611984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/axpmvq7k6o7/uPwd1lSqUUCN/54esG+l4vzQG/GtjwIgbEmT+ykQlv5mbOFiIOrUZXYVgssDWvPKHpBMrSnss/0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSjHqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr6zRAAmJo6U8+DAKeQ7kjnXBrD2v4/6fl01wH48c4+2UmLcVEAQs/I\r\nOssapHtFnspz+//fVDixF7VfgBsZmoNOoftj37Q4FxgczBEW6/LW1uWaJchC\r\nEri+Max2B0/7QwGN+i+WAS7A7ipFfY3o/s9r88bW0aCc4tHda+gFBvjUcvaC\r\ndJ5hVqkHvTPkcIEcHb0k/u6FuDc5iaJHAfsDFnnUaifI36yaTEvc9oWgoo0c\r\niiREiWM5xI6TIsGkfNAxC19CLWMFJP2tWTqG+v0TYmzoUI5RezM1QigFmObX\r\nZs3QeztBefoI2mrJd3MQBENMgIDGCa7wM9G546ieeYIlG03AdHd0nsaZhrB1\r\nL82BZdW0uPebPKArrc4xUo8Tvwin869SsFFeNwv/LITm2WL5/xatT50RX7Rx\r\ncw9bAQMYfKVIjk407Jial0YbQED1Jdfyp+/SRE4ZmIAuFlQskZTSSaEysG4o\r\nZ1XXrkrvU47rJ21UL+R/AWumyn3sJEnR+OXqRlRb+UGMk1zzImSPlPpXmHhU\r\nLyxSqc+5vS/6DwFAZq4BwUmPr7/f+idjdS7YfU7y1IqaZuRFoLEp4/1z2Lvj\r\n7MoyAOQiWRAuZ1QxsRMRYR2GA3U4ZD9YUkZieam34CtwNs63Z/gxuFGWMZ6f\r\nW1axaU3UFyg+74ThOmTzJJWkhKvaGZkTxGk=\r\n=EVRb\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2304262219.0_1682584042568_0.2892701106103297"},"_hasShrinkwrap":false},"1.2305022024.0":{"name":"@bentoproject/timeago","version":"1.2305022024.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2305022024.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"275d6cbfacfdba2a626c1c3d191df16325439dc2","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2305022024.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-ZrRcmWHY2hGZ1l9hfTnsejjrgQnvMFWG148k0llWeYnTzjHcJ6sc4HY3Z5KzbtkCbYjlrHkif9nj/WsFI/y/xg==","shasum":"c948fb9e39df07993f2dee6fd64af2852f5300b2","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2305022024.0.tgz","fileCount":29,"unpackedSize":1616793,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAaAJ3uVKP79dhEDoZiwby7xAB/ArTZWm1wbxijI7Lj6AiEA/jPApeQ/ygmTjIRHX6BK5rTZgbmwEmmhrRhZQz0lun0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkUhrQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFZA/+MxU0jyGupxz3pyW7aNaQTeOwWH5WeHO6WelkQFXx9PLFwEpL\r\noCpbnvB8IDKZCANHJW45LwRPPIdTdPEI/lVy26HKog272YfqRgQWJnfxjggu\r\nY94glTzqmP8jQDbxCbEI0ARNbg02eQNfOr//buiRmYSbZDlrlvqcEhyHT4zg\r\nvyVYll3nTxnGwJoX8eP5+yVr2OlDqc0DvN3WW1aCRbGp7C6rmP4qY06B2QQm\r\nrwI2uGYcZbF1C2uAfB7iFsgmPlp+Vg9jv9mosMAB1YAhOg6FeFKYGAMoXlEC\r\nRtB+ymz/84OyWKD4za6C9H9KoE9IfQRts9rLMLKn2UCYXLiqmVpKU3Fg8I1o\r\nL7WY/cR4h22id5OS1lI2NF+a1Mlvxc4smhX62sbO0O2DcTAb51f4dNz4AZxX\r\nLcAWZzyTa5o/qahhXir/VN3nnUzMg2XEqhIKVENJuUI+kQsYUCX4NVZHzPGR\r\nPlhEzWou2fr3BuHAjmxPqs1/H5KUkPvJHAzv1SoT8f3ZFFma9l/Kq7OppqWE\r\nZywe4oSGcLLBE5b+XWZCugAgoojsmDZEktEBh4W1pBvqgvUXX/X03JkeyV5k\r\nCiLudiKgylKSTA2+OeFOn9e2Bcg3NS2LDymTu2AJcM717r7kCD65/zk6Qj2i\r\nWQeRlBqbsf+y5J60Q0L49eu/TEZRUe8EhNk=\r\n=A/tM\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2305022024.0_1683102416269_0.7976501155324982"},"_hasShrinkwrap":false},"1.2305051745.0":{"name":"@bentoproject/timeago","version":"1.2305051745.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2305051745.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"a6aa8f04998e5f74539b892e6fde8143851f1ef6","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2305051745.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-Fci00fzD1grZpVmF5PTGIhFiKRs+Xvchd5Wy2ygzKj4qwhGFUW506DFeQqEIAT3wC76y/3/OvmSuSRuWV89V6A==","shasum":"e1097dfe2225247d0368fe4eac23a5a666e40d27","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2305051745.0.tgz","fileCount":29,"unpackedSize":1616793,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDtP//Og3JwdQpQuRbScsLddzbMgkYHBp74lqMbIU+WmAiB6U38swX/5nqKQlDPEgCovSXULZmABl3buykr3VkPnMg=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2305051745.0_1683361531164_0.8793476327778871"},"_hasShrinkwrap":false},"1.2305152039.0":{"name":"@bentoproject/timeago","version":"1.2305152039.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2305152039.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"4130d5e4016e588172d11ef0a84dea019bf08e0f","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2305152039.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-W8S4rHpbQZ81Cs/8EpoB9ApNG2IYPrPObFU9oB7ZTQ/lDMg84ywKS0PMXVuFZDATOmqbUVkz6VehD9/dG7kSig==","shasum":"90444a952c14eb62a533c15ea239ea3b916e4b1a","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2305152039.0.tgz","fileCount":29,"unpackedSize":1616793,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBox/nW8coVeGIlMPqP6vW1bwfbE4+m+9Jp6p99d+4R7AiAGk2GKfoQGiiHPGPt19XJin3wAKG20FzOkWZ9+awcQKw=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2305152039.0_1684225584812_0.5607224902598642"},"_hasShrinkwrap":false},"1.2305182038.0":{"name":"@bentoproject/timeago","version":"1.2305182038.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2305182038.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"885f40954f2783f7451ec4e195b909ce170466fc","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2305182038.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-08yms+iB5G/zT8uxI6BzojYplgb4KYCqnMBjds/sGqgTtb9+912ftZY8+VEUZVpmtEeuUiQoF6neovqtybv9jw==","shasum":"71515b6a97d8fb9e53da3c59475a079fe15ba45a","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2305182038.0.tgz","fileCount":29,"unpackedSize":1616793,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLQ28dWH7vXPaprdA16AnauuIoiHmblKiseIp3RUHpgAIgOVaq1RASVTV8eZbuGLiFVc3CI8mvwokeaGYpXzJ8ua8="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2305182038.0_1684484864544_0.3999588293673204"},"_hasShrinkwrap":false},"1.2305221508.0":{"name":"@bentoproject/timeago","version":"1.2305221508.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2305221508.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"f6a823a49114a57cdbf351ab983baaf0bdf4bd1d","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2305221508.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-IoTgXoLbgBmBmV/yXHUl54K38GU6BsHt+fOr0cJPCLNKxc7UnV6z+1/xH/vGPL1Mw7LefTkhvF8npeBkFAEg7g==","shasum":"f2d6136783b3897943a0d6473109b3ed3abca98e","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2305221508.0.tgz","fileCount":29,"unpackedSize":1616793,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKJL63Bb9xfLUyULfc4ciX6txJsLQWcilw4sAFw4OOJgIgerpUPSrvhkWUAW9QFjgIrMQL6useUukIrTPv166dMvI="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2305221508.0_1684830352434_0.3398828403744185"},"_hasShrinkwrap":false},"1.2305051745.1":{"name":"@bentoproject/timeago","version":"1.2305051745.1","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2305051745.1"},"gitHead":"c7c16e5e6f51fa01e6e31b5edddf60feacb1ebb1","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2305051745.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-msIqxXsQlqmx+04tiWRAb/metc1GqkPl1Pclp7X9M8G5RVsZkK9i9zHFWdkP2AWUjiX5LgEdIbvfri87XObxYw==","shasum":"afacec9f5bcc92390ceeb2a586e83fdea40f3e5d","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2305051745.1.tgz","fileCount":29,"unpackedSize":1616793,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGflAZf3Co5TI89UxLGwRBUgc0+AJQN55pFRd9z1Jq+jAiEAnshzJYBZ38sYrYFPEZ+FN2Hp2FeWjihLFQ7yGlAwkyo="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2305051745.1_1684883009880_0.0629724402829821"},"_hasShrinkwrap":false},"1.2305232041.0":{"name":"@bentoproject/timeago","version":"1.2305232041.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2305232041.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"c7c16e5e6f51fa01e6e31b5edddf60feacb1ebb1","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2305232041.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-br0D/R2YP1M94yWV+Q9do9NDt/KgJmOGfbwy+mE1FhfCqZ2Hyz+7dys6xabwBmnEkyiARs2YGe2qw1tKwHFvRg==","shasum":"5f7b7f607f397f455602fa9e03cd8bc8c95904d8","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2305232041.0.tgz","fileCount":29,"unpackedSize":1616793,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCH1IYbp9vqxyjBuBxwIEyHL6cf8pfQMfTwj0J/WCRLAoCIQDKLCL/5i8GXzjg+aO8u3+8UzNAaPDguYY4Zvnd1xO/CQ=="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2305232041.0_1684916802077_0.6068402272727096"},"_hasShrinkwrap":false},"1.2305241828.0":{"name":"@bentoproject/timeago","version":"1.2305241828.0","description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","author":{"name":"Bento Authors"},"license":"Apache-2.0","main":"./dist/web-component.js","module":"./dist/web-component.module.js","exports":{".":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./web-component":{"import":"./dist/web-component.module.js","require":"./dist/web-component.js"},"./preact":{"import":"./dist/component-preact.module.js","require":"./dist/component-preact.js"},"./react":{"import":"./dist/component-react.module.js","require":"./dist/component-react.js"},"./web-component.css":"./dist/web-component.css"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","peerDependencies":{"preact":"^10.2.1","react":"^17.0.0"},"dependencies":{"@bentoproject/core":"0.2305241828.0"},"readme":"# Bento Timeago\n\nCounts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as `in 30 years` or `3 hours ago`.\n\n## Web Component\n\nYou must include each Bento component's required CSS library before adding custom styles in order to guarantee proper loading. Or use the lightweight pre-uprgrade styles available inline. See [Layout and Style](#layout-and-style).\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport {defineElement as defineBentoTimeago} from '@bentoproject/timeago';\ndefineBentoTimeago();\n```\n\n### Include via `<script>`\n\n```html\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/bento.mjs\"\n></script>\n<script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n<script\n  type=\"module\"\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n></script>\n<script\n  nomodule\n  async\n  src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n></script>\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\n### Example\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n        await customElements.whenDefined('bento-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n### Layout and style\n\nEach Bento component has a small CSS library you must include to guarantee proper loading without [content shifts](https://web.dev/cls/). Because of order-based specificity, you must manually ensure that stylesheets are included before any custom styles.\n\n```html\n<link\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n/>\n```\n\nAlternatively, you may also make the light-weight pre-upgrade styles available inline:\n\n```html\n<style>\n  bento-timeago {\n    display: block;\n    overflow: hidden;\n    position: relative;\n  }\n</style>\n```\n\n### Attributes\n\n#### `datetime`\n\nThe required `datetime` attribute sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` attribute to specify one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` attribute to display the date specified in the `datatime` attribute after passing the specified date in seconds.\n\n#### API Example\n\nBy programmatically changing attribute values, you can dynamically change the text or locale:\n\n<!--% example %-->\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/bento.mjs\"\n    ></script>\n    <script nomodule src=\"https://cdn.ampproject.org/bento.js\"></script>\n    <script\n      type=\"module\"\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.mjs\"\n    ></script>\n    <script\n      nomodule\n      async\n      src=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.js\"\n    ></script>\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"https://cdn.ampproject.org/v0/bento-timeago-1.0.css\"\n    />\n  </head>\n  <body>\n    <bento-timeago\n      id=\"my-timeago\"\n      datetime=\"2017-04-11T00:37:33.809Z\"\n      locale=\"en\"\n      style=\"height: 30px\"\n    >\n      Saturday 11 April 2017 00.37\n    </bento-timeago>\n    <div class=\"buttons\" style=\"margin-top: 8px\">\n      <button id=\"ar-button\">Change locale to Arabic</button>\n      <button id=\"en-button\">Change locale to English</button>\n      <button id=\"now-button\">Change time to now</button>\n    </div>\n\n    <script>\n      (async () => {\n        const timeago = document.querySelector('#my-timeago');\n\n        // set up button actions\n        document.querySelector('#ar-button').onclick = () =>\n          timeago.setAttribute('locale', 'ar');\n        document.querySelector('#en-button').onclick = () =>\n          timeago.setAttribute('locale', 'en');\n        document.querySelector('#now-button').onclick = () =>\n          timeago.setAttribute('datetime', 'now');\n      })();\n    </script>\n  </body>\n</html>\n```\n\n---\n\n## Preact/React Component\n\n### Import via npm\n\n```sh\nnpm install @bentoproject/timeago\n```\n\n```javascript\nimport React from 'react';\nimport {BentoTimeago} from '@bentoproject/timeago/react';\nimport '@bentoproject/timeago/styles.css';\n\nfunction App() {\n  return (\n    <BentoTimeago\n      datetime={dateTime}\n      locale={locale}\n      cutoff={cutoff}\n      placeholder={placeholder}\n    />\n  );\n}\n```\n\n### Layout and style\n\nThe Bento Date Display Preact/React component allows consumers to render their own templates. These templates may use inline styles, `<style>` tags, Preact/React components that import their own stylesheets.\n\n### Props\n\n#### `datetime`\n\nThe required `datetime` prop sets the date and time. The value must be an [ISO datetime](https://www.w3.org/QA/Tips/iso-date).\n\n-   Express time in UTC (Coordinated Universal Time): `2017-03-10T01:00:00Z`\n-   Express in local time with a time zone offset: `2017-03-09T20:00:00-05:00`\n\n#### `locale` (optional)\n\nAdd the `locale` prop to one of the following values to change the locale. The default value is `en`.\n\n-   `ar` (Arabic)\n-   `be` (Belarusian)\n-   `bg` (Bulgarian)\n-   `bn-IN` (Bangla)\n-   `ca` (Catalan)\n-   `cs` (Czech)\n-   `da` (Danish)\n-   `de` (German)\n-   `el` (Greek)\n-   `en` (English)\n-   `en-short` (English - short)\n-   `es` (Spanish)\n-   `eu` (Basque)\n-   `fa` (Persian - Farsi)\n-   `fi` (Finnish)\n-   `fr` (French)\n-   `gl` (Galician)\n-   `he` (Hebrew)\n-   `hi-IN` (Hindi)\n-   `hu` (Hungarian)\n-   `id-ID` (Malay)\n-   `it` (Italian)\n-   `ja` (Japanese)\n-   `ka` (Georgian)\n-   `ko` (Korean)\n-   `ml` (Malayalam)\n-   `my` (Burmese - Myanmar)\n-   `nb-NO` (Norwegian Bokmål)\n-   `nl` (Dutch)\n-   `nn-NO` (Norwegian Nynorsk)\n-   `pl` (Polish)\n-   `pt-BR` (Portuguese)\n-   `ro` (Romanian)\n-   `ru` (Russian)\n-   `sq` (Albanian)\n-   `sr` (Serbian)\n-   `sv` (Swedish)\n-   `ta` (Tamil)\n-   `th` (Thai)\n-   `tr` (Turkish)\n-   `uk` (Ukrainian)\n-   `vi` (Vietnamese)\n-   `zh-CN` (Chinese)\n-   `zh-TW` (Taiwanese)\n\n#### `cutoff`\n\nAdd the `cutoff` prop to display the date specified in the `datetime` prop after passing the specified date in seconds.\n\n#### `placeholder`\n\nAdd the `placeholder` props to display the fallback text. The calculated timestamp will replace the placeholder text once ready.\n","readmeFilename":"README.md","gitHead":"fcd19c6354383946b2d66b95efec56661b06e5b6","bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"_id":"@bentoproject/timeago@1.2305241828.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-xdXulKfRr4l0jB0XKKyfvh03LyE0UgcCWWOn2FFNW/BLG8WxrpiAPiWVBHe/YUXz67ExfqVnRQK//jGv2ENXqw==","shasum":"d4f232ee10a68dc254dce7b9c1eb6034dc9287cf","tarball":"https://registry.npmjs.org/@bentoproject/timeago/-/timeago-1.2305241828.0.tgz","fileCount":29,"unpackedSize":1616793,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrE6mAqXxA8uWOJKUySX/R0JuUxenHuon5KMoKFBot6gIgSrGl67621+9XH9a72m6MFwRx2fRpnV0t+uc6sVfb98I="}]},"_npmUser":{"name":"bentoprojectbot","email":"bentobot@amp.dev"},"directories":{},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeago_1.2305241828.0_1685003158710_0.6131680735071465"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-28T18:20:42.181Z","1.2110261518.0":"2021-10-28T18:20:42.463Z","modified":"2023-05-25T08:25:59.181Z","1.2110252343.0":"2021-10-28T21:50:36.039Z","1.2110281959.0":"2021-10-29T11:55:03.492Z","1.2110290545.0":"2021-10-30T11:24:48.709Z","1.2111011823.0":"2021-11-02T11:25:53.014Z","1.2110152252.3":"2021-11-02T22:07:05.687Z","1.2110212130.2":"2021-11-02T22:18:21.358Z","1.2111022043.0":"2021-11-03T11:21:37.489Z","1.2111180040.0":"2021-11-18T21:30:40.378Z","1.2111060251.3":"2021-11-18T21:46:00.073Z","1.2111182332.0":"2021-11-19T12:27:51.718Z","1.2111060251.9":"2021-11-19T16:34:04.061Z","1.2111191951.0":"2021-11-20T12:26:04.112Z","1.2111230244.0":"2021-11-23T12:27:35.223Z","1.2111230636.0":"2021-11-24T12:25:26.539Z","1.2111242025.0":"2021-11-25T12:44:39.338Z","1.2111292120.0":"2021-11-30T12:44:02.163Z","1.2111152338.2":"2021-11-30T17:55:20.404Z","1.2112010058.0":"2021-12-01T12:20:53.137Z","1.2112012300.0":"2021-12-02T12:32:07.046Z","1.2112021656.0":"2021-12-03T12:23:49.203Z","1.2112032204.0":"2021-12-04T12:20:22.907Z","1.2112062322.0":"2021-12-07T12:28:57.752Z","1.2112062322.2":"2021-12-07T22:31:10.497Z","1.2112080230.0":"2021-12-08T13:22:05.612Z","1.2112080230.1":"2021-12-08T16:00:19.868Z","1.2112082232.0":"2021-12-09T12:47:57.689Z","1.2111242025.1":"2021-12-10T00:14:03.083Z","1.2112091956.0":"2021-12-10T12:48:20.054Z","1.2112102136.0":"2021-12-11T12:33:48.869Z","1.2112132331.0":"2021-12-14T13:01:36.082Z","1.2112160003.0":"2021-12-16T12:19:32.987Z","1.2112162055.0":"2021-12-17T12:19:39.539Z","1.2112170012.0":"2021-12-18T12:20:19.522Z","1.2112201724.0":"2021-12-21T12:23:56.479Z","1.2112212349.0":"2021-12-22T12:25:36.310Z","1.2112221739.0":"2021-12-23T12:21:30.629Z","1.2112231523.0":"2021-12-24T12:22:10.254Z","1.2201042109.0":"2022-01-05T12:33:00.415Z","1.2201052144.0":"2022-01-06T12:40:38.783Z","1.2201061922.0":"2022-01-07T12:31:58.499Z","1.2201071715.0":"2022-01-08T12:21:47.035Z","1.2201101902.0":"2022-01-11T12:32:39.510Z","1.2112231523.1":"2022-01-11T19:27:56.354Z","1.2201120015.0":"2022-01-12T12:32:49.862Z","1.2112231523.2":"2022-01-12T22:41:35.116Z","1.2201122239.0":"2022-01-13T13:02:26.120Z","1.2201131702.0":"2022-01-14T13:06:11.300Z","1.2201141909.0":"2022-01-15T12:23:17.219Z","1.2201141909.1":"2022-01-25T19:51:34.408Z","1.2201141909.3":"2022-01-26T21:01:10.551Z","1.2201141909.4":"2022-02-01T21:40:15.415Z","1.2201212122.3":"2022-02-02T18:00:38.007Z","1.2202012258.0":"2022-02-02T19:15:45.753Z","1.2202022130.0":"2022-02-03T16:57:59.251Z","1.2202031816.0":"2022-02-04T15:48:57.332Z","1.2202042210.0":"2022-02-05T09:18:22.213Z","1.2202072236.0":"2022-02-08T09:22:52.169Z","1.2201262038.1":"2022-02-08T21:15:07.676Z","1.2202082004.0":"2022-02-09T22:18:41.000Z","1.2202092050.0":"2022-02-10T17:59:51.712Z","1.2202112230.0":"2022-02-14T21:08:13.620Z","1.2202142035.0":"2022-02-15T09:27:46.339Z","1.2202042210.1":"2022-02-15T18:26:16.854Z","1.2202152253.0":"2022-02-16T09:11:21.881Z","1.2202162256.0":"2022-02-17T09:32:30.295Z","1.2202180255.0":"2022-02-18T09:45:08.300Z","1.2202230359.0":"2022-02-23T09:29:51.591Z","1.2202232232.0":"2022-02-24T15:25:17.775Z","1.2202241911.0":"2022-02-25T15:20:18.195Z","1.2202252101.0":"2022-02-28T16:46:26.309Z","1.2202230359.1":"2022-03-01T22:05:27.116Z","1.2203041950.0":"2022-03-15T18:36:26.096Z","1.2203151539.0":"2022-03-16T08:22:13.265Z","1.2203172113.0":"2022-03-18T08:23:11.990Z","1.2203221937.0":"2022-03-23T08:24:58.730Z","1.2203231914.0":"2022-03-24T08:23:32.652Z","1.2203101844.0":"2022-03-24T20:09:34.346Z","1.2203281422.0":"2022-03-29T08:28:21.862Z","1.2204121632.0":"2022-04-12T18:14:56.330Z","1.2204122000.0":"2022-04-13T08:30:43.602Z","1.2204132005.0":"2022-04-14T08:32:41.382Z","1.2204142048.0":"2022-04-15T08:26:27.191Z","1.2204160405.0":"2022-04-16T08:23:52.101Z","1.2204182206.0":"2022-04-19T08:29:30.050Z","1.2204191429.0":"2022-04-20T08:31:22.983Z","1.2204211736.0":"2022-04-22T08:25:40.457Z","1.2204221712.0":"2022-04-23T08:24:32.336Z","1.2204252045.0":"2022-04-26T08:30:52.519Z","1.2204272205.0":"2022-04-28T08:30:32.188Z","1.2204281949.0":"2022-04-29T08:26:44.725Z","1.2204292129.0":"2022-04-30T08:24:50.859Z","1.2205031420.0":"2022-05-04T08:25:51.247Z","1.2205041533.0":"2022-05-05T08:25:23.030Z","1.2205051832.0":"2022-05-06T08:26:06.758Z","1.2205090810.0":"2022-05-10T08:31:17.928Z","1.2205101904.0":"2022-05-11T08:31:34.353Z","1.2205120110.0":"2022-05-12T08:30:17.004Z","1.2205161914.0":"2022-05-17T08:25:36.900Z","1.2205181800.0":"2022-05-19T08:26:31.057Z","1.2205191749.0":"2022-05-20T08:26:22.413Z","1.2205232225.0":"2022-05-24T08:25:19.053Z","1.2205120110.1":"2022-05-24T19:12:18.416Z","1.2205251942.0":"2022-05-26T08:26:06.615Z","1.2205270638.0":"2022-05-27T08:26:11.457Z","1.2206071918.0":"2022-06-07T22:26:38.370Z","1.2206072228.0":"2022-06-08T08:26:34.174Z","1.2206082301.0":"2022-06-09T08:29:30.843Z","1.2205270638.4":"2022-06-10T21:34:13.653Z","1.2206101637.0":"2022-06-11T08:25:32.098Z","1.2206131450.0":"2022-06-14T08:27:10.443Z","1.2206071918.1":"2022-06-14T21:26:28.682Z","1.2206162023.0":"2022-06-17T08:26:19.023Z","1.2206221455.0":"2022-06-23T08:26:25.133Z","1.2206291614.0":"2022-06-30T16:06:58.764Z","1.2207071723.0":"2022-07-08T08:32:49.135Z","1.2207181727.0":"2022-07-19T08:26:07.520Z","1.2207201724.0":"2022-07-21T08:26:56.154Z","1.2207221643.0":"2022-07-23T08:25:58.113Z","1.2207261725.0":"2022-07-27T08:25:25.386Z","1.2207281718.0":"2022-07-29T08:28:10.467Z","1.2208021808.0":"2022-08-03T08:26:28.621Z","1.2208042017.0":"2022-08-05T08:28:20.954Z","1.2208051912.0":"2022-08-06T08:27:23.668Z","1.2208081650.0":"2022-08-09T08:26:59.611Z","1.2208092047.0":"2022-08-10T08:27:25.605Z","1.2207281718.1":"2022-08-10T16:56:45.910Z","1.2207281718.2":"2022-08-10T18:15:02.509Z","1.2208112015.0":"2022-08-12T08:27:09.329Z","1.2208121708.0":"2022-08-13T08:26:02.143Z","1.2208051912.1":"2022-08-16T23:05:30.404Z","1.2208172101.0":"2022-08-24T20:55:26.899Z","1.2208242209.0":"2022-08-25T08:26:00.669Z","1.2209072154.0":"2022-09-08T08:25:00.786Z","1.2209131909.0":"2022-09-14T08:43:41.679Z","1.2208242209.1":"2022-09-15T16:41:53.991Z","1.2209142312.0":"2022-09-20T22:06:57.801Z","1.2210010655.0":"2022-10-04T16:49:16.207Z","1.2210041838.0":"2022-10-05T08:29:54.164Z","1.2210052034.0":"2022-10-06T08:25:20.124Z","1.2210071758.0":"2022-10-08T08:25:08.442Z","1.2210112333.0":"2022-10-12T08:24:11.553Z","1.2210142102.0":"2022-10-15T08:24:21.385Z","1.2210172057.0":"2022-10-18T08:27:29.510Z","1.2210191347.0":"2022-10-20T08:25:31.987Z","1.2210211855.0":"2022-10-22T08:23:51.078Z","1.2210251605.0":"2022-10-26T08:27:35.655Z","1.2210272257.0":"2022-10-28T08:26:00.635Z","1.2211042305.0":"2022-11-05T08:24:06.170Z","1.2211060024.0":"2022-11-08T08:24:57.298Z","1.2211111611.0":"2022-11-12T08:24:19.906Z","1.2211151402.0":"2022-11-16T18:42:22.250Z","1.2211182146.0":"2022-11-19T08:25:09.977Z","1.2211250451.0":"2022-11-25T08:24:23.528Z","1.2211302304.0":"2022-12-01T08:24:16.871Z","1.2212071834.0":"2022-12-07T19:37:46.381Z","1.2212092023.0":"2022-12-10T08:24:41.721Z","1.2211302304.1":"2022-12-13T21:53:02.007Z","1.2212151632.0":"2022-12-20T15:51:49.831Z","1.2212151632.1":"2022-12-20T20:09:24.211Z","1.2211302304.2":"2022-12-20T22:32:16.763Z","1.2212151632.2":"2023-01-03T18:11:34.656Z","1.2301031703.0":"2023-01-03T20:29:22.373Z","1.2301032153.0":"2023-01-04T08:24:43.758Z","1.2301041800.0":"2023-01-05T08:25:22.250Z","1.2301100345.0":"2023-01-10T08:25:20.052Z","1.2301112346.0":"2023-01-12T08:26:53.955Z","1.2301181928.0":"2023-01-19T08:25:53.524Z","1.2301261900.0":"2023-01-27T08:26:56.571Z","1.2301301810.0":"2023-01-31T08:26:03.388Z","1.2302012254.0":"2023-02-02T08:25:24.491Z","1.2302021743.0":"2023-02-03T08:26:05.127Z","1.2302031721.0":"2023-02-04T08:24:01.104Z","1.2302171719.0":"2023-02-18T08:23:15.505Z","1.2302271541.0":"2023-02-28T17:24:57.330Z","1.2303151529.0":"2023-03-15T16:28:32.630Z","1.2303151621.0":"2023-03-22T08:24:38.692Z","1.2303231800.0":"2023-03-29T09:55:01.091Z","1.2304040531.0":"2023-04-04T08:25:24.437Z","1.2304062309.0":"2023-04-07T08:24:53.137Z","1.2304122229.0":"2023-04-13T08:24:53.545Z","1.2304132133.0":"2023-04-14T08:24:56.100Z","1.2304212144.0":"2023-04-22T08:26:24.504Z","1.2304241924.0":"2023-04-25T08:26:36.342Z","1.2304262219.0":"2023-04-27T08:27:22.875Z","1.2305022024.0":"2023-05-03T08:26:56.484Z","1.2305051745.0":"2023-05-06T08:25:31.417Z","1.2305152039.0":"2023-05-16T08:26:25.046Z","1.2305182038.0":"2023-05-19T08:27:44.790Z","1.2305221508.0":"2023-05-23T08:25:52.699Z","1.2305051745.1":"2023-05-23T23:03:30.109Z","1.2305232041.0":"2023-05-24T08:26:42.311Z","1.2305241828.0":"2023-05-25T08:25:59.012Z"},"maintainers":[{"name":"bentoprojectbot","email":"bentobot@amp.dev"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"esth","email":"esther@amp.dev"}],"description":"Counts up to, or away from, a specified date and time. It replaces the text node with a timestamp in natural language, such as in 30 years or 3 hours ago.","homepage":"https://github.com/ampproject/amphtml/tree/main/extensions/amp-timeago/1.0","repository":{"type":"git","url":"git+https://github.com/ampproject/amphtml.git","directory":"extensions/amp-timeago/1.0"},"author":{"name":"Bento Authors"},"bugs":{"url":"https://github.com/ampproject/amphtml/issues"},"license":"Apache-2.0","readme":"","readmeFilename":""}