Plugin Directory

Changeset 3276419


Ignore:
Timestamp:
04/18/2025 08:29:07 AM (10 months ago)
Author:
danielpost
Message:

Update to version 0.0.6 from GitHub

Location:
autoblue
Files:
2 deleted
28 edited
1 copied

Legend:

Unmodified
Added
Removed
  • autoblue/tags/0.0.6/autoblue.php

    r3270523 r3276419  
    88 * License: GPLv2 or later
    99 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    10  * Version: 0.0.5
     10 * Version: 0.0.6
    1111 * Text Domain: autoblue
    1212 * Requires at least: 6.6
     
    2121require_once __DIR__ . '/vendor/autoload.php';
    2222
    23 define( 'AUTOBLUE_VERSION', '0.0.5' );
     23define( 'AUTOBLUE_VERSION', '0.0.6' );
    2424define( 'AUTOBLUE_SLUG', 'autoblue' );
    2525define( 'AUTOBLUE_BASENAME', plugin_basename( __FILE__ ) );
  • autoblue/tags/0.0.6/build/admin-rtl.css

    r3211894 r3276419  
    1 .IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-right-radius:7px;border-top-left-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-right-radius:7px;border-bottom-left-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:right}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
     1.IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;gap:var(--gap-size);justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-right-radius:7px;border-top-left-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-right-radius:7px;border-bottom-left-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:right}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
    22.BdtMtThHyPg6Ixs294VO{border:1px solid #0000001a;border-radius:0 0 4px 4px;padding:4px 0}.UbZP1LRbJlNmQJ5XIfZU{display:flex;justify-content:center;padding:16px 0;width:100%}.WhjXMSYedjhE9iq9mGGQ{height:auto;padding:0;position:relative}.WhjXMSYedjhE9iq9mGGQ:focus-within{z-index:1}.aCyp1bdAS7uFpgfVTt4z{box-shadow:none;padding-bottom:5px;padding-top:5px}.WhjXMSYedjhE9iq9mGGQ:focus-within .aCyp1bdAS7uFpgfVTt4z,.WhjXMSYedjhE9iq9mGGQ:hover .aCyp1bdAS7uFpgfVTt4z{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}
    33.DP0h4FLv2L4zkkvcUIDh{background-color:#fef8ee;border-right:4px solid #f0b849;border-radius:4px;padding:10px}.DP0h4FLv2L4zkkvcUIDh p{margin:0}.DP0h4FLv2L4zkkvcUIDh svg{fill:#f0b849}
    44.QAtJyZwNum9Ab2obTC6K{padding:32px 16px!important}
    5 .noXm26AqZWQcZrKeIA1X .components-toggle-control__label{font-size:16px;font-weight:600}.noXm26AqZWQcZrKeIA1X .components-form-toggle{height:24px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__track{border-radius:12px;height:24px;width:50px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb{height:20px;width:20px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb:after{--mask:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z\"/></svg>");background-color:#1e1e1e;content:"";height:12px;right:-2px;-webkit-mask:var(--mask);mask:var(--mask);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:0;position:absolute;top:-2px;transition:opacity .2s ease,background-color .2s ease;width:12px}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb{transform:translateX(-26px)}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb:after{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));right:4px;opacity:1;top:4px}.noXm26AqZWQcZrKeIA1X .components-base-control__field>div:has(label){gap:16px}.noXm26AqZWQcZrKeIA1X .components-toggle-control__help{font-size:14px;margin-inline-start:66px}
    6 .meck1gRysSgwbPlTNoRp.meck1gRysSgwbPlTNoRp{padding:20px}
    7 .i0z7ZyN4Jro1uclPsSxA{padding:0 16px}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA{padding:0}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA>*{width:100%}.uuIa4zgLTbvjhWgp6ell{align-items:end;display:flex}.neP6M8HbdPhq0lQEAgyx{padding:32px;text-align:center}
     5.noXm26AqZWQcZrKeIA1X .components-toggle-control__label{font-size:16px;font-weight:600}@media screen and (max-width:500px){.noXm26AqZWQcZrKeIA1X .components-toggle-control__label{font-size:14px}}.noXm26AqZWQcZrKeIA1X .components-form-toggle{height:24px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__track{border-radius:12px;height:24px;width:50px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb{height:20px;width:20px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb:after{--mask:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z\"/></svg>");background-color:#1e1e1e;content:"";height:12px;right:-2px;-webkit-mask:var(--mask);mask:var(--mask);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:0;position:absolute;top:-2px;transition:opacity .2s ease,background-color .2s ease;width:12px}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb{transform:translateX(-26px)}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb:after{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));right:4px;opacity:1;top:4px}.noXm26AqZWQcZrKeIA1X .components-base-control__field>div:has(label){gap:16px}.noXm26AqZWQcZrKeIA1X .components-toggle-control__help{font-size:14px;margin-inline-start:66px}@media screen and (max-width:500px){.noXm26AqZWQcZrKeIA1X .components-toggle-control__help{font-size:13px}}
     6.meck1gRysSgwbPlTNoRp.meck1gRysSgwbPlTNoRp{padding:20px}@media screen and (max-width:500px){.meck1gRysSgwbPlTNoRp.meck1gRysSgwbPlTNoRp{padding:10px}}
     7.i0z7ZyN4Jro1uclPsSxA{display:flex;flex-wrap:wrap;justify-content:space-between}@media screen and (min-width:783px){.i0z7ZyN4Jro1uclPsSxA{padding:0 16px}}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA{padding:0}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA>*{width:100%}.uuIa4zgLTbvjhWgp6ell{align-items:end;display:flex}.neP6M8HbdPhq0lQEAgyx{padding:32px;text-align:center}
    88.cYBHXdayJ9hEt7ETXvHb{align-items:center;display:flex;font-size:12px;font-weight:700;gap:8px;text-transform:uppercase}.cYBHXdayJ9hEt7ETXvHb.e74HX1TJsY4mcF4KJRM3{--container-color:#3858e91a;--icon-color:#3858e9}.cYBHXdayJ9hEt7ETXvHb.iY5nmbaUM8NAU9Mkx4QI{--container-color:#0000000d;--icon-color:#0006}.cYBHXdayJ9hEt7ETXvHb.iY5nmbaUM8NAU9Mkx4QI svg{width:20px}.cYBHXdayJ9hEt7ETXvHb.U6hWwqaFD6ksNFzzBUsL{--container-color:#ffa9001a;--icon-color:#ffa900}.cYBHXdayJ9hEt7ETXvHb.lArm_d0OIb3tZey48j80{--container-color:#dc35451a;--icon-color:#dc3545}.cYBHXdayJ9hEt7ETXvHb.WX97I60r7oh7U_aGYHKV{--icon-color:#4ab866;--container-color:#4ab8661a}.cYBHXdayJ9hEt7ETXvHb.WX97I60r7oh7U_aGYHKV svg{width:14px}.J912WhKEiSxdZ1QVkUsD{align-items:center;background-color:var(--container-color);border-radius:50%;display:flex;height:24px;justify-content:center;width:24px}.J912WhKEiSxdZ1QVkUsD.CUIWekfURbh2zp3Nwqh5{border-radius:9999px;gap:4px;height:auto;padding:2px 8px;width:auto}.ECn5fPQP9eCW2GaO4wbw{fill:var(--icon-color)}
    9 .m0ishQkFGe8cW6U71f_E{border-collapse:collapse;text-align:right}.m0ishQkFGe8cW6U71f_E thead{background-color:#f0f0f180;padding:10px}.m0ishQkFGe8cW6U71f_E tr{border-bottom:1px solid #f0f0f0}.m0ishQkFGe8cW6U71f_E tbody tr:nth-child(2n){background-color:#f0f0f14d}.m0ishQkFGe8cW6U71f_E th{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}.m0ishQkFGe8cW6U71f_E td,.m0ishQkFGe8cW6U71f_E th{padding:12px 16px}.m0ishQkFGe8cW6U71f_E td:nth-child(4),.m0ishQkFGe8cW6U71f_E th:nth-child(4){text-align:left}.components-modal__content .m0ishQkFGe8cW6U71f_E td,.components-modal__content .m0ishQkFGe8cW6U71f_E th{vertical-align:top}
    10 .EWnbmq_38OJPlOh82E6w .components-modal__header{border-bottom:1px solid #f0f0f0}.EWnbmq_38OJPlOh82E6w .components-modal__content{max-width:800px;padding:0}.EWnbmq_38OJPlOh82E6w pre{white-space:pre-wrap;word-wrap:break-word;line-height:1.2;margin:0;overflow-wrap:break-word;word-break:break-word}
    11 @keyframes wZn5VxzBe2oH9bcXgw_D{to{transform:rotate(-1turn)}}.D3K9yFKhGochBoN9ciy0 svg{animation:wZn5VxzBe2oH9bcXgw_D .6s linear infinite}.giKoThf94yCr7M7ywIlF{display:inline-block;position:relative}.giKoThf94yCr7M7ywIlF .components-popover__content{min-width:250px;padding:16px}.E66oSeXaGdPMfAadmteF{margin-bottom:16px}
    12 .KzPwbHigWAmJrseQaoKw{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}
     9.dIaCy9uCnGvvhj_lqTQV{overflow-x:auto}.m0ishQkFGe8cW6U71f_E{border-collapse:collapse;text-align:right}.m0ishQkFGe8cW6U71f_E thead{background-color:#f0f0f180;padding:10px}.m0ishQkFGe8cW6U71f_E tr{border-bottom:1px solid #f0f0f0}.m0ishQkFGe8cW6U71f_E tbody tr:nth-child(2n){background-color:#f0f0f14d}.m0ishQkFGe8cW6U71f_E th{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}.m0ishQkFGe8cW6U71f_E td,.m0ishQkFGe8cW6U71f_E th{padding:12px 16px}.m0ishQkFGe8cW6U71f_E td:nth-child(4),.m0ishQkFGe8cW6U71f_E th:nth-child(4){text-align:left}.components-modal__content .m0ishQkFGe8cW6U71f_E td,.components-modal__content .m0ishQkFGe8cW6U71f_E th{vertical-align:top}
     10.EWnbmq_38OJPlOh82E6w .components-modal__header{border-bottom:1px solid #f0f0f0}.EWnbmq_38OJPlOh82E6w .components-modal__content{max-width:800px;padding:0}.EWnbmq_38OJPlOh82E6w pre{white-space:pre-wrap;word-wrap:break-word;line-height:1.2;margin:0;overflow-wrap:break-word;word-break:break-word}@media screen and (max-width:782px){.lpxIIelZJxgj5eCsjg0w tr{display:flex;flex-direction:column}}
     11@keyframes wZn5VxzBe2oH9bcXgw_D{to{transform:rotate(-1turn)}}.nzlAX7WNL7AHp9AeScd5{display:flex}.D3K9yFKhGochBoN9ciy0 svg{animation:wZn5VxzBe2oH9bcXgw_D .6s linear infinite}.giKoThf94yCr7M7ywIlF{display:inline-block;position:relative}.giKoThf94yCr7M7ywIlF .components-popover__content{min-width:250px;padding:16px}.E66oSeXaGdPMfAadmteF{margin-bottom:16px}
     12.KzPwbHigWAmJrseQaoKw{align-items:center;color:#1e1e1e;display:flex;font-size:11px;font-weight:500;text-transform:uppercase}.Zh2l7MhZK5xrRuAKKIA2{margin-right:10px}
    1313.K5BgxlncedJq_t7SNRMe{white-space:nowrap}
    14 .n7yM0P6DXfO7e1UgtFGQ{bottom:40px;position:fixed}.xzkNAh1yXHy3oWVtzkee{align-items:center;background-color:#fff;display:flex;gap:15px;margin-right:-20px;padding:20px 20px 0}@media screen and (max-width:782px){.xzkNAh1yXHy3oWVtzkee{margin-right:-10px;padding:20px 10px 0}}.xzkNAh1yXHy3oWVtzkee svg{height:28px;width:auto}.YhcowEQjGHG5jSc72vs4{background-color:#e1f0ff;border-radius:4px;color:#000;font-weight:700;padding:4px 8px}.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{align-items:center;background-color:#fff;box-shadow:0 1px 0 0 #0000001a;display:flex;justify-content:center;margin-bottom:20px;margin-right:-20px;padding:0}@media screen and (max-width:782px){.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{margin-right:-10px}}.skc1SozmvgQ52e9uA3Fc{padding-left:20px}.skc1SozmvgQ52e9uA3Fc *{box-sizing:border-box}@media screen and (max-width:782px){.skc1SozmvgQ52e9uA3Fc{padding-left:10px}}.H4mlAM8GJQgJbzRXdyVp{margin:0 auto}.H4mlAM8GJQgJbzRXdyVp.qUYVGzB3MCAFehNkod5e{max-width:600px}.H4mlAM8GJQgJbzRXdyVp.himvr6mnCghPWNGvRc1Z{max-width:900px}
     14.n7yM0P6DXfO7e1UgtFGQ{bottom:20px;padding-left:20px;position:fixed}@media screen and (max-width:782px){.n7yM0P6DXfO7e1UgtFGQ{bottom:10px}}.xzkNAh1yXHy3oWVtzkee{align-items:center;background-color:#fff;display:flex;gap:15px;margin-right:-20px;padding:20px 20px 0}.xzkNAh1yXHy3oWVtzkee svg{height:28px;width:auto}@media screen and (max-width:782px){.xzkNAh1yXHy3oWVtzkee{margin-right:-10px;padding:20px 16px 0}.xzkNAh1yXHy3oWVtzkee svg{height:24px}}.YhcowEQjGHG5jSc72vs4{background-color:#e1f0ff;border-radius:4px;color:#000;font-weight:700;padding:4px 8px}.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{align-items:center;background-color:#fff;box-shadow:0 1px 0 0 #0000001a;display:flex;justify-content:center;margin-bottom:20px;margin-right:-20px;padding:0}@media screen and (max-width:782px){.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{justify-content:left;margin-right:-10px}}.skc1SozmvgQ52e9uA3Fc{padding-left:20px}.skc1SozmvgQ52e9uA3Fc *{box-sizing:border-box}@media screen and (max-width:782px){.skc1SozmvgQ52e9uA3Fc{padding-left:10px}}.H4mlAM8GJQgJbzRXdyVp{margin:0 auto}.H4mlAM8GJQgJbzRXdyVp.qUYVGzB3MCAFehNkod5e{max-width:600px}.H4mlAM8GJQgJbzRXdyVp.himvr6mnCghPWNGvRc1Z{max-width:900px}
  • autoblue/tags/0.0.6/build/admin.asset.php

    r3211894 r3276419  
    1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '3ee52cf00b1d17ff3dbd');
     1<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '4ddb3401b92738828dca');
  • autoblue/tags/0.0.6/build/admin.css

    r3211894 r3276419  
    1 .IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-left-radius:7px;border-top-right-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-left-radius:7px;border-bottom-right-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:left}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
     1.IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;gap:var(--gap-size);justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-left-radius:7px;border-top-right-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-left-radius:7px;border-bottom-right-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:left}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
    22.BdtMtThHyPg6Ixs294VO{border:1px solid #0000001a;border-radius:0 0 4px 4px;padding:4px 0}.UbZP1LRbJlNmQJ5XIfZU{display:flex;justify-content:center;padding:16px 0;width:100%}.WhjXMSYedjhE9iq9mGGQ{height:auto;padding:0;position:relative}.WhjXMSYedjhE9iq9mGGQ:focus-within{z-index:1}.aCyp1bdAS7uFpgfVTt4z{box-shadow:none;padding-bottom:5px;padding-top:5px}.WhjXMSYedjhE9iq9mGGQ:focus-within .aCyp1bdAS7uFpgfVTt4z,.WhjXMSYedjhE9iq9mGGQ:hover .aCyp1bdAS7uFpgfVTt4z{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}
    33.DP0h4FLv2L4zkkvcUIDh{background-color:#fef8ee;border-left:4px solid #f0b849;border-radius:4px;padding:10px}.DP0h4FLv2L4zkkvcUIDh p{margin:0}.DP0h4FLv2L4zkkvcUIDh svg{fill:#f0b849}
    44.QAtJyZwNum9Ab2obTC6K{padding:32px 16px!important}
    5 .noXm26AqZWQcZrKeIA1X .components-toggle-control__label{font-size:16px;font-weight:600}.noXm26AqZWQcZrKeIA1X .components-form-toggle{height:24px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__track{border-radius:12px;height:24px;width:50px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb{height:20px;width:20px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb:after{--mask:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z\"/></svg>");background-color:#1e1e1e;content:"";height:12px;left:-2px;-webkit-mask:var(--mask);mask:var(--mask);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:0;position:absolute;top:-2px;transition:opacity .2s ease,background-color .2s ease;width:12px}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb{transform:translateX(26px)}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb:after{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));left:4px;opacity:1;top:4px}.noXm26AqZWQcZrKeIA1X .components-base-control__field>div:has(label){gap:16px}.noXm26AqZWQcZrKeIA1X .components-toggle-control__help{font-size:14px;margin-inline-start:66px}
    6 .meck1gRysSgwbPlTNoRp.meck1gRysSgwbPlTNoRp{padding:20px}
    7 .i0z7ZyN4Jro1uclPsSxA{padding:0 16px}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA{padding:0}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA>*{width:100%}.uuIa4zgLTbvjhWgp6ell{align-items:end;display:flex}.neP6M8HbdPhq0lQEAgyx{padding:32px;text-align:center}
     5.noXm26AqZWQcZrKeIA1X .components-toggle-control__label{font-size:16px;font-weight:600}@media screen and (max-width:500px){.noXm26AqZWQcZrKeIA1X .components-toggle-control__label{font-size:14px}}.noXm26AqZWQcZrKeIA1X .components-form-toggle{height:24px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__track{border-radius:12px;height:24px;width:50px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb{height:20px;width:20px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb:after{--mask:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z\"/></svg>");background-color:#1e1e1e;content:"";height:12px;left:-2px;-webkit-mask:var(--mask);mask:var(--mask);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:0;position:absolute;top:-2px;transition:opacity .2s ease,background-color .2s ease;width:12px}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb{transform:translateX(26px)}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb:after{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));left:4px;opacity:1;top:4px}.noXm26AqZWQcZrKeIA1X .components-base-control__field>div:has(label){gap:16px}.noXm26AqZWQcZrKeIA1X .components-toggle-control__help{font-size:14px;margin-inline-start:66px}@media screen and (max-width:500px){.noXm26AqZWQcZrKeIA1X .components-toggle-control__help{font-size:13px}}
     6.meck1gRysSgwbPlTNoRp.meck1gRysSgwbPlTNoRp{padding:20px}@media screen and (max-width:500px){.meck1gRysSgwbPlTNoRp.meck1gRysSgwbPlTNoRp{padding:10px}}
     7.i0z7ZyN4Jro1uclPsSxA{display:flex;flex-wrap:wrap;justify-content:space-between}@media screen and (min-width:783px){.i0z7ZyN4Jro1uclPsSxA{padding:0 16px}}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA{padding:0}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA>*{width:100%}.uuIa4zgLTbvjhWgp6ell{align-items:end;display:flex}.neP6M8HbdPhq0lQEAgyx{padding:32px;text-align:center}
    88.cYBHXdayJ9hEt7ETXvHb{align-items:center;display:flex;font-size:12px;font-weight:700;gap:8px;text-transform:uppercase}.cYBHXdayJ9hEt7ETXvHb.e74HX1TJsY4mcF4KJRM3{--container-color:#3858e91a;--icon-color:#3858e9}.cYBHXdayJ9hEt7ETXvHb.iY5nmbaUM8NAU9Mkx4QI{--container-color:#0000000d;--icon-color:#0006}.cYBHXdayJ9hEt7ETXvHb.iY5nmbaUM8NAU9Mkx4QI svg{width:20px}.cYBHXdayJ9hEt7ETXvHb.U6hWwqaFD6ksNFzzBUsL{--container-color:#ffa9001a;--icon-color:#ffa900}.cYBHXdayJ9hEt7ETXvHb.lArm_d0OIb3tZey48j80{--container-color:#dc35451a;--icon-color:#dc3545}.cYBHXdayJ9hEt7ETXvHb.WX97I60r7oh7U_aGYHKV{--icon-color:#4ab866;--container-color:#4ab8661a}.cYBHXdayJ9hEt7ETXvHb.WX97I60r7oh7U_aGYHKV svg{width:14px}.J912WhKEiSxdZ1QVkUsD{align-items:center;background-color:var(--container-color);border-radius:50%;display:flex;height:24px;justify-content:center;width:24px}.J912WhKEiSxdZ1QVkUsD.CUIWekfURbh2zp3Nwqh5{border-radius:9999px;gap:4px;height:auto;padding:2px 8px;width:auto}.ECn5fPQP9eCW2GaO4wbw{fill:var(--icon-color)}
    9 .m0ishQkFGe8cW6U71f_E{border-collapse:collapse;text-align:left}.m0ishQkFGe8cW6U71f_E thead{background-color:#f0f0f180;padding:10px}.m0ishQkFGe8cW6U71f_E tr{border-bottom:1px solid #f0f0f0}.m0ishQkFGe8cW6U71f_E tbody tr:nth-child(2n){background-color:#f0f0f14d}.m0ishQkFGe8cW6U71f_E th{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}.m0ishQkFGe8cW6U71f_E td,.m0ishQkFGe8cW6U71f_E th{padding:12px 16px}.m0ishQkFGe8cW6U71f_E td:nth-child(4),.m0ishQkFGe8cW6U71f_E th:nth-child(4){text-align:right}.components-modal__content .m0ishQkFGe8cW6U71f_E td,.components-modal__content .m0ishQkFGe8cW6U71f_E th{vertical-align:top}
    10 .EWnbmq_38OJPlOh82E6w .components-modal__header{border-bottom:1px solid #f0f0f0}.EWnbmq_38OJPlOh82E6w .components-modal__content{max-width:800px;padding:0}.EWnbmq_38OJPlOh82E6w pre{white-space:pre-wrap;word-wrap:break-word;line-height:1.2;margin:0;overflow-wrap:break-word;word-break:break-word}
    11 @keyframes wZn5VxzBe2oH9bcXgw_D{to{transform:rotate(1turn)}}.D3K9yFKhGochBoN9ciy0 svg{animation:wZn5VxzBe2oH9bcXgw_D .6s linear infinite}.giKoThf94yCr7M7ywIlF{display:inline-block;position:relative}.giKoThf94yCr7M7ywIlF .components-popover__content{min-width:250px;padding:16px}.E66oSeXaGdPMfAadmteF{margin-bottom:16px}
    12 .KzPwbHigWAmJrseQaoKw{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}
     9.dIaCy9uCnGvvhj_lqTQV{overflow-x:auto}.m0ishQkFGe8cW6U71f_E{border-collapse:collapse;text-align:left}.m0ishQkFGe8cW6U71f_E thead{background-color:#f0f0f180;padding:10px}.m0ishQkFGe8cW6U71f_E tr{border-bottom:1px solid #f0f0f0}.m0ishQkFGe8cW6U71f_E tbody tr:nth-child(2n){background-color:#f0f0f14d}.m0ishQkFGe8cW6U71f_E th{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}.m0ishQkFGe8cW6U71f_E td,.m0ishQkFGe8cW6U71f_E th{padding:12px 16px}.m0ishQkFGe8cW6U71f_E td:nth-child(4),.m0ishQkFGe8cW6U71f_E th:nth-child(4){text-align:right}.components-modal__content .m0ishQkFGe8cW6U71f_E td,.components-modal__content .m0ishQkFGe8cW6U71f_E th{vertical-align:top}
     10.EWnbmq_38OJPlOh82E6w .components-modal__header{border-bottom:1px solid #f0f0f0}.EWnbmq_38OJPlOh82E6w .components-modal__content{max-width:800px;padding:0}.EWnbmq_38OJPlOh82E6w pre{white-space:pre-wrap;word-wrap:break-word;line-height:1.2;margin:0;overflow-wrap:break-word;word-break:break-word}@media screen and (max-width:782px){.lpxIIelZJxgj5eCsjg0w tr{display:flex;flex-direction:column}}
     11@keyframes wZn5VxzBe2oH9bcXgw_D{to{transform:rotate(1turn)}}.nzlAX7WNL7AHp9AeScd5{display:flex}.D3K9yFKhGochBoN9ciy0 svg{animation:wZn5VxzBe2oH9bcXgw_D .6s linear infinite}.giKoThf94yCr7M7ywIlF{display:inline-block;position:relative}.giKoThf94yCr7M7ywIlF .components-popover__content{min-width:250px;padding:16px}.E66oSeXaGdPMfAadmteF{margin-bottom:16px}
     12.KzPwbHigWAmJrseQaoKw{align-items:center;color:#1e1e1e;display:flex;font-size:11px;font-weight:500;text-transform:uppercase}.Zh2l7MhZK5xrRuAKKIA2{margin-left:10px}
    1313.K5BgxlncedJq_t7SNRMe{white-space:nowrap}
    14 .n7yM0P6DXfO7e1UgtFGQ{bottom:40px;position:fixed}.xzkNAh1yXHy3oWVtzkee{align-items:center;background-color:#fff;display:flex;gap:15px;margin-left:-20px;padding:20px 20px 0}@media screen and (max-width:782px){.xzkNAh1yXHy3oWVtzkee{margin-left:-10px;padding:20px 10px 0}}.xzkNAh1yXHy3oWVtzkee svg{height:28px;width:auto}.YhcowEQjGHG5jSc72vs4{background-color:#e1f0ff;border-radius:4px;color:#000;font-weight:700;padding:4px 8px}.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{align-items:center;background-color:#fff;box-shadow:0 1px 0 0 #0000001a;display:flex;justify-content:center;margin-bottom:20px;margin-left:-20px;padding:0}@media screen and (max-width:782px){.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{margin-left:-10px}}.skc1SozmvgQ52e9uA3Fc{padding-right:20px}.skc1SozmvgQ52e9uA3Fc *{box-sizing:border-box}@media screen and (max-width:782px){.skc1SozmvgQ52e9uA3Fc{padding-right:10px}}.H4mlAM8GJQgJbzRXdyVp{margin:0 auto}.H4mlAM8GJQgJbzRXdyVp.qUYVGzB3MCAFehNkod5e{max-width:600px}.H4mlAM8GJQgJbzRXdyVp.himvr6mnCghPWNGvRc1Z{max-width:900px}
     14.n7yM0P6DXfO7e1UgtFGQ{bottom:20px;padding-right:20px;position:fixed}@media screen and (max-width:782px){.n7yM0P6DXfO7e1UgtFGQ{bottom:10px}}.xzkNAh1yXHy3oWVtzkee{align-items:center;background-color:#fff;display:flex;gap:15px;margin-left:-20px;padding:20px 20px 0}.xzkNAh1yXHy3oWVtzkee svg{height:28px;width:auto}@media screen and (max-width:782px){.xzkNAh1yXHy3oWVtzkee{margin-left:-10px;padding:20px 16px 0}.xzkNAh1yXHy3oWVtzkee svg{height:24px}}.YhcowEQjGHG5jSc72vs4{background-color:#e1f0ff;border-radius:4px;color:#000;font-weight:700;padding:4px 8px}.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{align-items:center;background-color:#fff;box-shadow:0 1px 0 0 #0000001a;display:flex;justify-content:center;margin-bottom:20px;margin-left:-20px;padding:0}@media screen and (max-width:782px){.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{justify-content:left;margin-left:-10px}}.skc1SozmvgQ52e9uA3Fc{padding-right:20px}.skc1SozmvgQ52e9uA3Fc *{box-sizing:border-box}@media screen and (max-width:782px){.skc1SozmvgQ52e9uA3Fc{padding-right:10px}}.H4mlAM8GJQgJbzRXdyVp{margin:0 auto}.H4mlAM8GJQgJbzRXdyVp.qUYVGzB3MCAFehNkod5e{max-width:600px}.H4mlAM8GJQgJbzRXdyVp.himvr6mnCghPWNGvRc1Z{max-width:900px}
  • autoblue/tags/0.0.6/build/admin.js

    r3211894 r3276419  
    1 (()=>{"use strict";var e={338:(e,t,a)=>{var n=a(795);t.H=n.createRoot,n.hydrateRoot},20:(e,t,a)=>{var n=a(609),l=Symbol.for("react.element"),o=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),r=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,a){var n,s={},i=null,u=null;for(n in void 0!==a&&(i=""+a),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,n)&&!c.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===s[n]&&(s[n]=t[n]);return{$$typeof:l,type:e,key:i,ref:u,props:s,_owner:r.current}}t.jsx=s,t.jsxs=s},848:(e,t,a)=>{e.exports=a(20)},609:e=>{e.exports=window.React},795:e=>{e.exports=window.ReactDOM}},t={};function a(n){var l=t[n];if(void 0!==l)return l.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,a),o.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};a.r(n),a.d(n,{getAccounts:()=>H});var l={};a.r(l),a.d(l,{getLogs:()=>Z,getLogsCurrentPage:()=>O,getLogsStatus:()=>z,getLogsTotalItems:()=>F,getLogsTotalPages:()=>I});var o={};a.r(o),a.d(o,{addAccount:()=>Q,addAccountToState:()=>U,deleteAccount:()=>X,deleteAccountFromState:()=>W,setAccounts:()=>G});var r={};a.r(r),a.d(r,{clearLogs:()=>K,refreshLogs:()=>J});var c=a(609),s=a(338);const i=window.wp.domReady;var u=a.n(i);function m(e){var t,a,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(a=m(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}const d=function(){for(var e,t,a=0,n="",l=arguments.length;a<l;a++)(e=arguments[a])&&(t=m(e))&&(n&&(n+=" "),n+=t);return n},g=window.wp.i18n,p=window.wp.components,h=window.wp.element,_=window.wp.data,E=window.wp.notices,b=(0,c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 813 138"},(0,c.createElement)("path",{fill:"#000",d:"M243.084 107.24c-19.592 0-32.736-13.392-32.736-34.472 0-21.08 13.144-34.348 32.736-34.348 12.772 0 21.08 4.712 24.924 11.532h.868l.62-10.416h19.84V106H268.38V95.336h-.868c-4.092 7.316-13.516 11.904-24.428 11.904Zm6.448-15.872c11.78 0 18.724-7.564 18.724-17.112v-3.224c0-9.3-6.944-16.74-18.724-16.74-10.788 0-18.104 6.572-18.104 18.476 0 11.78 7.192 18.6 18.104 18.6ZM329.746 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972S355.29 83.68 355.29 72.52V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM415.443 106c-11.036 0-18.104-5.208-18.104-16.492V55.284h-12.4V39.536h12.4V22.672l20.584-3.968v20.832h16.492v15.748h-16.492v27.652c0 4.092 1.984 5.332 6.076 5.332h10.416V106h-18.972ZM479.63 107.24c-24.056 0-40.052-12.772-40.052-34.472 0-21.576 15.872-34.472 40.052-34.472 24.056 0 39.928 12.648 39.928 34.472 0 21.576-15.748 34.472-39.928 34.472Zm0-15.996c12.028 0 19.096-7.192 19.096-18.476 0-11.408-6.944-18.476-19.096-18.476-12.152 0-19.096 7.192-19.096 18.476 0 11.284 6.944 18.476 19.096 18.476ZM575.383 106.992c-12.648 0-20.956-4.588-24.924-11.532h-.868l-.62 10.54h-19.716V15.604h20.832V50.2h.744c4.216-7.44 13.764-11.904 24.552-11.904 19.592 0 32.612 13.392 32.612 34.348 0 21.08-13.02 34.348-32.612 34.348Zm-6.448-15.748c10.912 0 18.104-6.696 18.104-18.6 0-11.656-7.192-18.476-18.104-18.476-11.904 0-18.848 7.564-18.848 17.112v3.1c0 9.3 6.944 16.864 18.848 16.864ZM617.532 106V15.604h20.832V106h-20.832ZM678.86 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972s18.352-7.688 18.352-18.848V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM774.249 107.116c-24.304 0-39.928-12.648-39.928-33.976 0-21.824 15.872-34.844 39.68-34.844 25.296 0 39.928 14.508 38.316 38.936h-57.04c.248 9.92 7.564 15.872 19.468 15.872 8.804 0 15.996-3.348 17.732-8.308h19.716c-1.86 13.392-17.484 22.32-37.944 22.32Zm-.372-54.684c-10.416 0-17.36 4.836-18.848 13.268h36.58c-.744-8.184-6.944-13.268-17.732-13.268Z"}),(0,c.createElement)("path",{fill:"#5089FB",d:"M127.627 1.756c13.597.242 21.261 8.627 23.983 20.423 1.371 5.939 1.669 12.174 1.987 18.3.739 14.24 1.276 28.496 1.733 42.746.259 7.984.199 15.983.266 23.975.137 16.158-12.09 24.804-22.837 27.733a48.532 48.532 0 0 1-11.457 1.786c-22.625.555-45.256 1.174-67.885 1.189-12.069.009-24.058-1.913-35.864-4.475C8.49 131.468 1.507 123.037.424 113.285a80.385 80.385 0 0 1-.41-9.705C.131 92.452.47 81.326.516 70.198c.057-12.963-.07-25.927-.194-38.89-.033-3.555-.263-7.01 1.024-10.52 3.59-9.792 10.627-15.202 20.643-16.91C55.135-1.775 91-.095 127.627 1.757Z"}),(0,c.createElement)("path",{fill:"#DEEBFF",d:"M35.164 99.944C37.83 73.172 56.04 30 77.984 30c21.944 0 40.155 43.172 42.821 69.944 2.681 26.939-22.785-14.807-42.82-14.807-20.036 0-45.256 39.273-42.821 14.807Z"})),w=((0,c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 256 256"},(0,c.createElement)("path",{fill:"#5089FB",d:"M209.982 17.89c22.371.4 34.98 14.2 39.459 33.617 2.256 9.775 2.746 20.04 3.268 30.121 1.216 23.441 2.101 46.906 2.852 70.362.426 13.142.326 26.308.437 39.464.226 26.596-19.891 40.827-37.573 45.649a79.8 79.8 0 0 1-18.85 2.938c-37.225.914-74.458 1.933-111.69 1.959-19.856.015-39.582-3.15-59.006-7.366-14.91-3.235-26.4-17.113-28.181-33.165a132.365 132.365 0 0 1-.676-15.974c.196-18.317.75-36.63.83-54.947.092-21.337-.117-42.677-.32-64.014C.476 60.682.1 54.994 2.217 49.216 8.123 33.1 19.7 24.195 36.179 21.385c54.533-9.308 113.541-6.543 173.803-3.495Z"}),(0,c.createElement)("path",{fill:"#DEEBFF",d:"M57.854 179.51c4.387-44.067 34.348-115.13 70.451-115.13 36.104 0 66.065 71.063 70.452 115.13 4.411 44.342-37.488-24.373-70.451-24.373-32.964 0-74.458 64.644-70.452 24.373Z"})),(0,c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"600",height:"530",version:"1.1",viewBox:"0 0 600 530"},(0,c.createElement)("path",{d:"m135.72 44.03c66.496 49.921 138.02 151.14 164.28 205.46 26.262-54.316 97.782-155.54 164.28-205.46 47.98-36.021 125.72-63.892 125.72 24.795 0 17.712-10.155 148.79-16.111 170.07-20.703 73.984-96.144 92.854-163.25 81.433 117.3 19.964 147.14 86.092 82.697 152.22-122.39 125.59-175.91-31.511-189.63-71.766-2.514-7.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937 0.51669-3.7077 7.8964-13.714 40.255-67.233 197.36-189.63 71.766-64.444-66.128-34.605-132.26 82.697-152.22-67.108 11.421-142.55-7.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07 0-88.687 77.742-60.816 125.72-24.795z",fill:"#1185fe"})),(0,c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,c.createElement)("path",{fillRule:"evenodd",d:"M6 12c0-3.328 2.64-6 5.866-6 2.164 0 4.063 1.201 5.08 3H15v1.5h4.5V6H18v1.848C16.683 5.834 14.431 4.5 11.866 4.5 7.783 4.5 4.5 7.872 4.5 12H6ZM18 12c0 3.328-2.64 6-5.865 6-2.165 0-4.064-1.201-5.081-3H9v-1.5H4.5V18H6v-1.848c1.317 2.014 3.569 3.348 6.135 3.348 4.082 0 7.365-3.372 7.365-7.5H18Z",clipRule:"evenodd"}))),v=(0,c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)("path",{d:"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z"})),f=(0,c.createElement)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)("path",{d:"M13.13 13.38L13.48 6.92004H10.52L10.87 13.38H13.13ZM13.04 16.74C13.28 16.51 13.41 16.19 13.41 15.78C13.41 15.36 13.29 15.04 13.05 14.81C12.81 14.58 12.46 14.46 11.99 14.46C11.52 14.46 11.17 14.58 10.92 14.81C10.67 15.04 10.55 15.36 10.55 15.78C10.55 16.19 10.68 16.51 10.93 16.74C11.19 16.97 11.54 17.08 11.99 17.08C12.44 17.08 12.79 16.97 13.04 16.74Z"})),y=(0,c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,c.createElement)("path",{d:"M11 17h2v-6h-2v6Zm0-8h2V7h-2v2Z"})),x=window.wp.apiFetch;var S=a.n(x);const C=({account:{did:e,meta:t={}},className:a,onDelete:n=null,deleteLabel:l=null,size:o="medium"})=>{const{userData:r,isLoading:s}=((e,t)=>{const[a,n]=(0,c.useState)({handle:t.handle||"",displayName:t.name||"",avatar:t.avatar||""}),[l,o]=(0,c.useState)(!1),r=(0,c.useRef)(null);return(0,c.useEffect)((()=>((async()=>{if(!a.handle){r.current&&r.current.abort(),r.current=new AbortController;try{o(!0);const t=await S()({path:`/autoblue/v1/account?did=${e}`,signal:r.current.signal});n({handle:t.handle||a.handle,displayName:t.displayName||a.displayName,avatar:t.avatar||a.avatar})}catch(e){console.error("Error fetching user data:",e),"AbortError"!==e.name&&console.error("Error fetching user data:",e)}finally{o(!1)}}})(),()=>{r.current&&r.current.abort()})),[e,a]),{userData:a,isLoading:l}})(e,t),[i,u]=(0,c.useState)(!1);return a=d("mS05_wtPati8LfYBYTGx",a,"small"===o&&"LUuMlpzD9HyupHyt98G3","large"===o&&"iVtkCNHNWdxuifShiMKh"),s?(0,c.createElement)("div",{className:a},(0,c.createElement)("div",{className:"IVZmEOtE_7uqQA_z7LDw"},(0,c.createElement)(p.Spinner,null))):(0,c.createElement)("div",{className:a},(0,c.createElement)("div",{className:"F2ZNrdlk8l4sx61TvagD"},(0,c.createElement)("figure",{className:"UPhsTTWKWZwbzXMghRps"},r.avatar&&(0,c.createElement)("img",{src:r.avatar,alt:r.displayName,style:{display:i?"block":"none"},onLoad:()=>u(!0),onError:()=>u(!1)})),(0,c.createElement)("div",{className:"zMF2PjNx4vXZ8jAMdrMm"},(0,c.createElement)("span",{className:"ADqq9wMPxBktKNS_YSlo"},r.displayName),(0,c.createElement)("span",{className:"BoWAC4fmJvi3BgVUzxXI"},"@",r.handle))),n&&(0,c.createElement)(p.Button,{icon:l?void 0:"no-alt",isDestructive:!0,variant:l?"secondary":void 0,onClick:n,label:l||(0,g.__)("Delete","autoblue")},l||null))},N="UbZP1LRbJlNmQJ5XIfZU",k=({onSelect:e})=>{const[t,a]=(0,h.useState)(""),[n,l]=(0,h.useState)(!1),[o,r]=(0,h.useState)([]),[s,i]=(0,h.useState)(!1);let u=null;const m=(0,h.useRef)(null),d=(0,h.useCallback)((async e=>{if(e.length>0){l(!0),m.current&&m.current.abort(),m.current=new AbortController;try{const t=await S()({path:`/autoblue/v1/search?q=${encodeURIComponent(e)}`,signal:m.current.signal});if(!t.actors)throw new Error("Unexpected response from the server");r(t.actors),i(!0)}catch(e){"AbortError"!==e.name&&(r([]),i(!0))}finally{!0!==m.current?.signal.aborted&&l(!1)}}else r([]),i(!1)}),[]);(0,h.useEffect)((()=>(u&&clearTimeout(u),u=setTimeout((()=>{d(t)}),300),()=>{clearTimeout(u),m.current&&m.current.abort()})),[t,d]);const _=n?(0,c.createElement)("div",{className:N},(0,c.createElement)(p.Spinner,null)):0===o.length&&t.length>0&&s?(0,c.createElement)("div",{className:N},(0,g.__)("No accounts found. Please try another search.","autoblue")):o.length>0?o.map((({did:t,handle:a,displayName:n,avatar:l})=>(0,c.createElement)(p.Button,{key:t,className:"WhjXMSYedjhE9iq9mGGQ",onClick:()=>e({did:t,meta:{handle:a,name:n,avatar:l}})},(0,c.createElement)(C,{account:{did:t,meta:{handle:a,name:n,avatar:l}},className:"aCyp1bdAS7uFpgfVTt4z"})))):null;return(0,c.createElement)("div",null,(0,c.createElement)(p.SearchControl,{__nextHasNoMarginBottom:!0,placeholder:(0,g.__)("Search for a Bluesky account","autoblue"),label:(0,g.__)("Bluesky Account","autoblue"),value:t,onChange:e=>a(e)}),_&&(0,c.createElement)("div",null,(0,c.createElement)(p.__experimentalVStack,{spacing:0,className:"BdtMtThHyPg6Ixs294VO"},_)))},A="SET_ACCOUNTS",M="ADD_ACCOUNT",P="DELETE_ACCOUNT",L="REFRESH_LOGS",B="CLEAR_LOGS",T="SET_LOGS_STATUS",V={items:[]},D={status:"idle"},R=(0,_.combineReducers)({accounts:function(e=V,t){switch(t.type){case A:return{...e,items:t.accounts};case M:return{...e,items:[...e.items,t.account]};case P:return{...e,items:e.items.filter((e=>e.did!==t.did))};default:return e}},logs:function(e=D,t){switch(t.type){case L:return{...e,items:t.logs,pagination:{...e.pagination,...t.pagination}};case B:return{...e,items:[],pagination:{...e.pagination,...t.pagination}};case T:return{...e,status:t.status};case"SET_LOGS_PAGE":return{...e,pagination:{...e.pagination,page:t.page}};default:return e}}});function H(e){return e.accounts.items}function Z(e){return e.logs.items}function z(e){return e.logs.status}function O(e){return e.logs.pagination.page}function I(e){return e.logs.pagination.totalPages}function F(e){return e.logs.pagination.totalItems}const j={...n,...l};function G(e){return{type:A,accounts:e}}function U(e){return{type:M,account:e}}function W(e){return{type:P,did:e}}function Q(e,t){return async function({dispatch:a,registry:n}){const{createSuccessNotice:l,createErrorNotice:o}=n.dispatch(E.store);try{const n=await S()({path:"/autoblue/v1/connections",method:"POST",data:{did:e,app_password:t}});a(U(n));let{handle:o,name:r}=n.meta;o=o?`@${o}`:"";const c=`${r} ${o}`;l(
     1(()=>{"use strict";var e={338:(e,t,a)=>{var n=a(795);t.H=n.createRoot,n.hydrateRoot},20:(e,t,a)=>{var n=a(609),l=Symbol.for("react.element"),r=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,a){var n,c={},i=null,u=null;for(n in void 0!==a&&(i=""+a),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(u=t.ref),t)r.call(t,n)&&!s.hasOwnProperty(n)&&(c[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===c[n]&&(c[n]=t[n]);return{$$typeof:l,type:e,key:i,ref:u,props:c,_owner:o.current}}t.jsx=c,t.jsxs=c},848:(e,t,a)=>{e.exports=a(20)},609:e=>{e.exports=window.React},795:e=>{e.exports=window.ReactDOM}},t={};function a(n){var l=t[n];if(void 0!==l)return l.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,a),r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};a.r(n),a.d(n,{getAccounts:()=>Z});var l={};a.r(l),a.d(l,{getLogs:()=>z,getLogsCurrentPage:()=>I,getLogsStatus:()=>H,getLogsTotalItems:()=>j,getLogsTotalPages:()=>O});var r={};a.r(r),a.d(r,{addAccount:()=>K,addAccountToState:()=>U,deleteAccount:()=>Q,deleteAccountFromState:()=>W,setAccounts:()=>G});var o={};a.r(o),a.d(o,{clearLogs:()=>J,refreshLogs:()=>q});var s=a(609),c=a(338);const i=window.wp.domReady;var u=a.n(i);function m(e){var t,a,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(a=m(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}const d=function(){for(var e,t,a=0,n="",l=arguments.length;a<l;a++)(e=arguments[a])&&(t=m(e))&&(n&&(n+=" "),n+=t);return n},g=window.wp.i18n,p=window.wp.components,h=window.wp.element,_=window.wp.data,E=window.wp.notices,b=(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 813 138"},(0,s.createElement)("path",{fill:"#000",d:"M243.084 107.24c-19.592 0-32.736-13.392-32.736-34.472 0-21.08 13.144-34.348 32.736-34.348 12.772 0 21.08 4.712 24.924 11.532h.868l.62-10.416h19.84V106H268.38V95.336h-.868c-4.092 7.316-13.516 11.904-24.428 11.904Zm6.448-15.872c11.78 0 18.724-7.564 18.724-17.112v-3.224c0-9.3-6.944-16.74-18.724-16.74-10.788 0-18.104 6.572-18.104 18.476 0 11.78 7.192 18.6 18.104 18.6ZM329.746 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972S355.29 83.68 355.29 72.52V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM415.443 106c-11.036 0-18.104-5.208-18.104-16.492V55.284h-12.4V39.536h12.4V22.672l20.584-3.968v20.832h16.492v15.748h-16.492v27.652c0 4.092 1.984 5.332 6.076 5.332h10.416V106h-18.972ZM479.63 107.24c-24.056 0-40.052-12.772-40.052-34.472 0-21.576 15.872-34.472 40.052-34.472 24.056 0 39.928 12.648 39.928 34.472 0 21.576-15.748 34.472-39.928 34.472Zm0-15.996c12.028 0 19.096-7.192 19.096-18.476 0-11.408-6.944-18.476-19.096-18.476-12.152 0-19.096 7.192-19.096 18.476 0 11.284 6.944 18.476 19.096 18.476ZM575.383 106.992c-12.648 0-20.956-4.588-24.924-11.532h-.868l-.62 10.54h-19.716V15.604h20.832V50.2h.744c4.216-7.44 13.764-11.904 24.552-11.904 19.592 0 32.612 13.392 32.612 34.348 0 21.08-13.02 34.348-32.612 34.348Zm-6.448-15.748c10.912 0 18.104-6.696 18.104-18.6 0-11.656-7.192-18.476-18.104-18.476-11.904 0-18.848 7.564-18.848 17.112v3.1c0 9.3 6.944 16.864 18.848 16.864ZM617.532 106V15.604h20.832V106h-20.832ZM678.86 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972s18.352-7.688 18.352-18.848V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM774.249 107.116c-24.304 0-39.928-12.648-39.928-33.976 0-21.824 15.872-34.844 39.68-34.844 25.296 0 39.928 14.508 38.316 38.936h-57.04c.248 9.92 7.564 15.872 19.468 15.872 8.804 0 15.996-3.348 17.732-8.308h19.716c-1.86 13.392-17.484 22.32-37.944 22.32Zm-.372-54.684c-10.416 0-17.36 4.836-18.848 13.268h36.58c-.744-8.184-6.944-13.268-17.732-13.268Z"}),(0,s.createElement)("path",{fill:"#5089FB",d:"M127.627 1.756c13.597.242 21.261 8.627 23.983 20.423 1.371 5.939 1.669 12.174 1.987 18.3.739 14.24 1.276 28.496 1.733 42.746.259 7.984.199 15.983.266 23.975.137 16.158-12.09 24.804-22.837 27.733a48.532 48.532 0 0 1-11.457 1.786c-22.625.555-45.256 1.174-67.885 1.189-12.069.009-24.058-1.913-35.864-4.475C8.49 131.468 1.507 123.037.424 113.285a80.385 80.385 0 0 1-.41-9.705C.131 92.452.47 81.326.516 70.198c.057-12.963-.07-25.927-.194-38.89-.033-3.555-.263-7.01 1.024-10.52 3.59-9.792 10.627-15.202 20.643-16.91C55.135-1.775 91-.095 127.627 1.757Z"}),(0,s.createElement)("path",{fill:"#DEEBFF",d:"M35.164 99.944C37.83 73.172 56.04 30 77.984 30c21.944 0 40.155 43.172 42.821 69.944 2.681 26.939-22.785-14.807-42.82-14.807-20.036 0-45.256 39.273-42.821 14.807Z"})),w=((0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 256 256"},(0,s.createElement)("path",{fill:"#5089FB",d:"M209.982 17.89c22.371.4 34.98 14.2 39.459 33.617 2.256 9.775 2.746 20.04 3.268 30.121 1.216 23.441 2.101 46.906 2.852 70.362.426 13.142.326 26.308.437 39.464.226 26.596-19.891 40.827-37.573 45.649a79.8 79.8 0 0 1-18.85 2.938c-37.225.914-74.458 1.933-111.69 1.959-19.856.015-39.582-3.15-59.006-7.366-14.91-3.235-26.4-17.113-28.181-33.165a132.365 132.365 0 0 1-.676-15.974c.196-18.317.75-36.63.83-54.947.092-21.337-.117-42.677-.32-64.014C.476 60.682.1 54.994 2.217 49.216 8.123 33.1 19.7 24.195 36.179 21.385c54.533-9.308 113.541-6.543 173.803-3.495Z"}),(0,s.createElement)("path",{fill:"#DEEBFF",d:"M57.854 179.51c4.387-44.067 34.348-115.13 70.451-115.13 36.104 0 66.065 71.063 70.452 115.13 4.411 44.342-37.488-24.373-70.451-24.373-32.964 0-74.458 64.644-70.452 24.373Z"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"600",height:"530",version:"1.1",viewBox:"0 0 600 530"},(0,s.createElement)("path",{d:"m135.72 44.03c66.496 49.921 138.02 151.14 164.28 205.46 26.262-54.316 97.782-155.54 164.28-205.46 47.98-36.021 125.72-63.892 125.72 24.795 0 17.712-10.155 148.79-16.111 170.07-20.703 73.984-96.144 92.854-163.25 81.433 117.3 19.964 147.14 86.092 82.697 152.22-122.39 125.59-175.91-31.511-189.63-71.766-2.514-7.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937 0.51669-3.7077 7.8964-13.714 40.255-67.233 197.36-189.63 71.766-64.444-66.128-34.605-132.26 82.697-152.22-67.108 11.421-142.55-7.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07 0-88.687 77.742-60.816 125.72-24.795z",fill:"#1185fe"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,s.createElement)("path",{fillRule:"evenodd",d:"M6 12c0-3.328 2.64-6 5.866-6 2.164 0 4.063 1.201 5.08 3H15v1.5h4.5V6H18v1.848C16.683 5.834 14.431 4.5 11.866 4.5 7.783 4.5 4.5 7.872 4.5 12H6ZM18 12c0 3.328-2.64 6-5.865 6-2.165 0-4.064-1.201-5.081-3H9v-1.5H4.5V18H6v-1.848c1.317 2.014 3.569 3.348 6.135 3.348 4.082 0 7.365-3.372 7.365-7.5H18Z",clipRule:"evenodd"}))),v=(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)("path",{d:"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z"})),f=(0,s.createElement)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)("path",{d:"M13.13 13.38L13.48 6.92004H10.52L10.87 13.38H13.13ZM13.04 16.74C13.28 16.51 13.41 16.19 13.41 15.78C13.41 15.36 13.29 15.04 13.05 14.81C12.81 14.58 12.46 14.46 11.99 14.46C11.52 14.46 11.17 14.58 10.92 14.81C10.67 15.04 10.55 15.36 10.55 15.78C10.55 16.19 10.68 16.51 10.93 16.74C11.19 16.97 11.54 17.08 11.99 17.08C12.44 17.08 12.79 16.97 13.04 16.74Z"})),y=(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,s.createElement)("path",{d:"M11 17h2v-6h-2v6Zm0-8h2V7h-2v2Z"})),x=window.wp.apiFetch;var S=a.n(x);const C=({account:{did:e,meta:t={}},className:a,onDelete:n=null,deleteLabel:l=null,size:r="medium"})=>{const{userData:o,isLoading:c}=((e,t)=>{const[a,n]=(0,s.useState)({handle:t.handle||"",displayName:t.name||"",avatar:t.avatar||""}),[l,r]=(0,s.useState)(!1),o=(0,s.useRef)(null);return(0,s.useEffect)((()=>((async()=>{if(!a.handle){o.current&&o.current.abort(),o.current=new AbortController;try{r(!0);const t=await S()({path:`/autoblue/v1/account?did=${e}`,signal:o.current.signal});n({handle:t.handle||a.handle,displayName:t.displayName||a.displayName,avatar:t.avatar||a.avatar})}catch(e){console.error("Error fetching user data:",e),"AbortError"!==e.name&&console.error("Error fetching user data:",e)}finally{r(!1)}}})(),()=>{o.current&&o.current.abort()})),[e,a]),{userData:a,isLoading:l}})(e,t),[i,u]=(0,s.useState)(!1);return a=d("mS05_wtPati8LfYBYTGx",a,"small"===r&&"LUuMlpzD9HyupHyt98G3","large"===r&&"iVtkCNHNWdxuifShiMKh"),c?(0,s.createElement)("div",{className:a},(0,s.createElement)("div",{className:"IVZmEOtE_7uqQA_z7LDw"},(0,s.createElement)(p.Spinner,null))):(0,s.createElement)("div",{className:a},(0,s.createElement)("div",{className:"F2ZNrdlk8l4sx61TvagD"},(0,s.createElement)("figure",{className:"UPhsTTWKWZwbzXMghRps"},o.avatar&&(0,s.createElement)("img",{src:o.avatar,alt:o.displayName,style:{display:i?"block":"none"},onLoad:()=>u(!0),onError:()=>u(!1)})),(0,s.createElement)("div",{className:"zMF2PjNx4vXZ8jAMdrMm"},(0,s.createElement)("span",{className:"ADqq9wMPxBktKNS_YSlo"},o.displayName),(0,s.createElement)("span",{className:"BoWAC4fmJvi3BgVUzxXI"},"@",o.handle))),n&&(0,s.createElement)(p.Button,{icon:l?void 0:"no-alt",isDestructive:!0,variant:l?"secondary":void 0,onClick:n,label:l||(0,g.__)("Delete","autoblue")},l||null))},N="UbZP1LRbJlNmQJ5XIfZU",k=({onSelect:e})=>{const[t,a]=(0,h.useState)(""),[n,l]=(0,h.useState)(!1),[r,o]=(0,h.useState)([]),[c,i]=(0,h.useState)(!1);let u=null;const m=(0,h.useRef)(null),d=(0,h.useCallback)((async e=>{if(e.length>0){l(!0),m.current&&m.current.abort(),m.current=new AbortController;try{const t=await S()({path:`/autoblue/v1/search?q=${encodeURIComponent(e)}`,signal:m.current.signal});if(!t.actors)throw new Error("Unexpected response from the server");o(t.actors),i(!0)}catch(e){"AbortError"!==e.name&&(o([]),i(!0))}finally{!0!==m.current?.signal.aborted&&l(!1)}}else o([]),i(!1)}),[]);(0,h.useEffect)((()=>(u&&clearTimeout(u),u=setTimeout((()=>{d(t)}),300),()=>{clearTimeout(u),m.current&&m.current.abort()})),[t,d]);const _=n?(0,s.createElement)("div",{className:N},(0,s.createElement)(p.Spinner,null)):0===r.length&&t.length>0&&c?(0,s.createElement)("div",{className:N},(0,g.__)("No accounts found. Please try another search.","autoblue")):r.length>0?r.map((({did:t,handle:a,displayName:n,avatar:l})=>(0,s.createElement)(p.Button,{key:t,className:"WhjXMSYedjhE9iq9mGGQ",onClick:()=>e({did:t,meta:{handle:a,name:n,avatar:l}})},(0,s.createElement)(C,{account:{did:t,meta:{handle:a,name:n,avatar:l}},className:"aCyp1bdAS7uFpgfVTt4z"})))):null;return(0,s.createElement)("div",null,(0,s.createElement)(p.SearchControl,{__nextHasNoMarginBottom:!0,placeholder:(0,g.__)("Search for a Bluesky account","autoblue"),label:(0,g.__)("Bluesky Account","autoblue"),value:t,onChange:e=>a(e)}),_&&(0,s.createElement)("div",null,(0,s.createElement)(p.__experimentalVStack,{spacing:0,className:"BdtMtThHyPg6Ixs294VO"},_)))},A="SET_ACCOUNTS",M="ADD_ACCOUNT",L="DELETE_ACCOUNT",P="REFRESH_LOGS",B="CLEAR_LOGS",T="SET_LOGS_STATUS",V={items:[]},D={status:"idle"},R=(0,_.combineReducers)({accounts:function(e=V,t){switch(t.type){case A:return{...e,items:t.accounts};case M:return{...e,items:[...e.items,t.account]};case L:return{...e,items:e.items.filter((e=>e.did!==t.did))};default:return e}},logs:function(e=D,t){switch(t.type){case P:return{...e,items:t.logs,pagination:{...e.pagination,...t.pagination}};case B:return{...e,items:[],pagination:{...e.pagination,...t.pagination}};case T:return{...e,status:t.status};case"SET_LOGS_PAGE":return{...e,pagination:{...e.pagination,page:t.page}};default:return e}}});function Z(e){return e.accounts.items}function z(e){return e.logs.items}function H(e){return e.logs.status}function I(e){return e.logs.pagination.page}function O(e){return e.logs.pagination.totalPages}function j(e){return e.logs.pagination.totalItems}const F={...n,...l};function G(e){return{type:A,accounts:e}}function U(e){return{type:M,account:e}}function W(e){return{type:L,did:e}}function K(e,t){return async function({dispatch:a,registry:n}){const{createSuccessNotice:l,createErrorNotice:r}=n.dispatch(E.store);try{const n=await S()({path:"/autoblue/v1/connections",method:"POST",data:{did:e,app_password:t}});a(U(n));let{handle:r,name:o}=n.meta;r=r?`@${r}`:"";const s=`${o} ${r}`;l(
    22// translators: %s is the account name and handle
    33// translators: %s is the account name and handle
    4 (0,g.sprintf)((0,g.__)('Account "%s" connected',"autoblue"),c),{id:"autoblue/account/added",type:"snackbar"})}catch(e){throw o((0,g.__)("Failed to connect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}function X(e){return async function({dispatch:t,registry:a}){const{createSuccessNotice:n,createErrorNotice:l}=a.dispatch(E.store);try{const a=await S()({path:"/autoblue/v1/connections",method:"DELETE",data:{did:e}});return t(W(e)),n((0,g.__)("Account disconnected","autoblue"),{id:"autoblue/account/deleted",type:"snackbar"}),a}catch(e){throw l((0,g.__)("Failed to disconnect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}const q=window.wp.url,J=({page:e=1,perPage:t=10}={})=>async({select:a,dispatch:n,registry:l})=>{const{createSuccessNotice:o,createErrorNotice:r,removeNotice:c}=l.dispatch(E.store);try{const l=a.getLogsCurrentPage(),r=e===l;n({type:T,status:r?"refreshing":"loading"});const s=(0,q.addQueryArgs)("/autoblue/v1/logs",{page:e,per_page:t}),i=await S()({path:s,method:"GET",parse:!0}),{data:u,pagination:m}=i;if(n({type:L,logs:u,pagination:{page:m.page,perPage:m.per_page,totalItems:m.total_items,totalPages:m.total_pages}}),n({type:T,status:"success"}),r){const e=await o((0,g.__)("Logs refreshed.","autoblue"),{type:"snackbar"});setTimeout((()=>{n({type:T,status:"idle"}),c(e.notice.id)}),2e3)}return u}catch(e){throw r((0,g.__)("Failed to refresh logs.","autoblue"),{id:"autoblue/logs/refresh-error",type:"snackbar"}),e}},K=()=>async({dispatch:e,registry:t})=>{const{createSuccessNotice:a,createErrorNotice:n,removeNotice:l}=t.dispatch(E.store);try{e({type:T,status:"clearing"});const t=await S()({path:"/autoblue/v1/logs",method:"DELETE"});if(t){e({type:B,pagination:{page:1,perPage:10,totalItems:0,totalPages:0}}),e({type:T,status:"success"});const t=await a((0,g.__)("Logs cleared.","autoblue"),{type:"snackbar"});setTimeout((()=>{e({type:T,status:"idle"}),l(t.notice.id)}),2e3)}return t}catch(t){throw e({type:T,status:"error"}),n((0,g.__)("Failed to clear logs.","autoblue"),{id:"autoblue/logs/clear-error",type:"snackbar"}),t}},Y={...o,...r},$="autoblue",ee={reducer:R,selectors:j,actions:Y,resolvers:{},initialState:autoblue.initialState};let te;try{te=(0,_.select)($)}catch(e){}if(!te){const e=(0,_.createReduxStore)($,ee);(0,_.register)(e)}const ae=()=>{const{accounts:e,isLoading:t,error:a}=(0,_.useSelect)((e=>({accounts:e($).getAccounts()})),[]),{addAccount:n,deleteAccount:l}=(0,_.useDispatch)($);return{accounts:e,hasAccounts:e.length>0,addAccount:n,deleteAccount:l}},ne=window.wp.primitives;var le=a(848);const oe=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,le.jsx)(ne.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"})}),re=({isOpen:e,onClose:t,selectedAccount:a,onSelectAccount:n,appPassword:l,onAppPasswordChange:o,onAddAccount:r,status:s,errorMessage:i})=>e?(0,c.createElement)(p.Modal,{title:(0,g.__)("Connect Bluesky account","autoblue"),onRequestClose:t,focusOnMount:"firstContentElement",size:"medium"},(0,c.createElement)(p.__experimentalVStack,{spacing:4},a?(0,c.createElement)(C,{account:a,onDelete:()=>n(null)}):(0,c.createElement)(k,{onSelect:n}),(0,c.createElement)(p.TextControl,{__nextHasNoMarginBottom:!0,label:(0,g.__)("App Password","autoblue"),help:(0,h.createInterpolateElement)((0,g.__)("You can create a new app password in your <a>Bluesky account settings</a>.","autoblue"),{a:(0,c.createElement)("a",{href:"https://bsky.app/settings/app-passwords",target:"_blank",rel:"noreferrer"})}),value:l,onChange:o}),(0,c.createElement)(p.__experimentalHStack,{alignment:"left"},(0,c.createElement)(p.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:r,disabled:"loading"===s},(0,g.__)("Connect Account","autoblue")),"loading"===s&&(0,c.createElement)(p.Spinner,null)),"loading"!==s&&i&&(0,c.createElement)(p.__experimentalHStack,{alignment:"left",className:"DP0h4FLv2L4zkkvcUIDh"},(0,c.createElement)(p.Icon,{icon:oe}),(0,c.createElement)("p",null,i)))):null,ce=()=>{const{renderModal:e,openModal:t}=((e=!1)=>{const[t,a]=(0,h.useState)(e),[n,l]=(0,h.useState)(null),[o,r]=(0,h.useState)(""),[s,i]=(0,h.useState)("idle"),[u,m]=(0,h.useState)(""),{addAccount:d}=ae(),p=()=>{a(!1),l(null),r("")},_=e=>{r(e)},E=async()=>{if(n)if(o){i("loading");try{await d(n.did,o),i("success"),m(""),p()}catch(e){i("error"),m((0,g.__)("Something went wrong. Make sure the app password is correct.","autoblue"))}}else m((0,g.__)("Please enter an app password.","autoblue"));else m((0,g.__)("Please pick an account to add.","autoblue"))};return{renderModal:()=>(0,c.createElement)(re,{isOpen:t,onClose:p,selectedAccount:n,onSelectAccount:l,appPassword:o,onAppPasswordChange:_,onAddAccount:E,status:s,errorMessage:u}),isOpen:t,openModal:()=>a(!0),closeModal:p}})();return(0,c.createElement)(p.Card,null,(0,c.createElement)(p.CardBody,{className:"QAtJyZwNum9Ab2obTC6K"},(0,c.createElement)(p.__experimentalVStack,{alignment:"center",spacing:4},(0,c.createElement)(p.__experimentalText,null,(0,g.__)("No account connected.","autoblue")),(0,c.createElement)(p.Button,{variant:"primary",onClick:()=>t()},(0,g.__)("Connect a Bluesky account","autoblue")),e())))},se=()=>{const{accounts:e,isLoading:t,deleteAccount:a}=ae(),[n,l]=(0,h.useState)(!1),[o,r]=(0,h.useState)(null);return t?(0,c.createElement)(p.Spinner,null):(0,c.createElement)("div",null,(0,c.createElement)(p.__experimentalConfirmDialog,{isOpen:n,onConfirm:async()=>{try{o&&await a(o.did)}catch(e){console.error(e)}finally{l(!1),r(null)}},onCancel:()=>{l(!1),r(null)},confirmButtonText:(0,g.__)("Disconnect","autoblue")},(0,g.__)("Are you sure you want to disconnect this account?","autoblue")),e.map((e=>(0,c.createElement)(C,{key:e.did,account:e,onDelete:()=>(e=>{r(e),l(!0)})(e),deleteLabel:(0,g.__)("Disconnect","autoblue"),size:"large"}))))},ie=e=>(0,c.createElement)(p.ToggleControl,{__nextHasNoMarginBottom:!0,className:"noXm26AqZWQcZrKeIA1X",...e}),ue=window.wp.coreData,me=()=>{const{hasAccounts:e}=ae(),{isEnabled:t,setIsEnabled:a}=(()=>{const[e,t]=(0,ue.useEntityProp)("root","site","autoblue_enabled"),{saveEditedEntityRecord:a}=(0,_.useDispatch)("core"),{createSuccessNotice:n,removeNotice:l}=(0,_.useDispatch)(E.store),o=(0,_.useSelect)((e=>e("core").isSavingEntityRecord("root","site")));return{isEnabled:null!=e?e:autoblue?.initialState?.settings?.enabled,setIsEnabled:async e=>{if(!o)try{t(e),await a("root","site");const o=await n(e?(0,g.__)("Automatic sharing to Bluesky enabled.","autoblue"):(0,g.__)("Automatic sharing to Bluesky disabled.","autoblue"),{type:"snackbar"});setTimeout((()=>{l(o.notice.id)}),2e3)}catch(e){}},isSaving:o}})();return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,g.__)("Bluesky account","autoblue"),id:"autoblue-accounts"},e?(0,c.createElement)(se,null):(0,c.createElement)(ce,null)),e&&(0,c.createElement)(p.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,g.__)("Settings","autoblue"),id:"autoblue-settings"},(0,c.createElement)(p.Card,null,(0,c.createElement)(p.CardBody,{className:"meck1gRysSgwbPlTNoRp"},(0,c.createElement)(p.__experimentalVStack,{spacing:2},(0,c.createElement)(ie,{label:(0,g.__)("Automatically share posts to Bluesky","autoblue"),help:(0,g.__)("When enabled, new posts will be automatically shared to Bluesky. You can change this on a per-post basis.","autoblue"),checked:t,onChange:a}))))),(0,c.createElement)(p.__experimentalText,{variant:"muted"},(0,h.createInterpolateElement)((0,g.__)("Autoblue is created by <a>Daniel Post</a>. Not officially affiliated with or endorsed by Bluesky.","autoblue"),{a:(0,c.createElement)("a",{href:"https://danielpost.com?ref=autoblue_admin",target:"_blank",rel:"noreferrer"})})))},de=[{value:"debug",label:(0,g.__)("Debug","autoblue"),description:(0,g.__)("Everything will be logged. Useful for debugging.","autoblue")},{value:"info",label:(0,g.__)("Info","autoblue"),description:(0,g.__)("Errors, warnings and info messages will be logged.","autoblue")},{value:"error",label:(0,g.__)("Error","autoblue"),description:(0,g.__)("Only critical errors will be logged.","autoblue")},{value:"off",label:(0,g.__)("Off","autoblue"),description:(0,g.__)("Nothing will be logged.","autoblue")}],ge=({perPage:e=10}={})=>{const{logs:t,status:a,page:n,totalPages:l,totalItems:o}=(0,_.useSelect)((e=>{const t=e($);return{logs:t.getLogs(),status:t.getLogsStatus(),page:t.getLogsCurrentPage(),totalPages:t.getLogsTotalPages(),totalItems:t.getLogsTotalItems()}}),[]),{createSuccessNotice:r,removeNotice:c}=(0,_.useDispatch)(E.store),{refreshLogs:s,clearLogs:i}=(0,_.useDispatch)($),[u,m]=(0,ue.useEntityProp)("root","site","autoblue_log_level"),{saveEditedEntityRecord:d}=(0,_.useDispatch)("core"),p=(0,_.useSelect)((e=>e("core").isSavingEntityRecord("root","site")));return{logs:t,level:u,setLevel:async e=>{if(!p)try{m(e),await d("root","site");const t=de.find((t=>t.value===e)),a=await r((0,g.sprintf)(
     4(0,g.sprintf)((0,g.__)('Account "%s" connected',"autoblue"),s),{id:"autoblue/account/added",type:"snackbar"})}catch(e){throw r((0,g.__)("Failed to connect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}function Q(e){return async function({dispatch:t,registry:a}){const{createSuccessNotice:n,createErrorNotice:l}=a.dispatch(E.store);try{const a=await S()({path:"/autoblue/v1/connections",method:"DELETE",data:{did:e}});return t(W(e)),n((0,g.__)("Account disconnected","autoblue"),{id:"autoblue/account/deleted",type:"snackbar"}),a}catch(e){throw l((0,g.__)("Failed to disconnect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}const X=window.wp.url,q=({page:e=1,perPage:t=10}={})=>async({select:a,dispatch:n,registry:l})=>{const{createSuccessNotice:r,createErrorNotice:o,removeNotice:s}=l.dispatch(E.store);try{const l=a.getLogsCurrentPage(),o=e===l;n({type:T,status:o?"refreshing":"loading"});const c=(0,X.addQueryArgs)("/autoblue/v1/logs",{page:e,per_page:t}),i=await S()({path:c,method:"GET",parse:!0}),{data:u,pagination:m}=i;if(n({type:P,logs:u,pagination:{page:m.page,perPage:m.per_page,totalItems:m.total_items,totalPages:m.total_pages}}),n({type:T,status:"success"}),o){const e=await r((0,g.__)("Logs refreshed.","autoblue"),{type:"snackbar"});setTimeout((()=>{n({type:T,status:"idle"}),s(e.notice.id)}),2e3)}return u}catch(e){throw o((0,g.__)("Failed to refresh logs.","autoblue"),{id:"autoblue/logs/refresh-error",type:"snackbar"}),e}},J=()=>async({dispatch:e,registry:t})=>{const{createSuccessNotice:a,createErrorNotice:n,removeNotice:l}=t.dispatch(E.store);try{e({type:T,status:"clearing"});const t=await S()({path:"/autoblue/v1/logs",method:"DELETE"});if(t){e({type:B,pagination:{page:1,perPage:10,totalItems:0,totalPages:0}}),e({type:T,status:"success"});const t=await a((0,g.__)("Logs cleared.","autoblue"),{type:"snackbar"});setTimeout((()=>{e({type:T,status:"idle"}),l(t.notice.id)}),2e3)}return t}catch(t){throw e({type:T,status:"error"}),n((0,g.__)("Failed to clear logs.","autoblue"),{id:"autoblue/logs/clear-error",type:"snackbar"}),t}},Y={...r,...o},$="autoblue",ee={reducer:R,selectors:F,actions:Y,resolvers:{},initialState:autoblue.initialState};let te;try{te=(0,_.select)($)}catch(e){}if(!te){const e=(0,_.createReduxStore)($,ee);(0,_.register)(e)}const ae=()=>{const{accounts:e,isLoading:t,error:a}=(0,_.useSelect)((e=>({accounts:e($).getAccounts()})),[]),{addAccount:n,deleteAccount:l}=(0,_.useDispatch)($);return{accounts:e,hasAccounts:e.length>0,addAccount:n,deleteAccount:l}},ne=window.wp.primitives;var le=a(848);const re=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,le.jsx)(ne.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"})}),oe=({isOpen:e,onClose:t,selectedAccount:a,onSelectAccount:n,appPassword:l,onAppPasswordChange:r,onAddAccount:o,status:c,errorMessage:i})=>e?(0,s.createElement)(p.Modal,{title:(0,g.__)("Connect Bluesky account","autoblue"),onRequestClose:t,focusOnMount:"firstContentElement",size:"medium"},(0,s.createElement)(p.__experimentalVStack,{spacing:4},a?(0,s.createElement)(C,{account:a,onDelete:()=>n(null)}):(0,s.createElement)(k,{onSelect:n}),(0,s.createElement)(p.TextControl,{__nextHasNoMarginBottom:!0,label:(0,g.__)("App Password","autoblue"),help:(0,h.createInterpolateElement)((0,g.__)("You can create a new app password in your <a>Bluesky account settings</a>.","autoblue"),{a:(0,s.createElement)("a",{href:"https://bsky.app/settings/app-passwords",target:"_blank",rel:"noreferrer"})}),value:l,onChange:r}),(0,s.createElement)(p.__experimentalHStack,{alignment:"left"},(0,s.createElement)(p.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:o,disabled:"loading"===c},(0,g.__)("Connect Account","autoblue")),"loading"===c&&(0,s.createElement)(p.Spinner,null)),"loading"!==c&&i&&(0,s.createElement)(p.__experimentalHStack,{alignment:"left",className:"DP0h4FLv2L4zkkvcUIDh"},(0,s.createElement)(p.Icon,{icon:re}),(0,s.createElement)("p",null,i)))):null,se=()=>{const{renderModal:e,openModal:t}=((e=!1)=>{const[t,a]=(0,h.useState)(e),[n,l]=(0,h.useState)(null),[r,o]=(0,h.useState)(""),[c,i]=(0,h.useState)("idle"),[u,m]=(0,h.useState)(""),{addAccount:d}=ae(),p=()=>{a(!1),l(null),o("")},_=e=>{o(e)},E=async()=>{if(n)if(r){i("loading");try{await d(n.did,r),i("success"),m(""),p()}catch(e){i("error"),m((0,g.__)("Something went wrong. Make sure the app password is correct.","autoblue"))}}else m((0,g.__)("Please enter an app password.","autoblue"));else m((0,g.__)("Please pick an account to add.","autoblue"))};return{renderModal:()=>(0,s.createElement)(oe,{isOpen:t,onClose:p,selectedAccount:n,onSelectAccount:l,appPassword:r,onAppPasswordChange:_,onAddAccount:E,status:c,errorMessage:u}),isOpen:t,openModal:()=>a(!0),closeModal:p}})();return(0,s.createElement)(p.Card,null,(0,s.createElement)(p.CardBody,{className:"QAtJyZwNum9Ab2obTC6K"},(0,s.createElement)(p.__experimentalVStack,{alignment:"center",spacing:4},(0,s.createElement)(p.__experimentalText,null,(0,g.__)("No account connected.","autoblue")),(0,s.createElement)(p.Button,{variant:"primary",onClick:()=>t()},(0,g.__)("Connect a Bluesky account","autoblue")),e())))},ce=()=>{const{width:e}=(()=>{const[e,t]=(0,h.useState)({width:window.innerWidth,height:window.innerHeight});return(0,h.useEffect)((()=>{const e=()=>{t({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e})(),{accounts:t,isLoading:a,deleteAccount:n}=ae(),[l,r]=(0,h.useState)(!1),[o,c]=(0,h.useState)(null);return a?(0,s.createElement)(p.Spinner,null):(0,s.createElement)("div",null,(0,s.createElement)(p.__experimentalConfirmDialog,{isOpen:l,onConfirm:async()=>{try{o&&await n(o.did)}catch(e){console.error(e)}finally{r(!1),c(null)}},onCancel:()=>{r(!1),c(null)},confirmButtonText:(0,g.__)("Disconnect","autoblue")},(0,g.__)("Are you sure you want to disconnect this account?","autoblue")),t.map((t=>(0,s.createElement)(C,{key:t.did,account:t,onDelete:()=>(e=>{c(e),r(!0)})(t),deleteLabel:(0,g.__)("Disconnect","autoblue"),size:e>500?"large":"small"}))))},ie=e=>(0,s.createElement)(p.ToggleControl,{__nextHasNoMarginBottom:!0,className:"noXm26AqZWQcZrKeIA1X",...e}),ue=window.wp.coreData,me=()=>{const{hasAccounts:e}=ae(),{isEnabled:t,setIsEnabled:a}=(()=>{const[e,t]=(0,ue.useEntityProp)("root","site","autoblue_enabled"),{saveEditedEntityRecord:a}=(0,_.useDispatch)("core"),{createSuccessNotice:n,removeNotice:l}=(0,_.useDispatch)(E.store),r=(0,_.useSelect)((e=>e("core").isSavingEntityRecord("root","site")));return{isEnabled:null!=e?e:autoblue?.initialState?.settings?.enabled,setIsEnabled:async e=>{if(!r)try{t(e),await a("root","site");const r=await n(e?(0,g.__)("Automatic sharing to Bluesky enabled.","autoblue"):(0,g.__)("Automatic sharing to Bluesky disabled.","autoblue"),{type:"snackbar"});setTimeout((()=>{l(r.notice.id)}),2e3)}catch(e){}},isSaving:r}})();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,g.__)("Bluesky account","autoblue"),id:"autoblue-accounts"},e?(0,s.createElement)(ce,null):(0,s.createElement)(se,null)),e&&(0,s.createElement)(p.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,g.__)("Settings","autoblue"),id:"autoblue-settings"},(0,s.createElement)(p.Card,null,(0,s.createElement)(p.CardBody,{className:"meck1gRysSgwbPlTNoRp"},(0,s.createElement)(p.__experimentalVStack,{spacing:2},(0,s.createElement)(ie,{label:(0,g.__)("Automatically share posts to Bluesky","autoblue"),help:(0,g.__)("When enabled, new posts will be automatically shared to Bluesky. You can change this on a per-post basis.","autoblue"),checked:t,onChange:a}))))),(0,s.createElement)(p.__experimentalText,{variant:"muted"},(0,h.createInterpolateElement)((0,g.__)("Autoblue is created by <a>Daniel Post</a>. Not officially affiliated with or endorsed by Bluesky.","autoblue"),{a:(0,s.createElement)("a",{href:"https://danielpost.com?ref=autoblue_admin",target:"_blank",rel:"noreferrer"})})))},de=[{value:"debug",label:(0,g.__)("Debug","autoblue"),description:(0,g.__)("Everything will be logged. Useful for debugging.","autoblue")},{value:"info",label:(0,g.__)("Info","autoblue"),description:(0,g.__)("Errors, warnings and info messages will be logged.","autoblue")},{value:"error",label:(0,g.__)("Error","autoblue"),description:(0,g.__)("Only critical errors will be logged.","autoblue")},{value:"off",label:(0,g.__)("Off","autoblue"),description:(0,g.__)("Nothing will be logged.","autoblue")}],ge=({perPage:e=10}={})=>{const{logs:t,status:a,page:n,totalPages:l,totalItems:r}=(0,_.useSelect)((e=>{const t=e($);return{logs:t.getLogs(),status:t.getLogsStatus(),page:t.getLogsCurrentPage(),totalPages:t.getLogsTotalPages(),totalItems:t.getLogsTotalItems()}}),[]),{createSuccessNotice:o,removeNotice:s}=(0,_.useDispatch)(E.store),{refreshLogs:c,clearLogs:i}=(0,_.useDispatch)($),u=(0,h.useCallback)((async()=>{try{await c({page:n,perPage:e})}catch(e){console.error("Failed to refresh logs:",e)}}),[c,n,e]),m=(0,h.useCallback)((async()=>{try{await i()}catch(e){console.error("Failed to clear logs:",e)}}),[i]),d=(0,h.useCallback)((async t=>{try{await c({page:t,perPage:e})}catch(e){console.error("Failed to change page:",e)}}),[c,e]),[p,b]=(0,ue.useEntityProp)("root","site","autoblue_log_level"),{saveEditedEntityRecord:w}=(0,_.useDispatch)("core"),v=(0,_.useSelect)((e=>e("core").isSavingEntityRecord("root","site")));return{logs:t,level:p,setLevel:async e=>{if(!v)try{b(e),await w("root","site");const t=de.find((t=>t.value===e)),a=await o((0,g.sprintf)(
    55// translators: %s is the log level
    66// translators: %s is the log level
    7 (0,g.__)('Log level updated to "%s".',"autoblue"),t.label),{type:"snackbar"});setTimeout((()=>{c(a.notice.id)}),2e3)}catch(e){}},page:n,totalPages:l,totalItems:o,refreshLogs:async()=>{try{await s({page:n,perPage:e})}catch(e){console.error("Failed to refresh logs:",e)}},clearLogs:async()=>{try{await i()}catch(e){console.error("Failed to clear logs:",e)}},setPage:async t=>{try{await s({page:t,perPage:e})}catch(e){console.error("Failed to change page:",e)}},isRefreshingLogs:"refreshing"===a,isClearingLogs:"clearing"===a,isSuccess:"success"===a,isError:"error"===a}},pe=window.wp.date,he=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),_e=(0,le.jsx)(ne.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,le.jsx)(ne.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})}),Ee=e=>{switch(e){case"success":return v;case"info":default:return y;case"warning":return f;case"error":return he;case"debug":return _e}},be=e=>e.split(/(https:\/\/bsky\.app\/profile\/[^\s]+)/g).map(((e,t)=>/^https:\/\/bsky\.app\/profile\/[^\s]+$/.test(e)?(0,c.createElement)("a",{key:`url-${t}`,href:e,target:"_blank",rel:"noreferrer"},e):e)).map((e=>{return"string"==typeof e?"string"==typeof(t=e)?t.split("`").map(((e,t)=>t%2==0?e:(0,c.createElement)("code",{key:`code-${t}`},e))):t:e;var t})).flat(),we={level:"cYBHXdayJ9hEt7ETXvHb",info:"e74HX1TJsY4mcF4KJRM3",debug:"iY5nmbaUM8NAU9Mkx4QI",warning:"U6hWwqaFD6ksNFzzBUsL",error:"lArm_d0OIb3tZey48j80",success:"WX97I60r7oh7U_aGYHKV",container:"J912WhKEiSxdZ1QVkUsD",pill:"CUIWekfURbh2zp3Nwqh5",icon:"ECn5fPQP9eCW2GaO4wbw"},ve=({level:e,showText:t=!1})=>(0,c.createElement)("div",{className:d(we.level,we[e])},(0,c.createElement)("div",{className:d(we.container,{[we.pill]:t})},(0,c.createElement)(p.Icon,{icon:Ee(e),className:we.icon}),t&&e)),fe=({children:e})=>(0,c.createElement)("table",{className:"m0ishQkFGe8cW6U71f_E"},e),ye=({context:e,onRequestClose:t})=>{const{formats:a}=(0,pe.getSettings)();return(0,c.createElement)(p.Modal,{title:(0,g.__)("Context","autoblue"),onRequestClose:t,className:"EWnbmq_38OJPlOh82E6w"},(0,c.createElement)(p.__experimentalVStack,{spacing:4},(0,c.createElement)(fe,null,(0,c.createElement)("tbody",null,(0,c.createElement)("tr",null,(0,c.createElement)("th",null,(0,g.__)("Level","autoblue")),(0,c.createElement)("td",null,(0,c.createElement)(ve,{level:e.level,showText:!0}))),(0,c.createElement)("tr",null,(0,c.createElement)("th",null,(0,g.__)("Message","autoblue")),(0,c.createElement)("td",null,be(e.message))),(0,c.createElement)("tr",null,(0,c.createElement)("th",null,(0,g.__)("Date","autoblue")),(0,c.createElement)("td",null,(0,c.createElement)(p.__experimentalVStack,{spacing:1},(0,c.createElement)("span",null,(0,pe.dateI18n)(a?.datetime||"c",e.created_at)),(0,c.createElement)(p.__experimentalText,{variant:"muted"},(0,pe.dateI18n)("c",e.created_at))))),Object.entries({...e.context,...e.extra}).map((([e,t])=>(0,c.createElement)("tr",{key:e},(0,c.createElement)("th",null,e),(0,c.createElement)("td",null,(0,c.createElement)("pre",null,"object"==typeof t?JSON.stringify(t,null,2):String(t))))))))))},xe=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})}),Se=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})}),Ce={refreshing:"D3K9yFKhGochBoN9ciy0",rotate:"wZn5VxzBe2oH9bcXgw_D",dropdown:"giKoThf94yCr7M7ywIlF",header:"E66oSeXaGdPMfAadmteF"},Ne=({onClose:e})=>(0,c.createElement)(p.__experimentalVStack,{spacing:1,className:Ce.header},(0,c.createElement)(p.__experimentalHStack,{alignment:"center"},(0,c.createElement)(p.__experimentalHeading,{level:2,size:13},(0,g.__)("Log level","autoblue")),(0,c.createElement)(p.__experimentalSpacer,null),e&&(0,c.createElement)(p.Button,{size:"small",label:(0,g.__)("Close"),icon:he,onClick:e})),(0,c.createElement)(p.__experimentalText,null,(0,g.__)("Choose the level of logs to save. This will not affect existing logs.","autoblue"))),ke=()=>{const{refreshLogs:e,clearLogs:t,isRefreshingLogs:a,isClearingLogs:n,totalItems:l,level:o,setLevel:r}=ge(),[s,i]=(0,h.useState)(!1),u=a||n;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.__experimentalConfirmDialog,{isOpen:s,onConfirm:()=>{u||(t(),i(!1))},onCancel:()=>i(!1),confirmButtonText:(0,g.__)("Clear logs","autoblue")},(0,g.__)("Are you sure you want to clear all logs?","autoblue")),(0,c.createElement)(p.__experimentalHStack,{alignment:"right"},(0,c.createElement)(p.Dropdown,{contentClassName:Ce.dropdown,popoverProps:{placement:"bottom-end"},focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,c.createElement)(p.Button,{label:(0,g.__)("View options","autoblue"),onClick:t,"aria-expanded":e,icon:xe,size:"compact"}),renderContent:({onClose:e})=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(Ne,{onClose:e}),(0,c.createElement)("form",null,(0,c.createElement)(p.RadioControl,{label:(0,g.__)("Log level","autoblue"),hideLabelFromVision:!0,onChange:r,options:de.map((e=>"info"===e.value?{...e,label:`${e.label} ${(0,g.__)("(recommended)","autoblue")}`}:e)),selected:o})))}),(0,c.createElement)(p.Button,{label:(0,g.__)("Refresh logs","autoblue"),onClick:()=>{u||e()},disabled:a||n,accessibleWhenDisabled:!0,className:d({[Ce.refresh]:!0,[Ce.refreshing]:a}),icon:w,size:"compact"}),(0,c.createElement)(p.Button,{label:(0,g.__)("Clear logs","autoblue"),onClick:()=>i(!0),isDestructive:!0,icon:Se,size:"compact",accessibleWhenDisabled:!0,disabled:a||n||0===l})))},Ae=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})}),Me=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})}),Pe=()=>{const{setPage:e,page:t,totalPages:a,totalItems:n}=ge();return(0,c.createElement)(p.__experimentalHStack,{alignment:"left",className:"KzPwbHigWAmJrseQaoKw"},(0,c.createElement)(p.Button,{label:(0,g.__)("Previous page","autoblue"),onClick:()=>{t>1&&e(t-1)},accessibleWhenDisabled:!0,size:"compact",disabled:1===t,icon:Ae}),(0,c.createElement)(p.Button,{label:(0,g.__)("Next page","autoblue"),onClick:()=>{t<a&&e(t+1)},accessibleWhenDisabled:!0,size:"compact",disabled:t===a||0===a,icon:Me}),(0,c.createElement)("span",null,(0,g.sprintf)(
     7(0,g.__)('Log level updated to "%s".',"autoblue"),t.label),{type:"snackbar"});setTimeout((()=>{s(a.notice.id)}),2e3)}catch(e){}},page:n,totalPages:l,totalItems:r,refreshLogs:u,clearLogs:m,setPage:d,isRefreshingLogs:"refreshing"===a,isClearingLogs:"clearing"===a,isSuccess:"success"===a,isError:"error"===a}},pe=window.wp.date,he=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),_e=(0,le.jsx)(ne.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,le.jsx)(ne.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})}),Ee=e=>{switch(e){case"success":return v;case"info":default:return y;case"warning":return f;case"error":return he;case"debug":return _e}},be=e=>e.split(/(https:\/\/bsky\.app\/profile\/[^\s]+)/g).map(((e,t)=>/^https:\/\/bsky\.app\/profile\/[^\s]+$/.test(e)?(0,s.createElement)("a",{key:`url-${t}`,href:e,target:"_blank",rel:"noreferrer"},e):e)).map((e=>{return"string"==typeof e?"string"==typeof(t=e)?t.split("`").map(((e,t)=>t%2==0?e:(0,s.createElement)("code",{key:`code-${t}`},e))):t:e;var t})).flat(),we={level:"cYBHXdayJ9hEt7ETXvHb",info:"e74HX1TJsY4mcF4KJRM3",debug:"iY5nmbaUM8NAU9Mkx4QI",warning:"U6hWwqaFD6ksNFzzBUsL",error:"lArm_d0OIb3tZey48j80",success:"WX97I60r7oh7U_aGYHKV",container:"J912WhKEiSxdZ1QVkUsD",pill:"CUIWekfURbh2zp3Nwqh5",icon:"ECn5fPQP9eCW2GaO4wbw"},ve=({level:e,showText:t=!1})=>(0,s.createElement)("div",{className:d(we.level,we[e])},(0,s.createElement)("div",{className:d(we.container,{[we.pill]:t})},(0,s.createElement)(p.Icon,{icon:Ee(e),className:we.icon}),t&&e)),fe=({children:e})=>(0,s.createElement)("div",{className:"dIaCy9uCnGvvhj_lqTQV"},(0,s.createElement)("table",{className:"m0ishQkFGe8cW6U71f_E"},e)),ye=({context:e,onRequestClose:t})=>{const{formats:a}=(0,pe.getSettings)();return(0,s.createElement)(p.Modal,{title:(0,g.__)("Context","autoblue"),onRequestClose:t,className:"EWnbmq_38OJPlOh82E6w"},(0,s.createElement)(p.__experimentalVStack,{spacing:4},(0,s.createElement)(fe,null,(0,s.createElement)("tbody",{className:"lpxIIelZJxgj5eCsjg0w"},(0,s.createElement)("tr",null,(0,s.createElement)("th",null,(0,g.__)("Level","autoblue")),(0,s.createElement)("td",null,(0,s.createElement)(ve,{level:e.level,showText:!0}))),(0,s.createElement)("tr",null,(0,s.createElement)("th",null,(0,g.__)("Message","autoblue")),(0,s.createElement)("td",null,be(e.message))),(0,s.createElement)("tr",null,(0,s.createElement)("th",null,(0,g.__)("Date","autoblue")),(0,s.createElement)("td",null,(0,s.createElement)(p.__experimentalVStack,{spacing:1},(0,s.createElement)("span",null,(0,pe.dateI18n)(a?.datetime||"c",e.created_at)),(0,s.createElement)(p.__experimentalText,{variant:"muted"},(0,pe.dateI18n)("c",e.created_at))))),Object.entries({...e.context,...e.extra}).map((([e,t])=>(0,s.createElement)("tr",{key:e},(0,s.createElement)("th",null,e),(0,s.createElement)("td",null,(0,s.createElement)("pre",null,"object"==typeof t?JSON.stringify(t,null,2):String(t))))))))))},xe=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})}),Se=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})}),Ce={wrapper:"nzlAX7WNL7AHp9AeScd5",refreshing:"D3K9yFKhGochBoN9ciy0",rotate:"wZn5VxzBe2oH9bcXgw_D",dropdown:"giKoThf94yCr7M7ywIlF",header:"E66oSeXaGdPMfAadmteF"},Ne=({onClose:e})=>(0,s.createElement)(p.__experimentalVStack,{spacing:1,className:Ce.header},(0,s.createElement)(p.__experimentalHStack,{alignment:"center"},(0,s.createElement)(p.__experimentalHeading,{level:2,size:13},(0,g.__)("Log level","autoblue")),(0,s.createElement)(p.__experimentalSpacer,null),e&&(0,s.createElement)(p.Button,{size:"small",label:(0,g.__)("Close"),icon:he,onClick:e})),(0,s.createElement)(p.__experimentalText,null,(0,g.__)("Choose the level of logs to save. This will not affect existing logs.","autoblue"))),ke=()=>{const{refreshLogs:e,clearLogs:t,isRefreshingLogs:a,isClearingLogs:n,totalItems:l,level:r,setLevel:o}=ge(),[c,i]=(0,h.useState)(!1),u=a||n;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalConfirmDialog,{isOpen:c,onConfirm:()=>{u||(t(),i(!1))},onCancel:()=>i(!1),confirmButtonText:(0,g.__)("Clear logs","autoblue")},(0,g.__)("Are you sure you want to clear all logs?","autoblue")),(0,s.createElement)("div",{className:Ce.wrapper},(0,s.createElement)(p.Dropdown,{contentClassName:Ce.dropdown,popoverProps:{placement:"bottom-end"},focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,s.createElement)(p.Button,{label:(0,g.__)("View options","autoblue"),onClick:t,"aria-expanded":e,icon:xe,size:"compact"}),renderContent:({onClose:e})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ne,{onClose:e}),(0,s.createElement)("form",null,(0,s.createElement)(p.RadioControl,{label:(0,g.__)("Log level","autoblue"),hideLabelFromVision:!0,onChange:o,options:de.map((e=>"info"===e.value?{...e,label:`${e.label} ${(0,g.__)("(recommended)","autoblue")}`}:e)),selected:r})))}),(0,s.createElement)(p.Button,{label:(0,g.__)("Refresh logs","autoblue"),onClick:()=>{u||e()},disabled:a||n,accessibleWhenDisabled:!0,className:d({[Ce.refresh]:!0,[Ce.refreshing]:a}),icon:w,size:"compact"}),(0,s.createElement)(p.Button,{label:(0,g.__)("Clear logs","autoblue"),onClick:()=>i(!0),isDestructive:!0,icon:Se,size:"compact",accessibleWhenDisabled:!0,disabled:a||n||0===l})))},Ae=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})}),Me=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})}),Le=()=>{const{setPage:e,page:t,totalPages:a,totalItems:n}=ge();return(0,s.createElement)("div",{className:"KzPwbHigWAmJrseQaoKw"},(0,s.createElement)(p.Button,{label:(0,g.__)("Previous page","autoblue"),onClick:()=>{t>1&&e(t-1)},accessibleWhenDisabled:!0,size:"compact",disabled:1===t,icon:Ae}),(0,s.createElement)(p.Button,{label:(0,g.__)("Next page","autoblue"),onClick:()=>{t<a&&e(t+1)},accessibleWhenDisabled:!0,size:"compact",disabled:t===a||0===a,icon:Me}),(0,s.createElement)("span",{className:"Zh2l7MhZK5xrRuAKKIA2"},(0,g.sprintf)(
    88// translators: %1$d is the first item number, %2$d is the last item number, %3$d is the total number of items)
    99// translators: %1$d is the first item number, %2$d is the last item number, %3$d is the total number of items)
    10 (0,g.__)("Showing %1$d-%2$d of %3$d logs","autoblue"),0===n?0:10*(t-1)+1,Math.min(10*t,n),n)))},Le=(0,le.jsxs)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,le.jsx)(ne.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,le.jsx)(ne.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),Be={time:"K5BgxlncedJq_t7SNRMe"},Te=({log:e,onButtonClick:t})=>{const{level:a,message:n,created_at:l}=e,{formats:o}=(0,pe.getSettings)();return(0,c.createElement)("tr",{className:d(Be.item,Be[a])},(0,c.createElement)("td",null,(0,c.createElement)(ve,{level:a})),(0,c.createElement)("td",null,be(n)),(0,c.createElement)("td",null,(0,c.createElement)(p.Tooltip,{text:(0,pe.dateI18n)("c",l)},(0,c.createElement)(p.__experimentalText,{variant:"muted"},(0,c.createElement)("time",{dateTime:(0,pe.dateI18n)("c",l),className:Be.time},(0,pe.dateI18n)(o?.datetime||"c",l))))),(0,c.createElement)("td",null,(0,c.createElement)(p.Button,{onClick:()=>t(e),variant:"secondary",icon:Le,label:(0,g.__)("View Context","autoblue")})))},Ve=()=>{const{logs:e}=ge(),[t,a]=(0,h.useState)(null),n=e=>{a(e)};return(0,c.createElement)(c.Fragment,null,t&&(0,c.createElement)(ye,{context:t,onRequestClose:()=>a(null)}),(0,c.createElement)(p.__experimentalVStack,{spacing:2},(0,c.createElement)(p.__experimentalHStack,{alignment:"edge",className:"i0z7ZyN4Jro1uclPsSxA"},(0,c.createElement)(Pe,null),(0,c.createElement)(ke,null)),(0,c.createElement)(p.Card,null,(0,c.createElement)(p.CardBody,{className:"RppDBVCrYWAJGIMmkYiA"},(0,c.createElement)(p.__experimentalVStack,{spacing:2},(0,c.createElement)(fe,null,(0,c.createElement)("thead",null,(0,c.createElement)("tr",null,(0,c.createElement)("th",null,(0,g.__)("Level","autoblue")),(0,c.createElement)("th",null,(0,g.__)("Message","autoblue")),(0,c.createElement)("th",null,(0,g.__)("Time","autoblue")),(0,c.createElement)("th",null,(0,g.__)("Context","autoblue")))),(0,c.createElement)("tbody",null,e.length>0&&e.map((e=>(0,c.createElement)(Te,{key:e.id,log:e,onButtonClick:n}))))),!e.length&&(0,c.createElement)("div",{className:"neP6M8HbdPhq0lQEAgyx"},(0,g.__)("No logs (yet).","autoblue")))))))},De={notices:"n7yM0P6DXfO7e1UgtFGQ",header:"xzkNAh1yXHy3oWVtzkee",version:"YhcowEQjGHG5jSc72vs4",tabs:"AcUQmgxMrKkXWKN_HshA",container:"skc1SozmvgQ52e9uA3Fc",wrapper:"H4mlAM8GJQgJbzRXdyVp",settings:"qUYVGzB3MCAFehNkod5e",logs:"himvr6mnCghPWNGvRc1Z"},Re=["settings","logs"],He=()=>{const{removeNotice:e}=(0,_.useDispatch)(E.store),t=(0,_.useSelect)((e=>e(E.store).getNotices())).filter((({type:e})=>"snackbar"===e));return(0,c.createElement)(p.SnackbarList,{className:De.notices,notices:t,onRemove:e})},Ze=()=>{const[e,t]=(0,h.useState)((()=>{const e=window.location.hash.replace("#","");return Re.includes(e)?e:"settings"})());return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{className:De.header},b,(0,c.createElement)("span",{className:De.version},autoblue.version)),(0,c.createElement)(p.TabPanel,{className:De.tabs,initialTabName:e,onSelect:e=>{t(e),window.location.hash=e},tabs:[{name:"settings",title:(0,g.__)("Settings","autoblue"),className:"autoblue-settings"},{name:"logs",title:(0,g.__)("Logs","autoblue"),className:"autoblue-logs"}]},(e=>(0,c.createElement)("div",{className:De.container},(0,c.createElement)(p.__experimentalVStack,{spacing:5,className:d(De.wrapper,De[e.name])},"settings"===e.name&&(0,c.createElement)(me,null),"logs"===e.name&&(0,c.createElement)(Ve,null))))),(0,c.createElement)(He,null))};u()((()=>{const e=document.getElementById("autoblue");e&&(0,s.H)(e).render((0,c.createElement)(Ze,null))}))})();
     10(0,g.__)("Showing %1$d-%2$d of %3$d logs","autoblue"),0===n?0:10*(t-1)+1,Math.min(10*t,n),n)))},Pe=(0,le.jsxs)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,le.jsx)(ne.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,le.jsx)(ne.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),Be={time:"K5BgxlncedJq_t7SNRMe"},Te=({log:e,onButtonClick:t})=>{const{level:a,message:n,created_at:l}=e,{formats:r}=(0,pe.getSettings)();return(0,s.createElement)("tr",{className:d(Be.item,Be[a])},(0,s.createElement)("td",null,(0,s.createElement)(ve,{level:a})),(0,s.createElement)("td",null,be(n)),(0,s.createElement)("td",null,(0,s.createElement)(p.Tooltip,{text:(0,pe.dateI18n)("c",l)},(0,s.createElement)(p.__experimentalText,{variant:"muted"},(0,s.createElement)("time",{dateTime:(0,pe.dateI18n)("c",l),className:Be.time},(0,pe.dateI18n)(r?.datetime||"c",l))))),(0,s.createElement)("td",null,(0,s.createElement)(p.Button,{onClick:()=>t(e),variant:"secondary",icon:Pe,label:(0,g.__)("View Context","autoblue")})))},Ve=()=>{const{logs:e,refreshLogs:t}=ge(),a=(0,h.useRef)(!0),[n,l]=(0,h.useState)(null),r=e=>{l(e)},o=(0,h.useCallback)((async()=>{try{await t()}catch(e){}}),[t]);return(0,h.useEffect)((()=>{a.current&&(o(),a.current=!1)}),[o]),(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(ye,{context:n,onRequestClose:()=>l(null)}),(0,s.createElement)(p.__experimentalVStack,{spacing:2},(0,s.createElement)("div",{className:"i0z7ZyN4Jro1uclPsSxA"},(0,s.createElement)(Le,null),(0,s.createElement)(ke,null)),(0,s.createElement)(p.Card,null,(0,s.createElement)(p.CardBody,{className:"RppDBVCrYWAJGIMmkYiA"},(0,s.createElement)(p.__experimentalVStack,{spacing:2},(0,s.createElement)(fe,null,(0,s.createElement)("thead",null,(0,s.createElement)("tr",null,(0,s.createElement)("th",null,(0,g.__)("Level","autoblue")),(0,s.createElement)("th",null,(0,g.__)("Message","autoblue")),(0,s.createElement)("th",null,(0,g.__)("Time","autoblue")),(0,s.createElement)("th",null,(0,g.__)("Context","autoblue")))),(0,s.createElement)("tbody",null,e.length>0&&e.map((e=>(0,s.createElement)(Te,{key:e.id,log:e,onButtonClick:r}))))),!e.length&&(0,s.createElement)("div",{className:"neP6M8HbdPhq0lQEAgyx"},(0,g.__)("No logs (yet).","autoblue")))))))},De={notices:"n7yM0P6DXfO7e1UgtFGQ",header:"xzkNAh1yXHy3oWVtzkee",version:"YhcowEQjGHG5jSc72vs4",tabs:"AcUQmgxMrKkXWKN_HshA",container:"skc1SozmvgQ52e9uA3Fc",wrapper:"H4mlAM8GJQgJbzRXdyVp",settings:"qUYVGzB3MCAFehNkod5e",logs:"himvr6mnCghPWNGvRc1Z"},Re=["settings","logs"],Ze=()=>{const{removeNotice:e}=(0,_.useDispatch)(E.store),t=(0,_.useSelect)((e=>e(E.store).getNotices())).filter((({type:e})=>"snackbar"===e));return(0,s.createElement)(p.SnackbarList,{className:De.notices,notices:t,onRemove:e})},ze=()=>{const[e,t]=(0,h.useState)((()=>{const e=window.location.hash.replace("#","");return Re.includes(e)?e:"settings"})());return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:De.header},b,(0,s.createElement)("span",{className:De.version},autoblue.version)),(0,s.createElement)(p.TabPanel,{className:De.tabs,initialTabName:e,onSelect:e=>{t(e),window.location.hash=e},tabs:[{name:"settings",title:(0,g.__)("Settings","autoblue"),className:"autoblue-settings"},{name:"logs",title:(0,g.__)("Logs","autoblue"),className:"autoblue-logs"}]},(e=>(0,s.createElement)("div",{className:De.container},(0,s.createElement)(p.__experimentalVStack,{spacing:5,className:d(De.wrapper,De[e.name])},"settings"===e.name&&(0,s.createElement)(me,null),"logs"===e.name&&(0,s.createElement)(Ve,null))))),(0,s.createElement)(Ze,null))};u()((()=>{const e=document.getElementById("autoblue");e&&(0,c.H)(e).render((0,s.createElement)(ze,null))}))})();
  • autoblue/tags/0.0.6/build/editor-rtl.css

    r3211894 r3276419  
    1 .IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-right-radius:7px;border-top-left-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-right-radius:7px;border-bottom-left-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:right}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
     1.IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;gap:var(--gap-size);justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-right-radius:7px;border-top-left-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-right-radius:7px;border-bottom-left-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:right}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
    22.pxGCoNPxvleLS9R54pDD{display:flex;flex-direction:column;gap:12px}.Pji33XRLzc2gr99NtkMW{background-color:#4ab866;border-radius:999px;fill:#fff}
    33.BdtMtThHyPg6Ixs294VO{border:1px solid #0000001a;border-radius:0 0 4px 4px;padding:4px 0}.UbZP1LRbJlNmQJ5XIfZU{display:flex;justify-content:center;padding:16px 0;width:100%}.WhjXMSYedjhE9iq9mGGQ{height:auto;padding:0;position:relative}.WhjXMSYedjhE9iq9mGGQ:focus-within{z-index:1}.aCyp1bdAS7uFpgfVTt4z{box-shadow:none;padding-bottom:5px;padding-top:5px}.WhjXMSYedjhE9iq9mGGQ:focus-within .aCyp1bdAS7uFpgfVTt4z,.WhjXMSYedjhE9iq9mGGQ:hover .aCyp1bdAS7uFpgfVTt4z{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}
  • autoblue/tags/0.0.6/build/editor.asset.php

    r3211894 r3276419  
    1 <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-date', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => 'efe2e75be642df5475f4');
     1<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-date', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => 'd14b47927ab16448f407');
  • autoblue/tags/0.0.6/build/editor.css

    r3211894 r3276419  
    1 .IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-left-radius:7px;border-top-right-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-left-radius:7px;border-bottom-right-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:left}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
     1.IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;gap:var(--gap-size);justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-left-radius:7px;border-top-right-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-left-radius:7px;border-bottom-right-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:left}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
    22.pxGCoNPxvleLS9R54pDD{display:flex;flex-direction:column;gap:12px}.Pji33XRLzc2gr99NtkMW{background-color:#4ab866;border-radius:999px;fill:#fff}
    33.BdtMtThHyPg6Ixs294VO{border:1px solid #0000001a;border-radius:0 0 4px 4px;padding:4px 0}.UbZP1LRbJlNmQJ5XIfZU{display:flex;justify-content:center;padding:16px 0;width:100%}.WhjXMSYedjhE9iq9mGGQ{height:auto;padding:0;position:relative}.WhjXMSYedjhE9iq9mGGQ:focus-within{z-index:1}.aCyp1bdAS7uFpgfVTt4z{box-shadow:none;padding-bottom:5px;padding-top:5px}.WhjXMSYedjhE9iq9mGGQ:focus-within .aCyp1bdAS7uFpgfVTt4z,.WhjXMSYedjhE9iq9mGGQ:hover .aCyp1bdAS7uFpgfVTt4z{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}
  • autoblue/tags/0.0.6/build/editor.js

    r3211894 r3276419  
    1 (()=>{"use strict";var e={20:(e,t,a)=>{var n=a(609),r=Symbol.for("react.element"),o=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,a){var n,c={},u=null,i=null;for(n in void 0!==a&&(u=""+a),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(i=t.ref),t)o.call(t,n)&&!s.hasOwnProperty(n)&&(c[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===c[n]&&(c[n]=t[n]);return{$$typeof:r,type:e,key:u,ref:i,props:c,_owner:l.current}}},848:(e,t,a)=>{e.exports=a(20)},609:e=>{e.exports=window.React}},t={};function a(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,a),o.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};a.r(n),a.d(n,{getAccounts:()=>O});var r={};a.r(r),a.d(r,{getLogs:()=>Z,getLogsCurrentPage:()=>I,getLogsStatus:()=>H,getLogsTotalItems:()=>z,getLogsTotalPages:()=>R});var o={};a.r(o),a.d(o,{addAccount:()=>W,addAccountToState:()=>G,deleteAccount:()=>q,deleteAccountFromState:()=>$,setAccounts:()=>j});var l={};a.r(l),a.d(l,{clearLogs:()=>Q,refreshLogs:()=>Y});var s=a(609);const c=window.wp.i18n,u=window.wp.plugins,i=window.wp.editor,d=((0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 813 138"},(0,s.createElement)("path",{fill:"#000",d:"M243.084 107.24c-19.592 0-32.736-13.392-32.736-34.472 0-21.08 13.144-34.348 32.736-34.348 12.772 0 21.08 4.712 24.924 11.532h.868l.62-10.416h19.84V106H268.38V95.336h-.868c-4.092 7.316-13.516 11.904-24.428 11.904Zm6.448-15.872c11.78 0 18.724-7.564 18.724-17.112v-3.224c0-9.3-6.944-16.74-18.724-16.74-10.788 0-18.104 6.572-18.104 18.476 0 11.78 7.192 18.6 18.104 18.6ZM329.746 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972S355.29 83.68 355.29 72.52V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM415.443 106c-11.036 0-18.104-5.208-18.104-16.492V55.284h-12.4V39.536h12.4V22.672l20.584-3.968v20.832h16.492v15.748h-16.492v27.652c0 4.092 1.984 5.332 6.076 5.332h10.416V106h-18.972ZM479.63 107.24c-24.056 0-40.052-12.772-40.052-34.472 0-21.576 15.872-34.472 40.052-34.472 24.056 0 39.928 12.648 39.928 34.472 0 21.576-15.748 34.472-39.928 34.472Zm0-15.996c12.028 0 19.096-7.192 19.096-18.476 0-11.408-6.944-18.476-19.096-18.476-12.152 0-19.096 7.192-19.096 18.476 0 11.284 6.944 18.476 19.096 18.476ZM575.383 106.992c-12.648 0-20.956-4.588-24.924-11.532h-.868l-.62 10.54h-19.716V15.604h20.832V50.2h.744c4.216-7.44 13.764-11.904 24.552-11.904 19.592 0 32.612 13.392 32.612 34.348 0 21.08-13.02 34.348-32.612 34.348Zm-6.448-15.748c10.912 0 18.104-6.696 18.104-18.6 0-11.656-7.192-18.476-18.104-18.476-11.904 0-18.848 7.564-18.848 17.112v3.1c0 9.3 6.944 16.864 18.848 16.864ZM617.532 106V15.604h20.832V106h-20.832ZM678.86 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972s18.352-7.688 18.352-18.848V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM774.249 107.116c-24.304 0-39.928-12.648-39.928-33.976 0-21.824 15.872-34.844 39.68-34.844 25.296 0 39.928 14.508 38.316 38.936h-57.04c.248 9.92 7.564 15.872 19.468 15.872 8.804 0 15.996-3.348 17.732-8.308h19.716c-1.86 13.392-17.484 22.32-37.944 22.32Zm-.372-54.684c-10.416 0-17.36 4.836-18.848 13.268h36.58c-.744-8.184-6.944-13.268-17.732-13.268Z"}),(0,s.createElement)("path",{fill:"#5089FB",d:"M127.627 1.756c13.597.242 21.261 8.627 23.983 20.423 1.371 5.939 1.669 12.174 1.987 18.3.739 14.24 1.276 28.496 1.733 42.746.259 7.984.199 15.983.266 23.975.137 16.158-12.09 24.804-22.837 27.733a48.532 48.532 0 0 1-11.457 1.786c-22.625.555-45.256 1.174-67.885 1.189-12.069.009-24.058-1.913-35.864-4.475C8.49 131.468 1.507 123.037.424 113.285a80.385 80.385 0 0 1-.41-9.705C.131 92.452.47 81.326.516 70.198c.057-12.963-.07-25.927-.194-38.89-.033-3.555-.263-7.01 1.024-10.52 3.59-9.792 10.627-15.202 20.643-16.91C55.135-1.775 91-.095 127.627 1.757Z"}),(0,s.createElement)("path",{fill:"#DEEBFF",d:"M35.164 99.944C37.83 73.172 56.04 30 77.984 30c21.944 0 40.155 43.172 42.821 69.944 2.681 26.939-22.785-14.807-42.82-14.807-20.036 0-45.256 39.273-42.821 14.807Z"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 256 256"},(0,s.createElement)("path",{fill:"#5089FB",d:"M209.982 17.89c22.371.4 34.98 14.2 39.459 33.617 2.256 9.775 2.746 20.04 3.268 30.121 1.216 23.441 2.101 46.906 2.852 70.362.426 13.142.326 26.308.437 39.464.226 26.596-19.891 40.827-37.573 45.649a79.8 79.8 0 0 1-18.85 2.938c-37.225.914-74.458 1.933-111.69 1.959-19.856.015-39.582-3.15-59.006-7.366-14.91-3.235-26.4-17.113-28.181-33.165a132.365 132.365 0 0 1-.676-15.974c.196-18.317.75-36.63.83-54.947.092-21.337-.117-42.677-.32-64.014C.476 60.682.1 54.994 2.217 49.216 8.123 33.1 19.7 24.195 36.179 21.385c54.533-9.308 113.541-6.543 173.803-3.495Z"}),(0,s.createElement)("path",{fill:"#DEEBFF",d:"M57.854 179.51c4.387-44.067 34.348-115.13 70.451-115.13 36.104 0 66.065 71.063 70.452 115.13 4.411 44.342-37.488-24.373-70.451-24.373-32.964 0-74.458 64.644-70.452 24.373Z"}))),p=((0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"600",height:"530",version:"1.1",viewBox:"0 0 600 530"},(0,s.createElement)("path",{d:"m135.72 44.03c66.496 49.921 138.02 151.14 164.28 205.46 26.262-54.316 97.782-155.54 164.28-205.46 47.98-36.021 125.72-63.892 125.72 24.795 0 17.712-10.155 148.79-16.111 170.07-20.703 73.984-96.144 92.854-163.25 81.433 117.3 19.964 147.14 86.092 82.697 152.22-122.39 125.59-175.91-31.511-189.63-71.766-2.514-7.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937 0.51669-3.7077 7.8964-13.714 40.255-67.233 197.36-189.63 71.766-64.444-66.128-34.605-132.26 82.697-152.22-67.108 11.421-142.55-7.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07 0-88.687 77.742-60.816 125.72-24.795z",fill:"#1185fe"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,s.createElement)("path",{fillRule:"evenodd",d:"M6 12c0-3.328 2.64-6 5.866-6 2.164 0 4.063 1.201 5.08 3H15v1.5h4.5V6H18v1.848C16.683 5.834 14.431 4.5 11.866 4.5 7.783 4.5 4.5 7.872 4.5 12H6ZM18 12c0 3.328-2.64 6-5.865 6-2.165 0-4.064-1.201-5.081-3H9v-1.5H4.5V18H6v-1.848c1.317 2.014 3.569 3.348 6.135 3.348 4.082 0 7.365-3.372 7.365-7.5H18Z",clipRule:"evenodd"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)("path",{d:"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z"})),(0,s.createElement)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)("path",{d:"M13.13 13.38L13.48 6.92004H10.52L10.87 13.38H13.13ZM13.04 16.74C13.28 16.51 13.41 16.19 13.41 15.78C13.41 15.36 13.29 15.04 13.05 14.81C12.81 14.58 12.46 14.46 11.99 14.46C11.52 14.46 11.17 14.58 10.92 14.81C10.67 15.04 10.55 15.36 10.55 15.78C10.55 16.19 10.68 16.51 10.93 16.74C11.19 16.97 11.54 17.08 11.99 17.08C12.44 17.08 12.79 16.97 13.04 16.74Z"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,s.createElement)("path",{d:"M11 17h2v-6h-2v6Zm0-8h2V7h-2v2Z"})),window.wp.components),m=window.wp.data,g=window.wp.apiFetch;var h=a.n(g);function _(e){var t,a,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=_(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}const E=({account:{did:e,meta:t={}},className:a,onDelete:n=null,deleteLabel:r=null,size:o="medium"})=>{const{userData:l,isLoading:u}=((e,t)=>{const[a,n]=(0,s.useState)({handle:t.handle||"",displayName:t.name||"",avatar:t.avatar||""}),[r,o]=(0,s.useState)(!1),l=(0,s.useRef)(null);return(0,s.useEffect)((()=>((async()=>{if(!a.handle){l.current&&l.current.abort(),l.current=new AbortController;try{o(!0);const t=await h()({path:`/autoblue/v1/account?did=${e}`,signal:l.current.signal});n({handle:t.handle||a.handle,displayName:t.displayName||a.displayName,avatar:t.avatar||a.avatar})}catch(e){console.error("Error fetching user data:",e),"AbortError"!==e.name&&console.error("Error fetching user data:",e)}finally{o(!1)}}})(),()=>{l.current&&l.current.abort()})),[e,a]),{userData:a,isLoading:r}})(e,t),[i,d]=(0,s.useState)(!1);return a=function(){for(var e,t,a=0,n="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=_(e))&&(n&&(n+=" "),n+=t);return n}("mS05_wtPati8LfYBYTGx",a,"small"===o&&"LUuMlpzD9HyupHyt98G3","large"===o&&"iVtkCNHNWdxuifShiMKh"),u?(0,s.createElement)("div",{className:a},(0,s.createElement)("div",{className:"IVZmEOtE_7uqQA_z7LDw"},(0,s.createElement)(p.Spinner,null))):(0,s.createElement)("div",{className:a},(0,s.createElement)("div",{className:"F2ZNrdlk8l4sx61TvagD"},(0,s.createElement)("figure",{className:"UPhsTTWKWZwbzXMghRps"},l.avatar&&(0,s.createElement)("img",{src:l.avatar,alt:l.displayName,style:{display:i?"block":"none"},onLoad:()=>d(!0),onError:()=>d(!1)})),(0,s.createElement)("div",{className:"zMF2PjNx4vXZ8jAMdrMm"},(0,s.createElement)("span",{className:"ADqq9wMPxBktKNS_YSlo"},l.displayName),(0,s.createElement)("span",{className:"BoWAC4fmJvi3BgVUzxXI"},"@",l.handle))),n&&(0,s.createElement)(p.Button,{icon:r?void 0:"no-alt",isDestructive:!0,variant:r?"secondary":void 0,onClick:n,label:r||(0,c.__)("Delete","autoblue")},r||null))},b=window.wp.date,w=window.wp.primitives;var v=a(848);const f=(0,v.jsx)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,v.jsx)(w.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),y=window.wp.element,S=()=>{const{shares:e,isSharingEnabled:t}=(()=>{var e;const[t,a]=(0,y.useState)(null),[n,r]=(0,y.useState)(0),o=(0,m.useSelect)((e=>{const{getCurrentPostAttribute:t,getCurrentPostId:a}=e(i.store),n=t("meta")||{};return{isSharingEnabled:n?.autoblue_enabled||!1,shares:n?.autoblue_shares||[],postId:a()}}),[]);(0,y.useEffect)((()=>{const{postId:e,shares:l}=o,s=l.length>0||t?.autoblue_shares?.length>0;if(!e||s||n>=60)return;const c=setInterval((async()=>{r((e=>e+1)),(await(async()=>{try{const t=await h()({path:`/wp/v2/posts/${e}`,method:"GET"});return!!t.meta&&(a(t.meta),t.meta.autoblue_shares?.length>0)}catch(e){return!1}})()||n>=59)&&clearInterval(c)}),1e3);return()=>clearInterval(c)}),[o,t?.autoblue_shares?.length,n]);const l=t?.autoblue_shares||o.shares;return{shares:l,hasShares:l.length>0,isSharingEnabled:null!==(e=t?.autoblue_enabled)&&void 0!==e?e:o.isSharingEnabled}})(),{postType:a}=(0,m.useSelect)((e=>{const{getCurrentPostType:t}=e("core/editor");return{postType:t()}}),[]);if("post"!==a)return null;const{formats:n}=(0,b.getSettings)();return t?e.length?(0,s.createElement)("div",null,e.map((e=>{return(0,s.createElement)("div",{key:e.uri,className:"pxGCoNPxvleLS9R54pDD"},(0,s.createElement)(p.__experimentalHStack,{alignment:"left",spacing:3},(0,s.createElement)(p.Icon,{icon:f,className:"Pji33XRLzc2gr99NtkMW"}),(0,s.createElement)(p.__experimentalVStack,{spacing:0},(0,s.createElement)(p.__experimentalText,null,(0,c.__)("Shared to Bluesky","autoblue")),(0,s.createElement)(p.Tooltip,{text:(0,b.dateI18n)(n?.datetime||"c",e.date)},(0,s.createElement)(p.__experimentalText,{variant:"muted"},(0,s.createElement)("time",{dateTime:(0,b.dateI18n)("c",e.date)},(0,b.humanTimeDiff)(e.date)))))),(0,s.createElement)(p.ExternalLink,{href:(t=e.uri,a=e.did,`https://bsky.app/profile/${a}/post/${t.split("/").pop()}`)},(0,c.__)("View on Bluesky","autoblue")));var t,a}))):(0,s.createElement)(p.__experimentalHStack,{alignment:"center"},(0,s.createElement)(p.Spinner,null)):(0,s.createElement)(p.__experimentalText,{variant:"muted"},(0,c.__)("Sharing was disabled for this post.","autoblue"))},x=()=>{const{editPost:e}=(0,m.useDispatch)("core/editor"),{postUrl:t}=(0,m.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{postUrl:t("meta")?.autoblue_post_url}}),[]);return(0,s.createElement)(p.__experimentalVStack,{spacing:4},(0,s.createElement)(S,null),(0,s.createElement)(p.TextControl,{label:(0,c.__)("Bluesky Post URL","autoblue"),value:t,onChange:t=>{e({meta:{autoblue_post_url:t}})},help:(0,c.__)("If you used Autoblue to share this post, replies from that URL will show up automatically. If you did not use Autoblue or want to show replies from a different URL, you can enter it here.","autoblue")}))},C="UbZP1LRbJlNmQJ5XIfZU",P=({onSelect:e})=>{const[t,a]=(0,y.useState)(""),[n,r]=(0,y.useState)(!1),[o,l]=(0,y.useState)([]),[u,i]=(0,y.useState)(!1);let d=null;const m=(0,y.useRef)(null),g=(0,y.useCallback)((async e=>{if(e.length>0){r(!0),m.current&&m.current.abort(),m.current=new AbortController;try{const t=await h()({path:`/autoblue/v1/search?q=${encodeURIComponent(e)}`,signal:m.current.signal});if(!t.actors)throw new Error("Unexpected response from the server");l(t.actors),i(!0)}catch(e){"AbortError"!==e.name&&(l([]),i(!0))}finally{!0!==m.current?.signal.aborted&&r(!1)}}else l([]),i(!1)}),[]);(0,y.useEffect)((()=>(d&&clearTimeout(d),d=setTimeout((()=>{g(t)}),300),()=>{clearTimeout(d),m.current&&m.current.abort()})),[t,g]);const _=n?(0,s.createElement)("div",{className:C},(0,s.createElement)(p.Spinner,null)):0===o.length&&t.length>0&&u?(0,s.createElement)("div",{className:C},(0,c.__)("No accounts found. Please try another search.","autoblue")):o.length>0?o.map((({did:t,handle:a,displayName:n,avatar:r})=>(0,s.createElement)(p.Button,{key:t,className:"WhjXMSYedjhE9iq9mGGQ",onClick:()=>e({did:t,meta:{handle:a,name:n,avatar:r}})},(0,s.createElement)(E,{account:{did:t,meta:{handle:a,name:n,avatar:r}},className:"aCyp1bdAS7uFpgfVTt4z"})))):null;return(0,s.createElement)("div",null,(0,s.createElement)(p.SearchControl,{__nextHasNoMarginBottom:!0,placeholder:(0,c.__)("Search for a Bluesky account","autoblue"),label:(0,c.__)("Bluesky Account","autoblue"),value:t,onChange:e=>a(e)}),_&&(0,s.createElement)("div",null,(0,s.createElement)(p.__experimentalVStack,{spacing:0,className:"BdtMtThHyPg6Ixs294VO"},_)))},A="SET_ACCOUNTS",N="ADD_ACCOUNT",k="DELETE_ACCOUNT",M="REFRESH_LOGS",T="CLEAR_LOGS",L="SET_LOGS_STATUS",B={items:[]},V={status:"idle"},D=(0,m.combineReducers)({accounts:function(e=B,t){switch(t.type){case A:return{...e,items:t.accounts};case N:return{...e,items:[...e.items,t.account]};case k:return{...e,items:e.items.filter((e=>e.did!==t.did))};default:return e}},logs:function(e=V,t){switch(t.type){case M:return{...e,items:t.logs,pagination:{...e.pagination,...t.pagination}};case T:return{...e,items:[],pagination:{...e.pagination,...t.pagination}};case L:return{...e,status:t.status};case"SET_LOGS_PAGE":return{...e,pagination:{...e.pagination,page:t.page}};default:return e}}});function O(e){return e.accounts.items}function Z(e){return e.logs.items}function H(e){return e.logs.status}function I(e){return e.logs.pagination.page}function R(e){return e.logs.pagination.totalPages}function z(e){return e.logs.pagination.totalItems}const F={...n,...r},U=window.wp.notices;function j(e){return{type:A,accounts:e}}function G(e){return{type:N,account:e}}function $(e){return{type:k,did:e}}function W(e,t){return async function({dispatch:a,registry:n}){const{createSuccessNotice:r,createErrorNotice:o}=n.dispatch(U.store);try{const n=await h()({path:"/autoblue/v1/connections",method:"POST",data:{did:e,app_password:t}});a(G(n));let{handle:o,name:l}=n.meta;o=o?`@${o}`:"";const s=`${l} ${o}`;r(
     1(()=>{"use strict";var e={20:(e,t,a)=>{var n=a(609),r=Symbol.for("react.element"),o=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,a){var n,c={},u=null,i=null;for(n in void 0!==a&&(u=""+a),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(i=t.ref),t)o.call(t,n)&&!s.hasOwnProperty(n)&&(c[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===c[n]&&(c[n]=t[n]);return{$$typeof:r,type:e,key:u,ref:i,props:c,_owner:l.current}}},848:(e,t,a)=>{e.exports=a(20)},609:e=>{e.exports=window.React}},t={};function a(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,a),o.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};a.r(n),a.d(n,{getAccounts:()=>Z});var r={};a.r(r),a.d(r,{getLogs:()=>H,getLogsCurrentPage:()=>R,getLogsStatus:()=>I,getLogsTotalItems:()=>F,getLogsTotalPages:()=>z});var o={};a.r(o),a.d(o,{addAccount:()=>q,addAccountToState:()=>$,deleteAccount:()=>X,deleteAccountFromState:()=>W,setAccounts:()=>G});var l={};a.r(l),a.d(l,{clearLogs:()=>J,refreshLogs:()=>Q});var s=a(609);const c=window.wp.plugins,u=window.wp.editor,i=window.wp.data,d=((0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 813 138"},(0,s.createElement)("path",{fill:"#000",d:"M243.084 107.24c-19.592 0-32.736-13.392-32.736-34.472 0-21.08 13.144-34.348 32.736-34.348 12.772 0 21.08 4.712 24.924 11.532h.868l.62-10.416h19.84V106H268.38V95.336h-.868c-4.092 7.316-13.516 11.904-24.428 11.904Zm6.448-15.872c11.78 0 18.724-7.564 18.724-17.112v-3.224c0-9.3-6.944-16.74-18.724-16.74-10.788 0-18.104 6.572-18.104 18.476 0 11.78 7.192 18.6 18.104 18.6ZM329.746 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972S355.29 83.68 355.29 72.52V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM415.443 106c-11.036 0-18.104-5.208-18.104-16.492V55.284h-12.4V39.536h12.4V22.672l20.584-3.968v20.832h16.492v15.748h-16.492v27.652c0 4.092 1.984 5.332 6.076 5.332h10.416V106h-18.972ZM479.63 107.24c-24.056 0-40.052-12.772-40.052-34.472 0-21.576 15.872-34.472 40.052-34.472 24.056 0 39.928 12.648 39.928 34.472 0 21.576-15.748 34.472-39.928 34.472Zm0-15.996c12.028 0 19.096-7.192 19.096-18.476 0-11.408-6.944-18.476-19.096-18.476-12.152 0-19.096 7.192-19.096 18.476 0 11.284 6.944 18.476 19.096 18.476ZM575.383 106.992c-12.648 0-20.956-4.588-24.924-11.532h-.868l-.62 10.54h-19.716V15.604h20.832V50.2h.744c4.216-7.44 13.764-11.904 24.552-11.904 19.592 0 32.612 13.392 32.612 34.348 0 21.08-13.02 34.348-32.612 34.348Zm-6.448-15.748c10.912 0 18.104-6.696 18.104-18.6 0-11.656-7.192-18.476-18.104-18.476-11.904 0-18.848 7.564-18.848 17.112v3.1c0 9.3 6.944 16.864 18.848 16.864ZM617.532 106V15.604h20.832V106h-20.832ZM678.86 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972s18.352-7.688 18.352-18.848V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM774.249 107.116c-24.304 0-39.928-12.648-39.928-33.976 0-21.824 15.872-34.844 39.68-34.844 25.296 0 39.928 14.508 38.316 38.936h-57.04c.248 9.92 7.564 15.872 19.468 15.872 8.804 0 15.996-3.348 17.732-8.308h19.716c-1.86 13.392-17.484 22.32-37.944 22.32Zm-.372-54.684c-10.416 0-17.36 4.836-18.848 13.268h36.58c-.744-8.184-6.944-13.268-17.732-13.268Z"}),(0,s.createElement)("path",{fill:"#5089FB",d:"M127.627 1.756c13.597.242 21.261 8.627 23.983 20.423 1.371 5.939 1.669 12.174 1.987 18.3.739 14.24 1.276 28.496 1.733 42.746.259 7.984.199 15.983.266 23.975.137 16.158-12.09 24.804-22.837 27.733a48.532 48.532 0 0 1-11.457 1.786c-22.625.555-45.256 1.174-67.885 1.189-12.069.009-24.058-1.913-35.864-4.475C8.49 131.468 1.507 123.037.424 113.285a80.385 80.385 0 0 1-.41-9.705C.131 92.452.47 81.326.516 70.198c.057-12.963-.07-25.927-.194-38.89-.033-3.555-.263-7.01 1.024-10.52 3.59-9.792 10.627-15.202 20.643-16.91C55.135-1.775 91-.095 127.627 1.757Z"}),(0,s.createElement)("path",{fill:"#DEEBFF",d:"M35.164 99.944C37.83 73.172 56.04 30 77.984 30c21.944 0 40.155 43.172 42.821 69.944 2.681 26.939-22.785-14.807-42.82-14.807-20.036 0-45.256 39.273-42.821 14.807Z"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 256 256"},(0,s.createElement)("path",{fill:"#5089FB",d:"M209.982 17.89c22.371.4 34.98 14.2 39.459 33.617 2.256 9.775 2.746 20.04 3.268 30.121 1.216 23.441 2.101 46.906 2.852 70.362.426 13.142.326 26.308.437 39.464.226 26.596-19.891 40.827-37.573 45.649a79.8 79.8 0 0 1-18.85 2.938c-37.225.914-74.458 1.933-111.69 1.959-19.856.015-39.582-3.15-59.006-7.366-14.91-3.235-26.4-17.113-28.181-33.165a132.365 132.365 0 0 1-.676-15.974c.196-18.317.75-36.63.83-54.947.092-21.337-.117-42.677-.32-64.014C.476 60.682.1 54.994 2.217 49.216 8.123 33.1 19.7 24.195 36.179 21.385c54.533-9.308 113.541-6.543 173.803-3.495Z"}),(0,s.createElement)("path",{fill:"#DEEBFF",d:"M57.854 179.51c4.387-44.067 34.348-115.13 70.451-115.13 36.104 0 66.065 71.063 70.452 115.13 4.411 44.342-37.488-24.373-70.451-24.373-32.964 0-74.458 64.644-70.452 24.373Z"}))),p=((0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"600",height:"530",version:"1.1",viewBox:"0 0 600 530"},(0,s.createElement)("path",{d:"m135.72 44.03c66.496 49.921 138.02 151.14 164.28 205.46 26.262-54.316 97.782-155.54 164.28-205.46 47.98-36.021 125.72-63.892 125.72 24.795 0 17.712-10.155 148.79-16.111 170.07-20.703 73.984-96.144 92.854-163.25 81.433 117.3 19.964 147.14 86.092 82.697 152.22-122.39 125.59-175.91-31.511-189.63-71.766-2.514-7.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937 0.51669-3.7077 7.8964-13.714 40.255-67.233 197.36-189.63 71.766-64.444-66.128-34.605-132.26 82.697-152.22-67.108 11.421-142.55-7.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07 0-88.687 77.742-60.816 125.72-24.795z",fill:"#1185fe"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,s.createElement)("path",{fillRule:"evenodd",d:"M6 12c0-3.328 2.64-6 5.866-6 2.164 0 4.063 1.201 5.08 3H15v1.5h4.5V6H18v1.848C16.683 5.834 14.431 4.5 11.866 4.5 7.783 4.5 4.5 7.872 4.5 12H6ZM18 12c0 3.328-2.64 6-5.865 6-2.165 0-4.064-1.201-5.081-3H9v-1.5H4.5V18H6v-1.848c1.317 2.014 3.569 3.348 6.135 3.348 4.082 0 7.365-3.372 7.365-7.5H18Z",clipRule:"evenodd"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)("path",{d:"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z"})),(0,s.createElement)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)("path",{d:"M13.13 13.38L13.48 6.92004H10.52L10.87 13.38H13.13ZM13.04 16.74C13.28 16.51 13.41 16.19 13.41 15.78C13.41 15.36 13.29 15.04 13.05 14.81C12.81 14.58 12.46 14.46 11.99 14.46C11.52 14.46 11.17 14.58 10.92 14.81C10.67 15.04 10.55 15.36 10.55 15.78C10.55 16.19 10.68 16.51 10.93 16.74C11.19 16.97 11.54 17.08 11.99 17.08C12.44 17.08 12.79 16.97 13.04 16.74Z"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,s.createElement)("path",{d:"M11 17h2v-6h-2v6Zm0-8h2V7h-2v2Z"})),window.wp.i18n),m=window.wp.components,h=window.wp.apiFetch;var g=a.n(h);function _(e){var t,a,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=_(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}const E=({account:{did:e,meta:t={}},className:a,onDelete:n=null,deleteLabel:r=null,size:o="medium"})=>{const{userData:l,isLoading:c}=((e,t)=>{const[a,n]=(0,s.useState)({handle:t.handle||"",displayName:t.name||"",avatar:t.avatar||""}),[r,o]=(0,s.useState)(!1),l=(0,s.useRef)(null);return(0,s.useEffect)((()=>((async()=>{if(!a.handle){l.current&&l.current.abort(),l.current=new AbortController;try{o(!0);const t=await g()({path:`/autoblue/v1/account?did=${e}`,signal:l.current.signal});n({handle:t.handle||a.handle,displayName:t.displayName||a.displayName,avatar:t.avatar||a.avatar})}catch(e){console.error("Error fetching user data:",e),"AbortError"!==e.name&&console.error("Error fetching user data:",e)}finally{o(!1)}}})(),()=>{l.current&&l.current.abort()})),[e,a]),{userData:a,isLoading:r}})(e,t),[u,i]=(0,s.useState)(!1);return a=function(){for(var e,t,a=0,n="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=_(e))&&(n&&(n+=" "),n+=t);return n}("mS05_wtPati8LfYBYTGx",a,"small"===o&&"LUuMlpzD9HyupHyt98G3","large"===o&&"iVtkCNHNWdxuifShiMKh"),c?(0,s.createElement)("div",{className:a},(0,s.createElement)("div",{className:"IVZmEOtE_7uqQA_z7LDw"},(0,s.createElement)(m.Spinner,null))):(0,s.createElement)("div",{className:a},(0,s.createElement)("div",{className:"F2ZNrdlk8l4sx61TvagD"},(0,s.createElement)("figure",{className:"UPhsTTWKWZwbzXMghRps"},l.avatar&&(0,s.createElement)("img",{src:l.avatar,alt:l.displayName,style:{display:u?"block":"none"},onLoad:()=>i(!0),onError:()=>i(!1)})),(0,s.createElement)("div",{className:"zMF2PjNx4vXZ8jAMdrMm"},(0,s.createElement)("span",{className:"ADqq9wMPxBktKNS_YSlo"},l.displayName),(0,s.createElement)("span",{className:"BoWAC4fmJvi3BgVUzxXI"},"@",l.handle))),n&&(0,s.createElement)(m.Button,{icon:r?void 0:"no-alt",isDestructive:!0,variant:r?"secondary":void 0,onClick:n,label:r||(0,p.__)("Delete","autoblue")},r||null))},b=window.wp.element,w=()=>{var e;const[t,a]=(0,b.useState)(null),[n,r]=(0,b.useState)(0),o=(0,i.useSelect)((e=>{const{getCurrentPostAttribute:t,getCurrentPostId:a}=e(u.store),n=t("meta")||{};return{isSharingEnabled:n?.autoblue_enabled||!1,shares:n?.autoblue_shares||[],postId:a()}}),[]);(0,b.useEffect)((()=>{const{postId:e,shares:l}=o,s=l.length>0||t?.autoblue_shares?.length>0;if(!e||s||n>=60)return;const c=setInterval((async()=>{r((e=>e+1)),(await(async()=>{try{const t=await g()({path:`/wp/v2/posts/${e}`,method:"GET"});return!!t.meta&&(a(t.meta),t.meta.autoblue_shares?.length>0)}catch(e){return!1}})()||n>=59)&&clearInterval(c)}),1e3);return()=>clearInterval(c)}),[o,t?.autoblue_shares?.length,n]);let l=t?.autoblue_shares||o.shares;return l=l.map((e=>{return{...e,url:(t=e.uri,a=e.did,`https://bsky.app/profile/${a}/post/${t.split("/").pop()}`)};var t,a})),{shares:l,hasShares:l.length>0,isSharingEnabled:null!==(e=t?.autoblue_enabled)&&void 0!==e?e:o.isSharingEnabled}},v=window.wp.date,f=window.wp.primitives;var y=a(848);const S=(0,y.jsx)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,y.jsx)(f.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),x=()=>{const{shares:e,isSharingEnabled:t}=w(),{formats:a}=(0,v.getSettings)();return t?e.length?(0,s.createElement)("div",null,e.map((e=>(0,s.createElement)("div",{key:e.uri,className:"pxGCoNPxvleLS9R54pDD"},(0,s.createElement)(m.__experimentalHStack,{alignment:"left",spacing:3},(0,s.createElement)(m.Icon,{icon:S,className:"Pji33XRLzc2gr99NtkMW"}),(0,s.createElement)(m.__experimentalVStack,{spacing:0},(0,s.createElement)(m.__experimentalText,null,(0,p.__)("Shared to Bluesky","autoblue")),(0,s.createElement)(m.Tooltip,{text:(0,v.dateI18n)(a?.datetime||"c",e.date)},(0,s.createElement)(m.__experimentalText,{variant:"muted"},(0,s.createElement)("time",{dateTime:(0,v.dateI18n)("c",e.date)},(0,v.humanTimeDiff)(e.date)))))),(0,s.createElement)(m.ExternalLink,{href:e.url},(0,p.__)("View on Bluesky","autoblue")))))):(0,s.createElement)(m.__experimentalHStack,{alignment:"center"},(0,s.createElement)(m.Spinner,null)):(0,s.createElement)(m.__experimentalText,{variant:"muted"},(0,p.__)("Sharing was disabled for this post.","autoblue"))},C=()=>{const{editPost:e}=(0,i.useDispatch)("core/editor"),{shares:t,isSharingEnabled:a}=w(),{postUrl:n}=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{postUrl:t("meta")?.autoblue_post_url}}),[]);return(0,s.createElement)(m.__experimentalVStack,{spacing:4},(0,s.createElement)(x,null),(!a||t.length>0)&&(0,s.createElement)(m.TextControl,{label:(0,p.__)("Bluesky Post URL","autoblue"),value:n,placeholder:t.length>0?t[0].url:"",onChange:t=>{e({meta:{autoblue_post_url:t}})},help:(0,p.__)("If you used Autoblue to share this post, replies from that URL will show up automatically. If you did not use Autoblue or want to show replies from a different URL, you can enter it here.","autoblue")}))},P="UbZP1LRbJlNmQJ5XIfZU",A=({onSelect:e})=>{const[t,a]=(0,b.useState)(""),[n,r]=(0,b.useState)(!1),[o,l]=(0,b.useState)([]),[c,u]=(0,b.useState)(!1);let i=null;const d=(0,b.useRef)(null),h=(0,b.useCallback)((async e=>{if(e.length>0){r(!0),d.current&&d.current.abort(),d.current=new AbortController;try{const t=await g()({path:`/autoblue/v1/search?q=${encodeURIComponent(e)}`,signal:d.current.signal});if(!t.actors)throw new Error("Unexpected response from the server");l(t.actors),u(!0)}catch(e){"AbortError"!==e.name&&(l([]),u(!0))}finally{!0!==d.current?.signal.aborted&&r(!1)}}else l([]),u(!1)}),[]);(0,b.useEffect)((()=>(i&&clearTimeout(i),i=setTimeout((()=>{h(t)}),300),()=>{clearTimeout(i),d.current&&d.current.abort()})),[t,h]);const _=n?(0,s.createElement)("div",{className:P},(0,s.createElement)(m.Spinner,null)):0===o.length&&t.length>0&&c?(0,s.createElement)("div",{className:P},(0,p.__)("No accounts found. Please try another search.","autoblue")):o.length>0?o.map((({did:t,handle:a,displayName:n,avatar:r})=>(0,s.createElement)(m.Button,{key:t,className:"WhjXMSYedjhE9iq9mGGQ",onClick:()=>e({did:t,meta:{handle:a,name:n,avatar:r}})},(0,s.createElement)(E,{account:{did:t,meta:{handle:a,name:n,avatar:r}},className:"aCyp1bdAS7uFpgfVTt4z"})))):null;return(0,s.createElement)("div",null,(0,s.createElement)(m.SearchControl,{__nextHasNoMarginBottom:!0,placeholder:(0,p.__)("Search for a Bluesky account","autoblue"),label:(0,p.__)("Bluesky Account","autoblue"),value:t,onChange:e=>a(e)}),_&&(0,s.createElement)("div",null,(0,s.createElement)(m.__experimentalVStack,{spacing:0,className:"BdtMtThHyPg6Ixs294VO"},_)))},N="SET_ACCOUNTS",k="ADD_ACCOUNT",M="DELETE_ACCOUNT",T="REFRESH_LOGS",L="CLEAR_LOGS",B="SET_LOGS_STATUS",V={items:[]},D={status:"idle"},O=(0,i.combineReducers)({accounts:function(e=V,t){switch(t.type){case N:return{...e,items:t.accounts};case k:return{...e,items:[...e.items,t.account]};case M:return{...e,items:e.items.filter((e=>e.did!==t.did))};default:return e}},logs:function(e=D,t){switch(t.type){case T:return{...e,items:t.logs,pagination:{...e.pagination,...t.pagination}};case L:return{...e,items:[],pagination:{...e.pagination,...t.pagination}};case B:return{...e,status:t.status};case"SET_LOGS_PAGE":return{...e,pagination:{...e.pagination,page:t.page}};default:return e}}});function Z(e){return e.accounts.items}function H(e){return e.logs.items}function I(e){return e.logs.status}function R(e){return e.logs.pagination.page}function z(e){return e.logs.pagination.totalPages}function F(e){return e.logs.pagination.totalItems}const U={...n,...r},j=window.wp.notices;function G(e){return{type:N,accounts:e}}function $(e){return{type:k,account:e}}function W(e){return{type:M,did:e}}function q(e,t){return async function({dispatch:a,registry:n}){const{createSuccessNotice:r,createErrorNotice:o}=n.dispatch(j.store);try{const n=await g()({path:"/autoblue/v1/connections",method:"POST",data:{did:e,app_password:t}});a($(n));let{handle:o,name:l}=n.meta;o=o?`@${o}`:"";const s=`${l} ${o}`;r(
    22// translators: %s is the account name and handle
    33// translators: %s is the account name and handle
    4 (0,c.sprintf)((0,c.__)('Account "%s" connected',"autoblue"),s),{id:"autoblue/account/added",type:"snackbar"})}catch(e){throw o((0,c.__)("Failed to connect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}function q(e){return async function({dispatch:t,registry:a}){const{createSuccessNotice:n,createErrorNotice:r}=a.dispatch(U.store);try{const a=await h()({path:"/autoblue/v1/connections",method:"DELETE",data:{did:e}});return t($(e)),n((0,c.__)("Account disconnected","autoblue"),{id:"autoblue/account/deleted",type:"snackbar"}),a}catch(e){throw r((0,c.__)("Failed to disconnect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}const X=window.wp.url,Y=({page:e=1,perPage:t=10}={})=>async({select:a,dispatch:n,registry:r})=>{const{createSuccessNotice:o,createErrorNotice:l,removeNotice:s}=r.dispatch(U.store);try{const r=a.getLogsCurrentPage(),l=e===r;n({type:L,status:l?"refreshing":"loading"});const u=(0,X.addQueryArgs)("/autoblue/v1/logs",{page:e,per_page:t}),i=await h()({path:u,method:"GET",parse:!0}),{data:d,pagination:p}=i;if(n({type:M,logs:d,pagination:{page:p.page,perPage:p.per_page,totalItems:p.total_items,totalPages:p.total_pages}}),n({type:L,status:"success"}),l){const e=await o((0,c.__)("Logs refreshed.","autoblue"),{type:"snackbar"});setTimeout((()=>{n({type:L,status:"idle"}),s(e.notice.id)}),2e3)}return d}catch(e){throw l((0,c.__)("Failed to refresh logs.","autoblue"),{id:"autoblue/logs/refresh-error",type:"snackbar"}),e}},Q=()=>async({dispatch:e,registry:t})=>{const{createSuccessNotice:a,createErrorNotice:n,removeNotice:r}=t.dispatch(U.store);try{e({type:L,status:"clearing"});const t=await h()({path:"/autoblue/v1/logs",method:"DELETE"});if(t){e({type:T,pagination:{page:1,perPage:10,totalItems:0,totalPages:0}}),e({type:L,status:"success"});const t=await a((0,c.__)("Logs cleared.","autoblue"),{type:"snackbar"});setTimeout((()=>{e({type:L,status:"idle"}),r(t.notice.id)}),2e3)}return t}catch(t){throw e({type:L,status:"error"}),n((0,c.__)("Failed to clear logs.","autoblue"),{id:"autoblue/logs/clear-error",type:"snackbar"}),t}},J={...o,...l},K="autoblue",ee={reducer:D,selectors:F,actions:J,resolvers:{},initialState:autoblue.initialState};let te;try{te=(0,m.select)(K)}catch(e){}if(!te){const e=(0,m.createReduxStore)(K,ee);(0,m.register)(e)}const ae=()=>{const{accounts:e,isLoading:t,error:a}=(0,m.useSelect)((e=>({accounts:e(K).getAccounts()})),[]),{addAccount:n,deleteAccount:r}=(0,m.useDispatch)(K);return{accounts:e,hasAccounts:e.length>0,addAccount:n,deleteAccount:r}},ne=(0,v.jsx)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,v.jsx)(w.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"})}),re=({isOpen:e,onClose:t,selectedAccount:a,onSelectAccount:n,appPassword:r,onAppPasswordChange:o,onAddAccount:l,status:u,errorMessage:i})=>e?(0,s.createElement)(p.Modal,{title:(0,c.__)("Connect Bluesky account","autoblue"),onRequestClose:t,focusOnMount:"firstContentElement",size:"medium"},(0,s.createElement)(p.__experimentalVStack,{spacing:4},a?(0,s.createElement)(E,{account:a,onDelete:()=>n(null)}):(0,s.createElement)(P,{onSelect:n}),(0,s.createElement)(p.TextControl,{__nextHasNoMarginBottom:!0,label:(0,c.__)("App Password","autoblue"),help:(0,y.createInterpolateElement)((0,c.__)("You can create a new app password in your <a>Bluesky account settings</a>.","autoblue"),{a:(0,s.createElement)("a",{href:"https://bsky.app/settings/app-passwords",target:"_blank",rel:"noreferrer"})}),value:r,onChange:o}),(0,s.createElement)(p.__experimentalHStack,{alignment:"left"},(0,s.createElement)(p.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:l,disabled:"loading"===u},(0,c.__)("Connect Account","autoblue")),"loading"===u&&(0,s.createElement)(p.Spinner,null)),"loading"!==u&&i&&(0,s.createElement)(p.__experimentalHStack,{alignment:"left",className:"DP0h4FLv2L4zkkvcUIDh"},(0,s.createElement)(p.Icon,{icon:ne}),(0,s.createElement)("p",null,i)))):null,oe=()=>{const{accounts:e}=ae(),{renderModal:t,openModal:a}=((e=!1)=>{const[t,a]=(0,y.useState)(e),[n,r]=(0,y.useState)(null),[o,l]=(0,y.useState)(""),[u,i]=(0,y.useState)("idle"),[d,p]=(0,y.useState)(""),{addAccount:m}=ae(),g=()=>{a(!1),r(null),l("")},h=e=>{l(e)},_=async()=>{if(n)if(o){i("loading");try{await m(n.did,o),i("success"),p(""),g()}catch(e){i("error"),p((0,c.__)("Something went wrong. Make sure the app password is correct.","autoblue"))}}else p((0,c.__)("Please enter an app password.","autoblue"));else p((0,c.__)("Please pick an account to add.","autoblue"))};return{renderModal:()=>(0,s.createElement)(re,{isOpen:t,onClose:g,selectedAccount:n,onSelectAccount:r,appPassword:o,onAppPasswordChange:h,onAddAccount:_,status:u,errorMessage:d}),isOpen:t,openModal:()=>a(!0),closeModal:g}})(),{editPost:n}=(0,m.useDispatch)("core/editor"),{postType:r,postStatus:o,isEnabled:l,customMessage:u}=(0,m.useSelect)((e=>{const{getCurrentPostType:t,getEditedPostAttribute:a}=e("core/editor");return{postType:t(),postStatus:a("status"),isEnabled:a("meta")?.autoblue_enabled,customMessage:a("meta")?.autoblue_custom_message}}),[]);return"post"!==r?null:"publish"===o?(0,s.createElement)(x,null):e.length?(0,s.createElement)(p.__experimentalVStack,{spacing:3},(0,s.createElement)(p.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,c.__)("Share to Bluesky","autoblue"),checked:l,onChange:e=>{n({meta:{autoblue_enabled:e}})}}),l&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,c.__)("Message","autoblue"),help:(0,c.__)("Add an optional message to the Bluesky post.","autoblue"),value:u,maxLength:250,onChange:e=>{n({meta:{autoblue_custom_message:e}})}}),(0,s.createElement)(p.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,c.__)("Sharing to:","autoblue"),id:"autoblue-account"},e.map((e=>(0,s.createElement)(E,{key:e.did,account:e,className:"RtWJ7rQhnShEvixSHzh5",size:"small"})))))):(0,s.createElement)(p.__experimentalVStack,null,(0,s.createElement)(p.Button,{variant:"secondary",onClick:()=>a()},(0,c.__)("Connect a Bluesky account","autoblue")),t())};(0,u.registerPlugin)("autoblue-share-panel",{render:()=>(0,s.createElement)(i.PluginDocumentSettingPanel,{name:"autoblue-share-panel",title:"Autoblue",icon:d},(0,s.createElement)(oe,null))}),(0,u.registerPlugin)("autoblue-prepublish-share-panel",{render:()=>(0,s.createElement)(i.PluginPrePublishPanel,{title:"Autoblue",initialOpen:!0,icon:d},(0,s.createElement)(oe,null))}),(0,u.registerPlugin)("autoblue-postpublish-share-panel",{render:()=>(0,s.createElement)(i.PluginPostPublishPanel,{title:"Autoblue",initialOpen:!0,icon:d},(0,s.createElement)(x,null))})})();
     4(0,p.sprintf)((0,p.__)('Account "%s" connected',"autoblue"),s),{id:"autoblue/account/added",type:"snackbar"})}catch(e){throw o((0,p.__)("Failed to connect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}function X(e){return async function({dispatch:t,registry:a}){const{createSuccessNotice:n,createErrorNotice:r}=a.dispatch(j.store);try{const a=await g()({path:"/autoblue/v1/connections",method:"DELETE",data:{did:e}});return t(W(e)),n((0,p.__)("Account disconnected","autoblue"),{id:"autoblue/account/deleted",type:"snackbar"}),a}catch(e){throw r((0,p.__)("Failed to disconnect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}const Y=window.wp.url,Q=({page:e=1,perPage:t=10}={})=>async({select:a,dispatch:n,registry:r})=>{const{createSuccessNotice:o,createErrorNotice:l,removeNotice:s}=r.dispatch(j.store);try{const r=a.getLogsCurrentPage(),l=e===r;n({type:B,status:l?"refreshing":"loading"});const c=(0,Y.addQueryArgs)("/autoblue/v1/logs",{page:e,per_page:t}),u=await g()({path:c,method:"GET",parse:!0}),{data:i,pagination:d}=u;if(n({type:T,logs:i,pagination:{page:d.page,perPage:d.per_page,totalItems:d.total_items,totalPages:d.total_pages}}),n({type:B,status:"success"}),l){const e=await o((0,p.__)("Logs refreshed.","autoblue"),{type:"snackbar"});setTimeout((()=>{n({type:B,status:"idle"}),s(e.notice.id)}),2e3)}return i}catch(e){throw l((0,p.__)("Failed to refresh logs.","autoblue"),{id:"autoblue/logs/refresh-error",type:"snackbar"}),e}},J=()=>async({dispatch:e,registry:t})=>{const{createSuccessNotice:a,createErrorNotice:n,removeNotice:r}=t.dispatch(j.store);try{e({type:B,status:"clearing"});const t=await g()({path:"/autoblue/v1/logs",method:"DELETE"});if(t){e({type:L,pagination:{page:1,perPage:10,totalItems:0,totalPages:0}}),e({type:B,status:"success"});const t=await a((0,p.__)("Logs cleared.","autoblue"),{type:"snackbar"});setTimeout((()=>{e({type:B,status:"idle"}),r(t.notice.id)}),2e3)}return t}catch(t){throw e({type:B,status:"error"}),n((0,p.__)("Failed to clear logs.","autoblue"),{id:"autoblue/logs/clear-error",type:"snackbar"}),t}},K={...o,...l},ee="autoblue",te={reducer:O,selectors:U,actions:K,resolvers:{},initialState:autoblue.initialState};let ae;try{ae=(0,i.select)(ee)}catch(e){}if(!ae){const e=(0,i.createReduxStore)(ee,te);(0,i.register)(e)}const ne=()=>{const{accounts:e,isLoading:t,error:a}=(0,i.useSelect)((e=>({accounts:e(ee).getAccounts()})),[]),{addAccount:n,deleteAccount:r}=(0,i.useDispatch)(ee);return{accounts:e,hasAccounts:e.length>0,addAccount:n,deleteAccount:r}},re=(0,y.jsx)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,y.jsx)(f.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"})}),oe=({isOpen:e,onClose:t,selectedAccount:a,onSelectAccount:n,appPassword:r,onAppPasswordChange:o,onAddAccount:l,status:c,errorMessage:u})=>e?(0,s.createElement)(m.Modal,{title:(0,p.__)("Connect Bluesky account","autoblue"),onRequestClose:t,focusOnMount:"firstContentElement",size:"medium"},(0,s.createElement)(m.__experimentalVStack,{spacing:4},a?(0,s.createElement)(E,{account:a,onDelete:()=>n(null)}):(0,s.createElement)(A,{onSelect:n}),(0,s.createElement)(m.TextControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("App Password","autoblue"),help:(0,b.createInterpolateElement)((0,p.__)("You can create a new app password in your <a>Bluesky account settings</a>.","autoblue"),{a:(0,s.createElement)("a",{href:"https://bsky.app/settings/app-passwords",target:"_blank",rel:"noreferrer"})}),value:r,onChange:o}),(0,s.createElement)(m.__experimentalHStack,{alignment:"left"},(0,s.createElement)(m.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:l,disabled:"loading"===c},(0,p.__)("Connect Account","autoblue")),"loading"===c&&(0,s.createElement)(m.Spinner,null)),"loading"!==c&&u&&(0,s.createElement)(m.__experimentalHStack,{alignment:"left",className:"DP0h4FLv2L4zkkvcUIDh"},(0,s.createElement)(m.Icon,{icon:re}),(0,s.createElement)("p",null,u)))):null,le=()=>{const{accounts:e}=ne(),{renderModal:t,openModal:a}=((e=!1)=>{const[t,a]=(0,b.useState)(e),[n,r]=(0,b.useState)(null),[o,l]=(0,b.useState)(""),[c,u]=(0,b.useState)("idle"),[i,d]=(0,b.useState)(""),{addAccount:m}=ne(),h=()=>{a(!1),r(null),l("")},g=e=>{l(e)},_=async()=>{if(n)if(o){u("loading");try{await m(n.did,o),u("success"),d(""),h()}catch(e){u("error"),d((0,p.__)("Something went wrong. Make sure the app password is correct.","autoblue"))}}else d((0,p.__)("Please enter an app password.","autoblue"));else d((0,p.__)("Please pick an account to add.","autoblue"))};return{renderModal:()=>(0,s.createElement)(oe,{isOpen:t,onClose:h,selectedAccount:n,onSelectAccount:r,appPassword:o,onAppPasswordChange:g,onAddAccount:_,status:c,errorMessage:i}),isOpen:t,openModal:()=>a(!0),closeModal:h}})(),{editPost:n}=(0,i.useDispatch)("core/editor"),{postStatus:r,isEnabled:o,customMessage:l}=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{postStatus:t("status"),isEnabled:t("meta")?.autoblue_enabled,customMessage:t("meta")?.autoblue_custom_message}}),[]);return"publish"===r?(0,s.createElement)(C,null):e.length?(0,s.createElement)(m.__experimentalVStack,{spacing:3},(0,s.createElement)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("Share to Bluesky","autoblue"),checked:o,onChange:e=>{n({meta:{autoblue_enabled:e}})}}),o&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("Message","autoblue"),help:(0,p.__)("Add an optional message to the Bluesky post.","autoblue"),value:l,maxLength:250,onChange:e=>{n({meta:{autoblue_custom_message:e}})}}),(0,s.createElement)(m.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("Sharing to:","autoblue"),id:"autoblue-account"},e.map((e=>(0,s.createElement)(E,{key:e.did,account:e,className:"RtWJ7rQhnShEvixSHzh5",size:"small"})))))):(0,s.createElement)(m.__experimentalVStack,null,(0,s.createElement)(m.Button,{variant:"secondary",onClick:()=>a()},(0,p.__)("Connect a Bluesky account","autoblue")),t())},se=["post"],ce=()=>{const e=(0,i.select)("core/editor").getCurrentPostType();return se.includes(e)};(0,c.registerPlugin)("autoblue-share-panel",{render:()=>ce()?(0,s.createElement)(u.PluginDocumentSettingPanel,{name:"autoblue-share-panel",title:"Autoblue",icon:d},(0,s.createElement)(le,null)):null}),(0,c.registerPlugin)("autoblue-prepublish-share-panel",{render:()=>ce()?(0,s.createElement)(u.PluginPrePublishPanel,{title:"Autoblue",initialOpen:!0,icon:d},(0,s.createElement)(le,null)):null}),(0,c.registerPlugin)("autoblue-postpublish-share-panel",{render:()=>ce()?(0,s.createElement)(u.PluginPostPublishPanel,{title:"Autoblue",initialOpen:!0,icon:d},(0,s.createElement)(C,null)):null})})();
  • autoblue/tags/0.0.6/includes/Bluesky.php

    r3270523 r3276419  
    144144        $message = apply_filters( 'autoblue/share_message', $message, $post_id );
    145145
    146         $message = html_entity_decode( wp_strip_all_tags( $message ) );
     146        $message = html_entity_decode( wp_strip_all_tags( $message ), ENT_QUOTES );
    147147        $message = ( new Utils\Text() )->trim_text( $message, 300 );
    148148
     
    159159                    'external' => [
    160160                        'uri'         => get_permalink( $post->ID ),
    161                         'title'       => html_entity_decode( get_the_title( $post->ID ), ENT_QUOTES, 'UTF-8' ),
    162                         'description' => $excerpt,
     161                        'title'       => html_entity_decode( get_the_title( $post->ID ), ENT_QUOTES ),
     162                        'description' => html_entity_decode( wp_strip_all_tags( $excerpt ), ENT_QUOTES ),
    163163                    ],
    164164                ],
  • autoblue/tags/0.0.6/includes/Meta.php

    r3223262 r3276419  
    5858                                'uri'      => [
    5959                                    'type'     => 'string',
    60                                     'format'   => 'uri',
    6160                                    'required' => true,
    62                                 ],
    63                                 'at_uri'   => [
    64                                     'type'   => 'string',
    65                                     'format' => 'uri',
    6661                                ],
    6762                                'response' => [
  • autoblue/tags/0.0.6/includes/Utils/Text.php

    r3270523 r3276419  
    2424        }
    2525
    26         $last_space = strrpos( $trimmed_string, ' ' );
     26        $last_space = grapheme_strrpos( $trimmed_string, ' ' );
    2727
    2828        if ( $last_space !== false ) {
  • autoblue/tags/0.0.6/readme.txt

    r3270523 r3276419  
    22Contributors: danielpost
    33Tags: social, bluesky, auto, share, post
    4 Stable tag: 0.0.5
     4Stable tag: 0.0.6
    55Requires at least: 6.6
    66Tested up to: 6.7
     
    4747== Changelog ==
    4848
     49= 0.0.6 =
     50* Improvement: Autoblue settings page is now more mobile-friendly.
     51* Fix: Link to the Bluesky post after sharing works again.
     52* Fix: Excerpts now render correctly in the Bluesky post.
     53
    4954= 0.0.5 =
    5055* Feature: Add filter for setting a custom share message
  • autoblue/tags/0.0.6/vendor/composer/installed.php

    r3270523 r3276419  
    22    'root' => array(
    33        'name' => 'posty/autoblue',
    4         'pretty_version' => 'v0.0.5',
    5         'version' => '0.0.5.0',
    6         'reference' => 'e777fe95e9c1caa7da4a76a4b09a863896f9d54b',
     4        'pretty_version' => 'v0.0.6',
     5        'version' => '0.0.6.0',
     6        'reference' => '06a849712982c8d95813f990356a98e6be2d45eb',
    77        'type' => 'project',
    88        'install_path' => __DIR__ . '/../../',
     
    2121        ),
    2222        'posty/autoblue' => array(
    23             'pretty_version' => 'v0.0.5',
    24             'version' => '0.0.5.0',
    25             'reference' => 'e777fe95e9c1caa7da4a76a4b09a863896f9d54b',
     23            'pretty_version' => 'v0.0.6',
     24            'version' => '0.0.6.0',
     25            'reference' => '06a849712982c8d95813f990356a98e6be2d45eb',
    2626            'type' => 'project',
    2727            'install_path' => __DIR__ . '/../../',
  • autoblue/trunk/autoblue.php

    r3270523 r3276419  
    88 * License: GPLv2 or later
    99 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    10  * Version: 0.0.5
     10 * Version: 0.0.6
    1111 * Text Domain: autoblue
    1212 * Requires at least: 6.6
     
    2121require_once __DIR__ . '/vendor/autoload.php';
    2222
    23 define( 'AUTOBLUE_VERSION', '0.0.5' );
     23define( 'AUTOBLUE_VERSION', '0.0.6' );
    2424define( 'AUTOBLUE_SLUG', 'autoblue' );
    2525define( 'AUTOBLUE_BASENAME', plugin_basename( __FILE__ ) );
  • autoblue/trunk/build/admin-rtl.css

    r3211894 r3276419  
    1 .IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-right-radius:7px;border-top-left-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-right-radius:7px;border-bottom-left-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:right}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
     1.IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;gap:var(--gap-size);justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-right-radius:7px;border-top-left-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-right-radius:7px;border-bottom-left-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:right}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
    22.BdtMtThHyPg6Ixs294VO{border:1px solid #0000001a;border-radius:0 0 4px 4px;padding:4px 0}.UbZP1LRbJlNmQJ5XIfZU{display:flex;justify-content:center;padding:16px 0;width:100%}.WhjXMSYedjhE9iq9mGGQ{height:auto;padding:0;position:relative}.WhjXMSYedjhE9iq9mGGQ:focus-within{z-index:1}.aCyp1bdAS7uFpgfVTt4z{box-shadow:none;padding-bottom:5px;padding-top:5px}.WhjXMSYedjhE9iq9mGGQ:focus-within .aCyp1bdAS7uFpgfVTt4z,.WhjXMSYedjhE9iq9mGGQ:hover .aCyp1bdAS7uFpgfVTt4z{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}
    33.DP0h4FLv2L4zkkvcUIDh{background-color:#fef8ee;border-right:4px solid #f0b849;border-radius:4px;padding:10px}.DP0h4FLv2L4zkkvcUIDh p{margin:0}.DP0h4FLv2L4zkkvcUIDh svg{fill:#f0b849}
    44.QAtJyZwNum9Ab2obTC6K{padding:32px 16px!important}
    5 .noXm26AqZWQcZrKeIA1X .components-toggle-control__label{font-size:16px;font-weight:600}.noXm26AqZWQcZrKeIA1X .components-form-toggle{height:24px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__track{border-radius:12px;height:24px;width:50px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb{height:20px;width:20px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb:after{--mask:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z\"/></svg>");background-color:#1e1e1e;content:"";height:12px;right:-2px;-webkit-mask:var(--mask);mask:var(--mask);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:0;position:absolute;top:-2px;transition:opacity .2s ease,background-color .2s ease;width:12px}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb{transform:translateX(-26px)}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb:after{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));right:4px;opacity:1;top:4px}.noXm26AqZWQcZrKeIA1X .components-base-control__field>div:has(label){gap:16px}.noXm26AqZWQcZrKeIA1X .components-toggle-control__help{font-size:14px;margin-inline-start:66px}
    6 .meck1gRysSgwbPlTNoRp.meck1gRysSgwbPlTNoRp{padding:20px}
    7 .i0z7ZyN4Jro1uclPsSxA{padding:0 16px}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA{padding:0}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA>*{width:100%}.uuIa4zgLTbvjhWgp6ell{align-items:end;display:flex}.neP6M8HbdPhq0lQEAgyx{padding:32px;text-align:center}
     5.noXm26AqZWQcZrKeIA1X .components-toggle-control__label{font-size:16px;font-weight:600}@media screen and (max-width:500px){.noXm26AqZWQcZrKeIA1X .components-toggle-control__label{font-size:14px}}.noXm26AqZWQcZrKeIA1X .components-form-toggle{height:24px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__track{border-radius:12px;height:24px;width:50px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb{height:20px;width:20px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb:after{--mask:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z\"/></svg>");background-color:#1e1e1e;content:"";height:12px;right:-2px;-webkit-mask:var(--mask);mask:var(--mask);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:0;position:absolute;top:-2px;transition:opacity .2s ease,background-color .2s ease;width:12px}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb{transform:translateX(-26px)}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb:after{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));right:4px;opacity:1;top:4px}.noXm26AqZWQcZrKeIA1X .components-base-control__field>div:has(label){gap:16px}.noXm26AqZWQcZrKeIA1X .components-toggle-control__help{font-size:14px;margin-inline-start:66px}@media screen and (max-width:500px){.noXm26AqZWQcZrKeIA1X .components-toggle-control__help{font-size:13px}}
     6.meck1gRysSgwbPlTNoRp.meck1gRysSgwbPlTNoRp{padding:20px}@media screen and (max-width:500px){.meck1gRysSgwbPlTNoRp.meck1gRysSgwbPlTNoRp{padding:10px}}
     7.i0z7ZyN4Jro1uclPsSxA{display:flex;flex-wrap:wrap;justify-content:space-between}@media screen and (min-width:783px){.i0z7ZyN4Jro1uclPsSxA{padding:0 16px}}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA{padding:0}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA>*{width:100%}.uuIa4zgLTbvjhWgp6ell{align-items:end;display:flex}.neP6M8HbdPhq0lQEAgyx{padding:32px;text-align:center}
    88.cYBHXdayJ9hEt7ETXvHb{align-items:center;display:flex;font-size:12px;font-weight:700;gap:8px;text-transform:uppercase}.cYBHXdayJ9hEt7ETXvHb.e74HX1TJsY4mcF4KJRM3{--container-color:#3858e91a;--icon-color:#3858e9}.cYBHXdayJ9hEt7ETXvHb.iY5nmbaUM8NAU9Mkx4QI{--container-color:#0000000d;--icon-color:#0006}.cYBHXdayJ9hEt7ETXvHb.iY5nmbaUM8NAU9Mkx4QI svg{width:20px}.cYBHXdayJ9hEt7ETXvHb.U6hWwqaFD6ksNFzzBUsL{--container-color:#ffa9001a;--icon-color:#ffa900}.cYBHXdayJ9hEt7ETXvHb.lArm_d0OIb3tZey48j80{--container-color:#dc35451a;--icon-color:#dc3545}.cYBHXdayJ9hEt7ETXvHb.WX97I60r7oh7U_aGYHKV{--icon-color:#4ab866;--container-color:#4ab8661a}.cYBHXdayJ9hEt7ETXvHb.WX97I60r7oh7U_aGYHKV svg{width:14px}.J912WhKEiSxdZ1QVkUsD{align-items:center;background-color:var(--container-color);border-radius:50%;display:flex;height:24px;justify-content:center;width:24px}.J912WhKEiSxdZ1QVkUsD.CUIWekfURbh2zp3Nwqh5{border-radius:9999px;gap:4px;height:auto;padding:2px 8px;width:auto}.ECn5fPQP9eCW2GaO4wbw{fill:var(--icon-color)}
    9 .m0ishQkFGe8cW6U71f_E{border-collapse:collapse;text-align:right}.m0ishQkFGe8cW6U71f_E thead{background-color:#f0f0f180;padding:10px}.m0ishQkFGe8cW6U71f_E tr{border-bottom:1px solid #f0f0f0}.m0ishQkFGe8cW6U71f_E tbody tr:nth-child(2n){background-color:#f0f0f14d}.m0ishQkFGe8cW6U71f_E th{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}.m0ishQkFGe8cW6U71f_E td,.m0ishQkFGe8cW6U71f_E th{padding:12px 16px}.m0ishQkFGe8cW6U71f_E td:nth-child(4),.m0ishQkFGe8cW6U71f_E th:nth-child(4){text-align:left}.components-modal__content .m0ishQkFGe8cW6U71f_E td,.components-modal__content .m0ishQkFGe8cW6U71f_E th{vertical-align:top}
    10 .EWnbmq_38OJPlOh82E6w .components-modal__header{border-bottom:1px solid #f0f0f0}.EWnbmq_38OJPlOh82E6w .components-modal__content{max-width:800px;padding:0}.EWnbmq_38OJPlOh82E6w pre{white-space:pre-wrap;word-wrap:break-word;line-height:1.2;margin:0;overflow-wrap:break-word;word-break:break-word}
    11 @keyframes wZn5VxzBe2oH9bcXgw_D{to{transform:rotate(-1turn)}}.D3K9yFKhGochBoN9ciy0 svg{animation:wZn5VxzBe2oH9bcXgw_D .6s linear infinite}.giKoThf94yCr7M7ywIlF{display:inline-block;position:relative}.giKoThf94yCr7M7ywIlF .components-popover__content{min-width:250px;padding:16px}.E66oSeXaGdPMfAadmteF{margin-bottom:16px}
    12 .KzPwbHigWAmJrseQaoKw{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}
     9.dIaCy9uCnGvvhj_lqTQV{overflow-x:auto}.m0ishQkFGe8cW6U71f_E{border-collapse:collapse;text-align:right}.m0ishQkFGe8cW6U71f_E thead{background-color:#f0f0f180;padding:10px}.m0ishQkFGe8cW6U71f_E tr{border-bottom:1px solid #f0f0f0}.m0ishQkFGe8cW6U71f_E tbody tr:nth-child(2n){background-color:#f0f0f14d}.m0ishQkFGe8cW6U71f_E th{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}.m0ishQkFGe8cW6U71f_E td,.m0ishQkFGe8cW6U71f_E th{padding:12px 16px}.m0ishQkFGe8cW6U71f_E td:nth-child(4),.m0ishQkFGe8cW6U71f_E th:nth-child(4){text-align:left}.components-modal__content .m0ishQkFGe8cW6U71f_E td,.components-modal__content .m0ishQkFGe8cW6U71f_E th{vertical-align:top}
     10.EWnbmq_38OJPlOh82E6w .components-modal__header{border-bottom:1px solid #f0f0f0}.EWnbmq_38OJPlOh82E6w .components-modal__content{max-width:800px;padding:0}.EWnbmq_38OJPlOh82E6w pre{white-space:pre-wrap;word-wrap:break-word;line-height:1.2;margin:0;overflow-wrap:break-word;word-break:break-word}@media screen and (max-width:782px){.lpxIIelZJxgj5eCsjg0w tr{display:flex;flex-direction:column}}
     11@keyframes wZn5VxzBe2oH9bcXgw_D{to{transform:rotate(-1turn)}}.nzlAX7WNL7AHp9AeScd5{display:flex}.D3K9yFKhGochBoN9ciy0 svg{animation:wZn5VxzBe2oH9bcXgw_D .6s linear infinite}.giKoThf94yCr7M7ywIlF{display:inline-block;position:relative}.giKoThf94yCr7M7ywIlF .components-popover__content{min-width:250px;padding:16px}.E66oSeXaGdPMfAadmteF{margin-bottom:16px}
     12.KzPwbHigWAmJrseQaoKw{align-items:center;color:#1e1e1e;display:flex;font-size:11px;font-weight:500;text-transform:uppercase}.Zh2l7MhZK5xrRuAKKIA2{margin-right:10px}
    1313.K5BgxlncedJq_t7SNRMe{white-space:nowrap}
    14 .n7yM0P6DXfO7e1UgtFGQ{bottom:40px;position:fixed}.xzkNAh1yXHy3oWVtzkee{align-items:center;background-color:#fff;display:flex;gap:15px;margin-right:-20px;padding:20px 20px 0}@media screen and (max-width:782px){.xzkNAh1yXHy3oWVtzkee{margin-right:-10px;padding:20px 10px 0}}.xzkNAh1yXHy3oWVtzkee svg{height:28px;width:auto}.YhcowEQjGHG5jSc72vs4{background-color:#e1f0ff;border-radius:4px;color:#000;font-weight:700;padding:4px 8px}.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{align-items:center;background-color:#fff;box-shadow:0 1px 0 0 #0000001a;display:flex;justify-content:center;margin-bottom:20px;margin-right:-20px;padding:0}@media screen and (max-width:782px){.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{margin-right:-10px}}.skc1SozmvgQ52e9uA3Fc{padding-left:20px}.skc1SozmvgQ52e9uA3Fc *{box-sizing:border-box}@media screen and (max-width:782px){.skc1SozmvgQ52e9uA3Fc{padding-left:10px}}.H4mlAM8GJQgJbzRXdyVp{margin:0 auto}.H4mlAM8GJQgJbzRXdyVp.qUYVGzB3MCAFehNkod5e{max-width:600px}.H4mlAM8GJQgJbzRXdyVp.himvr6mnCghPWNGvRc1Z{max-width:900px}
     14.n7yM0P6DXfO7e1UgtFGQ{bottom:20px;padding-left:20px;position:fixed}@media screen and (max-width:782px){.n7yM0P6DXfO7e1UgtFGQ{bottom:10px}}.xzkNAh1yXHy3oWVtzkee{align-items:center;background-color:#fff;display:flex;gap:15px;margin-right:-20px;padding:20px 20px 0}.xzkNAh1yXHy3oWVtzkee svg{height:28px;width:auto}@media screen and (max-width:782px){.xzkNAh1yXHy3oWVtzkee{margin-right:-10px;padding:20px 16px 0}.xzkNAh1yXHy3oWVtzkee svg{height:24px}}.YhcowEQjGHG5jSc72vs4{background-color:#e1f0ff;border-radius:4px;color:#000;font-weight:700;padding:4px 8px}.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{align-items:center;background-color:#fff;box-shadow:0 1px 0 0 #0000001a;display:flex;justify-content:center;margin-bottom:20px;margin-right:-20px;padding:0}@media screen and (max-width:782px){.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{justify-content:left;margin-right:-10px}}.skc1SozmvgQ52e9uA3Fc{padding-left:20px}.skc1SozmvgQ52e9uA3Fc *{box-sizing:border-box}@media screen and (max-width:782px){.skc1SozmvgQ52e9uA3Fc{padding-left:10px}}.H4mlAM8GJQgJbzRXdyVp{margin:0 auto}.H4mlAM8GJQgJbzRXdyVp.qUYVGzB3MCAFehNkod5e{max-width:600px}.H4mlAM8GJQgJbzRXdyVp.himvr6mnCghPWNGvRc1Z{max-width:900px}
  • autoblue/trunk/build/admin.asset.php

    r3211894 r3276419  
    1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '3ee52cf00b1d17ff3dbd');
     1<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '4ddb3401b92738828dca');
  • autoblue/trunk/build/admin.css

    r3211894 r3276419  
    1 .IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-left-radius:7px;border-top-right-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-left-radius:7px;border-bottom-right-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:left}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
     1.IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;gap:var(--gap-size);justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-left-radius:7px;border-top-right-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-left-radius:7px;border-bottom-right-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:left}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
    22.BdtMtThHyPg6Ixs294VO{border:1px solid #0000001a;border-radius:0 0 4px 4px;padding:4px 0}.UbZP1LRbJlNmQJ5XIfZU{display:flex;justify-content:center;padding:16px 0;width:100%}.WhjXMSYedjhE9iq9mGGQ{height:auto;padding:0;position:relative}.WhjXMSYedjhE9iq9mGGQ:focus-within{z-index:1}.aCyp1bdAS7uFpgfVTt4z{box-shadow:none;padding-bottom:5px;padding-top:5px}.WhjXMSYedjhE9iq9mGGQ:focus-within .aCyp1bdAS7uFpgfVTt4z,.WhjXMSYedjhE9iq9mGGQ:hover .aCyp1bdAS7uFpgfVTt4z{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}
    33.DP0h4FLv2L4zkkvcUIDh{background-color:#fef8ee;border-left:4px solid #f0b849;border-radius:4px;padding:10px}.DP0h4FLv2L4zkkvcUIDh p{margin:0}.DP0h4FLv2L4zkkvcUIDh svg{fill:#f0b849}
    44.QAtJyZwNum9Ab2obTC6K{padding:32px 16px!important}
    5 .noXm26AqZWQcZrKeIA1X .components-toggle-control__label{font-size:16px;font-weight:600}.noXm26AqZWQcZrKeIA1X .components-form-toggle{height:24px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__track{border-radius:12px;height:24px;width:50px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb{height:20px;width:20px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb:after{--mask:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z\"/></svg>");background-color:#1e1e1e;content:"";height:12px;left:-2px;-webkit-mask:var(--mask);mask:var(--mask);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:0;position:absolute;top:-2px;transition:opacity .2s ease,background-color .2s ease;width:12px}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb{transform:translateX(26px)}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb:after{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));left:4px;opacity:1;top:4px}.noXm26AqZWQcZrKeIA1X .components-base-control__field>div:has(label){gap:16px}.noXm26AqZWQcZrKeIA1X .components-toggle-control__help{font-size:14px;margin-inline-start:66px}
    6 .meck1gRysSgwbPlTNoRp.meck1gRysSgwbPlTNoRp{padding:20px}
    7 .i0z7ZyN4Jro1uclPsSxA{padding:0 16px}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA{padding:0}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA>*{width:100%}.uuIa4zgLTbvjhWgp6ell{align-items:end;display:flex}.neP6M8HbdPhq0lQEAgyx{padding:32px;text-align:center}
     5.noXm26AqZWQcZrKeIA1X .components-toggle-control__label{font-size:16px;font-weight:600}@media screen and (max-width:500px){.noXm26AqZWQcZrKeIA1X .components-toggle-control__label{font-size:14px}}.noXm26AqZWQcZrKeIA1X .components-form-toggle{height:24px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__track{border-radius:12px;height:24px;width:50px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb{height:20px;width:20px}.noXm26AqZWQcZrKeIA1X .components-form-toggle .components-form-toggle__thumb:after{--mask:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z\"/></svg>");background-color:#1e1e1e;content:"";height:12px;left:-2px;-webkit-mask:var(--mask);mask:var(--mask);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:0;position:absolute;top:-2px;transition:opacity .2s ease,background-color .2s ease;width:12px}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb{transform:translateX(26px)}.noXm26AqZWQcZrKeIA1X .components-form-toggle.is-checked .components-form-toggle__thumb:after{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));left:4px;opacity:1;top:4px}.noXm26AqZWQcZrKeIA1X .components-base-control__field>div:has(label){gap:16px}.noXm26AqZWQcZrKeIA1X .components-toggle-control__help{font-size:14px;margin-inline-start:66px}@media screen and (max-width:500px){.noXm26AqZWQcZrKeIA1X .components-toggle-control__help{font-size:13px}}
     6.meck1gRysSgwbPlTNoRp.meck1gRysSgwbPlTNoRp{padding:20px}@media screen and (max-width:500px){.meck1gRysSgwbPlTNoRp.meck1gRysSgwbPlTNoRp{padding:10px}}
     7.i0z7ZyN4Jro1uclPsSxA{display:flex;flex-wrap:wrap;justify-content:space-between}@media screen and (min-width:783px){.i0z7ZyN4Jro1uclPsSxA{padding:0 16px}}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA{padding:0}.RppDBVCrYWAJGIMmkYiA.RppDBVCrYWAJGIMmkYiA>*{width:100%}.uuIa4zgLTbvjhWgp6ell{align-items:end;display:flex}.neP6M8HbdPhq0lQEAgyx{padding:32px;text-align:center}
    88.cYBHXdayJ9hEt7ETXvHb{align-items:center;display:flex;font-size:12px;font-weight:700;gap:8px;text-transform:uppercase}.cYBHXdayJ9hEt7ETXvHb.e74HX1TJsY4mcF4KJRM3{--container-color:#3858e91a;--icon-color:#3858e9}.cYBHXdayJ9hEt7ETXvHb.iY5nmbaUM8NAU9Mkx4QI{--container-color:#0000000d;--icon-color:#0006}.cYBHXdayJ9hEt7ETXvHb.iY5nmbaUM8NAU9Mkx4QI svg{width:20px}.cYBHXdayJ9hEt7ETXvHb.U6hWwqaFD6ksNFzzBUsL{--container-color:#ffa9001a;--icon-color:#ffa900}.cYBHXdayJ9hEt7ETXvHb.lArm_d0OIb3tZey48j80{--container-color:#dc35451a;--icon-color:#dc3545}.cYBHXdayJ9hEt7ETXvHb.WX97I60r7oh7U_aGYHKV{--icon-color:#4ab866;--container-color:#4ab8661a}.cYBHXdayJ9hEt7ETXvHb.WX97I60r7oh7U_aGYHKV svg{width:14px}.J912WhKEiSxdZ1QVkUsD{align-items:center;background-color:var(--container-color);border-radius:50%;display:flex;height:24px;justify-content:center;width:24px}.J912WhKEiSxdZ1QVkUsD.CUIWekfURbh2zp3Nwqh5{border-radius:9999px;gap:4px;height:auto;padding:2px 8px;width:auto}.ECn5fPQP9eCW2GaO4wbw{fill:var(--icon-color)}
    9 .m0ishQkFGe8cW6U71f_E{border-collapse:collapse;text-align:left}.m0ishQkFGe8cW6U71f_E thead{background-color:#f0f0f180;padding:10px}.m0ishQkFGe8cW6U71f_E tr{border-bottom:1px solid #f0f0f0}.m0ishQkFGe8cW6U71f_E tbody tr:nth-child(2n){background-color:#f0f0f14d}.m0ishQkFGe8cW6U71f_E th{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}.m0ishQkFGe8cW6U71f_E td,.m0ishQkFGe8cW6U71f_E th{padding:12px 16px}.m0ishQkFGe8cW6U71f_E td:nth-child(4),.m0ishQkFGe8cW6U71f_E th:nth-child(4){text-align:right}.components-modal__content .m0ishQkFGe8cW6U71f_E td,.components-modal__content .m0ishQkFGe8cW6U71f_E th{vertical-align:top}
    10 .EWnbmq_38OJPlOh82E6w .components-modal__header{border-bottom:1px solid #f0f0f0}.EWnbmq_38OJPlOh82E6w .components-modal__content{max-width:800px;padding:0}.EWnbmq_38OJPlOh82E6w pre{white-space:pre-wrap;word-wrap:break-word;line-height:1.2;margin:0;overflow-wrap:break-word;word-break:break-word}
    11 @keyframes wZn5VxzBe2oH9bcXgw_D{to{transform:rotate(1turn)}}.D3K9yFKhGochBoN9ciy0 svg{animation:wZn5VxzBe2oH9bcXgw_D .6s linear infinite}.giKoThf94yCr7M7ywIlF{display:inline-block;position:relative}.giKoThf94yCr7M7ywIlF .components-popover__content{min-width:250px;padding:16px}.E66oSeXaGdPMfAadmteF{margin-bottom:16px}
    12 .KzPwbHigWAmJrseQaoKw{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}
     9.dIaCy9uCnGvvhj_lqTQV{overflow-x:auto}.m0ishQkFGe8cW6U71f_E{border-collapse:collapse;text-align:left}.m0ishQkFGe8cW6U71f_E thead{background-color:#f0f0f180;padding:10px}.m0ishQkFGe8cW6U71f_E tr{border-bottom:1px solid #f0f0f0}.m0ishQkFGe8cW6U71f_E tbody tr:nth-child(2n){background-color:#f0f0f14d}.m0ishQkFGe8cW6U71f_E th{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}.m0ishQkFGe8cW6U71f_E td,.m0ishQkFGe8cW6U71f_E th{padding:12px 16px}.m0ishQkFGe8cW6U71f_E td:nth-child(4),.m0ishQkFGe8cW6U71f_E th:nth-child(4){text-align:right}.components-modal__content .m0ishQkFGe8cW6U71f_E td,.components-modal__content .m0ishQkFGe8cW6U71f_E th{vertical-align:top}
     10.EWnbmq_38OJPlOh82E6w .components-modal__header{border-bottom:1px solid #f0f0f0}.EWnbmq_38OJPlOh82E6w .components-modal__content{max-width:800px;padding:0}.EWnbmq_38OJPlOh82E6w pre{white-space:pre-wrap;word-wrap:break-word;line-height:1.2;margin:0;overflow-wrap:break-word;word-break:break-word}@media screen and (max-width:782px){.lpxIIelZJxgj5eCsjg0w tr{display:flex;flex-direction:column}}
     11@keyframes wZn5VxzBe2oH9bcXgw_D{to{transform:rotate(1turn)}}.nzlAX7WNL7AHp9AeScd5{display:flex}.D3K9yFKhGochBoN9ciy0 svg{animation:wZn5VxzBe2oH9bcXgw_D .6s linear infinite}.giKoThf94yCr7M7ywIlF{display:inline-block;position:relative}.giKoThf94yCr7M7ywIlF .components-popover__content{min-width:250px;padding:16px}.E66oSeXaGdPMfAadmteF{margin-bottom:16px}
     12.KzPwbHigWAmJrseQaoKw{align-items:center;color:#1e1e1e;display:flex;font-size:11px;font-weight:500;text-transform:uppercase}.Zh2l7MhZK5xrRuAKKIA2{margin-left:10px}
    1313.K5BgxlncedJq_t7SNRMe{white-space:nowrap}
    14 .n7yM0P6DXfO7e1UgtFGQ{bottom:40px;position:fixed}.xzkNAh1yXHy3oWVtzkee{align-items:center;background-color:#fff;display:flex;gap:15px;margin-left:-20px;padding:20px 20px 0}@media screen and (max-width:782px){.xzkNAh1yXHy3oWVtzkee{margin-left:-10px;padding:20px 10px 0}}.xzkNAh1yXHy3oWVtzkee svg{height:28px;width:auto}.YhcowEQjGHG5jSc72vs4{background-color:#e1f0ff;border-radius:4px;color:#000;font-weight:700;padding:4px 8px}.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{align-items:center;background-color:#fff;box-shadow:0 1px 0 0 #0000001a;display:flex;justify-content:center;margin-bottom:20px;margin-left:-20px;padding:0}@media screen and (max-width:782px){.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{margin-left:-10px}}.skc1SozmvgQ52e9uA3Fc{padding-right:20px}.skc1SozmvgQ52e9uA3Fc *{box-sizing:border-box}@media screen and (max-width:782px){.skc1SozmvgQ52e9uA3Fc{padding-right:10px}}.H4mlAM8GJQgJbzRXdyVp{margin:0 auto}.H4mlAM8GJQgJbzRXdyVp.qUYVGzB3MCAFehNkod5e{max-width:600px}.H4mlAM8GJQgJbzRXdyVp.himvr6mnCghPWNGvRc1Z{max-width:900px}
     14.n7yM0P6DXfO7e1UgtFGQ{bottom:20px;padding-right:20px;position:fixed}@media screen and (max-width:782px){.n7yM0P6DXfO7e1UgtFGQ{bottom:10px}}.xzkNAh1yXHy3oWVtzkee{align-items:center;background-color:#fff;display:flex;gap:15px;margin-left:-20px;padding:20px 20px 0}.xzkNAh1yXHy3oWVtzkee svg{height:28px;width:auto}@media screen and (max-width:782px){.xzkNAh1yXHy3oWVtzkee{margin-left:-10px;padding:20px 16px 0}.xzkNAh1yXHy3oWVtzkee svg{height:24px}}.YhcowEQjGHG5jSc72vs4{background-color:#e1f0ff;border-radius:4px;color:#000;font-weight:700;padding:4px 8px}.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{align-items:center;background-color:#fff;box-shadow:0 1px 0 0 #0000001a;display:flex;justify-content:center;margin-bottom:20px;margin-left:-20px;padding:0}@media screen and (max-width:782px){.AcUQmgxMrKkXWKN_HshA .components-tab-panel__tabs{justify-content:left;margin-left:-10px}}.skc1SozmvgQ52e9uA3Fc{padding-right:20px}.skc1SozmvgQ52e9uA3Fc *{box-sizing:border-box}@media screen and (max-width:782px){.skc1SozmvgQ52e9uA3Fc{padding-right:10px}}.H4mlAM8GJQgJbzRXdyVp{margin:0 auto}.H4mlAM8GJQgJbzRXdyVp.qUYVGzB3MCAFehNkod5e{max-width:600px}.H4mlAM8GJQgJbzRXdyVp.himvr6mnCghPWNGvRc1Z{max-width:900px}
  • autoblue/trunk/build/admin.js

    r3211894 r3276419  
    1 (()=>{"use strict";var e={338:(e,t,a)=>{var n=a(795);t.H=n.createRoot,n.hydrateRoot},20:(e,t,a)=>{var n=a(609),l=Symbol.for("react.element"),o=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),r=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,a){var n,s={},i=null,u=null;for(n in void 0!==a&&(i=""+a),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,n)&&!c.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===s[n]&&(s[n]=t[n]);return{$$typeof:l,type:e,key:i,ref:u,props:s,_owner:r.current}}t.jsx=s,t.jsxs=s},848:(e,t,a)=>{e.exports=a(20)},609:e=>{e.exports=window.React},795:e=>{e.exports=window.ReactDOM}},t={};function a(n){var l=t[n];if(void 0!==l)return l.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,a),o.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};a.r(n),a.d(n,{getAccounts:()=>H});var l={};a.r(l),a.d(l,{getLogs:()=>Z,getLogsCurrentPage:()=>O,getLogsStatus:()=>z,getLogsTotalItems:()=>F,getLogsTotalPages:()=>I});var o={};a.r(o),a.d(o,{addAccount:()=>Q,addAccountToState:()=>U,deleteAccount:()=>X,deleteAccountFromState:()=>W,setAccounts:()=>G});var r={};a.r(r),a.d(r,{clearLogs:()=>K,refreshLogs:()=>J});var c=a(609),s=a(338);const i=window.wp.domReady;var u=a.n(i);function m(e){var t,a,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(a=m(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}const d=function(){for(var e,t,a=0,n="",l=arguments.length;a<l;a++)(e=arguments[a])&&(t=m(e))&&(n&&(n+=" "),n+=t);return n},g=window.wp.i18n,p=window.wp.components,h=window.wp.element,_=window.wp.data,E=window.wp.notices,b=(0,c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 813 138"},(0,c.createElement)("path",{fill:"#000",d:"M243.084 107.24c-19.592 0-32.736-13.392-32.736-34.472 0-21.08 13.144-34.348 32.736-34.348 12.772 0 21.08 4.712 24.924 11.532h.868l.62-10.416h19.84V106H268.38V95.336h-.868c-4.092 7.316-13.516 11.904-24.428 11.904Zm6.448-15.872c11.78 0 18.724-7.564 18.724-17.112v-3.224c0-9.3-6.944-16.74-18.724-16.74-10.788 0-18.104 6.572-18.104 18.476 0 11.78 7.192 18.6 18.104 18.6ZM329.746 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972S355.29 83.68 355.29 72.52V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM415.443 106c-11.036 0-18.104-5.208-18.104-16.492V55.284h-12.4V39.536h12.4V22.672l20.584-3.968v20.832h16.492v15.748h-16.492v27.652c0 4.092 1.984 5.332 6.076 5.332h10.416V106h-18.972ZM479.63 107.24c-24.056 0-40.052-12.772-40.052-34.472 0-21.576 15.872-34.472 40.052-34.472 24.056 0 39.928 12.648 39.928 34.472 0 21.576-15.748 34.472-39.928 34.472Zm0-15.996c12.028 0 19.096-7.192 19.096-18.476 0-11.408-6.944-18.476-19.096-18.476-12.152 0-19.096 7.192-19.096 18.476 0 11.284 6.944 18.476 19.096 18.476ZM575.383 106.992c-12.648 0-20.956-4.588-24.924-11.532h-.868l-.62 10.54h-19.716V15.604h20.832V50.2h.744c4.216-7.44 13.764-11.904 24.552-11.904 19.592 0 32.612 13.392 32.612 34.348 0 21.08-13.02 34.348-32.612 34.348Zm-6.448-15.748c10.912 0 18.104-6.696 18.104-18.6 0-11.656-7.192-18.476-18.104-18.476-11.904 0-18.848 7.564-18.848 17.112v3.1c0 9.3 6.944 16.864 18.848 16.864ZM617.532 106V15.604h20.832V106h-20.832ZM678.86 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972s18.352-7.688 18.352-18.848V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM774.249 107.116c-24.304 0-39.928-12.648-39.928-33.976 0-21.824 15.872-34.844 39.68-34.844 25.296 0 39.928 14.508 38.316 38.936h-57.04c.248 9.92 7.564 15.872 19.468 15.872 8.804 0 15.996-3.348 17.732-8.308h19.716c-1.86 13.392-17.484 22.32-37.944 22.32Zm-.372-54.684c-10.416 0-17.36 4.836-18.848 13.268h36.58c-.744-8.184-6.944-13.268-17.732-13.268Z"}),(0,c.createElement)("path",{fill:"#5089FB",d:"M127.627 1.756c13.597.242 21.261 8.627 23.983 20.423 1.371 5.939 1.669 12.174 1.987 18.3.739 14.24 1.276 28.496 1.733 42.746.259 7.984.199 15.983.266 23.975.137 16.158-12.09 24.804-22.837 27.733a48.532 48.532 0 0 1-11.457 1.786c-22.625.555-45.256 1.174-67.885 1.189-12.069.009-24.058-1.913-35.864-4.475C8.49 131.468 1.507 123.037.424 113.285a80.385 80.385 0 0 1-.41-9.705C.131 92.452.47 81.326.516 70.198c.057-12.963-.07-25.927-.194-38.89-.033-3.555-.263-7.01 1.024-10.52 3.59-9.792 10.627-15.202 20.643-16.91C55.135-1.775 91-.095 127.627 1.757Z"}),(0,c.createElement)("path",{fill:"#DEEBFF",d:"M35.164 99.944C37.83 73.172 56.04 30 77.984 30c21.944 0 40.155 43.172 42.821 69.944 2.681 26.939-22.785-14.807-42.82-14.807-20.036 0-45.256 39.273-42.821 14.807Z"})),w=((0,c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 256 256"},(0,c.createElement)("path",{fill:"#5089FB",d:"M209.982 17.89c22.371.4 34.98 14.2 39.459 33.617 2.256 9.775 2.746 20.04 3.268 30.121 1.216 23.441 2.101 46.906 2.852 70.362.426 13.142.326 26.308.437 39.464.226 26.596-19.891 40.827-37.573 45.649a79.8 79.8 0 0 1-18.85 2.938c-37.225.914-74.458 1.933-111.69 1.959-19.856.015-39.582-3.15-59.006-7.366-14.91-3.235-26.4-17.113-28.181-33.165a132.365 132.365 0 0 1-.676-15.974c.196-18.317.75-36.63.83-54.947.092-21.337-.117-42.677-.32-64.014C.476 60.682.1 54.994 2.217 49.216 8.123 33.1 19.7 24.195 36.179 21.385c54.533-9.308 113.541-6.543 173.803-3.495Z"}),(0,c.createElement)("path",{fill:"#DEEBFF",d:"M57.854 179.51c4.387-44.067 34.348-115.13 70.451-115.13 36.104 0 66.065 71.063 70.452 115.13 4.411 44.342-37.488-24.373-70.451-24.373-32.964 0-74.458 64.644-70.452 24.373Z"})),(0,c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"600",height:"530",version:"1.1",viewBox:"0 0 600 530"},(0,c.createElement)("path",{d:"m135.72 44.03c66.496 49.921 138.02 151.14 164.28 205.46 26.262-54.316 97.782-155.54 164.28-205.46 47.98-36.021 125.72-63.892 125.72 24.795 0 17.712-10.155 148.79-16.111 170.07-20.703 73.984-96.144 92.854-163.25 81.433 117.3 19.964 147.14 86.092 82.697 152.22-122.39 125.59-175.91-31.511-189.63-71.766-2.514-7.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937 0.51669-3.7077 7.8964-13.714 40.255-67.233 197.36-189.63 71.766-64.444-66.128-34.605-132.26 82.697-152.22-67.108 11.421-142.55-7.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07 0-88.687 77.742-60.816 125.72-24.795z",fill:"#1185fe"})),(0,c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,c.createElement)("path",{fillRule:"evenodd",d:"M6 12c0-3.328 2.64-6 5.866-6 2.164 0 4.063 1.201 5.08 3H15v1.5h4.5V6H18v1.848C16.683 5.834 14.431 4.5 11.866 4.5 7.783 4.5 4.5 7.872 4.5 12H6ZM18 12c0 3.328-2.64 6-5.865 6-2.165 0-4.064-1.201-5.081-3H9v-1.5H4.5V18H6v-1.848c1.317 2.014 3.569 3.348 6.135 3.348 4.082 0 7.365-3.372 7.365-7.5H18Z",clipRule:"evenodd"}))),v=(0,c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)("path",{d:"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z"})),f=(0,c.createElement)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)("path",{d:"M13.13 13.38L13.48 6.92004H10.52L10.87 13.38H13.13ZM13.04 16.74C13.28 16.51 13.41 16.19 13.41 15.78C13.41 15.36 13.29 15.04 13.05 14.81C12.81 14.58 12.46 14.46 11.99 14.46C11.52 14.46 11.17 14.58 10.92 14.81C10.67 15.04 10.55 15.36 10.55 15.78C10.55 16.19 10.68 16.51 10.93 16.74C11.19 16.97 11.54 17.08 11.99 17.08C12.44 17.08 12.79 16.97 13.04 16.74Z"})),y=(0,c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,c.createElement)("path",{d:"M11 17h2v-6h-2v6Zm0-8h2V7h-2v2Z"})),x=window.wp.apiFetch;var S=a.n(x);const C=({account:{did:e,meta:t={}},className:a,onDelete:n=null,deleteLabel:l=null,size:o="medium"})=>{const{userData:r,isLoading:s}=((e,t)=>{const[a,n]=(0,c.useState)({handle:t.handle||"",displayName:t.name||"",avatar:t.avatar||""}),[l,o]=(0,c.useState)(!1),r=(0,c.useRef)(null);return(0,c.useEffect)((()=>((async()=>{if(!a.handle){r.current&&r.current.abort(),r.current=new AbortController;try{o(!0);const t=await S()({path:`/autoblue/v1/account?did=${e}`,signal:r.current.signal});n({handle:t.handle||a.handle,displayName:t.displayName||a.displayName,avatar:t.avatar||a.avatar})}catch(e){console.error("Error fetching user data:",e),"AbortError"!==e.name&&console.error("Error fetching user data:",e)}finally{o(!1)}}})(),()=>{r.current&&r.current.abort()})),[e,a]),{userData:a,isLoading:l}})(e,t),[i,u]=(0,c.useState)(!1);return a=d("mS05_wtPati8LfYBYTGx",a,"small"===o&&"LUuMlpzD9HyupHyt98G3","large"===o&&"iVtkCNHNWdxuifShiMKh"),s?(0,c.createElement)("div",{className:a},(0,c.createElement)("div",{className:"IVZmEOtE_7uqQA_z7LDw"},(0,c.createElement)(p.Spinner,null))):(0,c.createElement)("div",{className:a},(0,c.createElement)("div",{className:"F2ZNrdlk8l4sx61TvagD"},(0,c.createElement)("figure",{className:"UPhsTTWKWZwbzXMghRps"},r.avatar&&(0,c.createElement)("img",{src:r.avatar,alt:r.displayName,style:{display:i?"block":"none"},onLoad:()=>u(!0),onError:()=>u(!1)})),(0,c.createElement)("div",{className:"zMF2PjNx4vXZ8jAMdrMm"},(0,c.createElement)("span",{className:"ADqq9wMPxBktKNS_YSlo"},r.displayName),(0,c.createElement)("span",{className:"BoWAC4fmJvi3BgVUzxXI"},"@",r.handle))),n&&(0,c.createElement)(p.Button,{icon:l?void 0:"no-alt",isDestructive:!0,variant:l?"secondary":void 0,onClick:n,label:l||(0,g.__)("Delete","autoblue")},l||null))},N="UbZP1LRbJlNmQJ5XIfZU",k=({onSelect:e})=>{const[t,a]=(0,h.useState)(""),[n,l]=(0,h.useState)(!1),[o,r]=(0,h.useState)([]),[s,i]=(0,h.useState)(!1);let u=null;const m=(0,h.useRef)(null),d=(0,h.useCallback)((async e=>{if(e.length>0){l(!0),m.current&&m.current.abort(),m.current=new AbortController;try{const t=await S()({path:`/autoblue/v1/search?q=${encodeURIComponent(e)}`,signal:m.current.signal});if(!t.actors)throw new Error("Unexpected response from the server");r(t.actors),i(!0)}catch(e){"AbortError"!==e.name&&(r([]),i(!0))}finally{!0!==m.current?.signal.aborted&&l(!1)}}else r([]),i(!1)}),[]);(0,h.useEffect)((()=>(u&&clearTimeout(u),u=setTimeout((()=>{d(t)}),300),()=>{clearTimeout(u),m.current&&m.current.abort()})),[t,d]);const _=n?(0,c.createElement)("div",{className:N},(0,c.createElement)(p.Spinner,null)):0===o.length&&t.length>0&&s?(0,c.createElement)("div",{className:N},(0,g.__)("No accounts found. Please try another search.","autoblue")):o.length>0?o.map((({did:t,handle:a,displayName:n,avatar:l})=>(0,c.createElement)(p.Button,{key:t,className:"WhjXMSYedjhE9iq9mGGQ",onClick:()=>e({did:t,meta:{handle:a,name:n,avatar:l}})},(0,c.createElement)(C,{account:{did:t,meta:{handle:a,name:n,avatar:l}},className:"aCyp1bdAS7uFpgfVTt4z"})))):null;return(0,c.createElement)("div",null,(0,c.createElement)(p.SearchControl,{__nextHasNoMarginBottom:!0,placeholder:(0,g.__)("Search for a Bluesky account","autoblue"),label:(0,g.__)("Bluesky Account","autoblue"),value:t,onChange:e=>a(e)}),_&&(0,c.createElement)("div",null,(0,c.createElement)(p.__experimentalVStack,{spacing:0,className:"BdtMtThHyPg6Ixs294VO"},_)))},A="SET_ACCOUNTS",M="ADD_ACCOUNT",P="DELETE_ACCOUNT",L="REFRESH_LOGS",B="CLEAR_LOGS",T="SET_LOGS_STATUS",V={items:[]},D={status:"idle"},R=(0,_.combineReducers)({accounts:function(e=V,t){switch(t.type){case A:return{...e,items:t.accounts};case M:return{...e,items:[...e.items,t.account]};case P:return{...e,items:e.items.filter((e=>e.did!==t.did))};default:return e}},logs:function(e=D,t){switch(t.type){case L:return{...e,items:t.logs,pagination:{...e.pagination,...t.pagination}};case B:return{...e,items:[],pagination:{...e.pagination,...t.pagination}};case T:return{...e,status:t.status};case"SET_LOGS_PAGE":return{...e,pagination:{...e.pagination,page:t.page}};default:return e}}});function H(e){return e.accounts.items}function Z(e){return e.logs.items}function z(e){return e.logs.status}function O(e){return e.logs.pagination.page}function I(e){return e.logs.pagination.totalPages}function F(e){return e.logs.pagination.totalItems}const j={...n,...l};function G(e){return{type:A,accounts:e}}function U(e){return{type:M,account:e}}function W(e){return{type:P,did:e}}function Q(e,t){return async function({dispatch:a,registry:n}){const{createSuccessNotice:l,createErrorNotice:o}=n.dispatch(E.store);try{const n=await S()({path:"/autoblue/v1/connections",method:"POST",data:{did:e,app_password:t}});a(U(n));let{handle:o,name:r}=n.meta;o=o?`@${o}`:"";const c=`${r} ${o}`;l(
     1(()=>{"use strict";var e={338:(e,t,a)=>{var n=a(795);t.H=n.createRoot,n.hydrateRoot},20:(e,t,a)=>{var n=a(609),l=Symbol.for("react.element"),r=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,a){var n,c={},i=null,u=null;for(n in void 0!==a&&(i=""+a),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(u=t.ref),t)r.call(t,n)&&!s.hasOwnProperty(n)&&(c[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===c[n]&&(c[n]=t[n]);return{$$typeof:l,type:e,key:i,ref:u,props:c,_owner:o.current}}t.jsx=c,t.jsxs=c},848:(e,t,a)=>{e.exports=a(20)},609:e=>{e.exports=window.React},795:e=>{e.exports=window.ReactDOM}},t={};function a(n){var l=t[n];if(void 0!==l)return l.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,a),r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};a.r(n),a.d(n,{getAccounts:()=>Z});var l={};a.r(l),a.d(l,{getLogs:()=>z,getLogsCurrentPage:()=>I,getLogsStatus:()=>H,getLogsTotalItems:()=>j,getLogsTotalPages:()=>O});var r={};a.r(r),a.d(r,{addAccount:()=>K,addAccountToState:()=>U,deleteAccount:()=>Q,deleteAccountFromState:()=>W,setAccounts:()=>G});var o={};a.r(o),a.d(o,{clearLogs:()=>J,refreshLogs:()=>q});var s=a(609),c=a(338);const i=window.wp.domReady;var u=a.n(i);function m(e){var t,a,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(a=m(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}const d=function(){for(var e,t,a=0,n="",l=arguments.length;a<l;a++)(e=arguments[a])&&(t=m(e))&&(n&&(n+=" "),n+=t);return n},g=window.wp.i18n,p=window.wp.components,h=window.wp.element,_=window.wp.data,E=window.wp.notices,b=(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 813 138"},(0,s.createElement)("path",{fill:"#000",d:"M243.084 107.24c-19.592 0-32.736-13.392-32.736-34.472 0-21.08 13.144-34.348 32.736-34.348 12.772 0 21.08 4.712 24.924 11.532h.868l.62-10.416h19.84V106H268.38V95.336h-.868c-4.092 7.316-13.516 11.904-24.428 11.904Zm6.448-15.872c11.78 0 18.724-7.564 18.724-17.112v-3.224c0-9.3-6.944-16.74-18.724-16.74-10.788 0-18.104 6.572-18.104 18.476 0 11.78 7.192 18.6 18.104 18.6ZM329.746 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972S355.29 83.68 355.29 72.52V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM415.443 106c-11.036 0-18.104-5.208-18.104-16.492V55.284h-12.4V39.536h12.4V22.672l20.584-3.968v20.832h16.492v15.748h-16.492v27.652c0 4.092 1.984 5.332 6.076 5.332h10.416V106h-18.972ZM479.63 107.24c-24.056 0-40.052-12.772-40.052-34.472 0-21.576 15.872-34.472 40.052-34.472 24.056 0 39.928 12.648 39.928 34.472 0 21.576-15.748 34.472-39.928 34.472Zm0-15.996c12.028 0 19.096-7.192 19.096-18.476 0-11.408-6.944-18.476-19.096-18.476-12.152 0-19.096 7.192-19.096 18.476 0 11.284 6.944 18.476 19.096 18.476ZM575.383 106.992c-12.648 0-20.956-4.588-24.924-11.532h-.868l-.62 10.54h-19.716V15.604h20.832V50.2h.744c4.216-7.44 13.764-11.904 24.552-11.904 19.592 0 32.612 13.392 32.612 34.348 0 21.08-13.02 34.348-32.612 34.348Zm-6.448-15.748c10.912 0 18.104-6.696 18.104-18.6 0-11.656-7.192-18.476-18.104-18.476-11.904 0-18.848 7.564-18.848 17.112v3.1c0 9.3 6.944 16.864 18.848 16.864ZM617.532 106V15.604h20.832V106h-20.832ZM678.86 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972s18.352-7.688 18.352-18.848V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM774.249 107.116c-24.304 0-39.928-12.648-39.928-33.976 0-21.824 15.872-34.844 39.68-34.844 25.296 0 39.928 14.508 38.316 38.936h-57.04c.248 9.92 7.564 15.872 19.468 15.872 8.804 0 15.996-3.348 17.732-8.308h19.716c-1.86 13.392-17.484 22.32-37.944 22.32Zm-.372-54.684c-10.416 0-17.36 4.836-18.848 13.268h36.58c-.744-8.184-6.944-13.268-17.732-13.268Z"}),(0,s.createElement)("path",{fill:"#5089FB",d:"M127.627 1.756c13.597.242 21.261 8.627 23.983 20.423 1.371 5.939 1.669 12.174 1.987 18.3.739 14.24 1.276 28.496 1.733 42.746.259 7.984.199 15.983.266 23.975.137 16.158-12.09 24.804-22.837 27.733a48.532 48.532 0 0 1-11.457 1.786c-22.625.555-45.256 1.174-67.885 1.189-12.069.009-24.058-1.913-35.864-4.475C8.49 131.468 1.507 123.037.424 113.285a80.385 80.385 0 0 1-.41-9.705C.131 92.452.47 81.326.516 70.198c.057-12.963-.07-25.927-.194-38.89-.033-3.555-.263-7.01 1.024-10.52 3.59-9.792 10.627-15.202 20.643-16.91C55.135-1.775 91-.095 127.627 1.757Z"}),(0,s.createElement)("path",{fill:"#DEEBFF",d:"M35.164 99.944C37.83 73.172 56.04 30 77.984 30c21.944 0 40.155 43.172 42.821 69.944 2.681 26.939-22.785-14.807-42.82-14.807-20.036 0-45.256 39.273-42.821 14.807Z"})),w=((0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 256 256"},(0,s.createElement)("path",{fill:"#5089FB",d:"M209.982 17.89c22.371.4 34.98 14.2 39.459 33.617 2.256 9.775 2.746 20.04 3.268 30.121 1.216 23.441 2.101 46.906 2.852 70.362.426 13.142.326 26.308.437 39.464.226 26.596-19.891 40.827-37.573 45.649a79.8 79.8 0 0 1-18.85 2.938c-37.225.914-74.458 1.933-111.69 1.959-19.856.015-39.582-3.15-59.006-7.366-14.91-3.235-26.4-17.113-28.181-33.165a132.365 132.365 0 0 1-.676-15.974c.196-18.317.75-36.63.83-54.947.092-21.337-.117-42.677-.32-64.014C.476 60.682.1 54.994 2.217 49.216 8.123 33.1 19.7 24.195 36.179 21.385c54.533-9.308 113.541-6.543 173.803-3.495Z"}),(0,s.createElement)("path",{fill:"#DEEBFF",d:"M57.854 179.51c4.387-44.067 34.348-115.13 70.451-115.13 36.104 0 66.065 71.063 70.452 115.13 4.411 44.342-37.488-24.373-70.451-24.373-32.964 0-74.458 64.644-70.452 24.373Z"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"600",height:"530",version:"1.1",viewBox:"0 0 600 530"},(0,s.createElement)("path",{d:"m135.72 44.03c66.496 49.921 138.02 151.14 164.28 205.46 26.262-54.316 97.782-155.54 164.28-205.46 47.98-36.021 125.72-63.892 125.72 24.795 0 17.712-10.155 148.79-16.111 170.07-20.703 73.984-96.144 92.854-163.25 81.433 117.3 19.964 147.14 86.092 82.697 152.22-122.39 125.59-175.91-31.511-189.63-71.766-2.514-7.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937 0.51669-3.7077 7.8964-13.714 40.255-67.233 197.36-189.63 71.766-64.444-66.128-34.605-132.26 82.697-152.22-67.108 11.421-142.55-7.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07 0-88.687 77.742-60.816 125.72-24.795z",fill:"#1185fe"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,s.createElement)("path",{fillRule:"evenodd",d:"M6 12c0-3.328 2.64-6 5.866-6 2.164 0 4.063 1.201 5.08 3H15v1.5h4.5V6H18v1.848C16.683 5.834 14.431 4.5 11.866 4.5 7.783 4.5 4.5 7.872 4.5 12H6ZM18 12c0 3.328-2.64 6-5.865 6-2.165 0-4.064-1.201-5.081-3H9v-1.5H4.5V18H6v-1.848c1.317 2.014 3.569 3.348 6.135 3.348 4.082 0 7.365-3.372 7.365-7.5H18Z",clipRule:"evenodd"}))),v=(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)("path",{d:"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z"})),f=(0,s.createElement)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)("path",{d:"M13.13 13.38L13.48 6.92004H10.52L10.87 13.38H13.13ZM13.04 16.74C13.28 16.51 13.41 16.19 13.41 15.78C13.41 15.36 13.29 15.04 13.05 14.81C12.81 14.58 12.46 14.46 11.99 14.46C11.52 14.46 11.17 14.58 10.92 14.81C10.67 15.04 10.55 15.36 10.55 15.78C10.55 16.19 10.68 16.51 10.93 16.74C11.19 16.97 11.54 17.08 11.99 17.08C12.44 17.08 12.79 16.97 13.04 16.74Z"})),y=(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,s.createElement)("path",{d:"M11 17h2v-6h-2v6Zm0-8h2V7h-2v2Z"})),x=window.wp.apiFetch;var S=a.n(x);const C=({account:{did:e,meta:t={}},className:a,onDelete:n=null,deleteLabel:l=null,size:r="medium"})=>{const{userData:o,isLoading:c}=((e,t)=>{const[a,n]=(0,s.useState)({handle:t.handle||"",displayName:t.name||"",avatar:t.avatar||""}),[l,r]=(0,s.useState)(!1),o=(0,s.useRef)(null);return(0,s.useEffect)((()=>((async()=>{if(!a.handle){o.current&&o.current.abort(),o.current=new AbortController;try{r(!0);const t=await S()({path:`/autoblue/v1/account?did=${e}`,signal:o.current.signal});n({handle:t.handle||a.handle,displayName:t.displayName||a.displayName,avatar:t.avatar||a.avatar})}catch(e){console.error("Error fetching user data:",e),"AbortError"!==e.name&&console.error("Error fetching user data:",e)}finally{r(!1)}}})(),()=>{o.current&&o.current.abort()})),[e,a]),{userData:a,isLoading:l}})(e,t),[i,u]=(0,s.useState)(!1);return a=d("mS05_wtPati8LfYBYTGx",a,"small"===r&&"LUuMlpzD9HyupHyt98G3","large"===r&&"iVtkCNHNWdxuifShiMKh"),c?(0,s.createElement)("div",{className:a},(0,s.createElement)("div",{className:"IVZmEOtE_7uqQA_z7LDw"},(0,s.createElement)(p.Spinner,null))):(0,s.createElement)("div",{className:a},(0,s.createElement)("div",{className:"F2ZNrdlk8l4sx61TvagD"},(0,s.createElement)("figure",{className:"UPhsTTWKWZwbzXMghRps"},o.avatar&&(0,s.createElement)("img",{src:o.avatar,alt:o.displayName,style:{display:i?"block":"none"},onLoad:()=>u(!0),onError:()=>u(!1)})),(0,s.createElement)("div",{className:"zMF2PjNx4vXZ8jAMdrMm"},(0,s.createElement)("span",{className:"ADqq9wMPxBktKNS_YSlo"},o.displayName),(0,s.createElement)("span",{className:"BoWAC4fmJvi3BgVUzxXI"},"@",o.handle))),n&&(0,s.createElement)(p.Button,{icon:l?void 0:"no-alt",isDestructive:!0,variant:l?"secondary":void 0,onClick:n,label:l||(0,g.__)("Delete","autoblue")},l||null))},N="UbZP1LRbJlNmQJ5XIfZU",k=({onSelect:e})=>{const[t,a]=(0,h.useState)(""),[n,l]=(0,h.useState)(!1),[r,o]=(0,h.useState)([]),[c,i]=(0,h.useState)(!1);let u=null;const m=(0,h.useRef)(null),d=(0,h.useCallback)((async e=>{if(e.length>0){l(!0),m.current&&m.current.abort(),m.current=new AbortController;try{const t=await S()({path:`/autoblue/v1/search?q=${encodeURIComponent(e)}`,signal:m.current.signal});if(!t.actors)throw new Error("Unexpected response from the server");o(t.actors),i(!0)}catch(e){"AbortError"!==e.name&&(o([]),i(!0))}finally{!0!==m.current?.signal.aborted&&l(!1)}}else o([]),i(!1)}),[]);(0,h.useEffect)((()=>(u&&clearTimeout(u),u=setTimeout((()=>{d(t)}),300),()=>{clearTimeout(u),m.current&&m.current.abort()})),[t,d]);const _=n?(0,s.createElement)("div",{className:N},(0,s.createElement)(p.Spinner,null)):0===r.length&&t.length>0&&c?(0,s.createElement)("div",{className:N},(0,g.__)("No accounts found. Please try another search.","autoblue")):r.length>0?r.map((({did:t,handle:a,displayName:n,avatar:l})=>(0,s.createElement)(p.Button,{key:t,className:"WhjXMSYedjhE9iq9mGGQ",onClick:()=>e({did:t,meta:{handle:a,name:n,avatar:l}})},(0,s.createElement)(C,{account:{did:t,meta:{handle:a,name:n,avatar:l}},className:"aCyp1bdAS7uFpgfVTt4z"})))):null;return(0,s.createElement)("div",null,(0,s.createElement)(p.SearchControl,{__nextHasNoMarginBottom:!0,placeholder:(0,g.__)("Search for a Bluesky account","autoblue"),label:(0,g.__)("Bluesky Account","autoblue"),value:t,onChange:e=>a(e)}),_&&(0,s.createElement)("div",null,(0,s.createElement)(p.__experimentalVStack,{spacing:0,className:"BdtMtThHyPg6Ixs294VO"},_)))},A="SET_ACCOUNTS",M="ADD_ACCOUNT",L="DELETE_ACCOUNT",P="REFRESH_LOGS",B="CLEAR_LOGS",T="SET_LOGS_STATUS",V={items:[]},D={status:"idle"},R=(0,_.combineReducers)({accounts:function(e=V,t){switch(t.type){case A:return{...e,items:t.accounts};case M:return{...e,items:[...e.items,t.account]};case L:return{...e,items:e.items.filter((e=>e.did!==t.did))};default:return e}},logs:function(e=D,t){switch(t.type){case P:return{...e,items:t.logs,pagination:{...e.pagination,...t.pagination}};case B:return{...e,items:[],pagination:{...e.pagination,...t.pagination}};case T:return{...e,status:t.status};case"SET_LOGS_PAGE":return{...e,pagination:{...e.pagination,page:t.page}};default:return e}}});function Z(e){return e.accounts.items}function z(e){return e.logs.items}function H(e){return e.logs.status}function I(e){return e.logs.pagination.page}function O(e){return e.logs.pagination.totalPages}function j(e){return e.logs.pagination.totalItems}const F={...n,...l};function G(e){return{type:A,accounts:e}}function U(e){return{type:M,account:e}}function W(e){return{type:L,did:e}}function K(e,t){return async function({dispatch:a,registry:n}){const{createSuccessNotice:l,createErrorNotice:r}=n.dispatch(E.store);try{const n=await S()({path:"/autoblue/v1/connections",method:"POST",data:{did:e,app_password:t}});a(U(n));let{handle:r,name:o}=n.meta;r=r?`@${r}`:"";const s=`${o} ${r}`;l(
    22// translators: %s is the account name and handle
    33// translators: %s is the account name and handle
    4 (0,g.sprintf)((0,g.__)('Account "%s" connected',"autoblue"),c),{id:"autoblue/account/added",type:"snackbar"})}catch(e){throw o((0,g.__)("Failed to connect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}function X(e){return async function({dispatch:t,registry:a}){const{createSuccessNotice:n,createErrorNotice:l}=a.dispatch(E.store);try{const a=await S()({path:"/autoblue/v1/connections",method:"DELETE",data:{did:e}});return t(W(e)),n((0,g.__)("Account disconnected","autoblue"),{id:"autoblue/account/deleted",type:"snackbar"}),a}catch(e){throw l((0,g.__)("Failed to disconnect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}const q=window.wp.url,J=({page:e=1,perPage:t=10}={})=>async({select:a,dispatch:n,registry:l})=>{const{createSuccessNotice:o,createErrorNotice:r,removeNotice:c}=l.dispatch(E.store);try{const l=a.getLogsCurrentPage(),r=e===l;n({type:T,status:r?"refreshing":"loading"});const s=(0,q.addQueryArgs)("/autoblue/v1/logs",{page:e,per_page:t}),i=await S()({path:s,method:"GET",parse:!0}),{data:u,pagination:m}=i;if(n({type:L,logs:u,pagination:{page:m.page,perPage:m.per_page,totalItems:m.total_items,totalPages:m.total_pages}}),n({type:T,status:"success"}),r){const e=await o((0,g.__)("Logs refreshed.","autoblue"),{type:"snackbar"});setTimeout((()=>{n({type:T,status:"idle"}),c(e.notice.id)}),2e3)}return u}catch(e){throw r((0,g.__)("Failed to refresh logs.","autoblue"),{id:"autoblue/logs/refresh-error",type:"snackbar"}),e}},K=()=>async({dispatch:e,registry:t})=>{const{createSuccessNotice:a,createErrorNotice:n,removeNotice:l}=t.dispatch(E.store);try{e({type:T,status:"clearing"});const t=await S()({path:"/autoblue/v1/logs",method:"DELETE"});if(t){e({type:B,pagination:{page:1,perPage:10,totalItems:0,totalPages:0}}),e({type:T,status:"success"});const t=await a((0,g.__)("Logs cleared.","autoblue"),{type:"snackbar"});setTimeout((()=>{e({type:T,status:"idle"}),l(t.notice.id)}),2e3)}return t}catch(t){throw e({type:T,status:"error"}),n((0,g.__)("Failed to clear logs.","autoblue"),{id:"autoblue/logs/clear-error",type:"snackbar"}),t}},Y={...o,...r},$="autoblue",ee={reducer:R,selectors:j,actions:Y,resolvers:{},initialState:autoblue.initialState};let te;try{te=(0,_.select)($)}catch(e){}if(!te){const e=(0,_.createReduxStore)($,ee);(0,_.register)(e)}const ae=()=>{const{accounts:e,isLoading:t,error:a}=(0,_.useSelect)((e=>({accounts:e($).getAccounts()})),[]),{addAccount:n,deleteAccount:l}=(0,_.useDispatch)($);return{accounts:e,hasAccounts:e.length>0,addAccount:n,deleteAccount:l}},ne=window.wp.primitives;var le=a(848);const oe=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,le.jsx)(ne.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"})}),re=({isOpen:e,onClose:t,selectedAccount:a,onSelectAccount:n,appPassword:l,onAppPasswordChange:o,onAddAccount:r,status:s,errorMessage:i})=>e?(0,c.createElement)(p.Modal,{title:(0,g.__)("Connect Bluesky account","autoblue"),onRequestClose:t,focusOnMount:"firstContentElement",size:"medium"},(0,c.createElement)(p.__experimentalVStack,{spacing:4},a?(0,c.createElement)(C,{account:a,onDelete:()=>n(null)}):(0,c.createElement)(k,{onSelect:n}),(0,c.createElement)(p.TextControl,{__nextHasNoMarginBottom:!0,label:(0,g.__)("App Password","autoblue"),help:(0,h.createInterpolateElement)((0,g.__)("You can create a new app password in your <a>Bluesky account settings</a>.","autoblue"),{a:(0,c.createElement)("a",{href:"https://bsky.app/settings/app-passwords",target:"_blank",rel:"noreferrer"})}),value:l,onChange:o}),(0,c.createElement)(p.__experimentalHStack,{alignment:"left"},(0,c.createElement)(p.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:r,disabled:"loading"===s},(0,g.__)("Connect Account","autoblue")),"loading"===s&&(0,c.createElement)(p.Spinner,null)),"loading"!==s&&i&&(0,c.createElement)(p.__experimentalHStack,{alignment:"left",className:"DP0h4FLv2L4zkkvcUIDh"},(0,c.createElement)(p.Icon,{icon:oe}),(0,c.createElement)("p",null,i)))):null,ce=()=>{const{renderModal:e,openModal:t}=((e=!1)=>{const[t,a]=(0,h.useState)(e),[n,l]=(0,h.useState)(null),[o,r]=(0,h.useState)(""),[s,i]=(0,h.useState)("idle"),[u,m]=(0,h.useState)(""),{addAccount:d}=ae(),p=()=>{a(!1),l(null),r("")},_=e=>{r(e)},E=async()=>{if(n)if(o){i("loading");try{await d(n.did,o),i("success"),m(""),p()}catch(e){i("error"),m((0,g.__)("Something went wrong. Make sure the app password is correct.","autoblue"))}}else m((0,g.__)("Please enter an app password.","autoblue"));else m((0,g.__)("Please pick an account to add.","autoblue"))};return{renderModal:()=>(0,c.createElement)(re,{isOpen:t,onClose:p,selectedAccount:n,onSelectAccount:l,appPassword:o,onAppPasswordChange:_,onAddAccount:E,status:s,errorMessage:u}),isOpen:t,openModal:()=>a(!0),closeModal:p}})();return(0,c.createElement)(p.Card,null,(0,c.createElement)(p.CardBody,{className:"QAtJyZwNum9Ab2obTC6K"},(0,c.createElement)(p.__experimentalVStack,{alignment:"center",spacing:4},(0,c.createElement)(p.__experimentalText,null,(0,g.__)("No account connected.","autoblue")),(0,c.createElement)(p.Button,{variant:"primary",onClick:()=>t()},(0,g.__)("Connect a Bluesky account","autoblue")),e())))},se=()=>{const{accounts:e,isLoading:t,deleteAccount:a}=ae(),[n,l]=(0,h.useState)(!1),[o,r]=(0,h.useState)(null);return t?(0,c.createElement)(p.Spinner,null):(0,c.createElement)("div",null,(0,c.createElement)(p.__experimentalConfirmDialog,{isOpen:n,onConfirm:async()=>{try{o&&await a(o.did)}catch(e){console.error(e)}finally{l(!1),r(null)}},onCancel:()=>{l(!1),r(null)},confirmButtonText:(0,g.__)("Disconnect","autoblue")},(0,g.__)("Are you sure you want to disconnect this account?","autoblue")),e.map((e=>(0,c.createElement)(C,{key:e.did,account:e,onDelete:()=>(e=>{r(e),l(!0)})(e),deleteLabel:(0,g.__)("Disconnect","autoblue"),size:"large"}))))},ie=e=>(0,c.createElement)(p.ToggleControl,{__nextHasNoMarginBottom:!0,className:"noXm26AqZWQcZrKeIA1X",...e}),ue=window.wp.coreData,me=()=>{const{hasAccounts:e}=ae(),{isEnabled:t,setIsEnabled:a}=(()=>{const[e,t]=(0,ue.useEntityProp)("root","site","autoblue_enabled"),{saveEditedEntityRecord:a}=(0,_.useDispatch)("core"),{createSuccessNotice:n,removeNotice:l}=(0,_.useDispatch)(E.store),o=(0,_.useSelect)((e=>e("core").isSavingEntityRecord("root","site")));return{isEnabled:null!=e?e:autoblue?.initialState?.settings?.enabled,setIsEnabled:async e=>{if(!o)try{t(e),await a("root","site");const o=await n(e?(0,g.__)("Automatic sharing to Bluesky enabled.","autoblue"):(0,g.__)("Automatic sharing to Bluesky disabled.","autoblue"),{type:"snackbar"});setTimeout((()=>{l(o.notice.id)}),2e3)}catch(e){}},isSaving:o}})();return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,g.__)("Bluesky account","autoblue"),id:"autoblue-accounts"},e?(0,c.createElement)(se,null):(0,c.createElement)(ce,null)),e&&(0,c.createElement)(p.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,g.__)("Settings","autoblue"),id:"autoblue-settings"},(0,c.createElement)(p.Card,null,(0,c.createElement)(p.CardBody,{className:"meck1gRysSgwbPlTNoRp"},(0,c.createElement)(p.__experimentalVStack,{spacing:2},(0,c.createElement)(ie,{label:(0,g.__)("Automatically share posts to Bluesky","autoblue"),help:(0,g.__)("When enabled, new posts will be automatically shared to Bluesky. You can change this on a per-post basis.","autoblue"),checked:t,onChange:a}))))),(0,c.createElement)(p.__experimentalText,{variant:"muted"},(0,h.createInterpolateElement)((0,g.__)("Autoblue is created by <a>Daniel Post</a>. Not officially affiliated with or endorsed by Bluesky.","autoblue"),{a:(0,c.createElement)("a",{href:"https://danielpost.com?ref=autoblue_admin",target:"_blank",rel:"noreferrer"})})))},de=[{value:"debug",label:(0,g.__)("Debug","autoblue"),description:(0,g.__)("Everything will be logged. Useful for debugging.","autoblue")},{value:"info",label:(0,g.__)("Info","autoblue"),description:(0,g.__)("Errors, warnings and info messages will be logged.","autoblue")},{value:"error",label:(0,g.__)("Error","autoblue"),description:(0,g.__)("Only critical errors will be logged.","autoblue")},{value:"off",label:(0,g.__)("Off","autoblue"),description:(0,g.__)("Nothing will be logged.","autoblue")}],ge=({perPage:e=10}={})=>{const{logs:t,status:a,page:n,totalPages:l,totalItems:o}=(0,_.useSelect)((e=>{const t=e($);return{logs:t.getLogs(),status:t.getLogsStatus(),page:t.getLogsCurrentPage(),totalPages:t.getLogsTotalPages(),totalItems:t.getLogsTotalItems()}}),[]),{createSuccessNotice:r,removeNotice:c}=(0,_.useDispatch)(E.store),{refreshLogs:s,clearLogs:i}=(0,_.useDispatch)($),[u,m]=(0,ue.useEntityProp)("root","site","autoblue_log_level"),{saveEditedEntityRecord:d}=(0,_.useDispatch)("core"),p=(0,_.useSelect)((e=>e("core").isSavingEntityRecord("root","site")));return{logs:t,level:u,setLevel:async e=>{if(!p)try{m(e),await d("root","site");const t=de.find((t=>t.value===e)),a=await r((0,g.sprintf)(
     4(0,g.sprintf)((0,g.__)('Account "%s" connected',"autoblue"),s),{id:"autoblue/account/added",type:"snackbar"})}catch(e){throw r((0,g.__)("Failed to connect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}function Q(e){return async function({dispatch:t,registry:a}){const{createSuccessNotice:n,createErrorNotice:l}=a.dispatch(E.store);try{const a=await S()({path:"/autoblue/v1/connections",method:"DELETE",data:{did:e}});return t(W(e)),n((0,g.__)("Account disconnected","autoblue"),{id:"autoblue/account/deleted",type:"snackbar"}),a}catch(e){throw l((0,g.__)("Failed to disconnect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}const X=window.wp.url,q=({page:e=1,perPage:t=10}={})=>async({select:a,dispatch:n,registry:l})=>{const{createSuccessNotice:r,createErrorNotice:o,removeNotice:s}=l.dispatch(E.store);try{const l=a.getLogsCurrentPage(),o=e===l;n({type:T,status:o?"refreshing":"loading"});const c=(0,X.addQueryArgs)("/autoblue/v1/logs",{page:e,per_page:t}),i=await S()({path:c,method:"GET",parse:!0}),{data:u,pagination:m}=i;if(n({type:P,logs:u,pagination:{page:m.page,perPage:m.per_page,totalItems:m.total_items,totalPages:m.total_pages}}),n({type:T,status:"success"}),o){const e=await r((0,g.__)("Logs refreshed.","autoblue"),{type:"snackbar"});setTimeout((()=>{n({type:T,status:"idle"}),s(e.notice.id)}),2e3)}return u}catch(e){throw o((0,g.__)("Failed to refresh logs.","autoblue"),{id:"autoblue/logs/refresh-error",type:"snackbar"}),e}},J=()=>async({dispatch:e,registry:t})=>{const{createSuccessNotice:a,createErrorNotice:n,removeNotice:l}=t.dispatch(E.store);try{e({type:T,status:"clearing"});const t=await S()({path:"/autoblue/v1/logs",method:"DELETE"});if(t){e({type:B,pagination:{page:1,perPage:10,totalItems:0,totalPages:0}}),e({type:T,status:"success"});const t=await a((0,g.__)("Logs cleared.","autoblue"),{type:"snackbar"});setTimeout((()=>{e({type:T,status:"idle"}),l(t.notice.id)}),2e3)}return t}catch(t){throw e({type:T,status:"error"}),n((0,g.__)("Failed to clear logs.","autoblue"),{id:"autoblue/logs/clear-error",type:"snackbar"}),t}},Y={...r,...o},$="autoblue",ee={reducer:R,selectors:F,actions:Y,resolvers:{},initialState:autoblue.initialState};let te;try{te=(0,_.select)($)}catch(e){}if(!te){const e=(0,_.createReduxStore)($,ee);(0,_.register)(e)}const ae=()=>{const{accounts:e,isLoading:t,error:a}=(0,_.useSelect)((e=>({accounts:e($).getAccounts()})),[]),{addAccount:n,deleteAccount:l}=(0,_.useDispatch)($);return{accounts:e,hasAccounts:e.length>0,addAccount:n,deleteAccount:l}},ne=window.wp.primitives;var le=a(848);const re=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,le.jsx)(ne.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"})}),oe=({isOpen:e,onClose:t,selectedAccount:a,onSelectAccount:n,appPassword:l,onAppPasswordChange:r,onAddAccount:o,status:c,errorMessage:i})=>e?(0,s.createElement)(p.Modal,{title:(0,g.__)("Connect Bluesky account","autoblue"),onRequestClose:t,focusOnMount:"firstContentElement",size:"medium"},(0,s.createElement)(p.__experimentalVStack,{spacing:4},a?(0,s.createElement)(C,{account:a,onDelete:()=>n(null)}):(0,s.createElement)(k,{onSelect:n}),(0,s.createElement)(p.TextControl,{__nextHasNoMarginBottom:!0,label:(0,g.__)("App Password","autoblue"),help:(0,h.createInterpolateElement)((0,g.__)("You can create a new app password in your <a>Bluesky account settings</a>.","autoblue"),{a:(0,s.createElement)("a",{href:"https://bsky.app/settings/app-passwords",target:"_blank",rel:"noreferrer"})}),value:l,onChange:r}),(0,s.createElement)(p.__experimentalHStack,{alignment:"left"},(0,s.createElement)(p.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:o,disabled:"loading"===c},(0,g.__)("Connect Account","autoblue")),"loading"===c&&(0,s.createElement)(p.Spinner,null)),"loading"!==c&&i&&(0,s.createElement)(p.__experimentalHStack,{alignment:"left",className:"DP0h4FLv2L4zkkvcUIDh"},(0,s.createElement)(p.Icon,{icon:re}),(0,s.createElement)("p",null,i)))):null,se=()=>{const{renderModal:e,openModal:t}=((e=!1)=>{const[t,a]=(0,h.useState)(e),[n,l]=(0,h.useState)(null),[r,o]=(0,h.useState)(""),[c,i]=(0,h.useState)("idle"),[u,m]=(0,h.useState)(""),{addAccount:d}=ae(),p=()=>{a(!1),l(null),o("")},_=e=>{o(e)},E=async()=>{if(n)if(r){i("loading");try{await d(n.did,r),i("success"),m(""),p()}catch(e){i("error"),m((0,g.__)("Something went wrong. Make sure the app password is correct.","autoblue"))}}else m((0,g.__)("Please enter an app password.","autoblue"));else m((0,g.__)("Please pick an account to add.","autoblue"))};return{renderModal:()=>(0,s.createElement)(oe,{isOpen:t,onClose:p,selectedAccount:n,onSelectAccount:l,appPassword:r,onAppPasswordChange:_,onAddAccount:E,status:c,errorMessage:u}),isOpen:t,openModal:()=>a(!0),closeModal:p}})();return(0,s.createElement)(p.Card,null,(0,s.createElement)(p.CardBody,{className:"QAtJyZwNum9Ab2obTC6K"},(0,s.createElement)(p.__experimentalVStack,{alignment:"center",spacing:4},(0,s.createElement)(p.__experimentalText,null,(0,g.__)("No account connected.","autoblue")),(0,s.createElement)(p.Button,{variant:"primary",onClick:()=>t()},(0,g.__)("Connect a Bluesky account","autoblue")),e())))},ce=()=>{const{width:e}=(()=>{const[e,t]=(0,h.useState)({width:window.innerWidth,height:window.innerHeight});return(0,h.useEffect)((()=>{const e=()=>{t({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e})(),{accounts:t,isLoading:a,deleteAccount:n}=ae(),[l,r]=(0,h.useState)(!1),[o,c]=(0,h.useState)(null);return a?(0,s.createElement)(p.Spinner,null):(0,s.createElement)("div",null,(0,s.createElement)(p.__experimentalConfirmDialog,{isOpen:l,onConfirm:async()=>{try{o&&await n(o.did)}catch(e){console.error(e)}finally{r(!1),c(null)}},onCancel:()=>{r(!1),c(null)},confirmButtonText:(0,g.__)("Disconnect","autoblue")},(0,g.__)("Are you sure you want to disconnect this account?","autoblue")),t.map((t=>(0,s.createElement)(C,{key:t.did,account:t,onDelete:()=>(e=>{c(e),r(!0)})(t),deleteLabel:(0,g.__)("Disconnect","autoblue"),size:e>500?"large":"small"}))))},ie=e=>(0,s.createElement)(p.ToggleControl,{__nextHasNoMarginBottom:!0,className:"noXm26AqZWQcZrKeIA1X",...e}),ue=window.wp.coreData,me=()=>{const{hasAccounts:e}=ae(),{isEnabled:t,setIsEnabled:a}=(()=>{const[e,t]=(0,ue.useEntityProp)("root","site","autoblue_enabled"),{saveEditedEntityRecord:a}=(0,_.useDispatch)("core"),{createSuccessNotice:n,removeNotice:l}=(0,_.useDispatch)(E.store),r=(0,_.useSelect)((e=>e("core").isSavingEntityRecord("root","site")));return{isEnabled:null!=e?e:autoblue?.initialState?.settings?.enabled,setIsEnabled:async e=>{if(!r)try{t(e),await a("root","site");const r=await n(e?(0,g.__)("Automatic sharing to Bluesky enabled.","autoblue"):(0,g.__)("Automatic sharing to Bluesky disabled.","autoblue"),{type:"snackbar"});setTimeout((()=>{l(r.notice.id)}),2e3)}catch(e){}},isSaving:r}})();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,g.__)("Bluesky account","autoblue"),id:"autoblue-accounts"},e?(0,s.createElement)(ce,null):(0,s.createElement)(se,null)),e&&(0,s.createElement)(p.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,g.__)("Settings","autoblue"),id:"autoblue-settings"},(0,s.createElement)(p.Card,null,(0,s.createElement)(p.CardBody,{className:"meck1gRysSgwbPlTNoRp"},(0,s.createElement)(p.__experimentalVStack,{spacing:2},(0,s.createElement)(ie,{label:(0,g.__)("Automatically share posts to Bluesky","autoblue"),help:(0,g.__)("When enabled, new posts will be automatically shared to Bluesky. You can change this on a per-post basis.","autoblue"),checked:t,onChange:a}))))),(0,s.createElement)(p.__experimentalText,{variant:"muted"},(0,h.createInterpolateElement)((0,g.__)("Autoblue is created by <a>Daniel Post</a>. Not officially affiliated with or endorsed by Bluesky.","autoblue"),{a:(0,s.createElement)("a",{href:"https://danielpost.com?ref=autoblue_admin",target:"_blank",rel:"noreferrer"})})))},de=[{value:"debug",label:(0,g.__)("Debug","autoblue"),description:(0,g.__)("Everything will be logged. Useful for debugging.","autoblue")},{value:"info",label:(0,g.__)("Info","autoblue"),description:(0,g.__)("Errors, warnings and info messages will be logged.","autoblue")},{value:"error",label:(0,g.__)("Error","autoblue"),description:(0,g.__)("Only critical errors will be logged.","autoblue")},{value:"off",label:(0,g.__)("Off","autoblue"),description:(0,g.__)("Nothing will be logged.","autoblue")}],ge=({perPage:e=10}={})=>{const{logs:t,status:a,page:n,totalPages:l,totalItems:r}=(0,_.useSelect)((e=>{const t=e($);return{logs:t.getLogs(),status:t.getLogsStatus(),page:t.getLogsCurrentPage(),totalPages:t.getLogsTotalPages(),totalItems:t.getLogsTotalItems()}}),[]),{createSuccessNotice:o,removeNotice:s}=(0,_.useDispatch)(E.store),{refreshLogs:c,clearLogs:i}=(0,_.useDispatch)($),u=(0,h.useCallback)((async()=>{try{await c({page:n,perPage:e})}catch(e){console.error("Failed to refresh logs:",e)}}),[c,n,e]),m=(0,h.useCallback)((async()=>{try{await i()}catch(e){console.error("Failed to clear logs:",e)}}),[i]),d=(0,h.useCallback)((async t=>{try{await c({page:t,perPage:e})}catch(e){console.error("Failed to change page:",e)}}),[c,e]),[p,b]=(0,ue.useEntityProp)("root","site","autoblue_log_level"),{saveEditedEntityRecord:w}=(0,_.useDispatch)("core"),v=(0,_.useSelect)((e=>e("core").isSavingEntityRecord("root","site")));return{logs:t,level:p,setLevel:async e=>{if(!v)try{b(e),await w("root","site");const t=de.find((t=>t.value===e)),a=await o((0,g.sprintf)(
    55// translators: %s is the log level
    66// translators: %s is the log level
    7 (0,g.__)('Log level updated to "%s".',"autoblue"),t.label),{type:"snackbar"});setTimeout((()=>{c(a.notice.id)}),2e3)}catch(e){}},page:n,totalPages:l,totalItems:o,refreshLogs:async()=>{try{await s({page:n,perPage:e})}catch(e){console.error("Failed to refresh logs:",e)}},clearLogs:async()=>{try{await i()}catch(e){console.error("Failed to clear logs:",e)}},setPage:async t=>{try{await s({page:t,perPage:e})}catch(e){console.error("Failed to change page:",e)}},isRefreshingLogs:"refreshing"===a,isClearingLogs:"clearing"===a,isSuccess:"success"===a,isError:"error"===a}},pe=window.wp.date,he=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),_e=(0,le.jsx)(ne.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,le.jsx)(ne.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})}),Ee=e=>{switch(e){case"success":return v;case"info":default:return y;case"warning":return f;case"error":return he;case"debug":return _e}},be=e=>e.split(/(https:\/\/bsky\.app\/profile\/[^\s]+)/g).map(((e,t)=>/^https:\/\/bsky\.app\/profile\/[^\s]+$/.test(e)?(0,c.createElement)("a",{key:`url-${t}`,href:e,target:"_blank",rel:"noreferrer"},e):e)).map((e=>{return"string"==typeof e?"string"==typeof(t=e)?t.split("`").map(((e,t)=>t%2==0?e:(0,c.createElement)("code",{key:`code-${t}`},e))):t:e;var t})).flat(),we={level:"cYBHXdayJ9hEt7ETXvHb",info:"e74HX1TJsY4mcF4KJRM3",debug:"iY5nmbaUM8NAU9Mkx4QI",warning:"U6hWwqaFD6ksNFzzBUsL",error:"lArm_d0OIb3tZey48j80",success:"WX97I60r7oh7U_aGYHKV",container:"J912WhKEiSxdZ1QVkUsD",pill:"CUIWekfURbh2zp3Nwqh5",icon:"ECn5fPQP9eCW2GaO4wbw"},ve=({level:e,showText:t=!1})=>(0,c.createElement)("div",{className:d(we.level,we[e])},(0,c.createElement)("div",{className:d(we.container,{[we.pill]:t})},(0,c.createElement)(p.Icon,{icon:Ee(e),className:we.icon}),t&&e)),fe=({children:e})=>(0,c.createElement)("table",{className:"m0ishQkFGe8cW6U71f_E"},e),ye=({context:e,onRequestClose:t})=>{const{formats:a}=(0,pe.getSettings)();return(0,c.createElement)(p.Modal,{title:(0,g.__)("Context","autoblue"),onRequestClose:t,className:"EWnbmq_38OJPlOh82E6w"},(0,c.createElement)(p.__experimentalVStack,{spacing:4},(0,c.createElement)(fe,null,(0,c.createElement)("tbody",null,(0,c.createElement)("tr",null,(0,c.createElement)("th",null,(0,g.__)("Level","autoblue")),(0,c.createElement)("td",null,(0,c.createElement)(ve,{level:e.level,showText:!0}))),(0,c.createElement)("tr",null,(0,c.createElement)("th",null,(0,g.__)("Message","autoblue")),(0,c.createElement)("td",null,be(e.message))),(0,c.createElement)("tr",null,(0,c.createElement)("th",null,(0,g.__)("Date","autoblue")),(0,c.createElement)("td",null,(0,c.createElement)(p.__experimentalVStack,{spacing:1},(0,c.createElement)("span",null,(0,pe.dateI18n)(a?.datetime||"c",e.created_at)),(0,c.createElement)(p.__experimentalText,{variant:"muted"},(0,pe.dateI18n)("c",e.created_at))))),Object.entries({...e.context,...e.extra}).map((([e,t])=>(0,c.createElement)("tr",{key:e},(0,c.createElement)("th",null,e),(0,c.createElement)("td",null,(0,c.createElement)("pre",null,"object"==typeof t?JSON.stringify(t,null,2):String(t))))))))))},xe=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})}),Se=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})}),Ce={refreshing:"D3K9yFKhGochBoN9ciy0",rotate:"wZn5VxzBe2oH9bcXgw_D",dropdown:"giKoThf94yCr7M7ywIlF",header:"E66oSeXaGdPMfAadmteF"},Ne=({onClose:e})=>(0,c.createElement)(p.__experimentalVStack,{spacing:1,className:Ce.header},(0,c.createElement)(p.__experimentalHStack,{alignment:"center"},(0,c.createElement)(p.__experimentalHeading,{level:2,size:13},(0,g.__)("Log level","autoblue")),(0,c.createElement)(p.__experimentalSpacer,null),e&&(0,c.createElement)(p.Button,{size:"small",label:(0,g.__)("Close"),icon:he,onClick:e})),(0,c.createElement)(p.__experimentalText,null,(0,g.__)("Choose the level of logs to save. This will not affect existing logs.","autoblue"))),ke=()=>{const{refreshLogs:e,clearLogs:t,isRefreshingLogs:a,isClearingLogs:n,totalItems:l,level:o,setLevel:r}=ge(),[s,i]=(0,h.useState)(!1),u=a||n;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.__experimentalConfirmDialog,{isOpen:s,onConfirm:()=>{u||(t(),i(!1))},onCancel:()=>i(!1),confirmButtonText:(0,g.__)("Clear logs","autoblue")},(0,g.__)("Are you sure you want to clear all logs?","autoblue")),(0,c.createElement)(p.__experimentalHStack,{alignment:"right"},(0,c.createElement)(p.Dropdown,{contentClassName:Ce.dropdown,popoverProps:{placement:"bottom-end"},focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,c.createElement)(p.Button,{label:(0,g.__)("View options","autoblue"),onClick:t,"aria-expanded":e,icon:xe,size:"compact"}),renderContent:({onClose:e})=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(Ne,{onClose:e}),(0,c.createElement)("form",null,(0,c.createElement)(p.RadioControl,{label:(0,g.__)("Log level","autoblue"),hideLabelFromVision:!0,onChange:r,options:de.map((e=>"info"===e.value?{...e,label:`${e.label} ${(0,g.__)("(recommended)","autoblue")}`}:e)),selected:o})))}),(0,c.createElement)(p.Button,{label:(0,g.__)("Refresh logs","autoblue"),onClick:()=>{u||e()},disabled:a||n,accessibleWhenDisabled:!0,className:d({[Ce.refresh]:!0,[Ce.refreshing]:a}),icon:w,size:"compact"}),(0,c.createElement)(p.Button,{label:(0,g.__)("Clear logs","autoblue"),onClick:()=>i(!0),isDestructive:!0,icon:Se,size:"compact",accessibleWhenDisabled:!0,disabled:a||n||0===l})))},Ae=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})}),Me=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})}),Pe=()=>{const{setPage:e,page:t,totalPages:a,totalItems:n}=ge();return(0,c.createElement)(p.__experimentalHStack,{alignment:"left",className:"KzPwbHigWAmJrseQaoKw"},(0,c.createElement)(p.Button,{label:(0,g.__)("Previous page","autoblue"),onClick:()=>{t>1&&e(t-1)},accessibleWhenDisabled:!0,size:"compact",disabled:1===t,icon:Ae}),(0,c.createElement)(p.Button,{label:(0,g.__)("Next page","autoblue"),onClick:()=>{t<a&&e(t+1)},accessibleWhenDisabled:!0,size:"compact",disabled:t===a||0===a,icon:Me}),(0,c.createElement)("span",null,(0,g.sprintf)(
     7(0,g.__)('Log level updated to "%s".',"autoblue"),t.label),{type:"snackbar"});setTimeout((()=>{s(a.notice.id)}),2e3)}catch(e){}},page:n,totalPages:l,totalItems:r,refreshLogs:u,clearLogs:m,setPage:d,isRefreshingLogs:"refreshing"===a,isClearingLogs:"clearing"===a,isSuccess:"success"===a,isError:"error"===a}},pe=window.wp.date,he=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),_e=(0,le.jsx)(ne.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,le.jsx)(ne.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})}),Ee=e=>{switch(e){case"success":return v;case"info":default:return y;case"warning":return f;case"error":return he;case"debug":return _e}},be=e=>e.split(/(https:\/\/bsky\.app\/profile\/[^\s]+)/g).map(((e,t)=>/^https:\/\/bsky\.app\/profile\/[^\s]+$/.test(e)?(0,s.createElement)("a",{key:`url-${t}`,href:e,target:"_blank",rel:"noreferrer"},e):e)).map((e=>{return"string"==typeof e?"string"==typeof(t=e)?t.split("`").map(((e,t)=>t%2==0?e:(0,s.createElement)("code",{key:`code-${t}`},e))):t:e;var t})).flat(),we={level:"cYBHXdayJ9hEt7ETXvHb",info:"e74HX1TJsY4mcF4KJRM3",debug:"iY5nmbaUM8NAU9Mkx4QI",warning:"U6hWwqaFD6ksNFzzBUsL",error:"lArm_d0OIb3tZey48j80",success:"WX97I60r7oh7U_aGYHKV",container:"J912WhKEiSxdZ1QVkUsD",pill:"CUIWekfURbh2zp3Nwqh5",icon:"ECn5fPQP9eCW2GaO4wbw"},ve=({level:e,showText:t=!1})=>(0,s.createElement)("div",{className:d(we.level,we[e])},(0,s.createElement)("div",{className:d(we.container,{[we.pill]:t})},(0,s.createElement)(p.Icon,{icon:Ee(e),className:we.icon}),t&&e)),fe=({children:e})=>(0,s.createElement)("div",{className:"dIaCy9uCnGvvhj_lqTQV"},(0,s.createElement)("table",{className:"m0ishQkFGe8cW6U71f_E"},e)),ye=({context:e,onRequestClose:t})=>{const{formats:a}=(0,pe.getSettings)();return(0,s.createElement)(p.Modal,{title:(0,g.__)("Context","autoblue"),onRequestClose:t,className:"EWnbmq_38OJPlOh82E6w"},(0,s.createElement)(p.__experimentalVStack,{spacing:4},(0,s.createElement)(fe,null,(0,s.createElement)("tbody",{className:"lpxIIelZJxgj5eCsjg0w"},(0,s.createElement)("tr",null,(0,s.createElement)("th",null,(0,g.__)("Level","autoblue")),(0,s.createElement)("td",null,(0,s.createElement)(ve,{level:e.level,showText:!0}))),(0,s.createElement)("tr",null,(0,s.createElement)("th",null,(0,g.__)("Message","autoblue")),(0,s.createElement)("td",null,be(e.message))),(0,s.createElement)("tr",null,(0,s.createElement)("th",null,(0,g.__)("Date","autoblue")),(0,s.createElement)("td",null,(0,s.createElement)(p.__experimentalVStack,{spacing:1},(0,s.createElement)("span",null,(0,pe.dateI18n)(a?.datetime||"c",e.created_at)),(0,s.createElement)(p.__experimentalText,{variant:"muted"},(0,pe.dateI18n)("c",e.created_at))))),Object.entries({...e.context,...e.extra}).map((([e,t])=>(0,s.createElement)("tr",{key:e},(0,s.createElement)("th",null,e),(0,s.createElement)("td",null,(0,s.createElement)("pre",null,"object"==typeof t?JSON.stringify(t,null,2):String(t))))))))))},xe=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})}),Se=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})}),Ce={wrapper:"nzlAX7WNL7AHp9AeScd5",refreshing:"D3K9yFKhGochBoN9ciy0",rotate:"wZn5VxzBe2oH9bcXgw_D",dropdown:"giKoThf94yCr7M7ywIlF",header:"E66oSeXaGdPMfAadmteF"},Ne=({onClose:e})=>(0,s.createElement)(p.__experimentalVStack,{spacing:1,className:Ce.header},(0,s.createElement)(p.__experimentalHStack,{alignment:"center"},(0,s.createElement)(p.__experimentalHeading,{level:2,size:13},(0,g.__)("Log level","autoblue")),(0,s.createElement)(p.__experimentalSpacer,null),e&&(0,s.createElement)(p.Button,{size:"small",label:(0,g.__)("Close"),icon:he,onClick:e})),(0,s.createElement)(p.__experimentalText,null,(0,g.__)("Choose the level of logs to save. This will not affect existing logs.","autoblue"))),ke=()=>{const{refreshLogs:e,clearLogs:t,isRefreshingLogs:a,isClearingLogs:n,totalItems:l,level:r,setLevel:o}=ge(),[c,i]=(0,h.useState)(!1),u=a||n;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalConfirmDialog,{isOpen:c,onConfirm:()=>{u||(t(),i(!1))},onCancel:()=>i(!1),confirmButtonText:(0,g.__)("Clear logs","autoblue")},(0,g.__)("Are you sure you want to clear all logs?","autoblue")),(0,s.createElement)("div",{className:Ce.wrapper},(0,s.createElement)(p.Dropdown,{contentClassName:Ce.dropdown,popoverProps:{placement:"bottom-end"},focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,s.createElement)(p.Button,{label:(0,g.__)("View options","autoblue"),onClick:t,"aria-expanded":e,icon:xe,size:"compact"}),renderContent:({onClose:e})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ne,{onClose:e}),(0,s.createElement)("form",null,(0,s.createElement)(p.RadioControl,{label:(0,g.__)("Log level","autoblue"),hideLabelFromVision:!0,onChange:o,options:de.map((e=>"info"===e.value?{...e,label:`${e.label} ${(0,g.__)("(recommended)","autoblue")}`}:e)),selected:r})))}),(0,s.createElement)(p.Button,{label:(0,g.__)("Refresh logs","autoblue"),onClick:()=>{u||e()},disabled:a||n,accessibleWhenDisabled:!0,className:d({[Ce.refresh]:!0,[Ce.refreshing]:a}),icon:w,size:"compact"}),(0,s.createElement)(p.Button,{label:(0,g.__)("Clear logs","autoblue"),onClick:()=>i(!0),isDestructive:!0,icon:Se,size:"compact",accessibleWhenDisabled:!0,disabled:a||n||0===l})))},Ae=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})}),Me=(0,le.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(ne.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})}),Le=()=>{const{setPage:e,page:t,totalPages:a,totalItems:n}=ge();return(0,s.createElement)("div",{className:"KzPwbHigWAmJrseQaoKw"},(0,s.createElement)(p.Button,{label:(0,g.__)("Previous page","autoblue"),onClick:()=>{t>1&&e(t-1)},accessibleWhenDisabled:!0,size:"compact",disabled:1===t,icon:Ae}),(0,s.createElement)(p.Button,{label:(0,g.__)("Next page","autoblue"),onClick:()=>{t<a&&e(t+1)},accessibleWhenDisabled:!0,size:"compact",disabled:t===a||0===a,icon:Me}),(0,s.createElement)("span",{className:"Zh2l7MhZK5xrRuAKKIA2"},(0,g.sprintf)(
    88// translators: %1$d is the first item number, %2$d is the last item number, %3$d is the total number of items)
    99// translators: %1$d is the first item number, %2$d is the last item number, %3$d is the total number of items)
    10 (0,g.__)("Showing %1$d-%2$d of %3$d logs","autoblue"),0===n?0:10*(t-1)+1,Math.min(10*t,n),n)))},Le=(0,le.jsxs)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,le.jsx)(ne.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,le.jsx)(ne.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),Be={time:"K5BgxlncedJq_t7SNRMe"},Te=({log:e,onButtonClick:t})=>{const{level:a,message:n,created_at:l}=e,{formats:o}=(0,pe.getSettings)();return(0,c.createElement)("tr",{className:d(Be.item,Be[a])},(0,c.createElement)("td",null,(0,c.createElement)(ve,{level:a})),(0,c.createElement)("td",null,be(n)),(0,c.createElement)("td",null,(0,c.createElement)(p.Tooltip,{text:(0,pe.dateI18n)("c",l)},(0,c.createElement)(p.__experimentalText,{variant:"muted"},(0,c.createElement)("time",{dateTime:(0,pe.dateI18n)("c",l),className:Be.time},(0,pe.dateI18n)(o?.datetime||"c",l))))),(0,c.createElement)("td",null,(0,c.createElement)(p.Button,{onClick:()=>t(e),variant:"secondary",icon:Le,label:(0,g.__)("View Context","autoblue")})))},Ve=()=>{const{logs:e}=ge(),[t,a]=(0,h.useState)(null),n=e=>{a(e)};return(0,c.createElement)(c.Fragment,null,t&&(0,c.createElement)(ye,{context:t,onRequestClose:()=>a(null)}),(0,c.createElement)(p.__experimentalVStack,{spacing:2},(0,c.createElement)(p.__experimentalHStack,{alignment:"edge",className:"i0z7ZyN4Jro1uclPsSxA"},(0,c.createElement)(Pe,null),(0,c.createElement)(ke,null)),(0,c.createElement)(p.Card,null,(0,c.createElement)(p.CardBody,{className:"RppDBVCrYWAJGIMmkYiA"},(0,c.createElement)(p.__experimentalVStack,{spacing:2},(0,c.createElement)(fe,null,(0,c.createElement)("thead",null,(0,c.createElement)("tr",null,(0,c.createElement)("th",null,(0,g.__)("Level","autoblue")),(0,c.createElement)("th",null,(0,g.__)("Message","autoblue")),(0,c.createElement)("th",null,(0,g.__)("Time","autoblue")),(0,c.createElement)("th",null,(0,g.__)("Context","autoblue")))),(0,c.createElement)("tbody",null,e.length>0&&e.map((e=>(0,c.createElement)(Te,{key:e.id,log:e,onButtonClick:n}))))),!e.length&&(0,c.createElement)("div",{className:"neP6M8HbdPhq0lQEAgyx"},(0,g.__)("No logs (yet).","autoblue")))))))},De={notices:"n7yM0P6DXfO7e1UgtFGQ",header:"xzkNAh1yXHy3oWVtzkee",version:"YhcowEQjGHG5jSc72vs4",tabs:"AcUQmgxMrKkXWKN_HshA",container:"skc1SozmvgQ52e9uA3Fc",wrapper:"H4mlAM8GJQgJbzRXdyVp",settings:"qUYVGzB3MCAFehNkod5e",logs:"himvr6mnCghPWNGvRc1Z"},Re=["settings","logs"],He=()=>{const{removeNotice:e}=(0,_.useDispatch)(E.store),t=(0,_.useSelect)((e=>e(E.store).getNotices())).filter((({type:e})=>"snackbar"===e));return(0,c.createElement)(p.SnackbarList,{className:De.notices,notices:t,onRemove:e})},Ze=()=>{const[e,t]=(0,h.useState)((()=>{const e=window.location.hash.replace("#","");return Re.includes(e)?e:"settings"})());return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{className:De.header},b,(0,c.createElement)("span",{className:De.version},autoblue.version)),(0,c.createElement)(p.TabPanel,{className:De.tabs,initialTabName:e,onSelect:e=>{t(e),window.location.hash=e},tabs:[{name:"settings",title:(0,g.__)("Settings","autoblue"),className:"autoblue-settings"},{name:"logs",title:(0,g.__)("Logs","autoblue"),className:"autoblue-logs"}]},(e=>(0,c.createElement)("div",{className:De.container},(0,c.createElement)(p.__experimentalVStack,{spacing:5,className:d(De.wrapper,De[e.name])},"settings"===e.name&&(0,c.createElement)(me,null),"logs"===e.name&&(0,c.createElement)(Ve,null))))),(0,c.createElement)(He,null))};u()((()=>{const e=document.getElementById("autoblue");e&&(0,s.H)(e).render((0,c.createElement)(Ze,null))}))})();
     10(0,g.__)("Showing %1$d-%2$d of %3$d logs","autoblue"),0===n?0:10*(t-1)+1,Math.min(10*t,n),n)))},Pe=(0,le.jsxs)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,le.jsx)(ne.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,le.jsx)(ne.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),Be={time:"K5BgxlncedJq_t7SNRMe"},Te=({log:e,onButtonClick:t})=>{const{level:a,message:n,created_at:l}=e,{formats:r}=(0,pe.getSettings)();return(0,s.createElement)("tr",{className:d(Be.item,Be[a])},(0,s.createElement)("td",null,(0,s.createElement)(ve,{level:a})),(0,s.createElement)("td",null,be(n)),(0,s.createElement)("td",null,(0,s.createElement)(p.Tooltip,{text:(0,pe.dateI18n)("c",l)},(0,s.createElement)(p.__experimentalText,{variant:"muted"},(0,s.createElement)("time",{dateTime:(0,pe.dateI18n)("c",l),className:Be.time},(0,pe.dateI18n)(r?.datetime||"c",l))))),(0,s.createElement)("td",null,(0,s.createElement)(p.Button,{onClick:()=>t(e),variant:"secondary",icon:Pe,label:(0,g.__)("View Context","autoblue")})))},Ve=()=>{const{logs:e,refreshLogs:t}=ge(),a=(0,h.useRef)(!0),[n,l]=(0,h.useState)(null),r=e=>{l(e)},o=(0,h.useCallback)((async()=>{try{await t()}catch(e){}}),[t]);return(0,h.useEffect)((()=>{a.current&&(o(),a.current=!1)}),[o]),(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(ye,{context:n,onRequestClose:()=>l(null)}),(0,s.createElement)(p.__experimentalVStack,{spacing:2},(0,s.createElement)("div",{className:"i0z7ZyN4Jro1uclPsSxA"},(0,s.createElement)(Le,null),(0,s.createElement)(ke,null)),(0,s.createElement)(p.Card,null,(0,s.createElement)(p.CardBody,{className:"RppDBVCrYWAJGIMmkYiA"},(0,s.createElement)(p.__experimentalVStack,{spacing:2},(0,s.createElement)(fe,null,(0,s.createElement)("thead",null,(0,s.createElement)("tr",null,(0,s.createElement)("th",null,(0,g.__)("Level","autoblue")),(0,s.createElement)("th",null,(0,g.__)("Message","autoblue")),(0,s.createElement)("th",null,(0,g.__)("Time","autoblue")),(0,s.createElement)("th",null,(0,g.__)("Context","autoblue")))),(0,s.createElement)("tbody",null,e.length>0&&e.map((e=>(0,s.createElement)(Te,{key:e.id,log:e,onButtonClick:r}))))),!e.length&&(0,s.createElement)("div",{className:"neP6M8HbdPhq0lQEAgyx"},(0,g.__)("No logs (yet).","autoblue")))))))},De={notices:"n7yM0P6DXfO7e1UgtFGQ",header:"xzkNAh1yXHy3oWVtzkee",version:"YhcowEQjGHG5jSc72vs4",tabs:"AcUQmgxMrKkXWKN_HshA",container:"skc1SozmvgQ52e9uA3Fc",wrapper:"H4mlAM8GJQgJbzRXdyVp",settings:"qUYVGzB3MCAFehNkod5e",logs:"himvr6mnCghPWNGvRc1Z"},Re=["settings","logs"],Ze=()=>{const{removeNotice:e}=(0,_.useDispatch)(E.store),t=(0,_.useSelect)((e=>e(E.store).getNotices())).filter((({type:e})=>"snackbar"===e));return(0,s.createElement)(p.SnackbarList,{className:De.notices,notices:t,onRemove:e})},ze=()=>{const[e,t]=(0,h.useState)((()=>{const e=window.location.hash.replace("#","");return Re.includes(e)?e:"settings"})());return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:De.header},b,(0,s.createElement)("span",{className:De.version},autoblue.version)),(0,s.createElement)(p.TabPanel,{className:De.tabs,initialTabName:e,onSelect:e=>{t(e),window.location.hash=e},tabs:[{name:"settings",title:(0,g.__)("Settings","autoblue"),className:"autoblue-settings"},{name:"logs",title:(0,g.__)("Logs","autoblue"),className:"autoblue-logs"}]},(e=>(0,s.createElement)("div",{className:De.container},(0,s.createElement)(p.__experimentalVStack,{spacing:5,className:d(De.wrapper,De[e.name])},"settings"===e.name&&(0,s.createElement)(me,null),"logs"===e.name&&(0,s.createElement)(Ve,null))))),(0,s.createElement)(Ze,null))};u()((()=>{const e=document.getElementById("autoblue");e&&(0,c.H)(e).render((0,s.createElement)(ze,null))}))})();
  • autoblue/trunk/build/editor-rtl.css

    r3211894 r3276419  
    1 .IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-right-radius:7px;border-top-left-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-right-radius:7px;border-bottom-left-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:right}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
     1.IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;gap:var(--gap-size);justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-right-radius:7px;border-top-left-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-right-radius:7px;border-bottom-left-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:right}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
    22.pxGCoNPxvleLS9R54pDD{display:flex;flex-direction:column;gap:12px}.Pji33XRLzc2gr99NtkMW{background-color:#4ab866;border-radius:999px;fill:#fff}
    33.BdtMtThHyPg6Ixs294VO{border:1px solid #0000001a;border-radius:0 0 4px 4px;padding:4px 0}.UbZP1LRbJlNmQJ5XIfZU{display:flex;justify-content:center;padding:16px 0;width:100%}.WhjXMSYedjhE9iq9mGGQ{height:auto;padding:0;position:relative}.WhjXMSYedjhE9iq9mGGQ:focus-within{z-index:1}.aCyp1bdAS7uFpgfVTt4z{box-shadow:none;padding-bottom:5px;padding-top:5px}.WhjXMSYedjhE9iq9mGGQ:focus-within .aCyp1bdAS7uFpgfVTt4z,.WhjXMSYedjhE9iq9mGGQ:hover .aCyp1bdAS7uFpgfVTt4z{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}
  • autoblue/trunk/build/editor.asset.php

    r3211894 r3276419  
    1 <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-date', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => 'efe2e75be642df5475f4');
     1<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-date', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => 'd14b47927ab16448f407');
  • autoblue/trunk/build/editor.css

    r3211894 r3276419  
    1 .IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-left-radius:7px;border-top-right-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-left-radius:7px;border-bottom-right-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:left}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
     1.IVZmEOtE_7uqQA_z7LDw{gap:12px}.IVZmEOtE_7uqQA_z7LDw,.mS05_wtPati8LfYBYTGx{align-items:center;display:flex}.mS05_wtPati8LfYBYTGx{--avatar-size:40px;--name-size:15px;--handle-size:14px;--gap-size:12px;background-color:#fff;box-shadow:0 0 0 1px #0000001a;color:#1e1e1e;flex-wrap:wrap;gap:var(--gap-size);justify-content:space-between;outline:none;padding:10px;width:100%}.mS05_wtPati8LfYBYTGx:first-of-type{border-top-left-radius:7px;border-top-right-radius:7px}.mS05_wtPati8LfYBYTGx:last-of-type{border-bottom-left-radius:7px;border-bottom-right-radius:7px}.F2ZNrdlk8l4sx61TvagD{align-items:center;display:flex;gap:var(--gap-size);text-align:left}.UPhsTTWKWZwbzXMghRps{background-color:#f1f1f1;border:1px solid #f1f1f1;border-radius:50%;height:var(--avatar-size);margin:0;overflow:hidden;width:var(--avatar-size)}.UPhsTTWKWZwbzXMghRps img{height:100%;width:100%}.zMF2PjNx4vXZ8jAMdrMm{display:flex;flex-direction:column;gap:4px}.ADqq9wMPxBktKNS_YSlo{font-size:var(--name-size);font-weight:600;line-height:1}.BoWAC4fmJvi3BgVUzxXI{color:#757575;font-size:var(--handle-size);line-height:1}.LUuMlpzD9HyupHyt98G3{--name-size:14px;--handle-size:13px;--gap-size:8px}.iVtkCNHNWdxuifShiMKh{--name-size:16px;--handle-size:14px;--avatar-size:50px;--gap-size:16px;padding:20px}.iVtkCNHNWdxuifShiMKh .zMF2PjNx4vXZ8jAMdrMm{gap:6px}
    22.pxGCoNPxvleLS9R54pDD{display:flex;flex-direction:column;gap:12px}.Pji33XRLzc2gr99NtkMW{background-color:#4ab866;border-radius:999px;fill:#fff}
    33.BdtMtThHyPg6Ixs294VO{border:1px solid #0000001a;border-radius:0 0 4px 4px;padding:4px 0}.UbZP1LRbJlNmQJ5XIfZU{display:flex;justify-content:center;padding:16px 0;width:100%}.WhjXMSYedjhE9iq9mGGQ{height:auto;padding:0;position:relative}.WhjXMSYedjhE9iq9mGGQ:focus-within{z-index:1}.aCyp1bdAS7uFpgfVTt4z{box-shadow:none;padding-bottom:5px;padding-top:5px}.WhjXMSYedjhE9iq9mGGQ:focus-within .aCyp1bdAS7uFpgfVTt4z,.WhjXMSYedjhE9iq9mGGQ:hover .aCyp1bdAS7uFpgfVTt4z{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}
  • autoblue/trunk/build/editor.js

    r3211894 r3276419  
    1 (()=>{"use strict";var e={20:(e,t,a)=>{var n=a(609),r=Symbol.for("react.element"),o=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,a){var n,c={},u=null,i=null;for(n in void 0!==a&&(u=""+a),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(i=t.ref),t)o.call(t,n)&&!s.hasOwnProperty(n)&&(c[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===c[n]&&(c[n]=t[n]);return{$$typeof:r,type:e,key:u,ref:i,props:c,_owner:l.current}}},848:(e,t,a)=>{e.exports=a(20)},609:e=>{e.exports=window.React}},t={};function a(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,a),o.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};a.r(n),a.d(n,{getAccounts:()=>O});var r={};a.r(r),a.d(r,{getLogs:()=>Z,getLogsCurrentPage:()=>I,getLogsStatus:()=>H,getLogsTotalItems:()=>z,getLogsTotalPages:()=>R});var o={};a.r(o),a.d(o,{addAccount:()=>W,addAccountToState:()=>G,deleteAccount:()=>q,deleteAccountFromState:()=>$,setAccounts:()=>j});var l={};a.r(l),a.d(l,{clearLogs:()=>Q,refreshLogs:()=>Y});var s=a(609);const c=window.wp.i18n,u=window.wp.plugins,i=window.wp.editor,d=((0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 813 138"},(0,s.createElement)("path",{fill:"#000",d:"M243.084 107.24c-19.592 0-32.736-13.392-32.736-34.472 0-21.08 13.144-34.348 32.736-34.348 12.772 0 21.08 4.712 24.924 11.532h.868l.62-10.416h19.84V106H268.38V95.336h-.868c-4.092 7.316-13.516 11.904-24.428 11.904Zm6.448-15.872c11.78 0 18.724-7.564 18.724-17.112v-3.224c0-9.3-6.944-16.74-18.724-16.74-10.788 0-18.104 6.572-18.104 18.476 0 11.78 7.192 18.6 18.104 18.6ZM329.746 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972S355.29 83.68 355.29 72.52V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM415.443 106c-11.036 0-18.104-5.208-18.104-16.492V55.284h-12.4V39.536h12.4V22.672l20.584-3.968v20.832h16.492v15.748h-16.492v27.652c0 4.092 1.984 5.332 6.076 5.332h10.416V106h-18.972ZM479.63 107.24c-24.056 0-40.052-12.772-40.052-34.472 0-21.576 15.872-34.472 40.052-34.472 24.056 0 39.928 12.648 39.928 34.472 0 21.576-15.748 34.472-39.928 34.472Zm0-15.996c12.028 0 19.096-7.192 19.096-18.476 0-11.408-6.944-18.476-19.096-18.476-12.152 0-19.096 7.192-19.096 18.476 0 11.284 6.944 18.476 19.096 18.476ZM575.383 106.992c-12.648 0-20.956-4.588-24.924-11.532h-.868l-.62 10.54h-19.716V15.604h20.832V50.2h.744c4.216-7.44 13.764-11.904 24.552-11.904 19.592 0 32.612 13.392 32.612 34.348 0 21.08-13.02 34.348-32.612 34.348Zm-6.448-15.748c10.912 0 18.104-6.696 18.104-18.6 0-11.656-7.192-18.476-18.104-18.476-11.904 0-18.848 7.564-18.848 17.112v3.1c0 9.3 6.944 16.864 18.848 16.864ZM617.532 106V15.604h20.832V106h-20.832ZM678.86 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972s18.352-7.688 18.352-18.848V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM774.249 107.116c-24.304 0-39.928-12.648-39.928-33.976 0-21.824 15.872-34.844 39.68-34.844 25.296 0 39.928 14.508 38.316 38.936h-57.04c.248 9.92 7.564 15.872 19.468 15.872 8.804 0 15.996-3.348 17.732-8.308h19.716c-1.86 13.392-17.484 22.32-37.944 22.32Zm-.372-54.684c-10.416 0-17.36 4.836-18.848 13.268h36.58c-.744-8.184-6.944-13.268-17.732-13.268Z"}),(0,s.createElement)("path",{fill:"#5089FB",d:"M127.627 1.756c13.597.242 21.261 8.627 23.983 20.423 1.371 5.939 1.669 12.174 1.987 18.3.739 14.24 1.276 28.496 1.733 42.746.259 7.984.199 15.983.266 23.975.137 16.158-12.09 24.804-22.837 27.733a48.532 48.532 0 0 1-11.457 1.786c-22.625.555-45.256 1.174-67.885 1.189-12.069.009-24.058-1.913-35.864-4.475C8.49 131.468 1.507 123.037.424 113.285a80.385 80.385 0 0 1-.41-9.705C.131 92.452.47 81.326.516 70.198c.057-12.963-.07-25.927-.194-38.89-.033-3.555-.263-7.01 1.024-10.52 3.59-9.792 10.627-15.202 20.643-16.91C55.135-1.775 91-.095 127.627 1.757Z"}),(0,s.createElement)("path",{fill:"#DEEBFF",d:"M35.164 99.944C37.83 73.172 56.04 30 77.984 30c21.944 0 40.155 43.172 42.821 69.944 2.681 26.939-22.785-14.807-42.82-14.807-20.036 0-45.256 39.273-42.821 14.807Z"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 256 256"},(0,s.createElement)("path",{fill:"#5089FB",d:"M209.982 17.89c22.371.4 34.98 14.2 39.459 33.617 2.256 9.775 2.746 20.04 3.268 30.121 1.216 23.441 2.101 46.906 2.852 70.362.426 13.142.326 26.308.437 39.464.226 26.596-19.891 40.827-37.573 45.649a79.8 79.8 0 0 1-18.85 2.938c-37.225.914-74.458 1.933-111.69 1.959-19.856.015-39.582-3.15-59.006-7.366-14.91-3.235-26.4-17.113-28.181-33.165a132.365 132.365 0 0 1-.676-15.974c.196-18.317.75-36.63.83-54.947.092-21.337-.117-42.677-.32-64.014C.476 60.682.1 54.994 2.217 49.216 8.123 33.1 19.7 24.195 36.179 21.385c54.533-9.308 113.541-6.543 173.803-3.495Z"}),(0,s.createElement)("path",{fill:"#DEEBFF",d:"M57.854 179.51c4.387-44.067 34.348-115.13 70.451-115.13 36.104 0 66.065 71.063 70.452 115.13 4.411 44.342-37.488-24.373-70.451-24.373-32.964 0-74.458 64.644-70.452 24.373Z"}))),p=((0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"600",height:"530",version:"1.1",viewBox:"0 0 600 530"},(0,s.createElement)("path",{d:"m135.72 44.03c66.496 49.921 138.02 151.14 164.28 205.46 26.262-54.316 97.782-155.54 164.28-205.46 47.98-36.021 125.72-63.892 125.72 24.795 0 17.712-10.155 148.79-16.111 170.07-20.703 73.984-96.144 92.854-163.25 81.433 117.3 19.964 147.14 86.092 82.697 152.22-122.39 125.59-175.91-31.511-189.63-71.766-2.514-7.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937 0.51669-3.7077 7.8964-13.714 40.255-67.233 197.36-189.63 71.766-64.444-66.128-34.605-132.26 82.697-152.22-67.108 11.421-142.55-7.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07 0-88.687 77.742-60.816 125.72-24.795z",fill:"#1185fe"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,s.createElement)("path",{fillRule:"evenodd",d:"M6 12c0-3.328 2.64-6 5.866-6 2.164 0 4.063 1.201 5.08 3H15v1.5h4.5V6H18v1.848C16.683 5.834 14.431 4.5 11.866 4.5 7.783 4.5 4.5 7.872 4.5 12H6ZM18 12c0 3.328-2.64 6-5.865 6-2.165 0-4.064-1.201-5.081-3H9v-1.5H4.5V18H6v-1.848c1.317 2.014 3.569 3.348 6.135 3.348 4.082 0 7.365-3.372 7.365-7.5H18Z",clipRule:"evenodd"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)("path",{d:"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z"})),(0,s.createElement)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)("path",{d:"M13.13 13.38L13.48 6.92004H10.52L10.87 13.38H13.13ZM13.04 16.74C13.28 16.51 13.41 16.19 13.41 15.78C13.41 15.36 13.29 15.04 13.05 14.81C12.81 14.58 12.46 14.46 11.99 14.46C11.52 14.46 11.17 14.58 10.92 14.81C10.67 15.04 10.55 15.36 10.55 15.78C10.55 16.19 10.68 16.51 10.93 16.74C11.19 16.97 11.54 17.08 11.99 17.08C12.44 17.08 12.79 16.97 13.04 16.74Z"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,s.createElement)("path",{d:"M11 17h2v-6h-2v6Zm0-8h2V7h-2v2Z"})),window.wp.components),m=window.wp.data,g=window.wp.apiFetch;var h=a.n(g);function _(e){var t,a,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=_(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}const E=({account:{did:e,meta:t={}},className:a,onDelete:n=null,deleteLabel:r=null,size:o="medium"})=>{const{userData:l,isLoading:u}=((e,t)=>{const[a,n]=(0,s.useState)({handle:t.handle||"",displayName:t.name||"",avatar:t.avatar||""}),[r,o]=(0,s.useState)(!1),l=(0,s.useRef)(null);return(0,s.useEffect)((()=>((async()=>{if(!a.handle){l.current&&l.current.abort(),l.current=new AbortController;try{o(!0);const t=await h()({path:`/autoblue/v1/account?did=${e}`,signal:l.current.signal});n({handle:t.handle||a.handle,displayName:t.displayName||a.displayName,avatar:t.avatar||a.avatar})}catch(e){console.error("Error fetching user data:",e),"AbortError"!==e.name&&console.error("Error fetching user data:",e)}finally{o(!1)}}})(),()=>{l.current&&l.current.abort()})),[e,a]),{userData:a,isLoading:r}})(e,t),[i,d]=(0,s.useState)(!1);return a=function(){for(var e,t,a=0,n="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=_(e))&&(n&&(n+=" "),n+=t);return n}("mS05_wtPati8LfYBYTGx",a,"small"===o&&"LUuMlpzD9HyupHyt98G3","large"===o&&"iVtkCNHNWdxuifShiMKh"),u?(0,s.createElement)("div",{className:a},(0,s.createElement)("div",{className:"IVZmEOtE_7uqQA_z7LDw"},(0,s.createElement)(p.Spinner,null))):(0,s.createElement)("div",{className:a},(0,s.createElement)("div",{className:"F2ZNrdlk8l4sx61TvagD"},(0,s.createElement)("figure",{className:"UPhsTTWKWZwbzXMghRps"},l.avatar&&(0,s.createElement)("img",{src:l.avatar,alt:l.displayName,style:{display:i?"block":"none"},onLoad:()=>d(!0),onError:()=>d(!1)})),(0,s.createElement)("div",{className:"zMF2PjNx4vXZ8jAMdrMm"},(0,s.createElement)("span",{className:"ADqq9wMPxBktKNS_YSlo"},l.displayName),(0,s.createElement)("span",{className:"BoWAC4fmJvi3BgVUzxXI"},"@",l.handle))),n&&(0,s.createElement)(p.Button,{icon:r?void 0:"no-alt",isDestructive:!0,variant:r?"secondary":void 0,onClick:n,label:r||(0,c.__)("Delete","autoblue")},r||null))},b=window.wp.date,w=window.wp.primitives;var v=a(848);const f=(0,v.jsx)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,v.jsx)(w.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),y=window.wp.element,S=()=>{const{shares:e,isSharingEnabled:t}=(()=>{var e;const[t,a]=(0,y.useState)(null),[n,r]=(0,y.useState)(0),o=(0,m.useSelect)((e=>{const{getCurrentPostAttribute:t,getCurrentPostId:a}=e(i.store),n=t("meta")||{};return{isSharingEnabled:n?.autoblue_enabled||!1,shares:n?.autoblue_shares||[],postId:a()}}),[]);(0,y.useEffect)((()=>{const{postId:e,shares:l}=o,s=l.length>0||t?.autoblue_shares?.length>0;if(!e||s||n>=60)return;const c=setInterval((async()=>{r((e=>e+1)),(await(async()=>{try{const t=await h()({path:`/wp/v2/posts/${e}`,method:"GET"});return!!t.meta&&(a(t.meta),t.meta.autoblue_shares?.length>0)}catch(e){return!1}})()||n>=59)&&clearInterval(c)}),1e3);return()=>clearInterval(c)}),[o,t?.autoblue_shares?.length,n]);const l=t?.autoblue_shares||o.shares;return{shares:l,hasShares:l.length>0,isSharingEnabled:null!==(e=t?.autoblue_enabled)&&void 0!==e?e:o.isSharingEnabled}})(),{postType:a}=(0,m.useSelect)((e=>{const{getCurrentPostType:t}=e("core/editor");return{postType:t()}}),[]);if("post"!==a)return null;const{formats:n}=(0,b.getSettings)();return t?e.length?(0,s.createElement)("div",null,e.map((e=>{return(0,s.createElement)("div",{key:e.uri,className:"pxGCoNPxvleLS9R54pDD"},(0,s.createElement)(p.__experimentalHStack,{alignment:"left",spacing:3},(0,s.createElement)(p.Icon,{icon:f,className:"Pji33XRLzc2gr99NtkMW"}),(0,s.createElement)(p.__experimentalVStack,{spacing:0},(0,s.createElement)(p.__experimentalText,null,(0,c.__)("Shared to Bluesky","autoblue")),(0,s.createElement)(p.Tooltip,{text:(0,b.dateI18n)(n?.datetime||"c",e.date)},(0,s.createElement)(p.__experimentalText,{variant:"muted"},(0,s.createElement)("time",{dateTime:(0,b.dateI18n)("c",e.date)},(0,b.humanTimeDiff)(e.date)))))),(0,s.createElement)(p.ExternalLink,{href:(t=e.uri,a=e.did,`https://bsky.app/profile/${a}/post/${t.split("/").pop()}`)},(0,c.__)("View on Bluesky","autoblue")));var t,a}))):(0,s.createElement)(p.__experimentalHStack,{alignment:"center"},(0,s.createElement)(p.Spinner,null)):(0,s.createElement)(p.__experimentalText,{variant:"muted"},(0,c.__)("Sharing was disabled for this post.","autoblue"))},x=()=>{const{editPost:e}=(0,m.useDispatch)("core/editor"),{postUrl:t}=(0,m.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{postUrl:t("meta")?.autoblue_post_url}}),[]);return(0,s.createElement)(p.__experimentalVStack,{spacing:4},(0,s.createElement)(S,null),(0,s.createElement)(p.TextControl,{label:(0,c.__)("Bluesky Post URL","autoblue"),value:t,onChange:t=>{e({meta:{autoblue_post_url:t}})},help:(0,c.__)("If you used Autoblue to share this post, replies from that URL will show up automatically. If you did not use Autoblue or want to show replies from a different URL, you can enter it here.","autoblue")}))},C="UbZP1LRbJlNmQJ5XIfZU",P=({onSelect:e})=>{const[t,a]=(0,y.useState)(""),[n,r]=(0,y.useState)(!1),[o,l]=(0,y.useState)([]),[u,i]=(0,y.useState)(!1);let d=null;const m=(0,y.useRef)(null),g=(0,y.useCallback)((async e=>{if(e.length>0){r(!0),m.current&&m.current.abort(),m.current=new AbortController;try{const t=await h()({path:`/autoblue/v1/search?q=${encodeURIComponent(e)}`,signal:m.current.signal});if(!t.actors)throw new Error("Unexpected response from the server");l(t.actors),i(!0)}catch(e){"AbortError"!==e.name&&(l([]),i(!0))}finally{!0!==m.current?.signal.aborted&&r(!1)}}else l([]),i(!1)}),[]);(0,y.useEffect)((()=>(d&&clearTimeout(d),d=setTimeout((()=>{g(t)}),300),()=>{clearTimeout(d),m.current&&m.current.abort()})),[t,g]);const _=n?(0,s.createElement)("div",{className:C},(0,s.createElement)(p.Spinner,null)):0===o.length&&t.length>0&&u?(0,s.createElement)("div",{className:C},(0,c.__)("No accounts found. Please try another search.","autoblue")):o.length>0?o.map((({did:t,handle:a,displayName:n,avatar:r})=>(0,s.createElement)(p.Button,{key:t,className:"WhjXMSYedjhE9iq9mGGQ",onClick:()=>e({did:t,meta:{handle:a,name:n,avatar:r}})},(0,s.createElement)(E,{account:{did:t,meta:{handle:a,name:n,avatar:r}},className:"aCyp1bdAS7uFpgfVTt4z"})))):null;return(0,s.createElement)("div",null,(0,s.createElement)(p.SearchControl,{__nextHasNoMarginBottom:!0,placeholder:(0,c.__)("Search for a Bluesky account","autoblue"),label:(0,c.__)("Bluesky Account","autoblue"),value:t,onChange:e=>a(e)}),_&&(0,s.createElement)("div",null,(0,s.createElement)(p.__experimentalVStack,{spacing:0,className:"BdtMtThHyPg6Ixs294VO"},_)))},A="SET_ACCOUNTS",N="ADD_ACCOUNT",k="DELETE_ACCOUNT",M="REFRESH_LOGS",T="CLEAR_LOGS",L="SET_LOGS_STATUS",B={items:[]},V={status:"idle"},D=(0,m.combineReducers)({accounts:function(e=B,t){switch(t.type){case A:return{...e,items:t.accounts};case N:return{...e,items:[...e.items,t.account]};case k:return{...e,items:e.items.filter((e=>e.did!==t.did))};default:return e}},logs:function(e=V,t){switch(t.type){case M:return{...e,items:t.logs,pagination:{...e.pagination,...t.pagination}};case T:return{...e,items:[],pagination:{...e.pagination,...t.pagination}};case L:return{...e,status:t.status};case"SET_LOGS_PAGE":return{...e,pagination:{...e.pagination,page:t.page}};default:return e}}});function O(e){return e.accounts.items}function Z(e){return e.logs.items}function H(e){return e.logs.status}function I(e){return e.logs.pagination.page}function R(e){return e.logs.pagination.totalPages}function z(e){return e.logs.pagination.totalItems}const F={...n,...r},U=window.wp.notices;function j(e){return{type:A,accounts:e}}function G(e){return{type:N,account:e}}function $(e){return{type:k,did:e}}function W(e,t){return async function({dispatch:a,registry:n}){const{createSuccessNotice:r,createErrorNotice:o}=n.dispatch(U.store);try{const n=await h()({path:"/autoblue/v1/connections",method:"POST",data:{did:e,app_password:t}});a(G(n));let{handle:o,name:l}=n.meta;o=o?`@${o}`:"";const s=`${l} ${o}`;r(
     1(()=>{"use strict";var e={20:(e,t,a)=>{var n=a(609),r=Symbol.for("react.element"),o=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,a){var n,c={},u=null,i=null;for(n in void 0!==a&&(u=""+a),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(i=t.ref),t)o.call(t,n)&&!s.hasOwnProperty(n)&&(c[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===c[n]&&(c[n]=t[n]);return{$$typeof:r,type:e,key:u,ref:i,props:c,_owner:l.current}}},848:(e,t,a)=>{e.exports=a(20)},609:e=>{e.exports=window.React}},t={};function a(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,a),o.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};a.r(n),a.d(n,{getAccounts:()=>Z});var r={};a.r(r),a.d(r,{getLogs:()=>H,getLogsCurrentPage:()=>R,getLogsStatus:()=>I,getLogsTotalItems:()=>F,getLogsTotalPages:()=>z});var o={};a.r(o),a.d(o,{addAccount:()=>q,addAccountToState:()=>$,deleteAccount:()=>X,deleteAccountFromState:()=>W,setAccounts:()=>G});var l={};a.r(l),a.d(l,{clearLogs:()=>J,refreshLogs:()=>Q});var s=a(609);const c=window.wp.plugins,u=window.wp.editor,i=window.wp.data,d=((0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 813 138"},(0,s.createElement)("path",{fill:"#000",d:"M243.084 107.24c-19.592 0-32.736-13.392-32.736-34.472 0-21.08 13.144-34.348 32.736-34.348 12.772 0 21.08 4.712 24.924 11.532h.868l.62-10.416h19.84V106H268.38V95.336h-.868c-4.092 7.316-13.516 11.904-24.428 11.904Zm6.448-15.872c11.78 0 18.724-7.564 18.724-17.112v-3.224c0-9.3-6.944-16.74-18.724-16.74-10.788 0-18.104 6.572-18.104 18.476 0 11.78 7.192 18.6 18.104 18.6ZM329.746 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972S355.29 83.68 355.29 72.52V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM415.443 106c-11.036 0-18.104-5.208-18.104-16.492V55.284h-12.4V39.536h12.4V22.672l20.584-3.968v20.832h16.492v15.748h-16.492v27.652c0 4.092 1.984 5.332 6.076 5.332h10.416V106h-18.972ZM479.63 107.24c-24.056 0-40.052-12.772-40.052-34.472 0-21.576 15.872-34.472 40.052-34.472 24.056 0 39.928 12.648 39.928 34.472 0 21.576-15.748 34.472-39.928 34.472Zm0-15.996c12.028 0 19.096-7.192 19.096-18.476 0-11.408-6.944-18.476-19.096-18.476-12.152 0-19.096 7.192-19.096 18.476 0 11.284 6.944 18.476 19.096 18.476ZM575.383 106.992c-12.648 0-20.956-4.588-24.924-11.532h-.868l-.62 10.54h-19.716V15.604h20.832V50.2h.744c4.216-7.44 13.764-11.904 24.552-11.904 19.592 0 32.612 13.392 32.612 34.348 0 21.08-13.02 34.348-32.612 34.348Zm-6.448-15.748c10.912 0 18.104-6.696 18.104-18.6 0-11.656-7.192-18.476-18.104-18.476-11.904 0-18.848 7.564-18.848 17.112v3.1c0 9.3 6.944 16.864 18.848 16.864ZM617.532 106V15.604h20.832V106h-20.832ZM678.86 107.116c-17.36 0-28.892-7.936-28.892-31v-36.58h20.956v32.86c0 12.028 3.968 18.972 15.128 18.972s18.352-7.688 18.352-18.848V39.536h20.956V106h-20.088l-.868-11.656h-.992c-4.092 7.812-13.888 12.772-24.552 12.772ZM774.249 107.116c-24.304 0-39.928-12.648-39.928-33.976 0-21.824 15.872-34.844 39.68-34.844 25.296 0 39.928 14.508 38.316 38.936h-57.04c.248 9.92 7.564 15.872 19.468 15.872 8.804 0 15.996-3.348 17.732-8.308h19.716c-1.86 13.392-17.484 22.32-37.944 22.32Zm-.372-54.684c-10.416 0-17.36 4.836-18.848 13.268h36.58c-.744-8.184-6.944-13.268-17.732-13.268Z"}),(0,s.createElement)("path",{fill:"#5089FB",d:"M127.627 1.756c13.597.242 21.261 8.627 23.983 20.423 1.371 5.939 1.669 12.174 1.987 18.3.739 14.24 1.276 28.496 1.733 42.746.259 7.984.199 15.983.266 23.975.137 16.158-12.09 24.804-22.837 27.733a48.532 48.532 0 0 1-11.457 1.786c-22.625.555-45.256 1.174-67.885 1.189-12.069.009-24.058-1.913-35.864-4.475C8.49 131.468 1.507 123.037.424 113.285a80.385 80.385 0 0 1-.41-9.705C.131 92.452.47 81.326.516 70.198c.057-12.963-.07-25.927-.194-38.89-.033-3.555-.263-7.01 1.024-10.52 3.59-9.792 10.627-15.202 20.643-16.91C55.135-1.775 91-.095 127.627 1.757Z"}),(0,s.createElement)("path",{fill:"#DEEBFF",d:"M35.164 99.944C37.83 73.172 56.04 30 77.984 30c21.944 0 40.155 43.172 42.821 69.944 2.681 26.939-22.785-14.807-42.82-14.807-20.036 0-45.256 39.273-42.821 14.807Z"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 256 256"},(0,s.createElement)("path",{fill:"#5089FB",d:"M209.982 17.89c22.371.4 34.98 14.2 39.459 33.617 2.256 9.775 2.746 20.04 3.268 30.121 1.216 23.441 2.101 46.906 2.852 70.362.426 13.142.326 26.308.437 39.464.226 26.596-19.891 40.827-37.573 45.649a79.8 79.8 0 0 1-18.85 2.938c-37.225.914-74.458 1.933-111.69 1.959-19.856.015-39.582-3.15-59.006-7.366-14.91-3.235-26.4-17.113-28.181-33.165a132.365 132.365 0 0 1-.676-15.974c.196-18.317.75-36.63.83-54.947.092-21.337-.117-42.677-.32-64.014C.476 60.682.1 54.994 2.217 49.216 8.123 33.1 19.7 24.195 36.179 21.385c54.533-9.308 113.541-6.543 173.803-3.495Z"}),(0,s.createElement)("path",{fill:"#DEEBFF",d:"M57.854 179.51c4.387-44.067 34.348-115.13 70.451-115.13 36.104 0 66.065 71.063 70.452 115.13 4.411 44.342-37.488-24.373-70.451-24.373-32.964 0-74.458 64.644-70.452 24.373Z"}))),p=((0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"600",height:"530",version:"1.1",viewBox:"0 0 600 530"},(0,s.createElement)("path",{d:"m135.72 44.03c66.496 49.921 138.02 151.14 164.28 205.46 26.262-54.316 97.782-155.54 164.28-205.46 47.98-36.021 125.72-63.892 125.72 24.795 0 17.712-10.155 148.79-16.111 170.07-20.703 73.984-96.144 92.854-163.25 81.433 117.3 19.964 147.14 86.092 82.697 152.22-122.39 125.59-175.91-31.511-189.63-71.766-2.514-7.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937 0.51669-3.7077 7.8964-13.714 40.255-67.233 197.36-189.63 71.766-64.444-66.128-34.605-132.26 82.697-152.22-67.108 11.421-142.55-7.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07 0-88.687 77.742-60.816 125.72-24.795z",fill:"#1185fe"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,s.createElement)("path",{fillRule:"evenodd",d:"M6 12c0-3.328 2.64-6 5.866-6 2.164 0 4.063 1.201 5.08 3H15v1.5h4.5V6H18v1.848C16.683 5.834 14.431 4.5 11.866 4.5 7.783 4.5 4.5 7.872 4.5 12H6ZM18 12c0 3.328-2.64 6-5.865 6-2.165 0-4.064-1.201-5.081-3H9v-1.5H4.5V18H6v-1.848c1.317 2.014 3.569 3.348 6.135 3.348 4.082 0 7.365-3.372 7.365-7.5H18Z",clipRule:"evenodd"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)("path",{d:"M20.285 2 9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z"})),(0,s.createElement)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)("path",{d:"M13.13 13.38L13.48 6.92004H10.52L10.87 13.38H13.13ZM13.04 16.74C13.28 16.51 13.41 16.19 13.41 15.78C13.41 15.36 13.29 15.04 13.05 14.81C12.81 14.58 12.46 14.46 11.99 14.46C11.52 14.46 11.17 14.58 10.92 14.81C10.67 15.04 10.55 15.36 10.55 15.78C10.55 16.19 10.68 16.51 10.93 16.74C11.19 16.97 11.54 17.08 11.99 17.08C12.44 17.08 12.79 16.97 13.04 16.74Z"})),(0,s.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,s.createElement)("path",{d:"M11 17h2v-6h-2v6Zm0-8h2V7h-2v2Z"})),window.wp.i18n),m=window.wp.components,h=window.wp.apiFetch;var g=a.n(h);function _(e){var t,a,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=_(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}const E=({account:{did:e,meta:t={}},className:a,onDelete:n=null,deleteLabel:r=null,size:o="medium"})=>{const{userData:l,isLoading:c}=((e,t)=>{const[a,n]=(0,s.useState)({handle:t.handle||"",displayName:t.name||"",avatar:t.avatar||""}),[r,o]=(0,s.useState)(!1),l=(0,s.useRef)(null);return(0,s.useEffect)((()=>((async()=>{if(!a.handle){l.current&&l.current.abort(),l.current=new AbortController;try{o(!0);const t=await g()({path:`/autoblue/v1/account?did=${e}`,signal:l.current.signal});n({handle:t.handle||a.handle,displayName:t.displayName||a.displayName,avatar:t.avatar||a.avatar})}catch(e){console.error("Error fetching user data:",e),"AbortError"!==e.name&&console.error("Error fetching user data:",e)}finally{o(!1)}}})(),()=>{l.current&&l.current.abort()})),[e,a]),{userData:a,isLoading:r}})(e,t),[u,i]=(0,s.useState)(!1);return a=function(){for(var e,t,a=0,n="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=_(e))&&(n&&(n+=" "),n+=t);return n}("mS05_wtPati8LfYBYTGx",a,"small"===o&&"LUuMlpzD9HyupHyt98G3","large"===o&&"iVtkCNHNWdxuifShiMKh"),c?(0,s.createElement)("div",{className:a},(0,s.createElement)("div",{className:"IVZmEOtE_7uqQA_z7LDw"},(0,s.createElement)(m.Spinner,null))):(0,s.createElement)("div",{className:a},(0,s.createElement)("div",{className:"F2ZNrdlk8l4sx61TvagD"},(0,s.createElement)("figure",{className:"UPhsTTWKWZwbzXMghRps"},l.avatar&&(0,s.createElement)("img",{src:l.avatar,alt:l.displayName,style:{display:u?"block":"none"},onLoad:()=>i(!0),onError:()=>i(!1)})),(0,s.createElement)("div",{className:"zMF2PjNx4vXZ8jAMdrMm"},(0,s.createElement)("span",{className:"ADqq9wMPxBktKNS_YSlo"},l.displayName),(0,s.createElement)("span",{className:"BoWAC4fmJvi3BgVUzxXI"},"@",l.handle))),n&&(0,s.createElement)(m.Button,{icon:r?void 0:"no-alt",isDestructive:!0,variant:r?"secondary":void 0,onClick:n,label:r||(0,p.__)("Delete","autoblue")},r||null))},b=window.wp.element,w=()=>{var e;const[t,a]=(0,b.useState)(null),[n,r]=(0,b.useState)(0),o=(0,i.useSelect)((e=>{const{getCurrentPostAttribute:t,getCurrentPostId:a}=e(u.store),n=t("meta")||{};return{isSharingEnabled:n?.autoblue_enabled||!1,shares:n?.autoblue_shares||[],postId:a()}}),[]);(0,b.useEffect)((()=>{const{postId:e,shares:l}=o,s=l.length>0||t?.autoblue_shares?.length>0;if(!e||s||n>=60)return;const c=setInterval((async()=>{r((e=>e+1)),(await(async()=>{try{const t=await g()({path:`/wp/v2/posts/${e}`,method:"GET"});return!!t.meta&&(a(t.meta),t.meta.autoblue_shares?.length>0)}catch(e){return!1}})()||n>=59)&&clearInterval(c)}),1e3);return()=>clearInterval(c)}),[o,t?.autoblue_shares?.length,n]);let l=t?.autoblue_shares||o.shares;return l=l.map((e=>{return{...e,url:(t=e.uri,a=e.did,`https://bsky.app/profile/${a}/post/${t.split("/").pop()}`)};var t,a})),{shares:l,hasShares:l.length>0,isSharingEnabled:null!==(e=t?.autoblue_enabled)&&void 0!==e?e:o.isSharingEnabled}},v=window.wp.date,f=window.wp.primitives;var y=a(848);const S=(0,y.jsx)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,y.jsx)(f.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),x=()=>{const{shares:e,isSharingEnabled:t}=w(),{formats:a}=(0,v.getSettings)();return t?e.length?(0,s.createElement)("div",null,e.map((e=>(0,s.createElement)("div",{key:e.uri,className:"pxGCoNPxvleLS9R54pDD"},(0,s.createElement)(m.__experimentalHStack,{alignment:"left",spacing:3},(0,s.createElement)(m.Icon,{icon:S,className:"Pji33XRLzc2gr99NtkMW"}),(0,s.createElement)(m.__experimentalVStack,{spacing:0},(0,s.createElement)(m.__experimentalText,null,(0,p.__)("Shared to Bluesky","autoblue")),(0,s.createElement)(m.Tooltip,{text:(0,v.dateI18n)(a?.datetime||"c",e.date)},(0,s.createElement)(m.__experimentalText,{variant:"muted"},(0,s.createElement)("time",{dateTime:(0,v.dateI18n)("c",e.date)},(0,v.humanTimeDiff)(e.date)))))),(0,s.createElement)(m.ExternalLink,{href:e.url},(0,p.__)("View on Bluesky","autoblue")))))):(0,s.createElement)(m.__experimentalHStack,{alignment:"center"},(0,s.createElement)(m.Spinner,null)):(0,s.createElement)(m.__experimentalText,{variant:"muted"},(0,p.__)("Sharing was disabled for this post.","autoblue"))},C=()=>{const{editPost:e}=(0,i.useDispatch)("core/editor"),{shares:t,isSharingEnabled:a}=w(),{postUrl:n}=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{postUrl:t("meta")?.autoblue_post_url}}),[]);return(0,s.createElement)(m.__experimentalVStack,{spacing:4},(0,s.createElement)(x,null),(!a||t.length>0)&&(0,s.createElement)(m.TextControl,{label:(0,p.__)("Bluesky Post URL","autoblue"),value:n,placeholder:t.length>0?t[0].url:"",onChange:t=>{e({meta:{autoblue_post_url:t}})},help:(0,p.__)("If you used Autoblue to share this post, replies from that URL will show up automatically. If you did not use Autoblue or want to show replies from a different URL, you can enter it here.","autoblue")}))},P="UbZP1LRbJlNmQJ5XIfZU",A=({onSelect:e})=>{const[t,a]=(0,b.useState)(""),[n,r]=(0,b.useState)(!1),[o,l]=(0,b.useState)([]),[c,u]=(0,b.useState)(!1);let i=null;const d=(0,b.useRef)(null),h=(0,b.useCallback)((async e=>{if(e.length>0){r(!0),d.current&&d.current.abort(),d.current=new AbortController;try{const t=await g()({path:`/autoblue/v1/search?q=${encodeURIComponent(e)}`,signal:d.current.signal});if(!t.actors)throw new Error("Unexpected response from the server");l(t.actors),u(!0)}catch(e){"AbortError"!==e.name&&(l([]),u(!0))}finally{!0!==d.current?.signal.aborted&&r(!1)}}else l([]),u(!1)}),[]);(0,b.useEffect)((()=>(i&&clearTimeout(i),i=setTimeout((()=>{h(t)}),300),()=>{clearTimeout(i),d.current&&d.current.abort()})),[t,h]);const _=n?(0,s.createElement)("div",{className:P},(0,s.createElement)(m.Spinner,null)):0===o.length&&t.length>0&&c?(0,s.createElement)("div",{className:P},(0,p.__)("No accounts found. Please try another search.","autoblue")):o.length>0?o.map((({did:t,handle:a,displayName:n,avatar:r})=>(0,s.createElement)(m.Button,{key:t,className:"WhjXMSYedjhE9iq9mGGQ",onClick:()=>e({did:t,meta:{handle:a,name:n,avatar:r}})},(0,s.createElement)(E,{account:{did:t,meta:{handle:a,name:n,avatar:r}},className:"aCyp1bdAS7uFpgfVTt4z"})))):null;return(0,s.createElement)("div",null,(0,s.createElement)(m.SearchControl,{__nextHasNoMarginBottom:!0,placeholder:(0,p.__)("Search for a Bluesky account","autoblue"),label:(0,p.__)("Bluesky Account","autoblue"),value:t,onChange:e=>a(e)}),_&&(0,s.createElement)("div",null,(0,s.createElement)(m.__experimentalVStack,{spacing:0,className:"BdtMtThHyPg6Ixs294VO"},_)))},N="SET_ACCOUNTS",k="ADD_ACCOUNT",M="DELETE_ACCOUNT",T="REFRESH_LOGS",L="CLEAR_LOGS",B="SET_LOGS_STATUS",V={items:[]},D={status:"idle"},O=(0,i.combineReducers)({accounts:function(e=V,t){switch(t.type){case N:return{...e,items:t.accounts};case k:return{...e,items:[...e.items,t.account]};case M:return{...e,items:e.items.filter((e=>e.did!==t.did))};default:return e}},logs:function(e=D,t){switch(t.type){case T:return{...e,items:t.logs,pagination:{...e.pagination,...t.pagination}};case L:return{...e,items:[],pagination:{...e.pagination,...t.pagination}};case B:return{...e,status:t.status};case"SET_LOGS_PAGE":return{...e,pagination:{...e.pagination,page:t.page}};default:return e}}});function Z(e){return e.accounts.items}function H(e){return e.logs.items}function I(e){return e.logs.status}function R(e){return e.logs.pagination.page}function z(e){return e.logs.pagination.totalPages}function F(e){return e.logs.pagination.totalItems}const U={...n,...r},j=window.wp.notices;function G(e){return{type:N,accounts:e}}function $(e){return{type:k,account:e}}function W(e){return{type:M,did:e}}function q(e,t){return async function({dispatch:a,registry:n}){const{createSuccessNotice:r,createErrorNotice:o}=n.dispatch(j.store);try{const n=await g()({path:"/autoblue/v1/connections",method:"POST",data:{did:e,app_password:t}});a($(n));let{handle:o,name:l}=n.meta;o=o?`@${o}`:"";const s=`${l} ${o}`;r(
    22// translators: %s is the account name and handle
    33// translators: %s is the account name and handle
    4 (0,c.sprintf)((0,c.__)('Account "%s" connected',"autoblue"),s),{id:"autoblue/account/added",type:"snackbar"})}catch(e){throw o((0,c.__)("Failed to connect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}function q(e){return async function({dispatch:t,registry:a}){const{createSuccessNotice:n,createErrorNotice:r}=a.dispatch(U.store);try{const a=await h()({path:"/autoblue/v1/connections",method:"DELETE",data:{did:e}});return t($(e)),n((0,c.__)("Account disconnected","autoblue"),{id:"autoblue/account/deleted",type:"snackbar"}),a}catch(e){throw r((0,c.__)("Failed to disconnect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}const X=window.wp.url,Y=({page:e=1,perPage:t=10}={})=>async({select:a,dispatch:n,registry:r})=>{const{createSuccessNotice:o,createErrorNotice:l,removeNotice:s}=r.dispatch(U.store);try{const r=a.getLogsCurrentPage(),l=e===r;n({type:L,status:l?"refreshing":"loading"});const u=(0,X.addQueryArgs)("/autoblue/v1/logs",{page:e,per_page:t}),i=await h()({path:u,method:"GET",parse:!0}),{data:d,pagination:p}=i;if(n({type:M,logs:d,pagination:{page:p.page,perPage:p.per_page,totalItems:p.total_items,totalPages:p.total_pages}}),n({type:L,status:"success"}),l){const e=await o((0,c.__)("Logs refreshed.","autoblue"),{type:"snackbar"});setTimeout((()=>{n({type:L,status:"idle"}),s(e.notice.id)}),2e3)}return d}catch(e){throw l((0,c.__)("Failed to refresh logs.","autoblue"),{id:"autoblue/logs/refresh-error",type:"snackbar"}),e}},Q=()=>async({dispatch:e,registry:t})=>{const{createSuccessNotice:a,createErrorNotice:n,removeNotice:r}=t.dispatch(U.store);try{e({type:L,status:"clearing"});const t=await h()({path:"/autoblue/v1/logs",method:"DELETE"});if(t){e({type:T,pagination:{page:1,perPage:10,totalItems:0,totalPages:0}}),e({type:L,status:"success"});const t=await a((0,c.__)("Logs cleared.","autoblue"),{type:"snackbar"});setTimeout((()=>{e({type:L,status:"idle"}),r(t.notice.id)}),2e3)}return t}catch(t){throw e({type:L,status:"error"}),n((0,c.__)("Failed to clear logs.","autoblue"),{id:"autoblue/logs/clear-error",type:"snackbar"}),t}},J={...o,...l},K="autoblue",ee={reducer:D,selectors:F,actions:J,resolvers:{},initialState:autoblue.initialState};let te;try{te=(0,m.select)(K)}catch(e){}if(!te){const e=(0,m.createReduxStore)(K,ee);(0,m.register)(e)}const ae=()=>{const{accounts:e,isLoading:t,error:a}=(0,m.useSelect)((e=>({accounts:e(K).getAccounts()})),[]),{addAccount:n,deleteAccount:r}=(0,m.useDispatch)(K);return{accounts:e,hasAccounts:e.length>0,addAccount:n,deleteAccount:r}},ne=(0,v.jsx)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,v.jsx)(w.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"})}),re=({isOpen:e,onClose:t,selectedAccount:a,onSelectAccount:n,appPassword:r,onAppPasswordChange:o,onAddAccount:l,status:u,errorMessage:i})=>e?(0,s.createElement)(p.Modal,{title:(0,c.__)("Connect Bluesky account","autoblue"),onRequestClose:t,focusOnMount:"firstContentElement",size:"medium"},(0,s.createElement)(p.__experimentalVStack,{spacing:4},a?(0,s.createElement)(E,{account:a,onDelete:()=>n(null)}):(0,s.createElement)(P,{onSelect:n}),(0,s.createElement)(p.TextControl,{__nextHasNoMarginBottom:!0,label:(0,c.__)("App Password","autoblue"),help:(0,y.createInterpolateElement)((0,c.__)("You can create a new app password in your <a>Bluesky account settings</a>.","autoblue"),{a:(0,s.createElement)("a",{href:"https://bsky.app/settings/app-passwords",target:"_blank",rel:"noreferrer"})}),value:r,onChange:o}),(0,s.createElement)(p.__experimentalHStack,{alignment:"left"},(0,s.createElement)(p.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:l,disabled:"loading"===u},(0,c.__)("Connect Account","autoblue")),"loading"===u&&(0,s.createElement)(p.Spinner,null)),"loading"!==u&&i&&(0,s.createElement)(p.__experimentalHStack,{alignment:"left",className:"DP0h4FLv2L4zkkvcUIDh"},(0,s.createElement)(p.Icon,{icon:ne}),(0,s.createElement)("p",null,i)))):null,oe=()=>{const{accounts:e}=ae(),{renderModal:t,openModal:a}=((e=!1)=>{const[t,a]=(0,y.useState)(e),[n,r]=(0,y.useState)(null),[o,l]=(0,y.useState)(""),[u,i]=(0,y.useState)("idle"),[d,p]=(0,y.useState)(""),{addAccount:m}=ae(),g=()=>{a(!1),r(null),l("")},h=e=>{l(e)},_=async()=>{if(n)if(o){i("loading");try{await m(n.did,o),i("success"),p(""),g()}catch(e){i("error"),p((0,c.__)("Something went wrong. Make sure the app password is correct.","autoblue"))}}else p((0,c.__)("Please enter an app password.","autoblue"));else p((0,c.__)("Please pick an account to add.","autoblue"))};return{renderModal:()=>(0,s.createElement)(re,{isOpen:t,onClose:g,selectedAccount:n,onSelectAccount:r,appPassword:o,onAppPasswordChange:h,onAddAccount:_,status:u,errorMessage:d}),isOpen:t,openModal:()=>a(!0),closeModal:g}})(),{editPost:n}=(0,m.useDispatch)("core/editor"),{postType:r,postStatus:o,isEnabled:l,customMessage:u}=(0,m.useSelect)((e=>{const{getCurrentPostType:t,getEditedPostAttribute:a}=e("core/editor");return{postType:t(),postStatus:a("status"),isEnabled:a("meta")?.autoblue_enabled,customMessage:a("meta")?.autoblue_custom_message}}),[]);return"post"!==r?null:"publish"===o?(0,s.createElement)(x,null):e.length?(0,s.createElement)(p.__experimentalVStack,{spacing:3},(0,s.createElement)(p.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,c.__)("Share to Bluesky","autoblue"),checked:l,onChange:e=>{n({meta:{autoblue_enabled:e}})}}),l&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,c.__)("Message","autoblue"),help:(0,c.__)("Add an optional message to the Bluesky post.","autoblue"),value:u,maxLength:250,onChange:e=>{n({meta:{autoblue_custom_message:e}})}}),(0,s.createElement)(p.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,c.__)("Sharing to:","autoblue"),id:"autoblue-account"},e.map((e=>(0,s.createElement)(E,{key:e.did,account:e,className:"RtWJ7rQhnShEvixSHzh5",size:"small"})))))):(0,s.createElement)(p.__experimentalVStack,null,(0,s.createElement)(p.Button,{variant:"secondary",onClick:()=>a()},(0,c.__)("Connect a Bluesky account","autoblue")),t())};(0,u.registerPlugin)("autoblue-share-panel",{render:()=>(0,s.createElement)(i.PluginDocumentSettingPanel,{name:"autoblue-share-panel",title:"Autoblue",icon:d},(0,s.createElement)(oe,null))}),(0,u.registerPlugin)("autoblue-prepublish-share-panel",{render:()=>(0,s.createElement)(i.PluginPrePublishPanel,{title:"Autoblue",initialOpen:!0,icon:d},(0,s.createElement)(oe,null))}),(0,u.registerPlugin)("autoblue-postpublish-share-panel",{render:()=>(0,s.createElement)(i.PluginPostPublishPanel,{title:"Autoblue",initialOpen:!0,icon:d},(0,s.createElement)(x,null))})})();
     4(0,p.sprintf)((0,p.__)('Account "%s" connected',"autoblue"),s),{id:"autoblue/account/added",type:"snackbar"})}catch(e){throw o((0,p.__)("Failed to connect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}function X(e){return async function({dispatch:t,registry:a}){const{createSuccessNotice:n,createErrorNotice:r}=a.dispatch(j.store);try{const a=await g()({path:"/autoblue/v1/connections",method:"DELETE",data:{did:e}});return t(W(e)),n((0,p.__)("Account disconnected","autoblue"),{id:"autoblue/account/deleted",type:"snackbar"}),a}catch(e){throw r((0,p.__)("Failed to disconnect account","autoblue"),{id:"autoblue/account/error",type:"snackbar"}),e}}}const Y=window.wp.url,Q=({page:e=1,perPage:t=10}={})=>async({select:a,dispatch:n,registry:r})=>{const{createSuccessNotice:o,createErrorNotice:l,removeNotice:s}=r.dispatch(j.store);try{const r=a.getLogsCurrentPage(),l=e===r;n({type:B,status:l?"refreshing":"loading"});const c=(0,Y.addQueryArgs)("/autoblue/v1/logs",{page:e,per_page:t}),u=await g()({path:c,method:"GET",parse:!0}),{data:i,pagination:d}=u;if(n({type:T,logs:i,pagination:{page:d.page,perPage:d.per_page,totalItems:d.total_items,totalPages:d.total_pages}}),n({type:B,status:"success"}),l){const e=await o((0,p.__)("Logs refreshed.","autoblue"),{type:"snackbar"});setTimeout((()=>{n({type:B,status:"idle"}),s(e.notice.id)}),2e3)}return i}catch(e){throw l((0,p.__)("Failed to refresh logs.","autoblue"),{id:"autoblue/logs/refresh-error",type:"snackbar"}),e}},J=()=>async({dispatch:e,registry:t})=>{const{createSuccessNotice:a,createErrorNotice:n,removeNotice:r}=t.dispatch(j.store);try{e({type:B,status:"clearing"});const t=await g()({path:"/autoblue/v1/logs",method:"DELETE"});if(t){e({type:L,pagination:{page:1,perPage:10,totalItems:0,totalPages:0}}),e({type:B,status:"success"});const t=await a((0,p.__)("Logs cleared.","autoblue"),{type:"snackbar"});setTimeout((()=>{e({type:B,status:"idle"}),r(t.notice.id)}),2e3)}return t}catch(t){throw e({type:B,status:"error"}),n((0,p.__)("Failed to clear logs.","autoblue"),{id:"autoblue/logs/clear-error",type:"snackbar"}),t}},K={...o,...l},ee="autoblue",te={reducer:O,selectors:U,actions:K,resolvers:{},initialState:autoblue.initialState};let ae;try{ae=(0,i.select)(ee)}catch(e){}if(!ae){const e=(0,i.createReduxStore)(ee,te);(0,i.register)(e)}const ne=()=>{const{accounts:e,isLoading:t,error:a}=(0,i.useSelect)((e=>({accounts:e(ee).getAccounts()})),[]),{addAccount:n,deleteAccount:r}=(0,i.useDispatch)(ee);return{accounts:e,hasAccounts:e.length>0,addAccount:n,deleteAccount:r}},re=(0,y.jsx)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,y.jsx)(f.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"})}),oe=({isOpen:e,onClose:t,selectedAccount:a,onSelectAccount:n,appPassword:r,onAppPasswordChange:o,onAddAccount:l,status:c,errorMessage:u})=>e?(0,s.createElement)(m.Modal,{title:(0,p.__)("Connect Bluesky account","autoblue"),onRequestClose:t,focusOnMount:"firstContentElement",size:"medium"},(0,s.createElement)(m.__experimentalVStack,{spacing:4},a?(0,s.createElement)(E,{account:a,onDelete:()=>n(null)}):(0,s.createElement)(A,{onSelect:n}),(0,s.createElement)(m.TextControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("App Password","autoblue"),help:(0,b.createInterpolateElement)((0,p.__)("You can create a new app password in your <a>Bluesky account settings</a>.","autoblue"),{a:(0,s.createElement)("a",{href:"https://bsky.app/settings/app-passwords",target:"_blank",rel:"noreferrer"})}),value:r,onChange:o}),(0,s.createElement)(m.__experimentalHStack,{alignment:"left"},(0,s.createElement)(m.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:l,disabled:"loading"===c},(0,p.__)("Connect Account","autoblue")),"loading"===c&&(0,s.createElement)(m.Spinner,null)),"loading"!==c&&u&&(0,s.createElement)(m.__experimentalHStack,{alignment:"left",className:"DP0h4FLv2L4zkkvcUIDh"},(0,s.createElement)(m.Icon,{icon:re}),(0,s.createElement)("p",null,u)))):null,le=()=>{const{accounts:e}=ne(),{renderModal:t,openModal:a}=((e=!1)=>{const[t,a]=(0,b.useState)(e),[n,r]=(0,b.useState)(null),[o,l]=(0,b.useState)(""),[c,u]=(0,b.useState)("idle"),[i,d]=(0,b.useState)(""),{addAccount:m}=ne(),h=()=>{a(!1),r(null),l("")},g=e=>{l(e)},_=async()=>{if(n)if(o){u("loading");try{await m(n.did,o),u("success"),d(""),h()}catch(e){u("error"),d((0,p.__)("Something went wrong. Make sure the app password is correct.","autoblue"))}}else d((0,p.__)("Please enter an app password.","autoblue"));else d((0,p.__)("Please pick an account to add.","autoblue"))};return{renderModal:()=>(0,s.createElement)(oe,{isOpen:t,onClose:h,selectedAccount:n,onSelectAccount:r,appPassword:o,onAppPasswordChange:g,onAddAccount:_,status:c,errorMessage:i}),isOpen:t,openModal:()=>a(!0),closeModal:h}})(),{editPost:n}=(0,i.useDispatch)("core/editor"),{postStatus:r,isEnabled:o,customMessage:l}=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{postStatus:t("status"),isEnabled:t("meta")?.autoblue_enabled,customMessage:t("meta")?.autoblue_custom_message}}),[]);return"publish"===r?(0,s.createElement)(C,null):e.length?(0,s.createElement)(m.__experimentalVStack,{spacing:3},(0,s.createElement)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("Share to Bluesky","autoblue"),checked:o,onChange:e=>{n({meta:{autoblue_enabled:e}})}}),o&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("Message","autoblue"),help:(0,p.__)("Add an optional message to the Bluesky post.","autoblue"),value:l,maxLength:250,onChange:e=>{n({meta:{autoblue_custom_message:e}})}}),(0,s.createElement)(m.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("Sharing to:","autoblue"),id:"autoblue-account"},e.map((e=>(0,s.createElement)(E,{key:e.did,account:e,className:"RtWJ7rQhnShEvixSHzh5",size:"small"})))))):(0,s.createElement)(m.__experimentalVStack,null,(0,s.createElement)(m.Button,{variant:"secondary",onClick:()=>a()},(0,p.__)("Connect a Bluesky account","autoblue")),t())},se=["post"],ce=()=>{const e=(0,i.select)("core/editor").getCurrentPostType();return se.includes(e)};(0,c.registerPlugin)("autoblue-share-panel",{render:()=>ce()?(0,s.createElement)(u.PluginDocumentSettingPanel,{name:"autoblue-share-panel",title:"Autoblue",icon:d},(0,s.createElement)(le,null)):null}),(0,c.registerPlugin)("autoblue-prepublish-share-panel",{render:()=>ce()?(0,s.createElement)(u.PluginPrePublishPanel,{title:"Autoblue",initialOpen:!0,icon:d},(0,s.createElement)(le,null)):null}),(0,c.registerPlugin)("autoblue-postpublish-share-panel",{render:()=>ce()?(0,s.createElement)(u.PluginPostPublishPanel,{title:"Autoblue",initialOpen:!0,icon:d},(0,s.createElement)(C,null)):null})})();
  • autoblue/trunk/includes/Bluesky.php

    r3270523 r3276419  
    144144        $message = apply_filters( 'autoblue/share_message', $message, $post_id );
    145145
    146         $message = html_entity_decode( wp_strip_all_tags( $message ) );
     146        $message = html_entity_decode( wp_strip_all_tags( $message ), ENT_QUOTES );
    147147        $message = ( new Utils\Text() )->trim_text( $message, 300 );
    148148
     
    159159                    'external' => [
    160160                        'uri'         => get_permalink( $post->ID ),
    161                         'title'       => html_entity_decode( get_the_title( $post->ID ), ENT_QUOTES, 'UTF-8' ),
    162                         'description' => $excerpt,
     161                        'title'       => html_entity_decode( get_the_title( $post->ID ), ENT_QUOTES ),
     162                        'description' => html_entity_decode( wp_strip_all_tags( $excerpt ), ENT_QUOTES ),
    163163                    ],
    164164                ],
  • autoblue/trunk/includes/Meta.php

    r3223262 r3276419  
    5858                                'uri'      => [
    5959                                    'type'     => 'string',
    60                                     'format'   => 'uri',
    6160                                    'required' => true,
    62                                 ],
    63                                 'at_uri'   => [
    64                                     'type'   => 'string',
    65                                     'format' => 'uri',
    6661                                ],
    6762                                'response' => [
  • autoblue/trunk/includes/Utils/Text.php

    r3270523 r3276419  
    2424        }
    2525
    26         $last_space = strrpos( $trimmed_string, ' ' );
     26        $last_space = grapheme_strrpos( $trimmed_string, ' ' );
    2727
    2828        if ( $last_space !== false ) {
  • autoblue/trunk/readme.txt

    r3270523 r3276419  
    22Contributors: danielpost
    33Tags: social, bluesky, auto, share, post
    4 Stable tag: 0.0.5
     4Stable tag: 0.0.6
    55Requires at least: 6.6
    66Tested up to: 6.7
     
    4747== Changelog ==
    4848
     49= 0.0.6 =
     50* Improvement: Autoblue settings page is now more mobile-friendly.
     51* Fix: Link to the Bluesky post after sharing works again.
     52* Fix: Excerpts now render correctly in the Bluesky post.
     53
    4954= 0.0.5 =
    5055* Feature: Add filter for setting a custom share message
  • autoblue/trunk/vendor/composer/installed.php

    r3270523 r3276419  
    22    'root' => array(
    33        'name' => 'posty/autoblue',
    4         'pretty_version' => 'v0.0.5',
    5         'version' => '0.0.5.0',
    6         'reference' => 'e777fe95e9c1caa7da4a76a4b09a863896f9d54b',
     4        'pretty_version' => 'v0.0.6',
     5        'version' => '0.0.6.0',
     6        'reference' => '06a849712982c8d95813f990356a98e6be2d45eb',
    77        'type' => 'project',
    88        'install_path' => __DIR__ . '/../../',
     
    2121        ),
    2222        'posty/autoblue' => array(
    23             'pretty_version' => 'v0.0.5',
    24             'version' => '0.0.5.0',
    25             'reference' => 'e777fe95e9c1caa7da4a76a4b09a863896f9d54b',
     23            'pretty_version' => 'v0.0.6',
     24            'version' => '0.0.6.0',
     25            'reference' => '06a849712982c8d95813f990356a98e6be2d45eb',
    2626            'type' => 'project',
    2727            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.