Compare commits
6 Commits
8b6bdd6e02
...
bca16253af
Author | SHA1 | Date |
---|---|---|
Natty | bca16253af | |
Natty | 1f10156ebb | |
Natty | aeb94687b5 | |
Natty | 553dbb9b7b | |
Natty | e21c5a8132 | |
Natty | 59f1d834d4 |
|
@ -1640,6 +1640,20 @@ dependencies = [
|
|||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "magnetar_activity_streams"
|
||||
version = "0.3.0-alpha"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"chrono",
|
||||
"either",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "magnetar_calckey_fe"
|
||||
version = "0.3.0-alpha"
|
||||
|
|
|
@ -8,6 +8,7 @@ license = "AGPL-3.0-only"
|
|||
[workspace]
|
||||
members = [
|
||||
".",
|
||||
"ext_activity_streams",
|
||||
"ext_federation",
|
||||
"ext_nodeinfo",
|
||||
"ext_webfinger",
|
||||
|
|
|
@ -13,6 +13,7 @@ async-trait = { workspace = true }
|
|||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
|
||||
either = { workspace = true }
|
||||
chrono = { workspace = true, features = ["serde"] }
|
||||
thiserror = { workspace = true }
|
||||
url = { workspace = true, features = ["serde"] }
|
||||
|
|
|
@ -1 +1,88 @@
|
|||
use std::borrow::Cow;
|
||||
use std::fmt::Debug;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use url::Url;
|
||||
|
||||
use crate::link::Link;
|
||||
|
||||
pub mod link;
|
||||
pub mod object;
|
||||
pub mod recipe;
|
||||
|
||||
pub trait ObjectTyped: Clone + Debug + Sized + 'static {
|
||||
fn get_type() -> &'static str;
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! def_ld {
|
||||
($obj_type: expr, $x: ty) => {
|
||||
impl $crate::ObjectTyped for $x {
|
||||
fn get_type() -> &'static str {
|
||||
$obj_type
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! ld_union {
|
||||
($z: ident, $($item_name: ident as $item_type: ty),+) => {
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct $z {
|
||||
$(
|
||||
#[serde(flatten)]
|
||||
$item_name: Box<$item_type>,
|
||||
)+
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum OneOrMore<T> {
|
||||
One(T),
|
||||
Many(Vec<T>),
|
||||
}
|
||||
|
||||
impl<T> OneOrMore<T> {
|
||||
pub fn into_vec(self) -> Vec<T> {
|
||||
match self {
|
||||
OneOrMore::One(x) => vec![x],
|
||||
OneOrMore::Many(x) => x,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn iter(&self) -> std::slice::Iter<'_, T> {
|
||||
match self {
|
||||
OneOrMore::One(x) => std::slice::from_ref(x).iter(),
|
||||
OneOrMore::Many(x) => x.iter(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
|
||||
pub struct Base {
|
||||
#[serde(rename = "@type")]
|
||||
as_type: Option<OneOrMore<String>>,
|
||||
#[serde(rename = "@id")]
|
||||
as_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum LinkOrUrl<'a> {
|
||||
Url(Url),
|
||||
Link(Box<Link<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[repr(transparent)]
|
||||
pub struct Id(pub String);
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub enum ObjectSlot<'a, T: ObjectTyped> {
|
||||
Id(Id),
|
||||
Value(Cow<'a, T>),
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
use crate::def_ld;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct LinkMention {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Mention", LinkMention);
|
|
@ -0,0 +1,44 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{def_ld, ObjectSlot};
|
||||
use crate::object::ObjectLinkUnion;
|
||||
use crate::OneOrMore;
|
||||
|
||||
pub mod link_types;
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct Link<'a> {
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#href")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#hreflang")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub href_lang: Option<String>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#mediaType")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub media_type: Option<String>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#rel")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub rel: Option<OneOrMore<String>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#name")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#width")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub width: Option<u32>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#height")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub height: Option<u32>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#preview")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub preview: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Link", Link<'_>);
|
|
@ -0,0 +1,211 @@
|
|||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{def_ld, ObjectSlot, ObjectTyped, OneOrMore};
|
||||
use crate::object::ObjectLinkUnion;
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct Activity<'a> {
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#actor")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub actor: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#object")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub object: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#target")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub target: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#result")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub result: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#origin")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub origin: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#instrument")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub instrument: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Activity", Activity<'_>, base as Object);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct IntransitiveActivity {}
|
||||
|
||||
def_ld!(
|
||||
"https://www.w3.org/ns/activitystreams#IntransitiveActivity",
|
||||
IntransitiveActivity,
|
||||
base as Activity
|
||||
);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityAccept {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Accept", ActivityAccept, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityTentativeAccept {}
|
||||
|
||||
def_ld!(
|
||||
"https://www.w3.org/ns/activitystreams#TentativeAccept",
|
||||
ActivityTentativeAccept,
|
||||
base as ActivityAccept
|
||||
);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityAdd;
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Add", ActivityAdd, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityArrive;
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Arrive", ActivityArrive, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityCreate;
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Create", ActivityCreate, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityDelete {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Delete", ActivityDelete, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityFollow {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Follow", ActivityFollow, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityIgnore {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Ignore", ActivityIgnore, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityJoin {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Join", ActivityJoin, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityLeave {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Leave", ActivityLeave, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityLike {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Like", ActivityLike, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityOffer {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Offer", ActivityOffer, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityInvite {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Invite", ActivityInvite, base as ActivityOffer);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityReject {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Reject", ActivityReject, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityTentativeReject {}
|
||||
|
||||
def_ld!(
|
||||
"https://www.w3.org/ns/activitystreams#TentativeReject",
|
||||
ActivityTentativeReject,
|
||||
base as ActivityReject
|
||||
);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityRemove {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Remove", ActivityRemove, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityUndo {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Undo", ActivityUndo, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityUpdate {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Update", ActivityUpdate, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityView {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#View", ActivityView, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityListen {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Listen", ActivityListen, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityRead {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Read", ActivityRead, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityMove {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Move", ActivityMove, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityTravel {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Travel", ActivityTravel, base as IntransitiveActivity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityAnnounce {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Announce", ActivityAnnounce, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityBlock {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Block", ActivityBlock, base as ActivityIgnore);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityFlag {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Flag", ActivityFlag, base as Activity);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityDislike {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Dislike", ActivityDislike, base as Activity);
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum ActivityClosedStatus<'a> {
|
||||
Date(DateTime<Utc>),
|
||||
Bool(bool),
|
||||
Other(ObjectSlot<'a, ObjectLinkUnion>),
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActivityQuestion<'a> {
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#oneOf")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub one_of: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#anyOf")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub any_of: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#closed")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub closed: Option<OneOrMore<ActivityClosedStatus<'a>>>,
|
||||
}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Question", ActivityQuestion<'_>, base as IntransitiveActivity);
|
|
@ -0,0 +1,65 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::{def_ld, ObjectSlot};
|
||||
use crate::object::{Collection, ObjectLinkUnion, OrderedCollection};
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActorActivityPubProps<'a> {
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#inbox")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub inbox: Option<ObjectSlot<'a, OrderedCollection>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#outbox")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub outbox: Option<ObjectSlot<'a, OrderedCollection>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#following")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub following: Option<ObjectSlot<'a, Collection>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#followers")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub followers: Option<ObjectSlot<'a, Collection>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#liked")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub liked: Option<ObjectSlot<'a, Collection>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#shares")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub shares: Option<ObjectSlot<'a, Collection>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#preferredUsername")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub preferred_username: Option<String>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#endpoints")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub endpoints: Option<Value>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActorApplication {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Application", ActorApplication, base as Object);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActorGroup {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Group", ActorGroup, base as Object);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActorOrganization {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Organization", ActorOrganization, base as Object);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActorPerson {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Person", ActorPerson, base as Object);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ActorService {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Service", ActorService, base as Object);
|
|
@ -0,0 +1,226 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{ld_union, LinkOrUrl, ObjectSlot, OneOrMore};
|
||||
use crate::def_ld;
|
||||
use crate::link::Link;
|
||||
use crate::object::object_types::ObjectImageLinkUnion;
|
||||
|
||||
pub mod activity;
|
||||
pub mod actor;
|
||||
pub mod object_types;
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct Object<'a> {
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#attachment")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub attachment: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#attributedTo")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub attributed_to: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#audience")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub audience: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#content")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub content: Option<String>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#contentMap")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub content_map: Option<HashMap<String, String>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#context")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub context: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#name")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#nameMap")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub name_map: Option<HashMap<String, String>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#endTime")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub end_time: Option<DateTime<Utc>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#generator")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub generator: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#icon")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub icon: Option<OneOrMore<ObjectSlot<'a, ObjectImageLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#image")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub image: Option<OneOrMore<ObjectSlot<'a, ObjectImageLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#inReplyTo")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub in_reply_to: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#location")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub location: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#preview")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub preview: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#published")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub published: Option<DateTime<Utc>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#replies")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub replies: Option<ObjectSlot<'a, CollectionLinkUnion>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#startTime")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub start_time: Option<DateTime<Utc>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#summary")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub summary: Option<String>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#summaryMap")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub summary_map: Option<HashMap<String, String>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#tag")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub tag: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#updated")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub updated: Option<DateTime<Utc>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#url")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub url: Option<OneOrMore<LinkOrUrl<'a>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#to")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub to: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#bto")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub bto: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#cc")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub cc: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#bcc")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub bcc: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#mediaType")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub media_type: Option<String>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#duration")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub duration: Option<String>,
|
||||
|
||||
// ActivityPub
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#source")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub source: Option<ObjectSlot<'a, Object<'a>>>,
|
||||
}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Object", Object<'_>);
|
||||
ld_union!(
|
||||
ObjectLinkUnion,
|
||||
object_props as Object,
|
||||
link_props as Link
|
||||
);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct Collection {
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#totalItems")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub total_items: Option<u32>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#current")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub current: Option<RefCollectionPageLinkUnion>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#first")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub first: Option<RefCollectionPageLinkUnion>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#last")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub last: Option<RefCollectionPageLinkUnion>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#items")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub items: Option<OneOrMore<RefObjectLinkUnion>>,
|
||||
}
|
||||
|
||||
def_ld!(
|
||||
"https://www.w3.org/ns/activitystreams#Collection",
|
||||
Collection
|
||||
);
|
||||
ld_union!(
|
||||
CollectionLinkUnion,
|
||||
collection_props as Collection,
|
||||
link_props as Link
|
||||
);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct OrderedCollection {
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#orderedItems")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub ordered_items: Option<OneOrMore<RefObjectLinkUnion>>,
|
||||
}
|
||||
|
||||
def_ld!(
|
||||
"https://www.w3.org/ns/activitystreams#OrderedCollection",
|
||||
OrderedCollection
|
||||
);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct CollectionPage {
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#next")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub next: Option<RefCollectionPageLinkUnion>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#prev")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub prev: Option<RefCollectionPageLinkUnion>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#partOf")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub part_of: Option<RefCollectionLinkUnion>,
|
||||
}
|
||||
|
||||
def_ld!(
|
||||
"https://www.w3.org/ns/activitystreams#CollectionPage",
|
||||
CollectionPage
|
||||
);
|
||||
ld_union!(
|
||||
CollectionPageLinkUnion,
|
||||
page_props as CollectionPage,
|
||||
link_props as Link
|
||||
);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct OrderedCollectionPage {
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#startIndex")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub start_index: Option<u32>,
|
||||
}
|
||||
|
||||
def_ld!(
|
||||
"https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
|
||||
OrderedCollectionPage
|
||||
);
|
|
@ -0,0 +1,119 @@
|
|||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{def_ld, ld_union, ObjectSlot, ObjectTyped, OneOrMore};
|
||||
use crate::link::Link;
|
||||
use crate::object::{Object, ObjectLinkUnion};
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ObjectRelationship<'a> {
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#object")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub object: Option<OneOrMore<ObjectSlot<'a, ObjectLinkUnion>>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#subject")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub subject: Option<ObjectSlot<'a, ObjectLinkUnion>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#relationship")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub relationship: Option<OneOrMore<ObjectSlot<'a, Object<'a>>>>,
|
||||
}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Relationship", ObjectRelationship, base as Object);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ObjectArticle {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Article", ObjectArticle, base as Object);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ObjectDocument {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Document", ObjectDocument, base as Object);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ObjectAudio {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Audio", ObjectAudio, base as ObjectDocument);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ObjectImage {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Image", ObjectImage, base as ObjectDocument);
|
||||
ld_union!(
|
||||
ObjectImageLinkUnion,
|
||||
image_props as ObjectImage,
|
||||
link_props as Link
|
||||
);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ObjectVideo {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Video", ObjectVideo, base as ObjectDocument);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ObjectNote {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Note", ObjectNote, base as Object);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ObjectPage {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Page", ObjectPage, base as ObjectDocument);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ObjectEvent {}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Event", ObjectEvent, base as Object);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ObjectPlace {
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#accuracy")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub accuracy: Option<f64>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#altitude")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub altitude: Option<f64>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#latitude")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub latitude: Option<f64>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#longitude")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub longitude: Option<f64>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#radius")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub radius: Option<f64>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#units")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub units: Option<String>,
|
||||
}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Place", ObjectPlace, base as Object);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ObjectProfile<'a> {
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#describes")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub describes: Option<ObjectSlot<'a, ObjectProfile<'a>>>,
|
||||
}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Profile", ObjectProfile, base as Object);
|
||||
|
||||
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
|
||||
pub struct ObjectTombstone {
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#formerType")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub former_type: Option<OneOrMore<String>>,
|
||||
|
||||
#[serde(rename = "https://www.w3.org/ns/activitystreams#deleted")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub deleted: Option<DateTime<Utc>>,
|
||||
}
|
||||
|
||||
def_ld!("https://www.w3.org/ns/activitystreams#Tombstone", ObjectTombstone, base as Object);
|
|
@ -0,0 +1,87 @@
|
|||
use crate::object::activity::ActivityBlock;
|
||||
|
||||
use crate::object::Object;
|
||||
use crate::recipe::RecipeError;
|
||||
use crate::{extract_field, Id, ObjectRaw};
|
||||
use serde::Deserialize;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Block {
|
||||
pub id: Id,
|
||||
pub actor: Id,
|
||||
pub object: Id,
|
||||
pub to: Id,
|
||||
}
|
||||
|
||||
impl Block {
|
||||
fn parse(object: &ObjectRaw<impl AsRef<Object>>) -> Result<Block, RecipeError> {
|
||||
let json = object.as_json();
|
||||
let data: &Object = (*object.data).as_ref();
|
||||
|
||||
let ap_type = extract_field!(data, as_type, unwrap);
|
||||
if ap_type.iter().all(|t| t != "Block") {
|
||||
return Err(RecipeError::UnexpectedType(format!("{:?}", ap_type)));
|
||||
}
|
||||
|
||||
let block = ActivityBlock::deserialize(json)?;
|
||||
Ok(Block {
|
||||
id: Id(extract_field!(block, as_id, unwrap | owned)),
|
||||
actor: Id(extract_field!(
|
||||
block,
|
||||
actor,
|
||||
unwrap | single | as_id | owned
|
||||
)),
|
||||
object: Id(extract_field!(
|
||||
block,
|
||||
object,
|
||||
unwrap | single | as_id | owned
|
||||
)),
|
||||
to: Id(extract_field!(block, to, unwrap | single | as_id | owned)),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::object::activity::{Activity, ActivityBlock, ActivityIgnore};
|
||||
use crate::object::Object;
|
||||
use crate::ObjectRaw;
|
||||
use serde::Deserialize;
|
||||
use serde_json::json;
|
||||
|
||||
#[test]
|
||||
fn parse_json() {
|
||||
let json = json!({
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
"id": "https://a.example.com/blocks/1",
|
||||
"type": "Block",
|
||||
"actor": "https://a.example.com/users/1",
|
||||
"object": "https://b.example.com/users/2",
|
||||
"to": "https://b.example.com/users/2",
|
||||
});
|
||||
|
||||
let object = ObjectRaw::<Activity>::deserialize(json).unwrap();
|
||||
|
||||
let block = super::Block::parse(&object).unwrap();
|
||||
|
||||
println!("{:#?}", block);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_json_with_multiple_types() {
|
||||
let json = json!({
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
"id": "https://a.example.com/blocks/1",
|
||||
"type": ["Block", "https://example.com/SomeOtherType"],
|
||||
"actor": "https://a.example.com/users/1",
|
||||
"object": "https://b.example.com/users/2",
|
||||
"to": "https://b.example.com/users/2",
|
||||
});
|
||||
|
||||
let object = ObjectRaw::<Activity>::deserialize(json).unwrap();
|
||||
|
||||
let block = super::Block::parse(&object).unwrap();
|
||||
|
||||
println!("{:#?}", block);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
use thiserror::Error;
|
||||
|
||||
use crate::OneOrMore;
|
||||
|
||||
#[macro_use]
|
||||
pub mod block;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum RecipeError {
|
||||
#[error("Serde error")]
|
||||
DeserializationError(#[from] serde_json::Error),
|
||||
#[error("Unexpected type: {0}")]
|
||||
UnexpectedType(String),
|
||||
#[error("Missing field: {0}")]
|
||||
MissingField(&'static str),
|
||||
#[error("Single item expected: {0}")]
|
||||
ExpectedSingleField(&'static str),
|
||||
#[error("Missing ID")]
|
||||
MissingId,
|
||||
}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub struct FieldPipeline<T> {
|
||||
value: T,
|
||||
field_name: &'static str,
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! extract_field {
|
||||
($obj: expr, $field: ident, $($step:ident)|+ $(|)?) => {{
|
||||
let pipeline = $crate::recipe::FieldPipeline {
|
||||
value: $obj.$field.as_ref(),
|
||||
field_name: stringify!($field),
|
||||
};
|
||||
|
||||
$(
|
||||
let pipeline = pipeline.$step()?;
|
||||
)+
|
||||
|
||||
pipeline.into_inner()
|
||||
}};
|
||||
}
|
||||
|
||||
impl<T> FieldPipeline<Option<T>> {
|
||||
fn unwrap(self) -> Result<FieldPipeline<T>, RecipeError> {
|
||||
Ok(FieldPipeline {
|
||||
value: self
|
||||
.value
|
||||
.ok_or(RecipeError::MissingField(self.field_name))?,
|
||||
field_name: self.field_name,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Resolvable> FieldPipeline<&T> {
|
||||
fn as_id(&self) -> Result<FieldPipeline<&str>, RecipeError> {
|
||||
Ok(FieldPipeline {
|
||||
value: self.value.unresolve().ok_or(RecipeError::MissingId)?,
|
||||
field_name: self.field_name,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> FieldPipeline<&'a OneOrMore<T>> {
|
||||
fn single(self) -> Result<FieldPipeline<&'a T>, RecipeError> {
|
||||
Ok(FieldPipeline {
|
||||
value: match self.value {
|
||||
OneOrMore::One(x) => Ok(x),
|
||||
OneOrMore::Many(vec) if vec.len() == 1 => Ok(vec.first().unwrap()),
|
||||
OneOrMore::Many(_) => Err(RecipeError::ExpectedSingleField(self.field_name)),
|
||||
}?,
|
||||
field_name: self.field_name,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: ToOwned + ?Sized> FieldPipeline<&T> {
|
||||
fn owned(&self) -> Result<FieldPipeline<T::Owned>, RecipeError> {
|
||||
Ok(FieldPipeline {
|
||||
value: self.value.to_owned(),
|
||||
field_name: self.field_name,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> FieldPipeline<T> {
|
||||
fn into_inner(self) -> T {
|
||||
self.value
|
||||
}
|
||||
}
|
|
@ -3,16 +3,17 @@ use std::{fmt::Display, sync::Arc};
|
|||
use chrono::Utc;
|
||||
use http::{HeaderMap, HeaderName, HeaderValue, Method};
|
||||
use indexmap::IndexSet;
|
||||
use magnetar_core::web_model::content_type::ContentActivityStreams;
|
||||
use serde_json::Value;
|
||||
use sha2::Digest;
|
||||
use thiserror::Error;
|
||||
use url::Url;
|
||||
|
||||
use magnetar_core::web_model::content_type::ContentActivityStreams;
|
||||
|
||||
use crate::{
|
||||
client::federation_client::{FederationClient, FederationClientError},
|
||||
crypto::{ApSigningError, ApSigningKey, SigningAlgorithm},
|
||||
ApClientService, ApSignature, ApSigningField, ApSigningHeaders, SigningInput, SigningParts,
|
||||
ApClientService,
|
||||
ApSignature,
|
||||
ApSigningField, ApSigningHeaders, client::federation_client::{FederationClient, FederationClientError}, crypto::{ApSigningError, ApSigningKey, SigningAlgorithm}, SigningInput, SigningParts,
|
||||
};
|
||||
|
||||
pub struct ApClientServiceDefaultProvider {
|
||||
|
@ -413,9 +414,9 @@ mod test {
|
|||
|
||||
use crate::{
|
||||
ap_client::ApClientServiceDefaultProvider,
|
||||
ApClientService,
|
||||
client::federation_client::FederationClient,
|
||||
crypto::{ApHttpPrivateKey, SigningAlgorithm},
|
||||
ApClientService,
|
||||
};
|
||||
|
||||
#[tokio::test]
|
||||
|
@ -427,7 +428,12 @@ mod test {
|
|||
let rsa_key = rsa::RsaPrivateKey::from_pkcs8_pem(key.trim()).into_diagnostic()?;
|
||||
let ap_client = ApClientServiceDefaultProvider {
|
||||
client: Arc::new(
|
||||
FederationClient::new(true, 128_000, 25, UserAgent::from_static("magnetar/0.42"))
|
||||
FederationClient::new(
|
||||
true,
|
||||
128_000,
|
||||
25,
|
||||
UserAgent::from_static("magnetar/0.42 (https://astolfo.social)"),
|
||||
)
|
||||
.into_diagnostic()?,
|
||||
),
|
||||
};
|
||||
|
@ -435,9 +441,9 @@ mod test {
|
|||
let val = ap_client
|
||||
.signed_get(
|
||||
ApHttpPrivateKey::Rsa(Box::new(Cow::Owned(rsa_key)))
|
||||
.create_signing_key(&key_id, SigningAlgorithm::Hs2019)
|
||||
.create_signing_key(&key_id, SigningAlgorithm::RsaSha256)
|
||||
.into_diagnostic()?,
|
||||
SigningAlgorithm::Hs2019,
|
||||
SigningAlgorithm::RsaSha256,
|
||||
None,
|
||||
&url,
|
||||
)
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
"@types/tinycolor2": "1.4.3",
|
||||
"@types/uuid": "8.3.4",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"@vue/runtime-core": "^3.4",
|
||||
"@vue/runtime-core": "^3.4.26",
|
||||
"@vueuse/core": "^10.9.0",
|
||||
"autobind-decorator": "2.4.0",
|
||||
"autosize": "5.0.2",
|
||||
|
@ -64,7 +64,7 @@
|
|||
"prismjs": "1.29.0",
|
||||
"punycode": "2.1.1",
|
||||
"rndstr": "1.0.0",
|
||||
"rollup": "^4.14.1",
|
||||
"rollup": "^4.17.1",
|
||||
"s-age": "1.1.2",
|
||||
"sass": "1.62.1",
|
||||
"seedrandom": "3.0.5",
|
||||
|
@ -80,15 +80,15 @@
|
|||
"tsc-alias": "1.8.6",
|
||||
"tsconfig-paths": "4.2.0",
|
||||
"twemoji-parser": "14.0.0",
|
||||
"typescript": "^5.4.4",
|
||||
"typescript": "^5.4.5",
|
||||
"unicode-emoji-json": "^0.4.0",
|
||||
"uuid": "9.0.0",
|
||||
"vanilla-tilt": "1.8.0",
|
||||
"vidstack": "^1.11",
|
||||
"vite": "^5.2.8",
|
||||
"vidstack": "^1.11.21",
|
||||
"vite": "^5.2.10",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vue": "^3.4.21",
|
||||
"vue-component-type-helpers": "^2.0.11",
|
||||
"vue": "^3.4.26",
|
||||
"vue-component-type-helpers": "^2.0.14",
|
||||
"vue-isyourpasswordsafe": "^2.0.0",
|
||||
"vue3-otp-input": "^0.4.4",
|
||||
"vuedraggable": "4.1.0"
|
||||
|
|
|
@ -4,19 +4,21 @@
|
|||
:title="video.comment"
|
||||
:src="{
|
||||
src: video.url,
|
||||
type: magTransProperty(video, 'mime_type', 'type'),
|
||||
type: mediaType,
|
||||
}"
|
||||
:media-type="magTransProperty(video, 'mime_type', 'type')"
|
||||
:media-type="mediaType"
|
||||
:volume="volume"
|
||||
:controlsDelay="500"
|
||||
:hideOnMouseLeave="true"
|
||||
:load="'play'"
|
||||
streamType="on-demand"
|
||||
crossOrigin
|
||||
playsInline
|
||||
@volume-change="volumeChange"
|
||||
>
|
||||
<media-provider>
|
||||
<media-poster
|
||||
v-if="magTransProperty(video, 'thumbnail_url', 'thumbnailUrl')"
|
||||
:src="magTransProperty(video, 'thumbnail_url', 'thumbnailUrl')"
|
||||
>
|
||||
</media-poster>
|
||||
|
@ -43,7 +45,7 @@ import { computed, ref } from "vue";
|
|||
import { useWindowSize } from "@vueuse/core";
|
||||
import { MediaPlayerElement } from "vidstack/elements";
|
||||
|
||||
defineProps<{
|
||||
const props = defineProps<{
|
||||
video: packed.PackDriveFileBase | misskey.entities.DriveFile;
|
||||
}>();
|
||||
|
||||
|
@ -82,6 +84,15 @@ const { width } = useWindowSize();
|
|||
const controls = computed(() =>
|
||||
structuredClone(getLayoutControls(width.value))
|
||||
);
|
||||
const mediaType = computed(() => {
|
||||
const type = magTransProperty(props.video, 'mime_type', 'type');
|
||||
switch (type) {
|
||||
case "audio/x-flac":
|
||||
return "audio/flac";
|
||||
default:
|
||||
return type;
|
||||
}
|
||||
});
|
||||
|
||||
function volumeChange(e: Event): void {
|
||||
let tgt = e.target as MediaPlayerElement | undefined;
|
||||
|
@ -92,6 +103,10 @@ function volumeChange(e: Event): void {
|
|||
<style lang="scss">
|
||||
.magVideoPlayer {
|
||||
--plyr-color-main: var(--accent);
|
||||
--plyr-audio-controls-background: var(--panelHighlight);
|
||||
--plyr-audio-controls-background-hover: var(--accentedBg);
|
||||
--plyr-audio-control-color: var(--navFg);
|
||||
--plyr-audio-border: 1px solid var(--accentedBg);
|
||||
|
||||
&[data-view-type="video"] {
|
||||
aspect-ratio: 16 / 9;
|
||||
|
|
|
@ -17,7 +17,10 @@
|
|||
"
|
||||
class="audio"
|
||||
>
|
||||
<fieldset class="audio-player-frame">
|
||||
<legend>{{ media.name }}</legend>
|
||||
<MagVideoPlayer :video="media"></MagVideoPlayer>
|
||||
</fieldset>
|
||||
</div>
|
||||
<a
|
||||
v-else
|
||||
|
@ -35,12 +38,12 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import { ref } from "vue";
|
||||
import type * as misskey from "calckey-js";
|
||||
import { ColdDeviceStorage } from "@/store";
|
||||
import { i18n } from "@/i18n";
|
||||
import { packed } from "magnetar-common";
|
||||
import { magTransProperty } from "@/scripts-mag/mag-util";
|
||||
import MagVideoPlayer from "@/components/MagVideoPlayer.vue";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
@ -49,7 +52,7 @@ const props = withDefaults(
|
|||
{}
|
||||
);
|
||||
|
||||
const audioEl = ref<HTMLAudioElement | null>();
|
||||
|
||||
let hide = ref(true);
|
||||
</script>
|
||||
|
||||
|
@ -58,11 +61,6 @@ let hide = ref(true);
|
|||
width: 100%;
|
||||
border-radius: 4px;
|
||||
margin-top: 4px;
|
||||
overflow: hidden;
|
||||
--plyr-color-main: var(--accent);
|
||||
--plyr-audio-controls-background: var(--panelHighlight);
|
||||
--plyr-audio-controls-background-hover: var(--accentedBg);
|
||||
--plyr-audio-control-color: var(--navFg);
|
||||
|
||||
> .download,
|
||||
> .sensitive {
|
||||
|
@ -100,6 +98,18 @@ let hide = ref(true);
|
|||
}
|
||||
|
||||
> .audio {
|
||||
& fieldset.audio-player-frame {
|
||||
border-color: var(--accentedBg);
|
||||
border-radius: 10px;
|
||||
|
||||
& legend {
|
||||
padding-inline: 5px;
|
||||
opacity: 0.7;
|
||||
font-style: italic;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
}
|
||||
|
||||
.audio {
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
|
|
@ -65,7 +65,7 @@ importers:
|
|||
version: 1.15.2
|
||||
ts-node:
|
||||
specifier: ^10.9.2
|
||||
version: 10.9.2(@types/node@20.8.10)(typescript@5.4.5)
|
||||
version: 10.9.2(@types/node@20.12.7)(typescript@5.4.5)
|
||||
typescript:
|
||||
specifier: ^5.4.5
|
||||
version: 5.4.5
|
||||
|
@ -118,13 +118,13 @@ importers:
|
|||
version: 2.1.1
|
||||
'@rollup/plugin-alias':
|
||||
specifier: ^5.1.0
|
||||
version: 5.1.0(rollup@4.14.1)
|
||||
version: 5.1.0(rollup@4.17.1)
|
||||
'@rollup/plugin-json':
|
||||
specifier: ^6.1.0
|
||||
version: 6.1.0(rollup@4.14.1)
|
||||
version: 6.1.0(rollup@4.17.1)
|
||||
'@rollup/pluginutils':
|
||||
specifier: ^5.1.0
|
||||
version: 5.1.0(rollup@4.14.1)
|
||||
version: 5.1.0(rollup@4.17.1)
|
||||
'@types/escape-regexp':
|
||||
specifier: 0.0.1
|
||||
version: 0.0.1
|
||||
|
@ -160,13 +160,13 @@ importers:
|
|||
version: 8.3.4
|
||||
'@vitejs/plugin-vue':
|
||||
specifier: ^5.0.4
|
||||
version: 5.0.4(vite@5.2.8)(vue@3.4.21)
|
||||
version: 5.0.4(vite@5.2.10)(vue@3.4.26)
|
||||
'@vue/runtime-core':
|
||||
specifier: ^3.4
|
||||
version: 3.4.21
|
||||
specifier: ^3.4.26
|
||||
version: 3.4.26
|
||||
'@vueuse/core':
|
||||
specifier: ^10.9.0
|
||||
version: 10.9.0(vue@3.4.21)
|
||||
version: 10.9.0(vue@3.4.26)
|
||||
autobind-decorator:
|
||||
specifier: 2.4.0
|
||||
version: 2.4.0
|
||||
|
@ -229,7 +229,7 @@ importers:
|
|||
version: 7.5.4
|
||||
focus-trap-vue:
|
||||
specifier: ^4.0.3
|
||||
version: 4.0.3(focus-trap@7.5.4)(vue@3.4.21)
|
||||
version: 4.0.3(focus-trap@7.5.4)(vue@3.4.26)
|
||||
gsap:
|
||||
specifier: ^3.12.5
|
||||
version: 3.12.5
|
||||
|
@ -273,8 +273,8 @@ importers:
|
|||
specifier: 1.0.0
|
||||
version: 1.0.0
|
||||
rollup:
|
||||
specifier: ^4.14.1
|
||||
version: 4.14.1
|
||||
specifier: ^4.17.1
|
||||
version: 4.17.1
|
||||
s-age:
|
||||
specifier: 1.1.2
|
||||
version: 1.1.2
|
||||
|
@ -321,8 +321,8 @@ importers:
|
|||
specifier: 14.0.0
|
||||
version: 14.0.0
|
||||
typescript:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^5.4.5
|
||||
version: 5.4.5
|
||||
unicode-emoji-json:
|
||||
specifier: ^0.4.0
|
||||
version: 0.4.0
|
||||
|
@ -333,29 +333,29 @@ importers:
|
|||
specifier: 1.8.0
|
||||
version: 1.8.0
|
||||
vidstack:
|
||||
specifier: ^1.11
|
||||
version: 1.11.12
|
||||
specifier: ^1.11.21
|
||||
version: 1.11.21
|
||||
vite:
|
||||
specifier: ^5.2.8
|
||||
version: 5.2.8(@types/node@20.8.10)(sass@1.62.1)
|
||||
specifier: ^5.2.10
|
||||
version: 5.2.10(@types/node@20.12.7)(sass@1.62.1)
|
||||
vite-plugin-compression:
|
||||
specifier: ^0.5.1
|
||||
version: 0.5.1(vite@5.2.8)
|
||||
version: 0.5.1(vite@5.2.10)
|
||||
vue:
|
||||
specifier: ^3.4.21
|
||||
version: 3.4.21(typescript@5.4.4)
|
||||
specifier: ^3.4.26
|
||||
version: 3.4.26(typescript@5.4.5)
|
||||
vue-component-type-helpers:
|
||||
specifier: ^2.0.11
|
||||
version: 2.0.11
|
||||
specifier: ^2.0.14
|
||||
version: 2.0.14
|
||||
vue-isyourpasswordsafe:
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0
|
||||
vue3-otp-input:
|
||||
specifier: ^0.4.4
|
||||
version: 0.4.4(vue@3.4.21)
|
||||
version: 0.4.4(vue@3.4.26)
|
||||
vuedraggable:
|
||||
specifier: 4.1.0
|
||||
version: 4.1.0(vue@3.4.21)
|
||||
version: 4.1.0(vue@3.4.26)
|
||||
|
||||
magnetar-common:
|
||||
dependencies:
|
||||
|
@ -498,92 +498,92 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@cropper/element-canvas@2.0.0-beta.4:
|
||||
resolution: {integrity: sha512-xL7k5YgtbCLdR/QEj81An4HpPcBTJXf1lq+2xisyHALGeUKQXjA9cJQL7bldYscHAKjmFgNZ5xOMrNaYM++qZw==}
|
||||
/@cropper/element-canvas@2.0.0-beta.5:
|
||||
resolution: {integrity: sha512-TS+NTVQAyLKBFLIjzFcaFK6V5GaNCNSp8FBjApTD/AosV/dPRlNCsgmdJ/BugwJTJUSowVnLrPmulI35z4npAg==}
|
||||
dependencies:
|
||||
'@cropper/element': 2.0.0-beta.4
|
||||
'@cropper/utils': 2.0.0-beta.4
|
||||
'@cropper/element': 2.0.0-beta.5
|
||||
'@cropper/utils': 2.0.0-beta.5
|
||||
dev: true
|
||||
|
||||
/@cropper/element-crosshair@2.0.0-beta.4:
|
||||
resolution: {integrity: sha512-NiwIQZFh963i3E3QbXFiU9oNqs+P1cLJur3+e+DK0E3oLTa7rEfcigP/ZoMj/3DZ9Et0LPhKKRDY2SJ8ZszyPA==}
|
||||
/@cropper/element-crosshair@2.0.0-beta.5:
|
||||
resolution: {integrity: sha512-en3EjiqS/O/uVPVLUanx2ZxvE2n3J5VxGABvBTwQimX4c3kNixq8TUVlsaLdcG7jbehxFpT3S19+tiuZudHqxg==}
|
||||
dependencies:
|
||||
'@cropper/element': 2.0.0-beta.4
|
||||
'@cropper/utils': 2.0.0-beta.4
|
||||
'@cropper/element': 2.0.0-beta.5
|
||||
'@cropper/utils': 2.0.0-beta.5
|
||||
dev: true
|
||||
|
||||
/@cropper/element-grid@2.0.0-beta.4:
|
||||
resolution: {integrity: sha512-uMVVNk1SICwM2nA/7BHkyEojc0DAqsDFIUnC/sIGPtNf3fe5hYQyukby8BEPO7dlqzfIXYmnxacgLaPM9BZ7GQ==}
|
||||
/@cropper/element-grid@2.0.0-beta.5:
|
||||
resolution: {integrity: sha512-uKQExNTOMOGo5d6Tv1NJDbjJHRR/0NgqeROUSt2J8g9ymPP+/MoFdCCf+Nj/KM5pk7/fBEV3HhzUnO8jh1hZfQ==}
|
||||
dependencies:
|
||||
'@cropper/element': 2.0.0-beta.4
|
||||
'@cropper/utils': 2.0.0-beta.4
|
||||
'@cropper/element': 2.0.0-beta.5
|
||||
'@cropper/utils': 2.0.0-beta.5
|
||||
dev: true
|
||||
|
||||
/@cropper/element-handle@2.0.0-beta.4:
|
||||
resolution: {integrity: sha512-PHjC4ptBi0leQ82mPWvivNilNOpiBnV90ueqz99tli8f9bQobx+Os7dzKFwLIpj4WKCNRYhyEvxf1KuKhQisIg==}
|
||||
/@cropper/element-handle@2.0.0-beta.5:
|
||||
resolution: {integrity: sha512-SlaV5/qbEBQLHnuaGD8J0EqSp797m/MMB8V10EUZpv6cznSRxg/SXOj6ROE0ePzo5+0i96Dw+8ZukLilDgc1Xw==}
|
||||
dependencies:
|
||||
'@cropper/element': 2.0.0-beta.4
|
||||
'@cropper/utils': 2.0.0-beta.4
|
||||
'@cropper/element': 2.0.0-beta.5
|
||||
'@cropper/utils': 2.0.0-beta.5
|
||||
dev: true
|
||||
|
||||
/@cropper/element-image@2.0.0-beta.4:
|
||||
resolution: {integrity: sha512-Nu5z5EFpyOEC2CAdhNZGfvpG9Xj6ZD46jvpJGKxsel7J7Kqf4qy+5m6nNdq2J+lK7YfTi16svkHeFwzNWZYLAA==}
|
||||
/@cropper/element-image@2.0.0-beta.5:
|
||||
resolution: {integrity: sha512-369ztVaoRS2DN8SaiHZ/bRCz0Snw9ss7PZrX1OQK86fwVhCoeRqCHj48ayfLMdchx+J3RbM5f2g8ePf7ejwOKw==}
|
||||
dependencies:
|
||||
'@cropper/element': 2.0.0-beta.4
|
||||
'@cropper/element-canvas': 2.0.0-beta.4
|
||||
'@cropper/utils': 2.0.0-beta.4
|
||||
'@cropper/element': 2.0.0-beta.5
|
||||
'@cropper/element-canvas': 2.0.0-beta.5
|
||||
'@cropper/utils': 2.0.0-beta.5
|
||||
dev: true
|
||||
|
||||
/@cropper/element-selection@2.0.0-beta.4:
|
||||
resolution: {integrity: sha512-wHZhWI80cC5TfFHI/2HT1A+ZbHifnAO+/IAr4IqkbaxtDZ9duqEvM2hhC+ZXgB3BYqVidAJNwpSnZkVK+DlJ6A==}
|
||||
/@cropper/element-selection@2.0.0-beta.5:
|
||||
resolution: {integrity: sha512-l8DvOBAZYytTarpkfhCglhxD+zDQ2acVwIzGwp5r9xR+ERleJHxr2rHYVhowRHT/JZRd94DJBlye91c1uO/XGg==}
|
||||
dependencies:
|
||||
'@cropper/element': 2.0.0-beta.4
|
||||
'@cropper/element-canvas': 2.0.0-beta.4
|
||||
'@cropper/element-image': 2.0.0-beta.4
|
||||
'@cropper/utils': 2.0.0-beta.4
|
||||
'@cropper/element': 2.0.0-beta.5
|
||||
'@cropper/element-canvas': 2.0.0-beta.5
|
||||
'@cropper/element-image': 2.0.0-beta.5
|
||||
'@cropper/utils': 2.0.0-beta.5
|
||||
dev: true
|
||||
|
||||
/@cropper/element-shade@2.0.0-beta.4:
|
||||
resolution: {integrity: sha512-sTFTzlmu+Z31Hp7RHgUAxfDsRIQ/uG8RueOBBHLeKVGFZbYhsIElQaLcVDwebgqXLHVr9imCEvvIX11JeTqiTQ==}
|
||||
/@cropper/element-shade@2.0.0-beta.5:
|
||||
resolution: {integrity: sha512-LGSVLAD1lasFrS+Pd7JnQSJRCMSNnc40UCcjLhscDuRcRHK/ViMglnwCfFxeGnS26kugbDLF5IbYDCLCbykUog==}
|
||||
dependencies:
|
||||
'@cropper/element': 2.0.0-beta.4
|
||||
'@cropper/element-canvas': 2.0.0-beta.4
|
||||
'@cropper/element-selection': 2.0.0-beta.4
|
||||
'@cropper/utils': 2.0.0-beta.4
|
||||
'@cropper/element': 2.0.0-beta.5
|
||||
'@cropper/element-canvas': 2.0.0-beta.5
|
||||
'@cropper/element-selection': 2.0.0-beta.5
|
||||
'@cropper/utils': 2.0.0-beta.5
|
||||
dev: true
|
||||
|
||||
/@cropper/element-viewer@2.0.0-beta.4:
|
||||
resolution: {integrity: sha512-bXW8OuezoHjyGFmQzX1QEj3OqvmSZwaLiQts+mVhcarYqAEVrK9s/bC/OqZKR2ZKkHeaiGWq+rTOBVAmhZja/A==}
|
||||
/@cropper/element-viewer@2.0.0-beta.5:
|
||||
resolution: {integrity: sha512-i4cc+L+j8Gq1L8g1BQWfQ842QxH5T9v2EkIeGuW66SVSBglafxu8gxmSOyRD3hDAMHM3wbJ+XVmFwBHZzlYCvQ==}
|
||||
dependencies:
|
||||
'@cropper/element': 2.0.0-beta.4
|
||||
'@cropper/element-canvas': 2.0.0-beta.4
|
||||
'@cropper/element-image': 2.0.0-beta.4
|
||||
'@cropper/element-selection': 2.0.0-beta.4
|
||||
'@cropper/utils': 2.0.0-beta.4
|
||||
'@cropper/element': 2.0.0-beta.5
|
||||
'@cropper/element-canvas': 2.0.0-beta.5
|
||||
'@cropper/element-image': 2.0.0-beta.5
|
||||
'@cropper/element-selection': 2.0.0-beta.5
|
||||
'@cropper/utils': 2.0.0-beta.5
|
||||
dev: true
|
||||
|
||||
/@cropper/element@2.0.0-beta.4:
|
||||
resolution: {integrity: sha512-1P8Vm9+OqTQz4B/rEA0t8xmzKUkYyxzxTiOaDMPKjKbG2R3UZgJBWRzvTgTsDudld9vlR6FfXpDBU1ZWA1BWxQ==}
|
||||
/@cropper/element@2.0.0-beta.5:
|
||||
resolution: {integrity: sha512-+pHX/iYw+Y/HxgpcjvSPBc3+hvJaycznbZdWifnChmDkpLStd6Xu9gO2ful9sSL0uGSjQxUYV4xPyikYJOnfug==}
|
||||
dependencies:
|
||||
'@cropper/utils': 2.0.0-beta.4
|
||||
'@cropper/utils': 2.0.0-beta.5
|
||||
dev: true
|
||||
|
||||
/@cropper/elements@2.0.0-beta.4:
|
||||
resolution: {integrity: sha512-cXKNFwudKcFrxn75VU9nLWNpjUnHcY0rUvtLn+2YVOLAnCTFLlu+azjOW1XZJ01FAEcC62Itb4CvDae+qgDpcQ==}
|
||||
/@cropper/elements@2.0.0-beta.5:
|
||||
resolution: {integrity: sha512-KWa5/dmJpLcKDJpNlbEQzO9Shz+f4aB0I3y97CqqTf8JSGS6CEKOd9uLywd1eow1r4O0Hwo65ktXPwAEhMWDZg==}
|
||||
dependencies:
|
||||
'@cropper/element': 2.0.0-beta.4
|
||||
'@cropper/element-canvas': 2.0.0-beta.4
|
||||
'@cropper/element-crosshair': 2.0.0-beta.4
|
||||
'@cropper/element-grid': 2.0.0-beta.4
|
||||
'@cropper/element-handle': 2.0.0-beta.4
|
||||
'@cropper/element-image': 2.0.0-beta.4
|
||||
'@cropper/element-selection': 2.0.0-beta.4
|
||||
'@cropper/element-shade': 2.0.0-beta.4
|
||||
'@cropper/element-viewer': 2.0.0-beta.4
|
||||
'@cropper/element': 2.0.0-beta.5
|
||||
'@cropper/element-canvas': 2.0.0-beta.5
|
||||
'@cropper/element-crosshair': 2.0.0-beta.5
|
||||
'@cropper/element-grid': 2.0.0-beta.5
|
||||
'@cropper/element-handle': 2.0.0-beta.5
|
||||
'@cropper/element-image': 2.0.0-beta.5
|
||||
'@cropper/element-selection': 2.0.0-beta.5
|
||||
'@cropper/element-shade': 2.0.0-beta.5
|
||||
'@cropper/element-viewer': 2.0.0-beta.5
|
||||
dev: true
|
||||
|
||||
/@cropper/utils@2.0.0-beta.4:
|
||||
resolution: {integrity: sha512-mrUTA3LbEq1Y3nPTC5X6koTd2Dk8P+6xTuhp4P8X3mg5Z7d8AVK+0OU5kbB49OLAaEfvGEqbZJ84rLwgMy9RHw==}
|
||||
/@cropper/utils@2.0.0-beta.5:
|
||||
resolution: {integrity: sha512-xE7Klel/4WSjhLUeldfROwbWqV/1A3YKrQLqTrs5/X0ath7B05Fmvhr3TNFvN51v2KSx46Ug6xDJzmbg772m1g==}
|
||||
dev: true
|
||||
|
||||
/@cspotcode/source-map-consumer@0.8.0:
|
||||
|
@ -979,7 +979,7 @@ packages:
|
|||
resolution: {integrity: sha512-QjrfbItu5Rb2i37GzsKxmrRHfZPTVk3oXSPBnQ2+oACDbQRWGAeB0AsvZw263n1nFouQuff+khOCtRbrc6+k+A==}
|
||||
dev: true
|
||||
|
||||
/@rollup/plugin-alias@5.1.0(rollup@4.14.1):
|
||||
/@rollup/plugin-alias@5.1.0(rollup@4.17.1):
|
||||
resolution: {integrity: sha512-lpA3RZ9PdIG7qqhEfv79tBffNaoDuukFDrmhLqg9ifv99u/ehn+lOg30x2zmhf8AQqQUZaMk/B9fZraQ6/acDQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
|
@ -988,11 +988,11 @@ packages:
|
|||
rollup:
|
||||
optional: true
|
||||
dependencies:
|
||||
rollup: 4.14.1
|
||||
rollup: 4.17.1
|
||||
slash: 4.0.0
|
||||
dev: true
|
||||
|
||||
/@rollup/plugin-json@6.1.0(rollup@4.14.1):
|
||||
/@rollup/plugin-json@6.1.0(rollup@4.17.1):
|
||||
resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
|
@ -1001,11 +1001,11 @@ packages:
|
|||
rollup:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.1.0(rollup@4.14.1)
|
||||
rollup: 4.14.1
|
||||
'@rollup/pluginutils': 5.1.0(rollup@4.17.1)
|
||||
rollup: 4.17.1
|
||||
dev: true
|
||||
|
||||
/@rollup/pluginutils@5.1.0(rollup@4.14.1):
|
||||
/@rollup/pluginutils@5.1.0(rollup@4.17.1):
|
||||
resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
|
@ -1017,123 +1017,131 @@ packages:
|
|||
'@types/estree': 1.0.5
|
||||
estree-walker: 2.0.2
|
||||
picomatch: 2.3.1
|
||||
rollup: 4.14.1
|
||||
rollup: 4.17.1
|
||||
dev: true
|
||||
|
||||
/@rollup/rollup-android-arm-eabi@4.14.1:
|
||||
resolution: {integrity: sha512-fH8/o8nSUek8ceQnT7K4EQbSiV7jgkHq81m9lWZFIXjJ7lJzpWXbQFpT/Zh6OZYnpFykvzC3fbEvEAFZu03dPA==}
|
||||
/@rollup/rollup-android-arm-eabi@4.17.1:
|
||||
resolution: {integrity: sha512-P6Wg856Ou/DLpR+O0ZLneNmrv7QpqBg+hK4wE05ijbC/t349BRfMfx+UFj5Ha3fCFopIa6iSZlpdaB4agkWp2Q==}
|
||||
cpu: [arm]
|
||||
os: [android]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-android-arm64@4.14.1:
|
||||
resolution: {integrity: sha512-Y/9OHLjzkunF+KGEoJr3heiD5X9OLa8sbT1lm0NYeKyaM3oMhhQFvPB0bNZYJwlq93j8Z6wSxh9+cyKQaxS7PQ==}
|
||||
/@rollup/rollup-android-arm64@4.17.1:
|
||||
resolution: {integrity: sha512-piwZDjuW2WiHr05djVdUkrG5JbjnGbtx8BXQchYCMfib/nhjzWoiScelZ+s5IJI7lecrwSxHCzW026MWBL+oJQ==}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-darwin-arm64@4.14.1:
|
||||
resolution: {integrity: sha512-+kecg3FY84WadgcuSVm6llrABOdQAEbNdnpi5X3UwWiFVhZIZvKgGrF7kmLguvxHNQy+UuRV66cLVl3S+Rkt+Q==}
|
||||
/@rollup/rollup-darwin-arm64@4.17.1:
|
||||
resolution: {integrity: sha512-LsZXXIsN5Q460cKDT4Y+bzoPDhBmO5DTr7wP80d+2EnYlxSgkwdPfE3hbE+Fk8dtya+8092N9srjBTJ0di8RIA==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-darwin-x64@4.14.1:
|
||||
resolution: {integrity: sha512-2pYRzEjVqq2TB/UNv47BV/8vQiXkFGVmPFwJb+1E0IFFZbIX8/jo1olxqqMbo6xCXf8kabANhp5bzCij2tFLUA==}
|
||||
/@rollup/rollup-darwin-x64@4.17.1:
|
||||
resolution: {integrity: sha512-S7TYNQpWXB9APkxu/SLmYHezWwCoZRA9QLgrDeml+SR2A1LLPD2DBUdUlvmCF7FUpRMKvbeeWky+iizQj65Etw==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-arm-gnueabihf@4.14.1:
|
||||
resolution: {integrity: sha512-mS6wQ6Do6/wmrF9aTFVpIJ3/IDXhg1EZcQFYHZLHqw6AzMBjTHWnCG35HxSqUNphh0EHqSM6wRTT8HsL1C0x5g==}
|
||||
/@rollup/rollup-linux-arm-gnueabihf@4.17.1:
|
||||
resolution: {integrity: sha512-Lq2JR5a5jsA5um2ZoLiXXEaOagnVyCpCW7xvlcqHC7y46tLwTEgUSTM3a2TfmmTMmdqv+jknUioWXlmxYxE9Yw==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-arm64-gnu@4.14.1:
|
||||
resolution: {integrity: sha512-p9rGKYkHdFMzhckOTFubfxgyIO1vw//7IIjBBRVzyZebWlzRLeNhqxuSaZ7kCEKVkm/kuC9fVRW9HkC/zNRG2w==}
|
||||
/@rollup/rollup-linux-arm-musleabihf@4.17.1:
|
||||
resolution: {integrity: sha512-9BfzwyPNV0IizQoR+5HTNBGkh1KXE8BqU0DBkqMngmyFW7BfuIZyMjQ0s6igJEiPSBvT3ZcnIFohZ19OqjhDPg==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-arm64-gnu@4.17.1:
|
||||
resolution: {integrity: sha512-e2uWaoxo/rtzA52OifrTSXTvJhAXb0XeRkz4CdHBK2KtxrFmuU/uNd544Ogkpu938BzEfvmWs8NZ8Axhw33FDw==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-arm64-musl@4.14.1:
|
||||
resolution: {integrity: sha512-nDY6Yz5xS/Y4M2i9JLQd3Rofh5OR8Bn8qe3Mv/qCVpHFlwtZSBYSPaU4mrGazWkXrdQ98GB//H0BirGR/SKFSw==}
|
||||
/@rollup/rollup-linux-arm64-musl@4.17.1:
|
||||
resolution: {integrity: sha512-ekggix/Bc/d/60H1Mi4YeYb/7dbal1kEDZ6sIFVAE8pUSx7PiWeEh+NWbL7bGu0X68BBIkgF3ibRJe1oFTksQQ==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-powerpc64le-gnu@4.14.1:
|
||||
resolution: {integrity: sha512-im7HE4VBL+aDswvcmfx88Mp1soqL9OBsdDBU8NqDEYtkri0qV0THhQsvZtZeNNlLeCUQ16PZyv7cqutjDF35qw==}
|
||||
cpu: [ppc64le]
|
||||
/@rollup/rollup-linux-powerpc64le-gnu@4.17.1:
|
||||
resolution: {integrity: sha512-UGV0dUo/xCv4pkr/C8KY7XLFwBNnvladt8q+VmdKrw/3RUd3rD0TptwjisvE2TTnnlENtuY4/PZuoOYRiGp8Gw==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-riscv64-gnu@4.14.1:
|
||||
resolution: {integrity: sha512-RWdiHuAxWmzPJgaHJdpvUUlDz8sdQz4P2uv367T2JocdDa98iRw2UjIJ4QxSyt077mXZT2X6pKfT2iYtVEvOFw==}
|
||||
/@rollup/rollup-linux-riscv64-gnu@4.17.1:
|
||||
resolution: {integrity: sha512-gEYmYYHaehdvX46mwXrU49vD6Euf1Bxhq9pPb82cbUU9UT2NV+RSckQ5tKWOnNXZixKsy8/cPGtiUWqzPuAcXQ==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-s390x-gnu@4.14.1:
|
||||
resolution: {integrity: sha512-VMgaGQ5zRX6ZqV/fas65/sUGc9cPmsntq2FiGmayW9KMNfWVG/j0BAqImvU4KTeOOgYSf1F+k6at1UfNONuNjA==}
|
||||
/@rollup/rollup-linux-s390x-gnu@4.17.1:
|
||||
resolution: {integrity: sha512-xeae5pMAxHFp6yX5vajInG2toST5lsCTrckSRUFwNgzYqnUjNBcQyqk1bXUxX5yhjWFl2Mnz3F8vQjl+2FRIcw==}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-x64-gnu@4.14.1:
|
||||
resolution: {integrity: sha512-9Q7DGjZN+hTdJomaQ3Iub4m6VPu1r94bmK2z3UeWP3dGUecRC54tmVu9vKHTm1bOt3ASoYtEz6JSRLFzrysKlA==}
|
||||
/@rollup/rollup-linux-x64-gnu@4.17.1:
|
||||
resolution: {integrity: sha512-AsdnINQoDWfKpBzCPqQWxSPdAWzSgnYbrJYtn6W0H2E9It5bZss99PiLA8CgmDRfvKygt20UpZ3xkhFlIfX9zQ==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-linux-x64-musl@4.14.1:
|
||||
resolution: {integrity: sha512-JNEG/Ti55413SsreTguSx0LOVKX902OfXIKVg+TCXO6Gjans/k9O6ww9q3oLGjNDaTLxM+IHFMeXy/0RXL5R/g==}
|
||||
/@rollup/rollup-linux-x64-musl@4.17.1:
|
||||
resolution: {integrity: sha512-KoB4fyKXTR+wYENkIG3fFF+5G6N4GFvzYx8Jax8BR4vmddtuqSb5oQmYu2Uu067vT/Fod7gxeQYKupm8gAcMSQ==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-win32-arm64-msvc@4.14.1:
|
||||
resolution: {integrity: sha512-ryS22I9y0mumlLNwDFYZRDFLwWh3aKaC72CWjFcFvxK0U6v/mOkM5Up1bTbCRAhv3kEIwW2ajROegCIQViUCeA==}
|
||||
/@rollup/rollup-win32-arm64-msvc@4.17.1:
|
||||
resolution: {integrity: sha512-J0d3NVNf7wBL9t4blCNat+d0PYqAx8wOoY+/9Q5cujnafbX7BmtYk3XvzkqLmFECaWvXGLuHmKj/wrILUinmQg==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-win32-ia32-msvc@4.14.1:
|
||||
resolution: {integrity: sha512-TdloItiGk+T0mTxKx7Hp279xy30LspMso+GzQvV2maYePMAWdmrzqSNZhUpPj3CGw12aGj57I026PgLCTu8CGg==}
|
||||
/@rollup/rollup-win32-ia32-msvc@4.17.1:
|
||||
resolution: {integrity: sha512-xjgkWUwlq7IbgJSIxvl516FJ2iuC/7ttjsAxSPpC9kkI5iQQFHKyEN5BjbhvJ/IXIZ3yIBcW5QDlWAyrA+TFag==}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@rollup/rollup-win32-x64-msvc@4.14.1:
|
||||
resolution: {integrity: sha512-wQGI+LY/Py20zdUPq+XCem7JcPOyzIJBm3dli+56DJsQOHbnXZFEwgmnC6el1TPAfC8lBT3m+z69RmLykNUbew==}
|
||||
/@rollup/rollup-win32-x64-msvc@4.17.1:
|
||||
resolution: {integrity: sha512-0QbCkfk6cnnVKWqqlC0cUrrUMDMfu5ffvYMTUHf+qMN2uAb3MKP31LPcwiMXBNsvoFGs/kYdFOsuLmvppCopXA==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
|
@ -1536,7 +1544,7 @@ packages:
|
|||
/@types/glob-stream@8.0.2:
|
||||
resolution: {integrity: sha512-kyuRfGE+yiSJWzSO3t74rXxdZNdYfLcllO0IUha4eX1fl40pm9L02Q/TEc3mykTLjoWz4STBNwYnUWdFu3I0DA==}
|
||||
dependencies:
|
||||
'@types/node': 20.8.10
|
||||
'@types/node': 20.12.7
|
||||
'@types/picomatch': 2.3.3
|
||||
'@types/streamx': 2.9.5
|
||||
dev: true
|
||||
|
@ -1545,14 +1553,14 @@ packages:
|
|||
resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==}
|
||||
dependencies:
|
||||
'@types/minimatch': 5.1.2
|
||||
'@types/node': 20.8.10
|
||||
'@types/node': 20.12.7
|
||||
dev: true
|
||||
|
||||
/@types/gulp-rename@2.0.2:
|
||||
resolution: {integrity: sha512-CQsXqTVtAXqrPd4IbrrlJEEzRkUR3RXsyZbrVoOVqjlchDDmnyRDatAUisjpQjjCg/wjJrSiNg8T1uAbJ/7Qqg==}
|
||||
dependencies:
|
||||
'@types/node': 20.8.10
|
||||
'@types/vinyl': 2.0.11
|
||||
'@types/node': 20.12.7
|
||||
'@types/vinyl': 2.0.12
|
||||
dev: true
|
||||
|
||||
/@types/gulp-rename@2.0.6:
|
||||
|
@ -1612,12 +1620,6 @@ packages:
|
|||
resolution: {integrity: sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==}
|
||||
dev: true
|
||||
|
||||
/@types/node@20.12.5:
|
||||
resolution: {integrity: sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw==}
|
||||
dependencies:
|
||||
undici-types: 5.26.5
|
||||
dev: true
|
||||
|
||||
/@types/node@20.12.7:
|
||||
resolution: {integrity: sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==}
|
||||
dependencies:
|
||||
|
@ -1663,7 +1665,7 @@ packages:
|
|||
/@types/streamx@2.9.5:
|
||||
resolution: {integrity: sha512-IHYsa6jYrck8VEdSwpY141FTTf6D7boPeMq9jy4qazNrFMA4VbRz/sw5LSsfR7jwdDcx0QKWkUexZvsWBC2eIQ==}
|
||||
dependencies:
|
||||
'@types/node': 20.8.10
|
||||
'@types/node': 20.12.7
|
||||
dev: true
|
||||
|
||||
/@types/throttle-debounce@5.0.0:
|
||||
|
@ -1681,7 +1683,7 @@ packages:
|
|||
/@types/undertaker@1.2.11:
|
||||
resolution: {integrity: sha512-j1Z0V2ByRHr8ZK7eOeGq0LGkkdthNFW0uAZGY22iRkNQNL9/vAV0yFPr1QN3FM/peY5bxs9P+1f0PYJTQVa5iA==}
|
||||
dependencies:
|
||||
'@types/node': 20.12.5
|
||||
'@types/node': 20.12.7
|
||||
'@types/undertaker-registry': 1.0.4
|
||||
async-done: 1.3.2
|
||||
dev: true
|
||||
|
@ -1694,8 +1696,8 @@ packages:
|
|||
resolution: {integrity: sha512-ckYz9giHgV6U10RFuf9WsDQ3X86EFougapxHmmoxLK7e6ICQqO8CE+4V/3lBN148V5N1pb4nQMmMjyScleVsig==}
|
||||
dependencies:
|
||||
'@types/glob-stream': 8.0.2
|
||||
'@types/node': 20.12.5
|
||||
'@types/vinyl': 2.0.11
|
||||
'@types/node': 20.12.7
|
||||
'@types/vinyl': 2.0.12
|
||||
dev: true
|
||||
|
||||
/@types/vinyl@2.0.11:
|
||||
|
@ -1705,6 +1707,13 @@ packages:
|
|||
'@types/node': 20.8.10
|
||||
dev: true
|
||||
|
||||
/@types/vinyl@2.0.12:
|
||||
resolution: {integrity: sha512-Sr2fYMBUVGYq8kj3UthXFAu5UN6ZW+rYr4NACjZQJvHvj+c8lYv0CahmZ2P/r7iUkN44gGUBwqxZkrKXYPb7cw==}
|
||||
dependencies:
|
||||
'@types/expect': 1.20.4
|
||||
'@types/node': 20.12.7
|
||||
dev: true
|
||||
|
||||
/@types/web-bluetooth@0.0.20:
|
||||
resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==}
|
||||
dev: true
|
||||
|
@ -1730,97 +1739,97 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@vitejs/plugin-vue@5.0.4(vite@5.2.8)(vue@3.4.21):
|
||||
/@vitejs/plugin-vue@5.0.4(vite@5.2.10)(vue@3.4.26):
|
||||
resolution: {integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
peerDependencies:
|
||||
vite: ^5.0.0
|
||||
vue: ^3.2.25
|
||||
dependencies:
|
||||
vite: 5.2.8(@types/node@20.8.10)(sass@1.62.1)
|
||||
vue: 3.4.21(typescript@5.4.4)
|
||||
vite: 5.2.10(@types/node@20.12.7)(sass@1.62.1)
|
||||
vue: 3.4.26(typescript@5.4.5)
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-core@3.4.21:
|
||||
resolution: {integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==}
|
||||
/@vue/compiler-core@3.4.26:
|
||||
resolution: {integrity: sha512-N9Vil6Hvw7NaiyFUFBPXrAyETIGlQ8KcFMkyk6hW1Cl6NvoqvP+Y8p1Eqvx+UdqsnrnI9+HMUEJegzia3mhXmQ==}
|
||||
dependencies:
|
||||
'@babel/parser': 7.24.4
|
||||
'@vue/shared': 3.4.21
|
||||
'@vue/shared': 3.4.26
|
||||
entities: 4.5.0
|
||||
estree-walker: 2.0.2
|
||||
source-map-js: 1.2.0
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-dom@3.4.21:
|
||||
resolution: {integrity: sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA==}
|
||||
/@vue/compiler-dom@3.4.26:
|
||||
resolution: {integrity: sha512-4CWbR5vR9fMg23YqFOhr6t6WB1Fjt62d6xdFPyj8pxrYub7d+OgZaObMsoxaF9yBUHPMiPFK303v61PwAuGvZA==}
|
||||
dependencies:
|
||||
'@vue/compiler-core': 3.4.21
|
||||
'@vue/shared': 3.4.21
|
||||
'@vue/compiler-core': 3.4.26
|
||||
'@vue/shared': 3.4.26
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-sfc@3.4.21:
|
||||
resolution: {integrity: sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ==}
|
||||
/@vue/compiler-sfc@3.4.26:
|
||||
resolution: {integrity: sha512-It1dp+FAOCgluYSVYlDn5DtZBxk1NCiJJfu2mlQqa/b+k8GL6NG/3/zRbJnHdhV2VhxFghaDq5L4K+1dakW6cw==}
|
||||
dependencies:
|
||||
'@babel/parser': 7.24.4
|
||||
'@vue/compiler-core': 3.4.21
|
||||
'@vue/compiler-dom': 3.4.21
|
||||
'@vue/compiler-ssr': 3.4.21
|
||||
'@vue/shared': 3.4.21
|
||||
'@vue/compiler-core': 3.4.26
|
||||
'@vue/compiler-dom': 3.4.26
|
||||
'@vue/compiler-ssr': 3.4.26
|
||||
'@vue/shared': 3.4.26
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.30.9
|
||||
magic-string: 0.30.10
|
||||
postcss: 8.4.38
|
||||
source-map-js: 1.2.0
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-ssr@3.4.21:
|
||||
resolution: {integrity: sha512-M5+9nI2lPpAsgXOGQobnIueVqc9sisBFexh5yMIMRAPYLa7+5wEJs8iqOZc1WAa9WQbx9GR2twgznU8LTIiZ4Q==}
|
||||
/@vue/compiler-ssr@3.4.26:
|
||||
resolution: {integrity: sha512-FNwLfk7LlEPRY/g+nw2VqiDKcnDTVdCfBREekF8X74cPLiWHUX6oldktf/Vx28yh4STNy7t+/yuLoMBBF7YDiQ==}
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.4.21
|
||||
'@vue/shared': 3.4.21
|
||||
'@vue/compiler-dom': 3.4.26
|
||||
'@vue/shared': 3.4.26
|
||||
dev: true
|
||||
|
||||
/@vue/reactivity@3.4.21:
|
||||
resolution: {integrity: sha512-UhenImdc0L0/4ahGCyEzc/pZNwVgcglGy9HVzJ1Bq2Mm9qXOpP8RyNTjookw/gOCUlXSEtuZ2fUg5nrHcoqJcw==}
|
||||
/@vue/reactivity@3.4.26:
|
||||
resolution: {integrity: sha512-E/ynEAu/pw0yotJeLdvZEsp5Olmxt+9/WqzvKff0gE67tw73gmbx6tRkiagE/eH0UCubzSlGRebCbidB1CpqZQ==}
|
||||
dependencies:
|
||||
'@vue/shared': 3.4.21
|
||||
'@vue/shared': 3.4.26
|
||||
dev: true
|
||||
|
||||
/@vue/runtime-core@3.4.21:
|
||||
resolution: {integrity: sha512-pQthsuYzE1XcGZznTKn73G0s14eCJcjaLvp3/DKeYWoFacD9glJoqlNBxt3W2c5S40t6CCcpPf+jG01N3ULyrA==}
|
||||
/@vue/runtime-core@3.4.26:
|
||||
resolution: {integrity: sha512-AFJDLpZvhT4ujUgZSIL9pdNcO23qVFh7zWCsNdGQBw8ecLNxOOnPcK9wTTIYCmBJnuPHpukOwo62a2PPivihqw==}
|
||||
dependencies:
|
||||
'@vue/reactivity': 3.4.21
|
||||
'@vue/shared': 3.4.21
|
||||
'@vue/reactivity': 3.4.26
|
||||
'@vue/shared': 3.4.26
|
||||
dev: true
|
||||
|
||||
/@vue/runtime-dom@3.4.21:
|
||||
resolution: {integrity: sha512-gvf+C9cFpevsQxbkRBS1NpU8CqxKw0ebqMvLwcGQrNpx6gqRDodqKqA+A2VZZpQ9RpK2f9yfg8VbW/EpdFUOJw==}
|
||||
/@vue/runtime-dom@3.4.26:
|
||||
resolution: {integrity: sha512-UftYA2hUXR2UOZD/Fc3IndZuCOOJgFxJsWOxDkhfVcwLbsfh2CdXE2tG4jWxBZuDAs9J9PzRTUFt1PgydEtItw==}
|
||||
dependencies:
|
||||
'@vue/runtime-core': 3.4.21
|
||||
'@vue/shared': 3.4.21
|
||||
'@vue/runtime-core': 3.4.26
|
||||
'@vue/shared': 3.4.26
|
||||
csstype: 3.1.3
|
||||
dev: true
|
||||
|
||||
/@vue/server-renderer@3.4.21(vue@3.4.21):
|
||||
resolution: {integrity: sha512-aV1gXyKSN6Rz+6kZ6kr5+Ll14YzmIbeuWe7ryJl5muJ4uwSwY/aStXTixx76TwkZFJLm1aAlA/HSWEJ4EyiMkg==}
|
||||
/@vue/server-renderer@3.4.26(vue@3.4.26):
|
||||
resolution: {integrity: sha512-xoGAqSjYDPGAeRWxeoYwqJFD/gw7mpgzOvSxEmjWaFO2rE6qpbD1PC172YRpvKhrihkyHJkNDADFXTfCyVGhKw==}
|
||||
peerDependencies:
|
||||
vue: 3.4.21
|
||||
vue: 3.4.26
|
||||
dependencies:
|
||||
'@vue/compiler-ssr': 3.4.21
|
||||
'@vue/shared': 3.4.21
|
||||
vue: 3.4.21(typescript@5.4.4)
|
||||
'@vue/compiler-ssr': 3.4.26
|
||||
'@vue/shared': 3.4.26
|
||||
vue: 3.4.26(typescript@5.4.5)
|
||||
dev: true
|
||||
|
||||
/@vue/shared@3.4.21:
|
||||
resolution: {integrity: sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==}
|
||||
/@vue/shared@3.4.26:
|
||||
resolution: {integrity: sha512-Fg4zwR0GNnjzodMt3KRy2AWGMKQXByl56+4HjN87soxLNU9P5xcJkstAlIeEF3cU6UYOzmJl1tV0dVPGIljCnQ==}
|
||||
dev: true
|
||||
|
||||
/@vueuse/core@10.9.0(vue@3.4.21):
|
||||
/@vueuse/core@10.9.0(vue@3.4.26):
|
||||
resolution: {integrity: sha512-/1vjTol8SXnx6xewDEKfS0Ra//ncg4Hb0DaZiwKf7drgfMsKFExQ+FnnENcN6efPen+1kIzhLQoGSy0eDUVOMg==}
|
||||
dependencies:
|
||||
'@types/web-bluetooth': 0.0.20
|
||||
'@vueuse/metadata': 10.9.0
|
||||
'@vueuse/shared': 10.9.0(vue@3.4.21)
|
||||
vue-demi: 0.14.7(vue@3.4.21)
|
||||
'@vueuse/shared': 10.9.0(vue@3.4.26)
|
||||
vue-demi: 0.14.7(vue@3.4.26)
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
|
@ -1830,10 +1839,10 @@ packages:
|
|||
resolution: {integrity: sha512-iddNbg3yZM0X7qFY2sAotomgdHK7YJ6sKUvQqbvwnf7TmaVPxS4EJydcNsVejNdS8iWCtDk+fYXr7E32nyTnGA==}
|
||||
dev: true
|
||||
|
||||
/@vueuse/shared@10.9.0(vue@3.4.21):
|
||||
/@vueuse/shared@10.9.0(vue@3.4.26):
|
||||
resolution: {integrity: sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==}
|
||||
dependencies:
|
||||
vue-demi: 0.14.7(vue@3.4.21)
|
||||
vue-demi: 0.14.7(vue@3.4.26)
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
|
@ -2818,8 +2827,8 @@ packages:
|
|||
/cropperjs@2.0.0-beta.2:
|
||||
resolution: {integrity: sha512-jDRSODDGKmi9vp3p/+WXkxMqV/AE+GpSld1U3cHZDRdLy9UykRzurSe8k1dR0TExn45ygCMrv31qkg+K3EeXXw==}
|
||||
dependencies:
|
||||
'@cropper/elements': 2.0.0-beta.4
|
||||
'@cropper/utils': 2.0.0-beta.4
|
||||
'@cropper/elements': 2.0.0-beta.5
|
||||
'@cropper/utils': 2.0.0-beta.5
|
||||
dev: true
|
||||
|
||||
/cross-env@7.0.3:
|
||||
|
@ -2927,7 +2936,7 @@ packages:
|
|||
cli-table3: 0.6.4
|
||||
commander: 5.1.0
|
||||
common-tags: 1.8.2
|
||||
dayjs: 1.11.10
|
||||
dayjs: 1.11.11
|
||||
debug: 4.3.4(supports-color@8.1.1)
|
||||
enquirer: 2.4.1
|
||||
eventemitter2: 6.4.7
|
||||
|
@ -2969,8 +2978,8 @@ packages:
|
|||
'@babel/runtime': 7.24.4
|
||||
dev: true
|
||||
|
||||
/dayjs@1.11.10:
|
||||
resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==}
|
||||
/dayjs@1.11.11:
|
||||
resolution: {integrity: sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==}
|
||||
dev: true
|
||||
|
||||
/debug@3.2.7(supports-color@8.1.1):
|
||||
|
@ -3523,14 +3532,14 @@ packages:
|
|||
deprecated: flatten is deprecated in favor of utility frameworks such as lodash.
|
||||
dev: true
|
||||
|
||||
/focus-trap-vue@4.0.3(focus-trap@7.5.4)(vue@3.4.21):
|
||||
/focus-trap-vue@4.0.3(focus-trap@7.5.4)(vue@3.4.26):
|
||||
resolution: {integrity: sha512-cIX5rybkCAlNZ4IHYJ3nCFIsipDDljJHHjtTO2IgYWkVYg7X9ipUVdab3HzYp88kmHgMwjcB71LYnXRRsF6ZqQ==}
|
||||
peerDependencies:
|
||||
focus-trap: ^7.0.0
|
||||
vue: ^3.0.0
|
||||
dependencies:
|
||||
focus-trap: 7.5.4
|
||||
vue: 3.4.21(typescript@5.4.4)
|
||||
vue: 3.4.26(typescript@5.4.5)
|
||||
dev: true
|
||||
|
||||
/focus-trap@7.5.4:
|
||||
|
@ -4510,9 +4519,8 @@ packages:
|
|||
dependencies:
|
||||
yallist: 4.0.0
|
||||
|
||||
/magic-string@0.30.9:
|
||||
resolution: {integrity: sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==}
|
||||
engines: {node: '>=12'}
|
||||
/magic-string@0.30.10:
|
||||
resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==}
|
||||
dependencies:
|
||||
'@jridgewell/sourcemap-codec': 1.4.15
|
||||
dev: true
|
||||
|
@ -5588,28 +5596,29 @@ packages:
|
|||
seedrandom: 2.4.2
|
||||
dev: true
|
||||
|
||||
/rollup@4.14.1:
|
||||
resolution: {integrity: sha512-4LnHSdd3QK2pa1J6dFbfm1HN0D7vSK/ZuZTsdyUAlA6Rr1yTouUTL13HaDOGJVgby461AhrNGBS7sCGXXtT+SA==}
|
||||
/rollup@4.17.1:
|
||||
resolution: {integrity: sha512-0gG94inrUtg25sB2V/pApwiv1lUb0bQ25FPNuzO89Baa+B+c0ccaaBKM5zkZV/12pUUdH+lWCSm9wmHqyocuVQ==}
|
||||
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@types/estree': 1.0.5
|
||||
optionalDependencies:
|
||||
'@rollup/rollup-android-arm-eabi': 4.14.1
|
||||
'@rollup/rollup-android-arm64': 4.14.1
|
||||
'@rollup/rollup-darwin-arm64': 4.14.1
|
||||
'@rollup/rollup-darwin-x64': 4.14.1
|
||||
'@rollup/rollup-linux-arm-gnueabihf': 4.14.1
|
||||
'@rollup/rollup-linux-arm64-gnu': 4.14.1
|
||||
'@rollup/rollup-linux-arm64-musl': 4.14.1
|
||||
'@rollup/rollup-linux-powerpc64le-gnu': 4.14.1
|
||||
'@rollup/rollup-linux-riscv64-gnu': 4.14.1
|
||||
'@rollup/rollup-linux-s390x-gnu': 4.14.1
|
||||
'@rollup/rollup-linux-x64-gnu': 4.14.1
|
||||
'@rollup/rollup-linux-x64-musl': 4.14.1
|
||||
'@rollup/rollup-win32-arm64-msvc': 4.14.1
|
||||
'@rollup/rollup-win32-ia32-msvc': 4.14.1
|
||||
'@rollup/rollup-win32-x64-msvc': 4.14.1
|
||||
'@rollup/rollup-android-arm-eabi': 4.17.1
|
||||
'@rollup/rollup-android-arm64': 4.17.1
|
||||
'@rollup/rollup-darwin-arm64': 4.17.1
|
||||
'@rollup/rollup-darwin-x64': 4.17.1
|
||||
'@rollup/rollup-linux-arm-gnueabihf': 4.17.1
|
||||
'@rollup/rollup-linux-arm-musleabihf': 4.17.1
|
||||
'@rollup/rollup-linux-arm64-gnu': 4.17.1
|
||||
'@rollup/rollup-linux-arm64-musl': 4.17.1
|
||||
'@rollup/rollup-linux-powerpc64le-gnu': 4.17.1
|
||||
'@rollup/rollup-linux-riscv64-gnu': 4.17.1
|
||||
'@rollup/rollup-linux-s390x-gnu': 4.17.1
|
||||
'@rollup/rollup-linux-x64-gnu': 4.17.1
|
||||
'@rollup/rollup-linux-x64-musl': 4.17.1
|
||||
'@rollup/rollup-win32-arm64-msvc': 4.17.1
|
||||
'@rollup/rollup-win32-ia32-msvc': 4.17.1
|
||||
'@rollup/rollup-win32-x64-msvc': 4.17.1
|
||||
fsevents: 2.3.3
|
||||
dev: true
|
||||
|
||||
|
@ -6331,7 +6340,7 @@ packages:
|
|||
yn: 3.1.1
|
||||
dev: true
|
||||
|
||||
/ts-node@10.9.2(@types/node@20.8.10)(typescript@5.4.5):
|
||||
/ts-node@10.9.2(@types/node@20.12.7)(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
|
@ -6350,7 +6359,7 @@ packages:
|
|||
'@tsconfig/node12': 1.0.11
|
||||
'@tsconfig/node14': 1.0.3
|
||||
'@tsconfig/node16': 1.0.4
|
||||
'@types/node': 20.8.10
|
||||
'@types/node': 20.12.7
|
||||
acorn: 8.11.3
|
||||
acorn-walk: 8.3.2
|
||||
arg: 4.1.3
|
||||
|
@ -6605,8 +6614,8 @@ packages:
|
|||
extsprintf: 1.3.0
|
||||
dev: true
|
||||
|
||||
/vidstack@1.11.12:
|
||||
resolution: {integrity: sha512-iGGMzn+lfsElfOOsgSwSICFAp4N8j/16zAODwffq2E1rUUZMCAnGXkmVsKON65zXE8haPVSk4jpm03FEnYLCzQ==}
|
||||
/vidstack@1.11.21:
|
||||
resolution: {integrity: sha512-DtsbT8zsLUCF27vRheFLEnpUzy0TsLzIt2EqiZyYvwho7nKgiVR32GuJVKRj9BTj80SSRxzLQ0/tx99fum6Rmw==}
|
||||
engines: {node: '>=18'}
|
||||
dependencies:
|
||||
media-captions: 1.0.3
|
||||
|
@ -6670,7 +6679,7 @@ packages:
|
|||
teex: 1.0.1
|
||||
dev: true
|
||||
|
||||
/vite-plugin-compression@0.5.1(vite@5.2.8):
|
||||
/vite-plugin-compression@0.5.1(vite@5.2.10):
|
||||
resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==}
|
||||
peerDependencies:
|
||||
vite: '>=2.0.0'
|
||||
|
@ -6678,13 +6687,13 @@ packages:
|
|||
chalk: 4.1.2
|
||||
debug: 4.3.4(supports-color@8.1.1)
|
||||
fs-extra: 10.1.0
|
||||
vite: 5.2.8(@types/node@20.8.10)(sass@1.62.1)
|
||||
vite: 5.2.10(@types/node@20.12.7)(sass@1.62.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/vite@5.2.8(@types/node@20.8.10)(sass@1.62.1):
|
||||
resolution: {integrity: sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==}
|
||||
/vite@5.2.10(@types/node@20.12.7)(sass@1.62.1):
|
||||
resolution: {integrity: sha512-PAzgUZbP7msvQvqdSD+ErD5qGnSFiGOoWmV5yAKUEI0kdhjbH6nMWVyZQC/hSc4aXwc0oJ9aEdIiF9Oje0JFCw==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
|
@ -6711,20 +6720,20 @@ packages:
|
|||
terser:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@types/node': 20.8.10
|
||||
'@types/node': 20.12.7
|
||||
esbuild: 0.20.2
|
||||
postcss: 8.4.38
|
||||
rollup: 4.14.1
|
||||
rollup: 4.17.1
|
||||
sass: 1.62.1
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.3
|
||||
dev: true
|
||||
|
||||
/vue-component-type-helpers@2.0.11:
|
||||
resolution: {integrity: sha512-8aluKz5oVC8PvVQAYgyIefOlqzKVmAOTCx2imbrFBVLbF7mnJvyMsE2A7rqX/4f4uT6ee9o8u3GcoRpUWc0xsw==}
|
||||
/vue-component-type-helpers@2.0.14:
|
||||
resolution: {integrity: sha512-DInfgOyXlMyliyqAAD9frK28tTfch0+tMi4qoWJcZlRxUf+NFAtraJBnAsKLep+FOyLMiajkhfyEb3xLK08i7w==}
|
||||
dev: true
|
||||
|
||||
/vue-demi@0.14.7(vue@3.4.21):
|
||||
/vue-demi@0.14.7(vue@3.4.26):
|
||||
resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==}
|
||||
engines: {node: '>=12'}
|
||||
hasBin: true
|
||||
|
@ -6736,7 +6745,7 @@ packages:
|
|||
'@vue/composition-api':
|
||||
optional: true
|
||||
dependencies:
|
||||
vue: 3.4.21(typescript@5.4.4)
|
||||
vue: 3.4.26(typescript@5.4.5)
|
||||
dev: true
|
||||
|
||||
/vue-isyourpasswordsafe@2.0.0:
|
||||
|
@ -6745,38 +6754,38 @@ packages:
|
|||
sha1: 1.1.1
|
||||
dev: true
|
||||
|
||||
/vue3-otp-input@0.4.4(vue@3.4.21):
|
||||
/vue3-otp-input@0.4.4(vue@3.4.26):
|
||||
resolution: {integrity: sha512-LI1MeBiiEy59cnjqXzlcz4G4cMxZcHF/xOKilb6sfw4uFHfQ22Luu2ls0Bb51zL0pb3gGp7RuIL5eurEJXkoBg==}
|
||||
engines: {node: '>=16.0.0', npm: '>=8.0.0'}
|
||||
peerDependencies:
|
||||
vue: ^3.0.*
|
||||
dependencies:
|
||||
vue: 3.4.21(typescript@5.4.4)
|
||||
vue: 3.4.26(typescript@5.4.5)
|
||||
dev: true
|
||||
|
||||
/vue@3.4.21(typescript@5.4.4):
|
||||
resolution: {integrity: sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA==}
|
||||
/vue@3.4.26(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-bUIq/p+VB+0xrJubaemrfhk1/FiW9iX+pDV+62I/XJ6EkspAO9/DXEjbDFoe8pIfOZBqfk45i9BMc41ptP/uRg==}
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.4.21
|
||||
'@vue/compiler-sfc': 3.4.21
|
||||
'@vue/runtime-dom': 3.4.21
|
||||
'@vue/server-renderer': 3.4.21(vue@3.4.21)
|
||||
'@vue/shared': 3.4.21
|
||||
typescript: 5.4.4
|
||||
'@vue/compiler-dom': 3.4.26
|
||||
'@vue/compiler-sfc': 3.4.26
|
||||
'@vue/runtime-dom': 3.4.26
|
||||
'@vue/server-renderer': 3.4.26(vue@3.4.26)
|
||||
'@vue/shared': 3.4.26
|
||||
typescript: 5.4.5
|
||||
dev: true
|
||||
|
||||
/vuedraggable@4.1.0(vue@3.4.21):
|
||||
/vuedraggable@4.1.0(vue@3.4.26):
|
||||
resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
|
||||
peerDependencies:
|
||||
vue: ^3.0.1
|
||||
dependencies:
|
||||
sortablejs: 1.14.0
|
||||
vue: 3.4.21(typescript@5.4.4)
|
||||
vue: 3.4.26(typescript@5.4.5)
|
||||
dev: true
|
||||
|
||||
/wait-on@6.0.1(debug@4.3.4):
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
use crate::web::ApiError;
|
||||
use cached::{Cached, TimedCache};
|
||||
use magnetar_common::config::MagnetarConfig;
|
||||
use magnetar_model::{
|
||||
ck, CalckeyCache, CalckeyCacheError, CalckeyDbError, CalckeyModel, CalckeySub,
|
||||
InternalStreamMessage, SubMessage,
|
||||
};
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
|
||||
use cached::{Cached, TimedCache};
|
||||
use strum::EnumVariantNames;
|
||||
use thiserror::Error;
|
||||
use tokio::sync::Mutex;
|
||||
use tracing::error;
|
||||
|
||||
use magnetar_common::config::MagnetarConfig;
|
||||
use magnetar_model::{
|
||||
CalckeyCache, CalckeyCacheError, CalckeyDbError, CalckeyModel, CalckeySub, ck,
|
||||
InternalStreamMessage, SubMessage,
|
||||
};
|
||||
|
||||
use crate::web::ApiError;
|
||||
|
||||
#[derive(Debug, Error, EnumVariantNames)]
|
||||
pub enum UserCacheError {
|
||||
#[error("Database error: {0}")]
|
||||
|
@ -37,7 +40,6 @@ struct LocalUserCache {
|
|||
lifetime: TimedCache<String, ()>,
|
||||
id_to_user: HashMap<String, Arc<ck::user::Model>>,
|
||||
token_to_user: HashMap<String, Arc<ck::user::Model>>,
|
||||
uri_to_user: HashMap<String, Arc<ck::user::Model>>,
|
||||
}
|
||||
|
||||
impl LocalUserCache {
|
||||
|
@ -50,9 +52,6 @@ impl LocalUserCache {
|
|||
if let Some(token) = user.token.clone() {
|
||||
self.token_to_user.remove(&token);
|
||||
}
|
||||
if let Some(uri) = user.uri.clone() {
|
||||
self.uri_to_user.remove(&uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,10 +65,6 @@ impl LocalUserCache {
|
|||
if let Some(token) = user.token.clone() {
|
||||
self.token_to_user.insert(token, user.clone());
|
||||
}
|
||||
|
||||
if let Some(uri) = user.uri.clone() {
|
||||
self.uri_to_user.insert(uri, user);
|
||||
}
|
||||
}
|
||||
|
||||
/// Low-priority refresh. Only refreshes the cache if the user is not there.
|
||||
|
@ -105,19 +100,6 @@ impl LocalUserCache {
|
|||
|
||||
None
|
||||
}
|
||||
|
||||
fn get_by_uri(&mut self, uri: &str) -> Option<Arc<ck::user::Model>> {
|
||||
if let Some(user) = self.uri_to_user.get(uri).cloned() {
|
||||
if self.lifetime.cache_get(&user.id).is_none() {
|
||||
self.purge(&user);
|
||||
return None;
|
||||
}
|
||||
|
||||
return Some(user);
|
||||
}
|
||||
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
pub struct LocalUserCacheService {
|
||||
|
@ -137,7 +119,6 @@ impl LocalUserCacheService {
|
|||
lifetime: TimedCache::with_lifespan(60 * 5),
|
||||
id_to_user: HashMap::new(),
|
||||
token_to_user: HashMap::new(),
|
||||
uri_to_user: HashMap::new(),
|
||||
}));
|
||||
|
||||
let cache_clone = cache.clone();
|
||||
|
@ -213,21 +194,6 @@ impl LocalUserCacheService {
|
|||
.await
|
||||
}
|
||||
|
||||
pub async fn get_by_uri(
|
||||
&self,
|
||||
uri: &str,
|
||||
) -> Result<Option<Arc<ck::user::Model>>, UserCacheError> {
|
||||
let result = self.cache.lock().await.get_by_uri(uri);
|
||||
|
||||
if let Some(user) = result {
|
||||
return Ok(Some(user));
|
||||
}
|
||||
|
||||
let user = self.db.get_user_by_uri(uri).await?;
|
||||
|
||||
self.map_cache_user(user).await
|
||||
}
|
||||
|
||||
pub async fn get_by_id(
|
||||
&self,
|
||||
id: &str,
|
||||
|
|
Loading…
Reference in New Issue